object BSONElement
BSONElement factories and utilities.
- Companion:
- class
Value members
Concrete methods
Create a new BSONElement.
Create a new BSONElement.
import reactivemongo.api.bson.{ BSONElement, BSONLong }
BSONElement("name", BSONLong(2L))
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 _ =>
}
Inherited methods
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
- Inherited from:
- BSONElementLowPriority (hidden)