opensavvy.ktmongo.bson.types¶
Data types specified in the BSON specification or in the MongoDB specification.
Types¶
BooleanVector¶
@Serializable(with = BooleanVector.Serializer::class)
class BooleanVector : Vector, Iterable<Boolean> , Collection<Boolean> , List<Boolean>
ByteVector¶
@Serializable(with = ByteVector.Serializer::class)
class ByteVector : Vector, Iterable<Byte> , Collection<Byte> , List<Byte>
ExperimentalGeoBsonApi¶
@RequiresOptIn(message = "This API is part of the experimental GeoJSON implementation. Please provide feedback in https://gitlab.com/opensavvy/ktmongo/-/work_items/76")
annotation class ExperimentalGeoBsonApi
FloatVector¶
@Serializable(with = FloatVector.Serializer::class)
class FloatVector : Vector, Iterable<Float> , Collection<Float> , List<Float>
Geo¶
@Serializable(with = Geo.Serializer::class)
sealed class Geo : BsonFieldWriteable
GeoJSON types supported by MongoDB.
InstantAsBsonDatetimeSerializer¶
Serializer for kotlin.time.Instant that serializes as a BsonType.Datetime.
ObjectId¶
@Serializable(with = ObjectId.Serializer::class)
class ObjectId : Comparable<ObjectId>
Small, likely unique, fast to generate, ordered identifier.
ObjectIdGenerator¶
interface ObjectIdGenerator
An object responsible for generating new ObjectId instances.
Timestamp¶
@Serializable(with = Timestamp.Serializer::class)
class Timestamp(val value: ULong) : Comparable<Timestamp>
Internal MongoDB timestamp used in the oplog.
UuidAsBsonBinarySerializer¶
Serializer for kotlin.uuid.Uuid that serializes as a BsonType.BinaryData with subtype 4 (UUID).
Vector¶
@Serializable(with = Vector.Serializer::class)
interface Vector
A dense array of numeric values stored in a binary storage efficient for storage and retrieval.
Functions¶
compareTo¶
toObjectIdRange¶
fun ClosedRange<Instant>.toObjectIdRange(): ClosedRange<ObjectId>