opensavvy.ktmongo.bson.official.types¶
Utilities for working with KtMongo's BSON types and utilities to convert them to the official implementations.
Types¶
Decimal128¶
expect class Decimal128 : Number, Comparable<Decimal128>
actual typealias Decimal128 = org.bson.types.Decimal128
Binary integer decimal representation of a 128-bit decimal value, supporting 34 decimal digits of significand and an exponent range of -6143 to +6144.
typealias Decimal128 = org.bson.types.Decimal128
Functions¶
Jvm¶
An ObjectIdGenerator instance that uses the Java driver's org.bson.types.ObjectId's algorithm.
toBinary¶
toKtMongo¶
fun Float32BinaryVector.toKtMongo(): FloatVector
fun Int8BinaryVector.toKtMongo(): ByteVector
fun PackedBitBinaryVector.toKtMongo(): BooleanVector
toKtMongoVector¶
fun BsonBinary.toKtMongoVector(): Vector
Converts an official BsonBinary to a KtMongo Vector.
toOfficial¶
fun BooleanVector.toOfficial(): PackedBitBinaryVector
fun ByteVector.toOfficial(): Int8BinaryVector
fun FloatVector.toOfficial(): Float32BinaryVector
fun ObjectId.toOfficial(): ObjectId
Converts an ObjectId from the Java driver into a KtMongo ObjectId.
fun Timestamp.toOfficial(): BsonTimestamp