Syntactic sugar for the Java driver's BsonDocument class.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
object allobject bsondocument
Members list
Type members
Classlikes
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
BsonDocument.type
Types
Extensions
Extensions
Append an optional value with the given key to the document.
Append an optional value with the given key to the document.
Value parameters
- key
-
The key field
- valueOpt
-
An Option BsonValue(@see org.bson.BsonValue), only if the value is defined then the key value pair will be inserted into the BsonDocument
Attributes
- Returns
-
this BsonDocument
Read the value from the BsonDocument using the key. If the key does not exist or the type of the value is not as expected, None will be returned
Read the value from the BsonDocument using the key. If the key does not exist or the type of the value is not as expected, None will be returned
Type parameters
- T
-
the type parameter for the expected value
Value parameters
- key
-
The key field
Attributes
- Returns
-
optional value of type T
If the value is not None, the key value pair will be inserted into the BsonDocument. If the value is None, then the key field is going to be removed from the BsonDocument
If the value is not None, the key value pair will be inserted into the BsonDocument. If the value is None, then the key field is going to be removed from the BsonDocument
Value parameters
- key
-
The key field
- value
-
An Option BsonValue(@see org.bson.BsonValue)
Attributes
- Returns
-
this BsonDocument