reactivemongo.api.bson
BSON main API
import reactivemongo.api.bson._
// { "name": "Johny", "surname": "Doe", "age": 28, "months": [1, 2, 3] }
BSONDocument.empty ++ ("name" -> "Johny") ++ ("surname" -> "Doe") ++
("age" -> 28) ++ ("months" -> array(1, 2, 3))
// { "_id": generatedId, "name": "Jane", "surname": "Doe", "age": 28,
// "months": [1, 2, 3], "details": { "salary": 12345,
// "inventory": ["foo", 7.8, 0, false] } }
document.++("_id" -> generateId, "name" -> "Jane", "surname" -> "Doe",
"age" -> 28, "months" -> array(1, 2, 3),
"details" -> document(
"salary" -> 12345L, "inventory" -> array("foo", 7.8, 0L, false)))
'''System properties:'''
The following properties can be set (e.g. using JVM -D
options).
reactivemongo.api.bson.bufferSizeBytes
(integer; default:96
): Number of bytes used as initial size when allocating a new buffer.reactivemongo.api.bson.document.strict
(boolean; default:false
): Flag to enable strict reading of document (filter duplicate fields, see BSONDocument.asStrict).
Attributes
Members list
Type members
Classlikes
Utility functions
A BSON binary value.
BSONBinary utilities
BSONBinary utilities
import reactivemongo.api.bson.{ BSONBinary, Subtype }
val bin1 = BSONBinary(
"foo".getBytes("UTF-8"), Subtype.GenericBinarySubtype)
// See Subtype.UuidSubtype
val uuid = BSONBinary(java.util.UUID.randomUUID())
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONBinary.type
BSON boolean value
BSONBoolean factories & utilities
BSONBoolean factories & utilities
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONBoolean.type
A BSON value that can be seen as a boolean.
A BSON value that can be seen as a boolean.
Conversions:
number = 0 ~> false
number != 0 ~> true
boolean
undefined ~> false
null ~> false
import scala.util.Success
import reactivemongo.api.bson.{ BSONBooleanLike, BSONDocument, BSONInteger }
val bi = BSONInteger(1)
assert(bi.asTry[BSONBooleanLike].flatMap(_.toBoolean) == Success(true))
val doc = BSONDocument("field" -> bi)
assert(doc.getAsTry[BSONBooleanLike]("field").
flatMap(_.toBoolean) == Success(true))
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
BSONBooleanLike utilities
BSONBooleanLike utilities
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONBooleanLike.type
BSON date time value
BSONDateTime factories & utilities
BSONDateTime factories & utilities
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONDateTime.type
Value wrapper for a BSON 128-bit decimal.
Value wrapper for a BSON 128-bit decimal.
Attributes
- high
the high-order 64 bits
- low
the low-order 64 bits
- Companion:
- object
- Graph
- Supertypes
BSONDecimal factories & utilities
BSONDecimal factories & utilities
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONDecimal.type
A BSONDocument
structure (BSON type 0x03
).
A BSONDocument
structure (BSON type 0x03
).
A BSONDocument
is an unordered set of fields (String, BSONValue)
.
'''Note:''' The insertion/initial order of the fields may not be maintained through the operations.
Attributes
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
- class BSONStrictDocument
- Self type
BSONDocument factories & utilities.
BSONDocument factories & utilities.
reactivemongo.api.bson.BSONDocument("foo" -> 1, "bar" -> "lorem")
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONDocument.type
Reads and writers T
values to/from BSONDocument.
Reads and writers T
values to/from BSONDocument.
Attributes
- Companion:
- object
- Graph
- Supertypes
- trait BSONHandler[T]trait BSONDocumentWriter[T]trait BSONWriter[T]trait BSONDocumentReader[T]trait BSONReader[T]class Objecttrait Matchableclass Any
- Known subtypes
- object Handler.type
BSONDocumentHandler factories
BSONDocumentHandler factories
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONDocumentHandler.type
BSONReader specialized for BSONDocument
BSONReader specialized for BSONDocument
Attributes
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
- trait BSONDocumentHandler[T]object Handler.type
- Self type
BSONDocumentReader factories
BSONDocumentReader factories
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONDocumentReader.type
BSONWriter specialized for BSONDocument
BSONWriter specialized for BSONDocument
Attributes
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
- trait BSONDocumentHandler[T]object Handler.type
- Self type
BSONDocumentWriter factories.
BSONDocumentWriter factories.
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONDocumentWriter.type
A BSON Double.
BSONDouble utilities
BSONDouble utilities
import reactivemongo.api.bson.BSONDouble
BSONDouble(1.23D) match {
case BSONDouble(v) => assert(v == 1.23D)
case _ => ???
}
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONDouble.type
BSONElement factories and utilities.
BSONElement factories and utilities.
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONElement.type
A BSON handler is able to both read and write T
values
from/to BSON representation.
A BSON handler is able to both read and write T
values
from/to BSON representation.
import scala.util.Try
import reactivemongo.api.bson.{ BSONHandler, BSONValue }
def roundtrip[T](value: T)(implicit handler: BSONHandler[T]): Try[Boolean] =
for {
bson: BSONValue <- handler.writeTry(value)
dser <- handler.readTry(bson)
} yield (dser == value) // true
Attributes
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
- object BSONBinaryHandler.typeobject BSONBooleanHandler.typeobject BSONByteHandler.typeobject BSONCharHandler.typeobject BSONDateTimeHandler.typeobject BSONDecimalHandler.typetrait BSONDocumentHandler[T]object Handler.typeobject BSONDoubleHandler.typeobject BSONFloatHandler.typeobject BSONIntegerHandler.typeobject BSONLocalTimeHandler.typeobject BSONLocaleHandler.typeobject BSONLongHandler.typeobject BSONShortHandler.typeobject BSONStringHandler.typeobject BSONURIHandler.typeobject BSONURLHandler.typeobject BSONUUIDHandler.type
BSONHandler factories
BSONHandler factories
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONHandler.type
BSON Integer value
BSONInteger factories & utilities
BSONInteger factories & utilities
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONInteger.type
BSONJavaScript factories & utilities
BSONJavaScript factories & utilities
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONJavaScript.type
BSONJavaScriptWS factories & utilities
BSONJavaScriptWS factories & utilities
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONJavaScriptWS.type
BSON Long value
BSON Max key value
Attributes
- Companion:
- trait
- Graph
- Supertypes
- Self type
- BSONMaxKey.type
BSON Min key value
Attributes
- Companion:
- trait
- Graph
- Supertypes
- Self type
- BSONMinKey.type
BSON null value
BSON null value
Attributes
Attributes
- Companion:
- trait
- Graph
- Supertypes
- trait Sumtrait Mirrortrait BSONNulltrait BSONBooleanLiketrait BSONValueclass Objecttrait Matchableclass Any
- Self type
- BSONNull.type
A BSON value that can be seen as a number.
A BSON value that can be seen as a number.
Conversions:
- numeric BSON types (BSONDecimal, BSONDouble, BSONInteger, BSONLong)
- BSON date/time ~> long (BSONDateTime
.value
) - BSON timestamp ~> long (BSONTimestamp.value)
import scala.util.Success
import reactivemongo.api.bson.{ BSONNumberLike, BSONDocument, BSONInteger }
val bi = BSONInteger(1)
assert(bi.asTry[BSONNumberLike].flatMap(_.toLong) == Success(1L))
val doc = BSONDocument("field" -> bi)
assert(doc.getAsTry[BSONNumberLike]("field").
flatMap(_.toDouble) == Success(1D))
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
BSONNumberLike utilities
BSONNumberLike utilities
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONNumberLike.type
BSON ObjectId value.
BSON ObjectId value.
import scala.util.Try
import reactivemongo.api.bson.BSONObjectID
val oid: BSONObjectID = BSONObjectID.generate()
def foo: Try[BSONObjectID] = BSONObjectID.parse(oid.stringify)
Timestamp (seconds) | Machine identifier | Thread identifier | Increment |
---|---|---|---|
4 bytes | 3 bytes | 2 bytes | 3 bytes |
Attributes
- Companion:
- object
- Graph
- Supertypes
BSONObjectID utilities
BSONObjectID utilities
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONObjectID.type
A reader that produces an instance of T
from a subtype of BSONValue.
A reader that produces an instance of T
from a subtype of BSONValue.
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- object Handler.typetrait BSONDocumentReader[T]trait BSONDocumentHandler[T]object Handler.typetrait BSONHandler[T]object BSONBinaryHandler.typeobject BSONBooleanHandler.typeobject BSONByteHandler.typeobject BSONCharHandler.typeobject BSONDateTimeHandler.typeobject BSONDecimalHandler.typeobject BSONDoubleHandler.typeobject BSONFloatHandler.typeobject BSONIntegerHandler.typeobject BSONLocalTimeHandler.typeobject BSONLocaleHandler.typeobject BSONLongHandler.typeobject BSONShortHandler.typeobject BSONStringHandler.typeobject BSONURIHandler.typeobject BSONURLHandler.typeobject BSONUUIDHandler.typeobject Handler.type
- Self type
- BSONReader[T]
BSONReader factories
BSONReader factories
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONReader.type
'''EXPERIMENTAL:''' Strict documentation representation with at most one value per field name (no duplicate).
'''EXPERIMENTAL:''' Strict documentation representation with at most one value per field name (no duplicate).
import reactivemongo.api.bson.BSONDocument
def strict1 = // { 'foo': 1 }
BSONDocument.strict("foo" -> 1, "foo" -> 2)
def strict2 = BSONDocument("foo" -> 1, "foo" -> 2).asStrict
assert(strict1 == strict2)
Attributes
- Graph
- Supertypes
- class BSONDocumenttrait ElementProducertrait Producer[BSONElement]trait BSONValueclass Objecttrait Matchableclass Any
- Self type
A BSON string.
BSONString utilities
BSONString utilities
import reactivemongo.api.bson.BSONString
BSONString("foo") match {
case BSONString(v) => v == "foo"
case _ => false
}
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONString.type
BSONSymbol factories & utilities
BSONSymbol factories & utilities
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONSymbol.type
BSON Timestamp value
Timestamp companion
Timestamp companion
Attributes
- Companion:
- class
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONTimestamp.type
BSON undefined value
BSON undefined value
Attributes
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
- object BSONUndefined.type
Single value for BSONUndefined type
Single value for BSONUndefined type
Attributes
- Companion:
- trait
- Graph
- Supertypes
- trait Sumtrait Mirrortrait BSONUndefinedtrait BSONBooleanLiketrait BSONValueclass Objecttrait Matchableclass Any
- Self type
- BSONUndefined.type
A BSON value
A BSON value
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- class BSONArrayclass BSONBinaryclass BSONBooleanclass BSONDateTimeclass BSONDecimalclass BSONDocumentclass BSONStrictDocumentclass BSONDoubleclass BSONIntegerclass BSONJavaScriptclass BSONJavaScriptWSclass BSONLongtrait BSONMaxKeyobject BSONMaxKey.typetrait BSONMinKeyobject BSONMinKey.typetrait BSONNullobject BSONNull.typeclass BSONObjectIDclass BSONRegexclass BSONStringclass BSONSymbolclass BSONTimestamptrait BSONUndefinedobject BSONUndefined.type
- Self type
A writer that produces a subtype of BSONValue from an instance of T
.
A writer that produces a subtype of BSONValue from an instance of T
.
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- object Handler.typetrait BSONDocumentWriter[T]trait BSONDocumentHandler[T]object Handler.typetrait BSONHandler[T]object BSONBinaryHandler.typeobject BSONBooleanHandler.typeobject BSONByteHandler.typeobject BSONCharHandler.typeobject BSONDateTimeHandler.typeobject BSONDecimalHandler.typeobject BSONDoubleHandler.typeobject BSONFloatHandler.typeobject BSONIntegerHandler.typeobject BSONLocalTimeHandler.typeobject BSONLocaleHandler.typeobject BSONLongHandler.typeobject BSONShortHandler.typeobject BSONStringHandler.typeobject BSONURIHandler.typeobject BSONURLHandler.typeobject BSONUUIDHandler.typeobject Handler.type
BSONWriter factories.
BSONWriter factories.
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- BSONWriter.type
Evidence that T
can be serialized as a BSON document.
Evidence that T
can be serialized as a BSON document.
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
See DocumentClass
See DocumentClass
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- DocumentClass.type
See BSONDocument
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- ElementProducer.type
Utilities to handle Enumerations
Utilities to handle Enumerations
(Inspired by enumeratum)
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- EnumHandler.type
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- EnumHelper.type
Naming strategy, to map each class property to the corresponding field.
Naming strategy, to map each class property to the corresponding field.
import reactivemongo.api.bson.{ FieldNaming, MacroConfiguration }
def initCfg(naming: FieldNaming): MacroConfiguration =
MacroConfiguration(fieldNaming = naming)
Attributes
- See also:
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
Naming companion
Naming companion
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- FieldNaming.type
Mapping from a BSON string to T
;
Used by scala.collection.Map handlers.
Mapping from a BSON string to T
;
Used by scala.collection.Map handlers.
final class Foo(val v: String) extends AnyVal
val bson = reactivemongo.api.bson.BSONDocument(
"foo:key" -> 1, "foo:name" -> 2)
import reactivemongo.api.bson.KeyReader
implicit def fooKeyReader: KeyReader[Foo] =
KeyReader[Foo] { str =>
new Foo(str.stripPrefix("foo:"))
}
reactivemongo.api.bson.BSON.readDocument[Map[Foo, Int]](bson)
// Success: Map[Foo, Int](
// (new Foo("key") -> 1),
// (new Foo("name") -> 2))
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Mapping from a BSON string to T
.
Used by scala.collection.Map handlers.
Mapping from a BSON string to T
.
Used by scala.collection.Map handlers.
final class Foo(val v: String) extends AnyVal
val dict = Map[Foo, Int](
(new Foo("key") -> 1),
(new Foo("name") -> 2))
import reactivemongo.api.bson.KeyWriter
implicit def fooKeyWriter: KeyWriter[Foo] =
KeyWriter[Foo] { foo =>
"foo:" + foo.v
}
reactivemongo.api.bson.BSON.writeDocument(dict)
// Success = {'foo:key': 1, 'foo:name': 2}
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Macro configuration;
Macro configuration;
It allows to configure compile time options, and behaviour to be retained at runtime (field & type naming).
import reactivemongo.api.bson.{
BSONDocumentReader, MacroConfiguration, Macros
}
case class Foo(name: String)
val r1: BSONDocumentReader[Foo] = Macros.configured.reader[Foo]
val r2: BSONDocumentReader[Foo] = Macros.configured(
MacroConfiguration.simpleTypeName).reader[Foo]
Attributes
- See also:
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
MacroConfiguration factories and utilities
MacroConfiguration factories and utilities
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- MacroConfiguration.type
Macros with 'Opts' suffix will take additional options in the form of type parameters that will customize behaviour of the macros during compilation.
Macros with 'Opts' suffix will take additional options in the form of type parameters that will customize behaviour of the macros during compilation.
import reactivemongo.api.bson.{ BSONDocumentWriter, Macros, MacroOptions }
case class Bar(score: Float)
val w: BSONDocumentWriter[Bar] =
Macros.using[MacroOptions.Default].writer[Bar]
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- trait Defaulttrait AutomaticMaterializationtrait DisableWarningstrait ReadDefaultValuestrait UnionType[Types]trait Verbose
MacroOptions factories & utilities.
MacroOptions factories & utilities.
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- MacroOptions.type
Macros for generating BSONReader
and BSONWriter
at compile time.
Macros for generating BSONReader
and BSONWriter
at compile time.
import reactivemongo.api.bson.{ BSONDocumentHandler, Macros }
case class Person(name: String, surname: String)
given personHandler: BSONDocumentHandler[Person] = Macros.handler[Person]
Attributes
- See also:
MacroOptions for specific options
MacroConfiguration for extended configuration
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- Macros.type
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- OpaqueAlias.type
Attributes
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
Binary Subtype
Binary Subtype
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Known subtypes
- class FunctionSubtypeobject FunctionSubtype.typeclass GenericBinarySubtypeobject GenericBinarySubtype.typeclass Md5Subtypeobject Md5Subtype.typeclass OldBinarySubtypeobject OldBinarySubtype.typeclass OldUuidSubtypeobject OldUuidSubtype.typeclass UserDefinedSubtypeobject UserDefinedSubtype.typeclass UuidSubtypeobject UuidSubtype.type
Naming strategy, to map each class to a discriminator value.
Naming strategy, to map each class to a discriminator value.
import reactivemongo.api.bson.{ MacroConfiguration, TypeNaming }
val cfg1 = MacroConfiguration(typeNaming = TypeNaming.FullName)
val cfg2 = MacroConfiguration(typeNaming = TypeNaming.FullName)
val cfg3 = MacroConfiguration(
typeNaming = TypeNaming { (cls: Class[_]) =>
"_" + cls.getSimpleName
})
Attributes
- See also:
- Companion:
- object
- Graph
- Supertypes
- Known subtypes
- object FullName.typeobject SimpleName.type
TypeNaming factories
TypeNaming factories
Attributes
- Companion:
- trait
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
- Self type
- TypeNaming.type
Type level evidence that type A
is not type B
.
Type level evidence that type A
is not type B
.
Attributes
- Companion:
- object
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Inherited classlikes
Attributes
- Inherited from:
- LowPriority1BSONHandlers (hidden)
- Graph
- Supertypes
Attributes
- Inherited from:
- LowPriority1BSONHandlers (hidden)
- Graph
- Supertypes
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[Boolean]trait BSONWriter[Boolean]trait BSONReader[Boolean]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[Byte]trait BSONWriter[Byte]trait BSONReader[Byte]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[Char]trait BSONWriter[Char]trait BSONReader[Char]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[Instant]trait BSONWriter[Instant]trait BSONReader[Instant]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[BigDecimal]trait BSONWriter[BigDecimal]trait BSONReader[BigDecimal]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[Double]trait BSONWriter[Double]trait BSONReader[Double]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[Float]trait BSONWriter[Float]trait BSONReader[Float]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[Int]trait BSONWriter[Int]trait BSONReader[Int]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[LocalTime]trait BSONWriter[LocalTime]trait BSONReader[LocalTime]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[Locale]trait BSONWriter[Locale]trait BSONReader[Locale]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[Long]trait BSONWriter[Long]trait BSONReader[Long]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[Short]trait BSONWriter[Short]trait BSONReader[Short]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[String]trait BSONWriter[String]trait BSONReader[String]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[URI]trait BSONWriter[URI]trait BSONReader[URI]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[URL]trait BSONWriter[URL]trait BSONReader[URL]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
- Graph
- Supertypes
- trait BSONHandler[UUID]trait BSONWriter[UUID]trait BSONReader[UUID]class Objecttrait Matchableclass Any
Attributes
- Inherited from:
- BSONIdentityLowPriorityHandlers (hidden)
- Graph
- Supertypes
Value members
Concrete methods
Returns an empty array.
Returns an empty array.
import reactivemongo.api.bson._
val arr1 = BSONString("bar") +: array // [ 'bar' ]
val arr2 = BSONInteger(1) +: arr1 // [ 1, 'bar' ]
Attributes
Returns an array with given values.
Returns an array with given values.
import reactivemongo.api.bson._
val arr = array("bar", 1L) // [ 'bar', NumberLong(1) ]
Attributes
Returns an empty document.
Returns an empty document.
import reactivemongo.api.bson._
val doc = document ++ ("foo" -> 1)
// { 'foo': 1 }
Attributes
Returns a document with given elements.
Returns a document with given elements.
import reactivemongo.api.bson._
val doc = document("foo" -> 1)
// { 'foo': 1 }
Attributes
Returns a newly generated object ID.
Returns a newly generated object ID.
Attributes
Returns a BSON MaxKey value
Returns a BSON MaxKey value
Attributes
Returns a BSON MinKey value
Returns a BSON MinKey value
Attributes
Returns a BSON Undefined value
Returns a BSON Undefined value
Attributes
Inherited methods
Keeps a A
statement but raise a migration error at compile-time.
Keeps a A
statement but raise a migration error at compile-time.
The compilation error can be disabled by setting the system property
reactivemongo.api.migrationRequired.nonFatal
to true
.
Attributes
- Inherited from:
- PackageCompat (hidden)
Inherited fields
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
Attributes
- Inherited from:
- DefaultBSONHandlers (hidden)
Givens
Inherited givens
Attributes
- Inherited from:
- LowPriority1BSONHandlers (hidden)
Implicits
Implicits
Key/value ordering
Key/value ordering
import reactivemongo.api.bson.{ BSONString, nameValueOrdering }
Seq("foo" -> BSONString("1"), "bar" -> BSONString("1")).
sorted // == [ "bar" -> .., "foo" -> .. ]
Attributes
Inherited implicits
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- BSONIdentityHandlers (hidden)
Attributes
- Inherited from:
- LowPriority1BSONHandlers (hidden)