Skip to content

opensavvy.ktmongo.bson.official.types

Types

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

fun Vector.toBinary(): BsonBinary

Converts a KtMongo Vector to an official BsonBinary.

toKtMongo

fun BsonTimestamp.toKtMongo(): Timestamp
fun Float32BinaryVector.toKtMongo(): FloatVector
fun Int8BinaryVector.toKtMongo(): ByteVector
fun PackedBitBinaryVector.toKtMongo(): BooleanVector
fun ObjectId.toKtMongo(): ObjectId

Converts an ObjectId from KtMongo into one from the Java driver.

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