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
- 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
- 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
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: