reactivemongo.api.bson.BSONElement$
See theBSONElement companion class
object BSONElement
BSONElement factories and utilities.
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONElement.type
Members list
Concise view
Value members
Concrete methods
Create a new BSONElement.
Create a new BSONElement.
import reactivemongo.api.bson.{ BSONElement, BSONLong }
BSONElement("name", BSONLong(2L))
Attributes
Returns an empty ElementProducer
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 _ =>
}
Attributes
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
Attributes
- Inherited from:
- BSONElementLowPriority (hidden)
Implicits
Inherited implicits
import reactivemongo.api.bson.{ BSONElement, BSONInteger }
val e: BSONElement = "foo" -> BSONInteger(1)
// tuple as BSONElement("foo", BSONInteger(1))
Attributes
- Inherited from:
- BSONElementLowPriority (hidden)