object BsonTransformer extends DefaultBsonTransformers
Maps the following native scala types to BsonValues:
BsonValue => BsonValue
BigDecimal
=> BsonDecimal128Boolean => BsonBoolean
String => BsonString
Array[Byte] => BsonBinary
Regex => BsonRegex
Date => BsonDateTime
Decimal128
=> BsonDecimal128ObjectId => BsonObjectId
Int => BsonInt32
Long => BsonInt64
Double => BsonDouble
None => BsonNull
immutable.Document => BsonDocument
mutable.Document => BsonDocument
Option[T] => BsonValue
whereT
is one of the above typesSeq[(String, T)] => BsonDocument
whereT
is one of the above typesSeq[T] => BsonArray
whereT
is one of the above types
- Alphabetic
- By Inheritance
- BsonTransformer
- DefaultBsonTransformers
- LowPrio
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- implicit def transformKeyValuePairs[T](implicit transformer: BsonTransformer[T]): BsonTransformer[Seq[(String, T)]]
Transforms
Seq[(String, T)]
toBsonDocument
Transforms
Seq[(String, T)]
toBsonDocument
- T
the type of the values
- transformer
implicit transformer for type
T
- returns
a BsonDocument containing the values
- Definition Classes
- LowPrio
- implicit def transformOption[T](implicit transformer: BsonTransformer[T]): BsonTransformer[Option[T]]
Transforms
Option[T]
toBsonValue
Transforms
Option[T]
toBsonValue
- Definition Classes
- DefaultBsonTransformers
- implicit def transformSeq[T](implicit transformer: BsonTransformer[T]): BsonTransformer[Seq[T]]
Transforms
Seq[T]
toBsonArray
Transforms
Seq[T]
toBsonArray
- T
the type of the values
- transformer
implicit transformer for type
T
- returns
a BsonArray containing all the values
- Definition Classes
- LowPrio
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- implicit object TransformBigDecimal extends BsonTransformer[BigDecimal]
Transforms
BigDecimal
toBsonDecimal128
Transforms
BigDecimal
toBsonDecimal128
- Definition Classes
- DefaultBsonTransformers
- implicit object TransformBinary extends BsonTransformer[Array[Byte]]
Transforms
Array[Byte]
toBsonBinary
Transforms
Array[Byte]
toBsonBinary
- Definition Classes
- DefaultBsonTransformers
- implicit object TransformBoolean extends BsonTransformer[Boolean]
Transforms
Boolean
toBsonBoolean
Transforms
Boolean
toBsonBoolean
- Definition Classes
- DefaultBsonTransformers
- implicit object TransformBsonValue extends BsonTransformer[BsonValue]
Noop transformer for
BsonValue
sNoop transformer for
BsonValue
s- Definition Classes
- DefaultBsonTransformers
- implicit object TransformDateTime extends BsonTransformer[Date]
Transforms
Date
toBsonDateTime
Transforms
Date
toBsonDateTime
- Definition Classes
- DefaultBsonTransformers
- implicit object TransformDecimal128 extends BsonTransformer[Decimal128]
Transforms
Decimal128
toBsonDecimal128
Transforms
Decimal128
toBsonDecimal128
- Definition Classes
- DefaultBsonTransformers
- implicit object TransformDouble extends BsonTransformer[Double]
Transforms
Double
toBsonDouble
Transforms
Double
toBsonDouble
- Definition Classes
- DefaultBsonTransformers
- implicit object TransformInt extends BsonTransformer[Int]
Transforms
Int
toBsonInt32
Transforms
Int
toBsonInt32
- Definition Classes
- DefaultBsonTransformers
- implicit object TransformLong extends BsonTransformer[Long]
Transforms
Long
toBsonInt64
Transforms
Long
toBsonInt64
- Definition Classes
- DefaultBsonTransformers
- implicit object TransformNone extends BsonTransformer[Option[Nothing]]
Transforms
None
toBsonNull
Transforms
None
toBsonNull
- Definition Classes
- DefaultBsonTransformers
- implicit object TransformObjectId extends BsonTransformer[ObjectId]
Transforms
ObjectId
toBsonObjectId
Transforms
ObjectId
toBsonObjectId
- Definition Classes
- DefaultBsonTransformers
- implicit object TransformRegex extends BsonTransformer[Regex]
Transforms
Regex
toBsonRegex
Transforms
Regex
toBsonRegex
- Definition Classes
- DefaultBsonTransformers
- implicit object TransformString extends BsonTransformer[String]
Transforms
String
toBsonString
Transforms
String
toBsonString
- Definition Classes
- DefaultBsonTransformers
- implicit object TransformImmutableDocument extends BsonTransformer[collection.immutable.Document]
Transforms
immutable.Document
toBsonDocument
Transforms
immutable.Document
toBsonDocument
- Definition Classes
- LowPrio
- implicit object TransformMutableDocument extends BsonTransformer[collection.mutable.Document]
Transforms
mutable.Document
toBsonDocument
Transforms
mutable.Document
toBsonDocument
- Definition Classes
- LowPrio
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
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: