bsondocument

molly.core.syntax.bsondocument
See thebsondocument companion trait
object bsondocument extends bsondocument

Attributes

Companion
trait
Graph
Supertypes
trait bsondocument
class Object
trait Matchable
class Any
Self type

Members list

Type members

Inherited classlikes

object BsonDocument

Attributes

Inherited from:
bsondocument
Supertypes
class Object
trait Matchable
class Any

Inherited types

type BsonDocument = BsonDocument

Attributes

Inherited from:
bsondocument

Attributes

Inherited from:
bsondocument

Extensions

Inherited extensions

extension (bsonDoc: BsonDocument)
def append(key: String, valueOpt: Option[BsonValue]): BsonDocument

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

Inherited from:
bsondocument
def getOption[T <: BsonValue : ClassTag](key: String): Option[T]

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

Inherited from:
bsondocument
def setOption(key: String, value: Option[BsonValue]): 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

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

Inherited from:
bsondocument