Alias for :~
or merge
Alias for add(doc: BSONDocument): BSONDocument
Alias for remove(names: String*)
Merge the produced elements with this set
Merge the produced elements with this set
The code indicating the BSON type for this value
The code indicating the BSON type for this value
Checks whether the given key is found in this element set.
Checks whether the given key is found in this element set.
the key to be found in the document
true if the key is found
Returns a Stream
for all the elements of this BSONDocument
.
Returns a Stream
for all the elements of this BSONDocument
.
Returns the BSONValue associated with the given key
.
Returns the BSONValue associated with the given key
.
If the key cannot be found, returns None
.
the key to be found in the document
Returns the BSONValue associated with the given key
, and converts it with the given implicit BSONReader.
Returns the BSONValue associated with the given key
, and converts it with the given implicit BSONReader.
If there is no matching value, or the value could not be deserialized or converted, returns a None
.
the key to be found in the document
When implementing a custom reader, getAsTry must be preferred.
Returns the BSONValue associated with the given key
, and converts it with the given implicit BSONReader.
Returns the BSONValue associated with the given key
, and converts it with the given implicit BSONReader.
If there is no matching value, or the value could not be deserialized or converted, returns a Failure
.
The Failure
holds a exceptions.DocumentKeyNotFound if the key could not be found.
the key to be found in the document
Returns the BSONValue associated with the given key
, and converts it with the given implicit BSONReader.
Returns the BSONValue associated with the given key
, and converts it with the given implicit BSONReader.
If there is no matching value, returns a Success
holding None
.
If the value could not be deserialized or converted, returns a Failure
.
Returns the BSONValue associated with the given key
.
Returns the BSONValue associated with the given key
.
If the key is not found or the matching value cannot be deserialized, returns a Failure
.
The Failure
holds a exceptions.DocumentKeyNotFound if the key could not be found.
the key to be found in the document
Returns the BSONValue associated with the given key
.
Returns the BSONValue associated with the given key
.
If the key could not be found, the resulting option will be None
.
If the matching value could not be deserialized, returns a Failure
.
the key to be found in the document
The first/mandatory nested element, if any
The first/mandatory nested element, if any
Indicates whether this element set is empty
Indicates whether this element set is empty
Creates a new BSONDocument containing all the elements of this one and the given elements
.
Creates a new BSONDocument containing all the elements of this one and the elements of the given document.
Creates a new BSONDocument without the elements corresponding the given keys
.
The number of elements
The number of elements
Returns a Map
representation for this element set.
Returns a Map
representation for this element set.
Returns the values for the nested elements.
Returns the values for the nested elements.
Merge the produced elements at the beginning of this set
Merge the produced elements at the beginning of this set
(Since version 0.12.0) Use merge
(Since version 0.12.0) Use merge
A
BSONDocument
structure (BSON type0x03
).A
BSONDocument
is basically a stream of tuples(String, BSONValue)
. It is completely lazy. The stream it wraps is aStream[Try[(String, BSONValue)]]
since we cannot be sure that a not yet deserialized value will be processed without error.