Packages

package bson

import reactivemongo.api.bson._

// { "name": "Johny", "surname": "Doe", "age": 28, "months": [1, 2, 3] }
document ++ ("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)))
Linear Supertypes
Utils, Aliases, DefaultBSONHandlers, BSONIdentityHandlers, BSONIdentityLowPriorityHandlers, LowPriorityBSONHandlers, LowerPriorityBSONHandlers, LowPriorityBSONHandlersCompat, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. bson
  2. Utils
  3. Aliases
  4. DefaultBSONHandlers
  5. BSONIdentityHandlers
  6. BSONIdentityLowPriorityHandlers
  7. LowPriorityBSONHandlers
  8. LowerPriorityBSONHandlers
  9. LowPriorityBSONHandlersCompat
  10. AnyRef
  11. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Package Members

  1. package exceptions

Type Members

  1. final class BSONArray extends BSONValue

    A BSONArray structure (BSON type 0x04).

    A BSONArray structure (BSON type 0x04).

    A BSONArray is a indexed sequence of BSONValue.

  2. class BSONArrayCollectionReader[M[_], T] extends BSONReader[M[T]]
    Attributes
    protected
    Definition Classes
    LowPriorityBSONHandlers
  3. final class BSONBinary extends BSONValue

    A BSON binary value.

  4. final class BSONBoolean extends BSONValue

    BSON boolean value

  5. 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
  6. final class BSONDateTime extends BSONValue

    BSON date time value

  7. final class BSONDecimal extends BSONValue

    Value wrapper for a BSON 128-bit decimal.

  8. sealed abstract class BSONDocument extends BSONValue with ElementProducer with BSONDocumentLowPriority

    A BSONDocument structure (BSON type 0x03).

    A BSONDocument structure (BSON type 0x03).

    A BSONDocument is basically a set of fields (String, BSONValue).

    Note: The insertion/initial order of the fields may not be maintained through the operations.

  9. type BSONDocumentHandler[T] = BSONDocumentReader[T] with BSONDocumentWriter[T] with BSONHandler[T]

    Convenient type alias for document handlers

  10. trait BSONDocumentReader[T] extends BSONReader[T]
  11. trait BSONDocumentWriter[T] extends BSONWriter[T]
  12. final class BSONDouble extends BSONValue

    A BSON Double.

  13. sealed abstract class BSONElement extends ElementProducer
  14. trait BSONHandler[T] extends BSONReader[T] with BSONWriter[T]
  15. final class BSONInteger extends BSONValue

    BSON Integer value

  16. final class BSONJavaScript extends BSONValue

    BSON JavaScript value.

  17. final class BSONJavaScriptWS extends BSONValue

    BSON JavaScript value with scope (WS).

  18. final class BSONLong extends BSONValue

    BSON Long value

  19. sealed trait BSONMaxKey extends BSONValue

    BSON Max key value

  20. sealed trait BSONMinKey extends BSONValue

    BSON Min key value

  21. sealed trait BSONNull extends BSONValue

    BSON null value

  22. 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:

  23. sealed abstract class BSONObjectID extends BSONValue

    BSON ObjectId value.

    BSON ObjectId value.

    +------------------------+------------------------+------------------------+------------------------+ + timestamp (in seconds) + machine identifier + thread identifier + increment + + (4 bytes) + (3 bytes) + (2 bytes) + (3 bytes) + +------------------------+------------------------+------------------------+------------------------+

  24. trait BSONReader[T] extends AnyRef

    A reader that produces an instance of T from a subtype of BSONValue.

  25. final class BSONRegex extends BSONValue

    BSON Regex value.

  26. final class BSONString extends BSONValue
  27. final class BSONSymbol extends BSONValue

    BSON Symbol value.

  28. final class BSONTimestamp extends BSONValue

    BSON Timestamp value

  29. sealed trait BSONUndefined extends BSONValue

    BSON Undefined value

  30. sealed trait BSONValue extends AnyRef
  31. trait BSONWriter[T] extends AnyRef

    A writer that produces a subtype of BSONValue from an instance of T.

  32. sealed trait ElementProducer extends Producer[BSONElement]
  33. trait FieldNaming extends (String) => String

    Naming strategy, to map each class property to the corresponding field.

  34. sealed trait MacroConfiguration extends AnyRef

    Macro configuration

  35. sealed trait MacroOptions extends AnyRef

    Macros with 'Opts' suffix will take additional options in the form of type parameters that will customize behaviour of the macros during compilation.

  36. sealed trait Producer[T] extends AnyRef
  37. type StringOps = scala.collection.StringOps
    Definition Classes
    Aliases
  38. sealed trait Subtype extends AnyRef

    Binary Subtype

  39. trait TypeNaming extends (Class[_]) => String

    Naming strategy, to map each class to a discriminator value.

  40. final class ¬[A, B] extends AnyRef

    Type level evidence that type A is not type B.

    Type level evidence that type A is not type B.

    Annotations
    @SuppressWarnings()

Value Members

  1. def array(values: Producer[BSONValue]*): BSONArray

    Returns an array with given values.

  2. def array: BSONArray

    Returns an empty array.

  3. def bsonLocalDateHandler(zone: ZoneId): BSONHandler[LocalDate]

    Returns a BSON handler for java.time.LocalDate, considering the specified time zone.

    Returns a BSON handler for java.time.LocalDate, considering the specified time zone.

    Definition Classes
    DefaultBSONHandlers
    Annotations
    @inline()
  4. implicit val bsonLocalDateHandler: BSONHandler[LocalDate]
    Definition Classes
    DefaultBSONHandlers
  5. def bsonLocalDateTimeHandler(zone: ZoneId): BSONHandler[LocalDateTime]

    Returns a BSON handler for java.time.LocalDateTime, considering the specified time zone.

    Returns a BSON handler for java.time.LocalDateTime, considering the specified time zone.

    Definition Classes
    DefaultBSONHandlers
    Annotations
    @inline()
  6. implicit val bsonLocalDateTimeHandler: BSONHandler[LocalDateTime]
    Definition Classes
    DefaultBSONHandlers
  7. def bsonOffsetDateTimeHandler(zone: ZoneId): BSONHandler[OffsetDateTime]

    Returns a BSON handler for java.time.OffsetDateTime, considering the specified time zone.

    Returns a BSON handler for java.time.OffsetDateTime, considering the specified time zone.

    Definition Classes
    DefaultBSONHandlers
    Annotations
    @inline()
  8. implicit val bsonOffsetDateTimeHandler: BSONHandler[OffsetDateTime]
    Definition Classes
    DefaultBSONHandlers
  9. def bsonZonedDateTimeHandler(zone: ZoneId): BSONHandler[ZonedDateTime]

    Returns a BSON handler for java.time.ZonedDateTime, considering the specified time zone.

    Returns a BSON handler for java.time.ZonedDateTime, considering the specified time zone.

    Definition Classes
    DefaultBSONHandlers
    Annotations
    @inline()
  10. implicit val bsonZonedDateTimeHandler: BSONHandler[ZonedDateTime]
    Definition Classes
    DefaultBSONHandlers
  11. implicit final def collectionReader[M[_], T](implicit f: Factory[T, M[T]], reader: BSONReader[T]): BSONReader[M[T]]
    Definition Classes
    LowPriorityBSONHandlersCompat
  12. implicit def collectionWriter[T, Repr](implicit arg0: (Repr) => Iterable[T], writer: BSONWriter[T], notOption: ¬[Repr, Option[T]]): BSONWriter[Repr]
    Definition Classes
    LowPriorityBSONHandlers
    Annotations
    @silent()
  13. def document(elements: ElementProducer*): BSONDocument

    Returns a document with given elements.

  14. def document: BSONDocument

    Returns an empty document.

  15. def element(name: String, value: BSONValue): BSONElement
  16. def generateId: BSONObjectID

    Returns a newly generated object ID.

  17. implicit def mapKeyWriter[K, V](implicit ev: (K) => StringOps, valueWriter: BSONWriter[V]): BSONDocumentWriter[Map[K, V]]
    Definition Classes
    LowerPriorityBSONHandlers
  18. implicit def mapReader[K, V](implicit keyReader: BSONReader[K], valueReader: BSONReader[V]): BSONDocumentReader[Map[K, V]]
    Definition Classes
    LowPriorityBSONHandlers
  19. implicit def mapWriter[V](implicit valueWriter: BSONWriter[V]): BSONDocumentWriter[Map[String, V]]
    Definition Classes
    LowPriorityBSONHandlers
  20. object BSON

    Utility functions

  21. object BSONArray

    See BSONArray

  22. implicit object BSONArrayIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONArray]
    Definition Classes
    BSONIdentityHandlers
  23. object BSONBinary
  24. implicit object BSONBinaryHandler extends BSONHandler[Array[Byte]] with SafeBSONWriter[Array[Byte]]
    Definition Classes
    DefaultBSONHandlers
  25. implicit object BSONBinaryIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONBinary]
    Definition Classes
    BSONIdentityHandlers
  26. object BSONBoolean
  27. implicit object BSONBooleanHandler extends BSONHandler[Boolean] with SafeBSONWriter[Boolean]
    Definition Classes
    DefaultBSONHandlers
  28. implicit object BSONBooleanIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONBoolean]
    Definition Classes
    BSONIdentityHandlers
  29. object BSONBooleanLike
  30. object BSONDateTime
  31. implicit object BSONDateTimeHandler extends BSONHandler[Instant] with SafeBSONWriter[Instant]
    Definition Classes
    DefaultBSONHandlers
  32. implicit object BSONDateTimeIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONDateTime]
    Definition Classes
    BSONIdentityHandlers
  33. object BSONDecimal
  34. implicit object BSONDecimalHandler extends BSONHandler[BigDecimal]
    Definition Classes
    DefaultBSONHandlers
  35. implicit object BSONDecimalIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONDecimal]
    Definition Classes
    BSONIdentityHandlers
  36. object BSONDocument
  37. object BSONDocumentHandler

    Handler factory

  38. implicit object BSONDocumentIdentity extends BSONDocumentReader[BSONDocument] with BSONDocumentWriter[BSONDocument]
    Definition Classes
    BSONIdentityHandlers
  39. object BSONDocumentReader
  40. object BSONDocumentWriter
  41. object BSONDouble
  42. implicit object BSONDoubleHandler extends BSONHandler[Double] with SafeBSONWriter[Double]
    Definition Classes
    DefaultBSONHandlers
  43. implicit object BSONDoubleIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONDouble]
    Definition Classes
    BSONIdentityHandlers
  44. object BSONElement extends BSONElementLowPriority
  45. implicit object BSONFloatHandler extends BSONHandler[Float] with SafeBSONWriter[Float]
    Definition Classes
    DefaultBSONHandlers
  46. object BSONHandler
  47. object BSONInteger
  48. implicit object BSONIntegerHandler extends BSONHandler[Int] with SafeBSONWriter[Int]
    Definition Classes
    DefaultBSONHandlers
  49. implicit object BSONIntegerIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONInteger]
    Definition Classes
    BSONIdentityHandlers
  50. object BSONJavaScript
  51. implicit object BSONJavaScriptIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONJavaScript]
    Definition Classes
    BSONIdentityHandlers
  52. object BSONJavaScriptWS
  53. implicit object BSONJavaScriptWSIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONJavaScriptWS]
    Definition Classes
    BSONIdentityHandlers
  54. object BSONLong
  55. implicit object BSONLongHandler extends BSONHandler[Long] with SafeBSONWriter[Long]
    Definition Classes
    DefaultBSONHandlers
  56. implicit object BSONLongIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONLong]
    Definition Classes
    BSONIdentityHandlers
  57. object BSONMaxKey extends BSONMaxKey
  58. implicit object BSONMaxKeyIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONMaxKey]
    Definition Classes
    BSONIdentityHandlers
  59. object BSONMinKey extends BSONMinKey
  60. implicit object BSONMinKeyIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONMinKey]
    Definition Classes
    BSONIdentityHandlers
  61. object BSONNull extends BSONNull
  62. implicit object BSONNullIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONNull]
    Definition Classes
    BSONIdentityHandlers
  63. object BSONNumberLike
  64. object BSONObjectID
  65. implicit object BSONObjectIDIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONObjectID]
    Definition Classes
    BSONIdentityHandlers
  66. object BSONReader
  67. object BSONRegex
  68. implicit object BSONRegexIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONRegex]
    Definition Classes
    BSONIdentityHandlers
  69. object BSONString
  70. implicit object BSONStringHandler extends BSONHandler[String] with SafeBSONWriter[String]
    Definition Classes
    DefaultBSONHandlers
  71. implicit object BSONStringIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONString]
    Definition Classes
    BSONIdentityHandlers
  72. object BSONSymbol
  73. implicit object BSONSymbolIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONSymbol]
    Definition Classes
    BSONIdentityHandlers
  74. object BSONTimestamp

    Timestamp companion

  75. implicit object BSONTimestampIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONTimestamp]
    Definition Classes
    BSONIdentityHandlers
  76. implicit object BSONURIHandler extends BSONHandler[URI] with SafeBSONWriter[URI]
    Definition Classes
    DefaultBSONHandlers
  77. implicit object BSONURLHandler extends BSONHandler[URL] with SafeBSONWriter[URL]
    Definition Classes
    DefaultBSONHandlers
  78. object BSONUndefined extends BSONUndefined
  79. implicit object BSONUndefinedIdentity extends bson.DefaultBSONHandlers.IdentityBSONHandler[BSONUndefined]
    Definition Classes
    BSONIdentityHandlers
  80. object BSONValue extends BSONValueLowPriority1
  81. implicit object BSONValueIdentity extends BSONReader[BSONValue] with BSONWriter[BSONValue]
    Definition Classes
    BSONIdentityLowPriorityHandlers
  82. object BSONWriter
  83. object ElementProducer extends ElementProducerLowPriority
  84. object FieldNaming

    Naming companion

  85. object MacroConfiguration
  86. object MacroOptions
  87. object Macros

    Macros for generating BSONReader and BSONWriter at compile time.

    Macros for generating BSONReader and BSONWriter at compile time.

    case class Person(name: String, surname: String)
    implicit val personHandler = Macros.handler[Person]
    See also

    MacroOptions for specific options

    MacroConfiguration for extended configuration

  88. object Subtype
  89. object TypeNaming
  90. object ¬
    Annotations
    @SuppressWarnings()

Inherited from Utils

Inherited from Aliases

Inherited from DefaultBSONHandlers

Inherited from BSONIdentityHandlers

Inherited from BSONIdentityLowPriorityHandlers

Inherited from LowPriorityBSONHandlers

Inherited from LowerPriorityBSONHandlers

Inherited from LowPriorityBSONHandlersCompat

Inherited from AnyRef

Inherited from Any

Ungrouped