Object

reactivemongo.api.bson

Macros

Related Doc: package bson

Permalink

object Macros

Macros for generating BSONReader and BSONWriter at compile time.

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

MacroConfiguration for extended configuration

Macros.Options for specific options

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Macros
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final class LocalVar[T] extends AnyRef

    Permalink

    Only for internal purposes

  2. sealed trait Options extends AnyRef

    Permalink

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

  3. final class Placeholder extends AnyRef

    Permalink

    Only for internal purposes

  4. final class WithOptions[Opts <: Options] extends AnyRef

    Permalink

    Macros for generating BSONReader and BSONWriter at compile time, with given options.

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object Annotations

    Permalink

    Annotations to use on case classes that are being processed by macros.

  5. object Options

    Permalink
  6. object Placeholder

    Permalink

    Only for internal purposes

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def configured[Opts <: Options](implicit config: Aux[Opts]): WithOptions[Opts]

    Permalink

    Returns macros using the current BSON configuration.

    Returns macros using the current BSON configuration.

    Opts

    the compile-time options

    import reactivemongo.api.bson.{
      BSONDocumentReader, MacroConfiguration, Macros
    }
    // Materializes a `BSONDocumentReader[Foo]`,
    // with the configuration resolved at compile time
    val r1: BSONDocumentReader[Foo] = Macros.configured.reader[Foo]
    val r2: BSONDocumentReader[Foo] = Macros.configured(
      MacroConfiguration.simpleTypeName).reader[Foo]
  10. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  14. macro def handler[A]: BSONDocumentHandler[A]

    Permalink

    Creates a BSONDocumentHandler for type A.

    Creates a BSONDocumentHandler for type A.

    A

    the type of the value represented as BSON

    Annotations
    @SuppressWarnings()
  15. macro def handlerOpts[A, Opts <: Default]: BSONDocumentHandler[A]

    Permalink

    Creates a BSONDocumentHandler for type A and takes additional options.

    Creates a BSONDocumentHandler for type A and takes additional options.

    A

    the type of the value represented as BSON

    Opts

    the compile-time options

    Annotations
    @SuppressWarnings()
  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. macro def reader[A]: BSONDocumentReader[A]

    Permalink

    Creates a BSONDocumentReader for type A.

    Creates a BSONDocumentReader for type A.

    A

    the type of the value represented as BSON

    Annotations
    @SuppressWarnings()
  22. macro def readerOpts[A, Opts <: Default]: BSONDocumentReader[A]

    Permalink

    Creates a BSONDocumentReader for type A and takes additional options.

    Creates a BSONDocumentReader for type A and takes additional options.

    A

    the type of the value represented as BSON

    Opts

    the compile-time options

    Annotations
    @SuppressWarnings()
  23. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  24. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  25. def using[Opts <: Options]: WithOptions[Opts]

    Permalink

    Returns an inference context to call the BSON macros, using explicit compile-time options.

    Returns an inference context to call the BSON macros, using explicit compile-time options.

    Opts

    the compile-time options

    import reactivemongo.api.bson.{
      BSONDocumentReader, MacroConfiguration, Macros
    }
    val w: BSONDocumentWriter[Bar] =
      Macros.using[Options.Default].writer[Bar]
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. macro def writer[A]: BSONDocumentWriter[A]

    Permalink

    Creates a BSONDocumentWriter for type A.

    Creates a BSONDocumentWriter for type A.

    A

    the type of the value represented as BSON

    Annotations
    @SuppressWarnings()
  30. macro def writerOpts[A, Opts <: Default]: BSONDocumentWriter[A]

    Permalink

    Creates a BSONDocumentWriter for type A and takes additional options.

    Creates a BSONDocumentWriter for type A and takes additional options.

    A

    the type of the value represented as BSON

    Opts

    the compile-time options

    Annotations
    @SuppressWarnings()

Inherited from AnyRef

Inherited from Any

Ungrouped