Only for internal purposes
Only for internal purposes
Macros for generating BSONReader
and BSONWriter
at compile time,
with given options.
Annotations to use on case classes that are being processed by macros.
Only for internal purposes
Returns macros using the current BSON configuration.
Returns macros using the current BSON configuration.
the compile-time options
import reactivemongo.api.bson.{ BSONDocumentReader, MacroConfiguration, Macros } case class Foo(name: String) // 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]
Creates a BSONDocumentHandler for type A
.
Creates a BSONDocumentHandler for type A
.
The default MacroConfiguration is used (see Macros.configured).
import reactivemongo.api.bson.{ BSONDocumentHandler, Macros } case class Foo(bar: String, lorem: Int) val handler: BSONDocumentHandler[Foo] = Macros.handler
the type of the value represented as BSON
Creates a BSONDocumentHandler for type A
.
Creates a BSONDocumentHandler for type A
.
The default MacroConfiguration is used (see Macros.configured), with given additional options.
import reactivemongo.api.bson.{ Macros, MacroOptions } case class Foo(bar: String, lorem: Int) val handler = Macros.handlerOpts[Foo, MacroOptions.Default]
the type of the value represented as BSON
the compile-time options
Creates a BSONDocumentReader for type A
.
Creates a BSONDocumentReader for type A
.
The default MacroConfiguration is used (see Macros.configured).
import reactivemongo.api.bson.{ BSONDocumentReader, Macros } case class Foo(bar: String, lorem: Int) val reader: BSONDocumentReader[Foo] = Macros.reader
the type of the value represented as BSON
Creates a BSONDocumentReader for type A
.
Creates a BSONDocumentReader for type A
.
The default MacroConfiguration is used (see Macros.configured), with given additional options.
import reactivemongo.api.bson.{ Macros, MacroOptions } case class Foo(bar: String, lorem: Int) val reader = Macros.readerOpts[Foo, MacroOptions.Verbose]
the type of the value represented as BSON
the compile-time options
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.
the compile-time options
import reactivemongo.api.bson.{ BSONDocumentWriter, Macros, MacroOptions } case class Bar(score: Float) val w: BSONDocumentWriter[Bar] = Macros.using[MacroOptions.Default].writer[Bar]
Creates a BSONDocumentWriter for type A
.
Creates a BSONDocumentWriter for type A
.
The default MacroConfiguration is used (see Macros.configured).
import reactivemongo.api.bson.{ BSONDocumentWriter, Macros } case class Foo(bar: String, lorem: Int) val writer: BSONDocumentWriter[Foo] = Macros.writer
the type of the value represented as BSON
Creates a BSONDocumentWriter for type A
.
Creates a BSONDocumentWriter for type A
.
The default MacroConfiguration is used (see Macros.configured), with given additional options.
import reactivemongo.api.bson.{ Macros, MacroOptions } case class Foo(bar: String, lorem: Int) val writer = Macros.writerOpts[Foo, MacroOptions.DisableWarnings]
the type of the value represented as BSON
the compile-time options
Macros for generating
BSONReader
andBSONWriter
at compile time.MacroConfiguration for extended configuration
MacroOptions for specific options