Packages

  • package root

    This is the documentation for the MongoDB Scala driver.

    This is the documentation for the MongoDB Scala driver.

    Driver structure

    The mongodb scala driver.

    To get started you need a MongoClient instance, either from a connection string or via a org.mongodb.scala.MongoClientSettings.

    Notable packages include:

    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package mongodb
    Definition Classes
    org
  • package scala

    The MongoDB Scala Driver package

    The MongoDB Scala Driver package

    Contains type aliases and companion objects to help when using the Scala API

    Definition Classes
    mongodb
    Since

    1.0

  • package bson

    The bson package, contains mirrors and companion objects for Bson values.

    The bson package, contains mirrors and companion objects for Bson values.

    Definition Classes
    scala
  • package codecs
    Definition Classes
    bson
  • package macrocodecs
    Definition Classes
    codecs
  • MacroCodec

trait MacroCodec[T] extends Codec[T]

T

the case class type for the codec

Since

2.0

Linear Supertypes
Codec[T], Decoder[T], Encoder[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MacroCodec
  2. Codec
  3. Decoder
  4. Encoder
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract val caseClassesMap: Map[String, Class[_]]

    Creates a Map[String, Class[_]] mapping the case class name and the type.

  2. abstract val classFieldTypeArgsMap: Map[String, Map[String, List[Class[_]]]]

    A nested map of case class name to a Map of the given field names and a list of the field types.

  3. abstract val classToCaseClassMap: Map[Class[_], Boolean]

    Creates a Map[Class[_], Boolean] mapping field types to a boolean representing if they are a case class.

  4. abstract val codecRegistry: CodecRegistry

    The CodecRegistry for use with the codec.

  5. abstract val encoderClass: Class[T]

    The case class type for the codec.

  6. abstract def getInstance(className: String, fieldsData: Map[String, Any]): T

    Creates a new instance of the case class with the provided data

    Creates a new instance of the case class with the provided data

    className

    the name of the class to be instantiated

    fieldsData

    the Map of data for the class

    returns

    the new instance of the class

  7. abstract def writeCaseClassData(className: String, writer: BsonWriter, value: T, encoderContext: EncoderContext): Unit

    The method that writes the data for the case class

    The method that writes the data for the case class

    className

    the name of the current case class being written

    writer

    the BsonWriter

    value

    the value to the case class

    encoderContext

    the EncoderContext

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. val bsonNull: BsonNull
    Attributes
    protected
  6. lazy val caseClassesMapInv: Map[Class[_], String]
  7. val classFieldName: String

    The field used to save the class name when saving sealed case classes.

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  9. def decode(reader: BsonReader, decoderContext: DecoderContext): T
    Definition Classes
    MacroCodec → Decoder
  10. def encode(writer: BsonWriter, value: T, encoderContext: EncoderContext): Unit
    Definition Classes
    MacroCodec → Encoder
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def getClassName(reader: BsonReader, decoderContext: DecoderContext): String
    Attributes
    protected
  15. def getEncoderClass(): Class[T]
    Definition Classes
    MacroCodec → Encoder
  16. lazy val hasClassFieldName: Boolean
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. def readArray[V](reader: BsonReader, decoderContext: DecoderContext, clazz: Class[V], typeArgs: List[Class[_]], fieldTypeArgsMap: Map[String, List[Class[_]]]): V
    Attributes
    protected
  23. def readDocument[V](reader: BsonReader, decoderContext: DecoderContext, clazz: Class[V], typeArgs: List[Class[_]], fieldTypeArgsMap: Map[String, List[Class[_]]]): V
    Attributes
    protected
  24. def readValue[V](reader: BsonReader, decoderContext: DecoderContext, clazz: Class[V], typeArgs: List[Class[_]], fieldTypeArgsMap: Map[String, List[Class[_]]]): V
    Attributes
    protected
  25. val registry: CodecRegistry
    Attributes
    protected
  26. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. def writeClassFieldName(writer: BsonWriter, className: String, encoderContext: EncoderContext): Unit
    Attributes
    protected
  32. def writeFieldValue[V](fieldName: String, writer: BsonWriter, value: V, encoderContext: EncoderContext): Unit
    Attributes
    protected
  33. def writeValue[V](writer: BsonWriter, value: V, encoderContext: EncoderContext): Unit
    Attributes
    protected

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from Codec[T]

Inherited from Decoder[T]

Inherited from Encoder[T]

Inherited from AnyRef

Inherited from Any

Ungrouped