Document is a collection type that uses a BSON document as storage.
-As such, it can be stored in a file or instantiated from BSON data.
-
-
Documents behave partially like an array, and partially like a dictionary.
-For general information about BSON documents, see http://bsonspec.org/spec.html
BSON values can be compared using the ==, ===, <, >, <= and >= operators. When comparing values, the sort order as specified in the MongoDB documentation is used.
regularExpression: Regular expression with regex pattern and options string. Options are identified by characters, which must be stored in alphabetical order. Valid options are ‘i’ for case insensitive matching, ’m’ for multiline matching, ‘x’ for verbose mode, 'l’ to make \w, \W, etc. locale dependent, ’s’ for dotall mode (’.’ matches everything), and 'u’ to make \w, \W, etc. match unicode.
-
javascriptCode: JavaScript code
-
javascriptCodeWithScope: JavaScript code w/ scope
-
int32: 32-bit integer
-
timestamp: MongoBD internal timestamp type
-
int64: 64-bit integer
-
minKey: Internal MongoDB type with lowest sort order.
-
maxKey: Internal MongoDB type with highest sort order.
-
nothing: Internal OpenKitten BSON type to indicate that a value is not present.
BSON values can be compared using the ==, ===, <, >, <= and >= operators. When comparing values, the sort order as specified in the MongoDB documentation is used.
regularExpression: Regular expression with regex pattern and options string. Options are identified by characters, which must be stored in alphabetical order. Valid options are ‘i’ for case insensitive matching, ’m’ for multiline matching, ‘x’ for verbose mode, 'l’ to make \w, \W, etc. locale dependent, ’s’ for dotall mode (’.’ matches everything), and 'u’ to make \w, \W, etc. match unicode.
-
javascriptCode: JavaScript code
-
javascriptCodeWithScope: JavaScript code w/ scope
-
int32: 32-bit integer
-
timestamp: MongoBD internal timestamp type
-
int64: 64-bit integer
-
minKey: Internal MongoDB type with lowest sort order.
-
maxKey: Internal MongoDB type with highest sort order.
-
nothing: Internal OpenKitten BSON type to indicate that a value is not present.
BSON values can be compared using the ==, ===, <, >, <= and >= operators. When comparing values, the sort order as specified in the MongoDB documentation is used.
regularExpression: Regular expression with regex pattern and options string. Options are identified by characters, which must be stored in alphabetical order. Valid options are ‘i’ for case insensitive matching, ’m’ for multiline matching, ‘x’ for verbose mode, 'l’ to make \w, \W, etc. locale dependent, ’s’ for dotall mode (’.’ matches everything), and 'u’ to make \w, \W, etc. match unicode.
-
javascriptCode: JavaScript code
-
javascriptCodeWithScope: JavaScript code w/ scope
-
int32: 32-bit integer
-
timestamp: MongoBD internal timestamp type
-
int64: 64-bit integer
-
minKey: Internal MongoDB type with lowest sort order.
-
maxKey: Internal MongoDB type with highest sort order.
-
nothing: Internal OpenKitten BSON type to indicate that a value is not present.
Document is a collection type that uses a BSON document as storage.
-As such, it can be stored in a file or instantiated from BSON data.
-
-
Documents behave partially like an array, and partially like a dictionary.
-For general information about BSON documents, see http://bsonspec.org/spec.html
Document is a collection type that uses a BSON document as storage.
-As such, it can be stored in a file or instantiated from BSON data.
-
-
Documents behave partially like an array, and partially like a dictionary.
-For general information about BSON documents, see http://bsonspec.org/spec.html
Document is a collection type that uses a BSON document as storage.
-As such, it can be stored in a file or instantiated from BSON data.
-
-
Documents behave partially like an array, and partially like a dictionary.
-For general information about BSON documents, see http://bsonspec.org/spec.html
BSON values can be compared using the ==, ===, <, >, <= and >= operators. When comparing values, the sort order as specified in the MongoDB documentation is used.
regularExpression: Regular expression with regex pattern and options string. Options are identified by characters, which must be stored in alphabetical order. Valid options are ‘i’ for case insensitive matching, ’m’ for multiline matching, ‘x’ for verbose mode, 'l’ to make \w, \W, etc. locale dependent, ’s’ for dotall mode (’.’ matches everything), and 'u’ to make \w, \W, etc. match unicode.
-
javascriptCode: JavaScript code
-
javascriptCodeWithScope: JavaScript code w/ scope
-
int32: 32-bit integer
-
timestamp: MongoBD internal timestamp type
-
int64: 64-bit integer
-
minKey: Internal MongoDB type with lowest sort order.
-
maxKey: Internal MongoDB type with highest sort order.
-
nothing: Internal OpenKitten BSON type to indicate that a value is not present.
BSON values can be compared using the ==, ===, <, >, <= and >= operators. When comparing values, the sort order as specified in the MongoDB documentation is used.
regularExpression: Regular expression with regex pattern and options string. Options are identified by characters, which must be stored in alphabetical order. Valid options are ‘i’ for case insensitive matching, ’m’ for multiline matching, ‘x’ for verbose mode, 'l’ to make \w, \W, etc. locale dependent, ’s’ for dotall mode (’.’ matches everything), and 'u’ to make \w, \W, etc. match unicode.
-
javascriptCode: JavaScript code
-
javascriptCodeWithScope: JavaScript code w/ scope
-
int32: 32-bit integer
-
timestamp: MongoBD internal timestamp type
-
int64: 64-bit integer
-
minKey: Internal MongoDB type with lowest sort order.
-
maxKey: Internal MongoDB type with highest sort order.
-
nothing: Internal OpenKitten BSON type to indicate that a value is not present.
BSON values can be compared using the ==, ===, <, >, <= and >= operators. When comparing values, the sort order as specified in the MongoDB documentation is used.
regularExpression: Regular expression with regex pattern and options string. Options are identified by characters, which must be stored in alphabetical order. Valid options are ‘i’ for case insensitive matching, ’m’ for multiline matching, ‘x’ for verbose mode, 'l’ to make \w, \W, etc. locale dependent, ’s’ for dotall mode (’.’ matches everything), and 'u’ to make \w, \W, etc. match unicode.
-
javascriptCode: JavaScript code
-
javascriptCodeWithScope: JavaScript code w/ scope
-
int32: 32-bit integer
-
timestamp: MongoBD internal timestamp type
-
int64: 64-bit integer
-
minKey: Internal MongoDB type with lowest sort order.
-
maxKey: Internal MongoDB type with highest sort order.
-
nothing: Internal OpenKitten BSON type to indicate that a value is not present.
Document is a collection type that uses a BSON document as storage.
-As such, it can be stored in a file or instantiated from BSON data.
-
-
Documents behave partially like an array, and partially like a dictionary.
-For general information about BSON documents, see http://bsonspec.org/spec.html
Document is a collection type that uses a BSON document as storage.
-As such, it can be stored in a file or instantiated from BSON data.
-
-
Documents behave partially like an array, and partially like a dictionary.
-For general information about BSON documents, see http://bsonspec.org/spec.html
// Create a document using a dictionary literal
-letdocument:Document=[
- "hello":"I am a BSON document",
- "temperature":42.5
- ]
-
-// Retreive the BSON data, ready for storing or sending over the network
-letdata=document.bsonData// Array of [UInt8]
-
-// Initialize a document using a [UInt8]
-letsameDocument=try!Document(data:data)
-
-// Do something with the data
-lettemperature=document["temperature"].double
-
-// Use the temperature
-
-
Embedded documents
-
letdocument:Document=[
- "subdocument":["hello":"sample"],
- "anothersubdocument":[81.2,"cheese"]// an array is also an embedded document
- ]
-
-
Comparing
-
document["double"]==document["int64"]// true for .double(0) == .int64(0)
-document["double"]===document["int64"]// false for .double(0) === .int64(0)
-
// Create a document using a dictionary literal
-letdocument:Document=[
- "hello":"I am a BSON document",
- "temperature":42.5
- ]
-
-// Retreive the BSON data, ready for storing or sending over the network
-letdata=document.bsonData// Array of [UInt8]
-
-// Initialize a document using a [UInt8]
-letsameDocument=try!Document(data:data)
-
-// Do something with the data
-lettemperature=document["temperature"].double
-
-// Use the temperature
-
-
Embedded documents
-
letdocument:Document=[
- "subdocument":["hello":"sample"],
- "anothersubdocument":[81.2,"cheese"]// an array is also an embedded document
- ]
-
-
Comparing
-
document["double"]==document["int64"]// true for .double(0) == .int64(0)
-document["double"]===document["int64"]// false for .double(0) === .int64(0)
-