Alias for add(elements: Producer[(String, BSONValue)]*): BSONDocument
Alias for add(doc: BSONDocument): BSONDocument
Alias for remove(names: String*)
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.
Checks whether the given key is found in the document.
Checks whether the given key is found in the document.
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 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 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
Is this document empty?
Creates a new BSONDocument without the elements corresponding the given keys
.
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.