package
0.1.1
Repository: https://github.com/zaporter/go-update-mongo.git
Documentation: pkg.go.dev

# Packages

Package fjson provides converters to FJSON (JSON with some extensions) for built-in and `types` types.

# Functions

Compare compares any BSON values in the same way as MongoDB does it for filtering.
CompareForAggregation compares bson values.
CompareOrder detects the data type for two values and compares them.
CompareOrderForOperator detects the data type for two values and compares them.
CompareOrderForSort detects the data type for two values and compares them.
ConvertDocument converts bson.Document to *types.Document.
FormatAnyValue formats BSON value for error message output.
Identical returns true if a and b are the same type and has the same value.
IsConflictPath returns PathError error if adding a path creates conflict at any of paths.
MakeArray creates an empty array with set capacity.
MakeDocument creates an empty document with set capacity.
NewArray creates an array with the given values.
NewDocument creates a document with the given key/value pairs.
NewObjectID returns a new ObjectID.
NewPathFromString returns Path from a given dot notation.
NewStaticPath returns Path from a strings slice.
NewTimestamp returns the timestamp for the given time and counter values.
NextTimestamp returns the next timestamp for the given time value.
RemoveByPath removes document by path, doing nothing if the key does not exist.

# Constants

Ascending is used for sort in ascending order.
encrypted.
function.
generic.
generic-old.
md5.
user.
uuid.
uuid-old.
Descending is used for sort in descending order.
==.
ErrIDNotFound indicates that _id field is not found.
ErrPathCannotAccess indicates that path couldn't be accessed.
ErrPathCannotCreateField indicates that it's impossible to create a specific field.
ErrPathConflictCollision indicates a path creates collision at another path.
ErrPathConflictOverwrite indicates a path overwrites another path.
ErrPathElementEmpty indicates that provided path contains an empty element.
ErrPathElementInvalid indicates that provided path contains an invalid element (other than empty).
ErrPathIndexInvalid indicates that provided array index is invalid.
ErrPathIndexOutOfBound indicates that provided array index is out of bound.
ErrPathKeyNotFound indicates that key was not found in document.
ErrValidation indicates that document is invalid.
ErrWrongIDType indicates that _id field is invalid.
>.
<.
16 MiB = 16777216 bytes.
52bit mantissa max value = 9007199254740991.
ObjectIDLen is an ObjectID length in bytes.

# Variables

ErrInvalidClassRange indicates that range out of order in character class.
ErrInvalidEscape indicates invalid escape errors.
ErrInvalidRepeatSize indicates that the regular expression is too large.
ErrMissingBracket indicates missing terminating ] for character class.
ErrMissingParen indicates missing parentheses in regex expression.
ErrMissingTerminator indicates syntax error in subpattern name (missing terminator).
ErrNothingToRepeat indicates invalid regex: nothing to repeat.
ErrOptionNotImplemented indicates unimplemented regex option.
ErrTrailingBackslash indicates \\ at end of the pattern.
ErrUnmatchedParentheses indicates unmatched parentheses.
ErrUnsupportedPerlOp indicates unrecognized character after the grouping sequence start.
Null represents BSON value Null.

# Structs

Array represents BSON array: an ordered collection of BSON values, accessed by 0-based indexes.
Binary represents BSON type Binary.
Document represents BSON document: an ordered collection of fields (key/value pairs where key is a string and value is any BSON value).
No description provided by the author
Path represents a parsed dot notation - a sequence of elements (document keys and array indexes) separated by dots.
PathError describes an error that could occur on path related operations.
Regex represents BSON type Regex.
ValidationError describes an error that could occur when validating a document.

# Interfaces

CompositeType represents composite type - *Document or *Array.
CompositeTypeInterface consists of Document and Array.
ScalarType represents scalar type.
Type represents any BSON type (scalar or composite).

# Type aliases

BinarySubtype represents BSON Binary's subtype.
CompareResult represents the result of a comparison.
ObjectID represents BSON type ObjectID.
PathErrorCode represents PathError code.
SortType represents sort type for $sort aggregation.
Timestamp represents BSON type Timestamp.
ValidationErrorCode represents ValidationData error code.