Returns an empty ElementProducer
Create a new BSONElement.
Create a new BSONElement.
import reactivemongo.api.bson.{ BSONElement, BSONLong } BSONElement("name", BSONLong(2L))
Returns a ElementProducer for the given name and value.
Returns a ElementProducer for the given name and value.
import reactivemongo.api.bson.{ BSONElement, ElementProducer } val e1: ElementProducer = BSONElement("name1", 1) // BSONInteger val e2 = BSONElement("name2", "foo") // BSONString
import reactivemongo.api.bson.{ BSONElement, BSONInteger } val e: BSONElement = "foo" -> BSONInteger(1) // tuple as BSONElement("foo", BSONInteger(1))
Extracts the name and BSONValue if that
's a BSONElement.
Extracts the name and BSONValue if that
's a BSONElement.
import reactivemongo.api.bson.{ BSONDocument, BSONElement } def foo(doc: BSONDocument): Unit = doc.elements.foreach { case BSONElement(name, bson) => println(s"- " + name + " = " + bson) case _ => }
BSONElement factories and utilities.