Creates a new BSONDocument containing all the elements in the given sequence.
Creates a new BSONDocument containing all the elements in the given sequence.
import reactivemongo.api.bson._ BSONDocument(Seq( "foo" -> BSONInteger(1), "bar" -> BSONString("lorem"))) // { 'foo': 1, 'bar': 'lorem' }
Creates a new BSONDocument containing all the given elements.
Creates a new BSONDocument containing all the given elements.
reactivemongo.api.bson.BSONDocument( "foo" -> 1, "bar" -> "lorem" ) // => { 'foo': 1, 'bar': 'lorem' }
An empty BSONDocument.
Returns a String representing the given BSONDocument.
Returns a String representing the given BSONDocument.
Extracts the elements if that
's a BSONDocument.
Extracts the elements if that
's a BSONDocument.
import reactivemongo.api.bson.{ BSONDocument, BSONValue } def names(v: BSONValue): Seq[String] = v match { case BSONDocument(elements) => elements.map(_.name) case _ => Seq.empty[String] }
BSONDocument factories & utilities