package bson
- Alphabetic
- By Inheritance
- bson
- DefaultBSONHandlers
- LowPrioBSONHandlers
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class BSONArray(stream: Stream[Try[BSONValue]]) extends BSONValue with BSONElementSet with Product with Serializable
A
BSONArray
structure (BSON type0x04
).A
BSONArray
structure (BSON type0x04
).A
BSONArray
is a straightforwardBSONDocument
where keys are a sequence of positive integers.A
BSONArray
is basically a stream of tuples(String, BSONValue)
where the first member is a string representation of an index. It is completely lazy. The stream it wraps is aStream[Try[(String, BSONValue)]]
since we cannot be sure that a not yet deserialized value will be processed without error. - class BSONArrayBenchmark extends AnyRef
- Annotations
- @State()
- class BSONArrayHandlerBenchmark extends AnyRef
- Annotations
- @State()
- case class BSONBinary(value: ReadableBuffer, subtype: Subtype) extends BSONValue with Product with Serializable
A BSON binary value.
A BSON binary value.
- value
The binary content.
- subtype
The type of the binary content.
- class BSONBinaryHandlerBenchmark extends HandlerBenchmark[BSONBinary]
- Annotations
- @State()
- class BSONBinarySerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- class BSONBinaryUUIDBenchmark extends AnyRef
- Annotations
- @State()
- case class BSONBoolean(value: Boolean) extends BSONValue with Product with Serializable
BSON boolean value
- class BSONBooleanHandlerBenchmark extends HandlerBenchmark[BSONBoolean]
- Annotations
- @State()
- sealed trait BSONBooleanLike extends AnyRef
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
- sealed trait BSONBooleanLikeClass[B <: BSONValue] extends BSONBooleanLike
- class BSONBooleanLikeHandlerBenchmark extends AnyRef
- Annotations
- @State()
- class BSONBooleanSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- class BSONDBPointer extends BSONValue
BSON DBPointer value.
- case class BSONDateTime(value: Long) extends BSONValue with Product with Serializable
BSON date time value
- class BSONDateTimeHandlerBenchmark extends HandlerBenchmark[BSONDateTime]
- Annotations
- @State()
- class BSONDateTimeSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- final class BSONDecimal extends BSONValue with Product2[Long, Long]
Value wrapper for a BSON 128-bit decimal.
Value wrapper for a BSON 128-bit decimal.
- Annotations
- @SerialVersionUID()
- class BSONDecimalHandlerBenchmark extends HandlerBenchmark[BSONDecimal]
- Annotations
- @State()
- class BSONDecimalSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- case class BSONDocument(stream: Stream[Try[BSONElement]]) extends BSONValue with BSONElementSet with Product with Serializable
A
BSONDocument
structure (BSON type0x03
).A
BSONDocument
structure (BSON type0x03
).A
BSONDocument
is basically a stream of tuples(String, BSONValue)
. It is completely lazy. The stream it wraps is aStream[Try[(String, BSONValue)]]
since we cannot be sure that a not yet deserialized value will be processed without error. - class BSONDocumentBenchmark extends AnyRef
- Annotations
- @State()
- type BSONDocumentHandler[T] = BSONDocumentReader[T] with BSONDocumentWriter[T] with BSONHandler[BSONDocument, T]
Convenient type alias for document handlers
- class BSONDocumentHandlerBenchmark extends AnyRef
- Annotations
- @State()
- trait BSONDocumentReader[T] extends BSONReader[BSONDocument, T]
- class BSONDocumentSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- trait BSONDocumentWriter[T] extends BSONWriter[T, BSONDocument]
- case class BSONDouble(value: Double) extends BSONValue with Product with Serializable
A BSON Double.
- class BSONDoubleHandlerBenchmark extends HandlerBenchmark[BSONDouble]
- Annotations
- @State()
- class BSONDoubleSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- case class BSONElement(name: String, value: BSONValue) extends ElementProducer with Product with Serializable
- class BSONElementBenchmark extends AnyRef
- Annotations
- @State()
- sealed trait BSONElementLowPriority extends AnyRef
- sealed trait BSONElementSet extends ElementProducer
Operations for a BSONElement that can contain multiple nested elements.
- trait BSONHandler[B <: BSONValue, T] extends BSONReader[B, T] with BSONWriter[T, B]
- case class BSONInteger(value: Int) extends BSONValue with Product with Serializable
BSON Integer value
- class BSONIntegerHandlerBenchmark extends HandlerBenchmark[BSONInteger]
- Annotations
- @State()
- class BSONIntegerSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- sealed trait BSONIterator extends Iterator[(String, BSONValue)]
- case class BSONJavaScript(value: String) extends BSONValue with Product with Serializable
BSON JavaScript value.
BSON JavaScript value.
- value
The JavaScript source code.
- case class BSONJavaScriptWS(value: String) extends BSONValue with Product with Serializable
BSON scoped JavaScript value.
BSON scoped JavaScript value.
- value
The JavaScript source code.
- class BSONJavascriptSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- class BSONJavascriptWsSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- case class BSONLong(value: Long) extends BSONValue with Product with Serializable
BSON Long value
- class BSONLongHandlerBenchmark extends HandlerBenchmark[BSONLong]
- Annotations
- @State()
- class BSONLongSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- sealed trait BSONNumberLike extends AnyRef
A BSON value that can be seen as a number.
A BSON value that can be seen as a number.
Conversions:
- sealed trait BSONNumberLikeClass[B <: BSONValue] extends BSONNumberLike
- class BSONNumberLikeHandlerBenchmark extends AnyRef
- Annotations
- @State()
- class BSONObjectID extends BSONValue with Serializable with Equals
BSON ObjectId value.
BSON ObjectId value.
+------------------------+------------------------+------------------------+------------------------+ + timestamp (in seconds) + machine identifier + thread identifier + increment + + (4 bytes) + (3 bytes) + (2 bytes) + (3 bytes) + +------------------------+------------------------+------------------------+------------------------+
- Annotations
- @SerialVersionUID()
- class BSONObjectIDSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- trait BSONReader[B <: BSONValue, T] extends AnyRef
A reader that produces an instance of
T
from a subtype of BSONValue. - case class BSONRegex(value: String, flags: String) extends BSONValue with Product with Serializable
BSON Regex value.
BSON Regex value.
- flags
Regex flags.
- class BSONRegexSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- case class BSONString(value: String) extends BSONValue with Product with Serializable
- class BSONStringHandlerBenchmark extends HandlerBenchmark[BSONString]
- Annotations
- @State()
- class BSONStringSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- case class BSONSymbol(value: String) extends BSONValue with Product with Serializable
BSON Symbol value.
- case class BSONTimestamp(value: Long) extends BSONValue with Product with Serializable
BSON Timestamp value
- class BSONTimestampBenchmark extends AnyRef
- Annotations
- @State()
- class BSONTimestampSerializationBenchmark extends SerializationBenchmark
- Annotations
- @State()
- sealed trait BSONValue extends AnyRef
- trait BSONWriter[T, B <: BSONValue] extends AnyRef
A writer that produces a subtype of BSONValue from an instance of
T
. - trait DefaultBSONHandlers extends LowPrioBSONHandlers
- class BSONBooleanLikeReader[B <: BSONValue] extends BSONReader[B, BSONBooleanLike]
- Definition Classes
- DefaultBSONHandlers
- class BSONNumberLikeReader[B <: BSONValue] extends BSONReader[B, BSONNumberLike]
- Definition Classes
- DefaultBSONHandlers
- abstract class IdentityBSONConverter[T <: BSONValue] extends BSONReader[T, T] with BSONWriter[T, T]
- Definition Classes
- DefaultBSONHandlers
- sealed trait ElementProducer extends Producer[BSONElement]
- sealed trait HandlerBenchmark[B <: BSONValue] extends AnyRef
- trait LowPrioBSONHandlers extends AnyRef
- class BSONArrayCollectionReader[M[_], T] extends BSONReader[BSONArray, M[T]]
- Definition Classes
- LowPrioBSONHandlers
- class BSONArrayCollectionWriter[T, Repr] extends VariantBSONWriter[Repr, BSONArray]
- Definition Classes
- LowPrioBSONHandlers
- sealed trait Producer[T] extends AnyRef
- class ReadableBufferBenchmark extends AnyRef
- Annotations
- @State()
- sealed trait SerializationBenchmark extends AnyRef
- sealed trait Subtype extends AnyRef
Binary Subtype
- sealed trait UnsafeBSONReader[T] extends AnyRef
- trait VariantBSONDocumentReader[+T] extends VariantBSONReader[BSONDocument, T]
- trait VariantBSONDocumentWriter[-T] extends VariantBSONWriter[T, BSONDocument]
- trait VariantBSONReader[-B <: BSONValue, +T] extends AnyRef
A reader that produces an instance of
T
from a subtype of BSONValue. - class VariantBSONReaderWrapper[B <: BSONValue, T] extends BSONReader[B, T]
- trait VariantBSONWriter[-T, +B <: BSONValue] extends AnyRef
A writer that produces a subtype of BSONValue from an instance of
T
. - class VariantBSONWriterWrapper[T, B <: BSONValue] extends BSONWriter[T, B]
- class WritableBufferBenchmark extends AnyRef
- Annotations
- @State()
Value Members
- def BSONDocumentHandler[T](read: (BSONDocument) => T, write: (T) => BSONDocument): BSONDocumentHandler[T]
Handler factory
- implicit def MapReader[K, V](implicit keyReader: BSONReader[BSONString, K], valueReader: BSONReader[_ <: BSONValue, V]): BSONDocumentReader[Map[K, V]]
- Definition Classes
- DefaultBSONHandlers
- implicit def MapWriter[K, V](implicit keyWriter: BSONWriter[K, BSONString], valueWriter: BSONWriter[V, _ <: BSONValue]): BSONDocumentWriter[Map[K, V]]
- Definition Classes
- DefaultBSONHandlers
- def array(values: Producer[BSONValue]*): BSONArray
Returns an array with given values.
- def array: BSONArray
Returns an empty array.
- implicit def bsonArrayToCollectionReader[M[_], T](implicit cbf: Factory[T, M[T]], reader: BSONReader[_ <: BSONValue, T]): BSONReader[BSONArray, M[T]]
- Definition Classes
- LowPrioBSONHandlers
- implicit def bsonBooleanLikeReader[B <: BSONValue]: BSONBooleanLikeReader[B]
- Definition Classes
- DefaultBSONHandlers
- implicit def bsonNumberLikeReader[B <: BSONValue]: BSONNumberLikeReader[B]
- Definition Classes
- DefaultBSONHandlers
- implicit def collectionToBSONArrayCollectionWriter[T, Repr](implicit arg0: (Repr) => Iterable[T], writer: BSONWriter[T, _ <: BSONValue]): VariantBSONWriter[Repr, BSONArray]
- Definition Classes
- LowPrioBSONHandlers
- def document(elements: Producer[BSONElement]*): BSONDocument
Returns a document with given elements.
- def document: BSONDocument
Returns an empty document.
- def element(name: String, value: BSONValue): BSONElement
- implicit def findWriter[T](implicit writer: VariantBSONWriter[T, _ <: BSONValue]): BSONWriter[T, _ <: BSONValue]
- Definition Classes
- DefaultBSONHandlers
- def generateId: BSONObjectID
Returns a newly generated object ID.
- object BSON
- object BSONArray extends Serializable
- object BSONArrayBenchmark
- object BSONBinary extends Serializable
- object BSONBooleanLike
- object BSONDBPointer
- object BSONDecimal
- object BSONDocument extends Serializable
- object BSONDocumentBenchmark
- object BSONDocumentReader
- object BSONDocumentWriter
- object BSONElement extends BSONElementLowPriority with Serializable
- object BSONElementSet
- object BSONHandler
- object BSONIterator
- object BSONMaxKey extends BSONValue
BSON Max key value
- object BSONMinKey extends BSONValue
BSON Min key value
- object BSONNull extends BSONValue with Product with Serializable
BSON null value
- object BSONNumberLike
- object BSONObjectID extends Serializable
- object BSONReader
- object BSONTimestamp extends Serializable
Timestamp companion
- object BSONUndefined extends BSONValue with Product with Serializable
BSON Undefined value
- object BSONValue
- object BSONWriter
- object DefaultBSONHandlers extends DefaultBSONHandlers
- implicit object BSONArrayIdentity extends IdentityBSONConverter[BSONArray]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONBinaryHandler extends BSONHandler[BSONBinary, Array[Byte]]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONBinaryIdentity extends IdentityBSONConverter[BSONBinary]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONBooleanHandler extends BSONHandler[BSONBoolean, Boolean]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONBooleanIdentity extends IdentityBSONConverter[BSONBoolean]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONBooleanLikeWriter extends VariantBSONWriter[BSONBooleanLike, BSONValue]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONDateTimeHandler extends BSONHandler[BSONDateTime, Date]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONDateTimeIdentity extends IdentityBSONConverter[BSONDateTime]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONDecimalHandler extends BSONHandler[BSONDecimal, BigDecimal]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONDecimalIdentity extends IdentityBSONConverter[BSONDecimal]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONDocumentIdentity extends IdentityBSONConverter[BSONDocument] with BSONDocumentReader[BSONDocument] with BSONDocumentWriter[BSONDocument]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONDoubleHandler extends BSONHandler[BSONDouble, Double]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONDoubleIdentity extends IdentityBSONConverter[BSONDouble]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONIntegerHandler extends BSONHandler[BSONInteger, Int]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONIntegerIdentity extends IdentityBSONConverter[BSONInteger]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONJavaScriptIdentity extends BSONReader[BSONJavaScript, BSONJavaScript] with BSONWriter[BSONJavaScript, BSONJavaScript]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONLongHandler extends BSONHandler[BSONLong, Long]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONLongIdentity extends IdentityBSONConverter[BSONLong]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONNullIdentity extends IdentityBSONConverter[BSONNull.type]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONNumberLikeWriter extends VariantBSONWriter[BSONNumberLike, BSONValue]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONObjectIDIdentity extends IdentityBSONConverter[BSONObjectID]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONRegexIdentity extends IdentityBSONConverter[BSONRegex]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONStringHandler extends BSONHandler[BSONString, String]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONStringIdentity extends IdentityBSONConverter[BSONString]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONUndefinedIdentity extends IdentityBSONConverter[BSONUndefined.type]
- Definition Classes
- DefaultBSONHandlers
- implicit object BSONValueIdentity extends IdentityBSONConverter[BSONValue]
- Definition Classes
- DefaultBSONHandlers
- object ElementProducer
- object Macros
Macros for generating
BSONReader
andBSONWriter
implementations for case at compile time.Macros for generating
BSONReader
andBSONWriter
implementations for case at compile time. Invoking these macros is equivalent to writing anonymous class implementations by hand.import reactivemongo.bson.Macros case class Person(name: String, surname: String) implicit val personHandler = Macros.handler[Person]
- See also
Macros.Options for specific options
- object Producer
- object Subtype