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 Options

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

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

    Definition Classes
    Macros
  • AutomaticMaterialization
  • Default
  • SaveSimpleName
  • SimpleUnionType
  • UnionType
  • Verbose
  • \/

trait UnionType[Types <: \/[_, _]] extends Default

Use type parameter A as static type but use pattern matching to handle different possible subtypes. This makes it easy to persist algebraic data types(pattern where you have a sealed trait and several implementing case classes). When writing a case class into BSON its dynamic type will be pattern matched, when reading from BSON the pattern matching will be done on the className string.

Types

to use in pattern matching. Listed in a "type list" \/

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. UnionType
  2. Default
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected