Packages

  • package root
    Definition Classes
    root
  • package reactivemongo
    Definition Classes
    root
  • package bson
    Definition Classes
    reactivemongo
  • object Macros

    Macros for generating BSONReader and BSONWriter implementations for case at compile time.

    Macros for generating BSONReader and BSONWriter 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]
    Definition Classes
    bson
    See also

    Macros.Options for specific options

  • object Placeholder

    Only for internal purposes

    Only for internal purposes

    Definition Classes
    Macros
  • Handler

implicit object Handler extends BSONHandler[BSONDocument, Placeholder]

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Handler
  2. BSONHandler
  3. BSONWriter
  4. BSONReader
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. final def afterRead[U](f: (Placeholder) => U): BSONReader[BSONDocument, U]

    Returns a BSON reader that returns the result of applying f on the result of this reader.

    Returns a BSON reader that returns the result of applying f on the result of this reader.

    f

    the function to apply

    Definition Classes
    BSONReader
  2. final def afterWrite[U <: BSONValue](f: (BSONDocument) => U): BSONWriter[Placeholder, U]

    Returns a BSON writer that returns the result of applying f on the BSON value from this writer.

    Returns a BSON writer that returns the result of applying f on the BSON value from this writer.

    f

    the function to apply

    Definition Classes
    BSONWriter
  3. def as[R](to: (Placeholder) => R, from: (R) => Placeholder): BSONHandler[BSONDocument, R]
    Definition Classes
    BSONHandler
  4. final def beforeRead[U <: BSONValue](f: (U) => BSONDocument): BSONReader[U, Placeholder]
    Definition Classes
    BSONReader
  5. final def beforeWrite[U](f: (U) => Placeholder): BSONWriter[U, BSONDocument]
    Definition Classes
    BSONWriter
  6. def read(bson: BSONDocument): Placeholder

    Reads a BSON value and produce an instance of T.

    Reads a BSON value and produce an instance of T.

    This method may throw exceptions at runtime. If used outside a reader, one should consider readTry(bson: B): Try[T] or readOpt(bson: B): Option[T].

    Definition Classes
    HandlerBSONReader
  7. def readOpt(bson: BSONDocument): Option[Placeholder]

    Tries to produce an instance of T from the bson value, returns None if an error occurred.

    Tries to produce an instance of T from the bson value, returns None if an error occurred.

    Definition Classes
    BSONReader
  8. def readTry(bson: BSONDocument): Try[Placeholder]

    Tries to produce an instance of T from the bson value.

    Tries to produce an instance of T from the bson value.

    Definition Classes
    BSONReader
  9. def write(pl: Placeholder): BSONDocument

    Writes an instance of T as a BSON value.

    Writes an instance of T as a BSON value.

    This method may throw exceptions at runtime. If used outside a reader, one should consider writeTry(bson: B): Try[T] or writeOpt(bson: B): Option[T].

    Definition Classes
    HandlerBSONWriter
  10. def writeOpt(t: Placeholder): Option[BSONDocument]

    Tries to produce a BSON value from an instance of T, returns None if an error occurred.

    Tries to produce a BSON value from an instance of T, returns None if an error occurred.

    Definition Classes
    BSONWriter
  11. def writeTry(t: Placeholder): Try[BSONDocument]

    Tries to produce a BSON value from an instance of T.

    Tries to produce a BSON value from an instance of T.

    Definition Classes
    BSONWriter