Skip to content
OpenSavvy KtMongo
Drop
Initializing search
KtMongo • Alpha
Home
Getting started
Features
Reference (experimental)
Reference (external)
News
OpenSavvy KtMongo
KtMongo • Alpha
Home
Getting started
Getting started
Finding data
Updating data
Migrating from KMongo
Migrating from KMongo
Finding data
Referring to nested documents
Updating data
Features
Features
CRUD operations
Bulk writes
Optional criteria
Filtered collections
Data types
Data types
Nested documents
Arrays
Maps
Reference (experimental)
Reference (experimental)
Kotlin BSON • Based on the official MongoDB implementation
Kotlin BSON • Based on the official MongoDB implementation
opensavvy.ktmongo.bson.official
opensavvy.ktmongo.bson.official
Bson
Bson
context
raw
reader
toByteArray
toString
BsonArray
BsonArray
context
raw
reader
toByteArray
toString
BsonContext
BsonContext
buildArray
buildDocument
JvmBsonContext
JvmBsonContext
JvmBsonContext
buildArray
buildDocument
codecRegistry
readArray
readDocument
opensavvy.ktmongo.bson.official.types
opensavvy.ktmongo.bson.official.types
Decimal128
Decimal128
compareTo
toByte
toDouble
toFloat
toInt
toLong
toShort
Jvm
toKtMongo
toOfficial
Kotlin BSON • Multiplatform abstraction for different BSON implementations
Kotlin BSON • Multiplatform abstraction for different BSON implementations
opensavvy.ktmongo.bson
opensavvy.ktmongo.bson
AnyBsonWriter
AnyBsonWriter
Bson
Bson
reader
toByteArray
toString
BsonArray
BsonArray
reader
toByteArray
toString
BsonArrayReader
BsonArrayReader
asValue
elements
read
toBson
toString
BsonContext
BsonContext
buildArray
buildDocument
readArray
readDocument
BsonDocumentReader
BsonDocumentReader
asValue
entries
read
toBson
toString
BsonFieldWriteable
BsonFieldWriteable
toString
writeTo
BsonFieldWriter
BsonFieldWriter
write
writeArray
writeBinaryData
writeBoolean
writeDBPointer
writeDateTime
writeDecimal128
writeDocument
writeDouble
writeInstant
writeInt32
writeInt64
writeJavaScript
writeJavaScriptWithScope
writeMaxKey
writeMinKey
writeNull
writeObjectId
writeObjectSafe
writeRegularExpression
writeString
writeSymbol
writeTimestamp
writeUndefined
BsonReaderException
BsonReaderException
BsonReaderException
BsonType
BsonType
Array
Array
BinaryData
BinaryData
Boolean
Boolean
Companion
Companion
fromCode
DBPointer
DBPointer
Datetime
Datetime
Decimal128
Decimal128
Document
Document
Double
Double
Int32
Int32
Int64
Int64
JavaScript
JavaScript
JavaScriptWithScope
JavaScriptWithScope
MaxKey
MaxKey
MinKey
MinKey
Null
Null
ObjectId
ObjectId
RegExp
RegExp
String
String
Symbol
Symbol
Timestamp
Timestamp
Undefined
Undefined
code
entries
valueOf
values
BsonValueReader
BsonValueReader
readArray
readBinaryData
readBinaryDataType
readBoolean
readDBPointerId
readDBPointerNamespace
readDateTime
readDecimal128
readDocument
readDouble
readInstant
readInt32
readInt64
readJavaScript
readJavaScriptWithScope
readMaxKey
readMinKey
readNull
readObjectId
readObjectIdBytes
readRegularExpressionOptions
readRegularExpressionPattern
readString
readSymbol
readTimestamp
readUndefined
toString
type
BsonValueWriteable
BsonValueWriteable
toString
writeTo
BsonValueWriter
BsonValueWriter
pipe
writeArray
writeBinaryData
writeBoolean
writeDBPointer
writeDateTime
writeDecimal128
writeDocument
writeDouble
writeInstant
writeInt32
writeInt64
writeJavaScript
writeJavaScriptWithScope
writeMaxKey
writeMinKey
writeNull
writeObjectId
writeObjectSafe
writeRegularExpression
writeString
writeSymbol
writeTimestamp
writeUndefined
BsonWriterDsl
BsonWriterDsl
DEPRECATED_IN_BSON_SPEC
opensavvy.ktmongo.bson.types
opensavvy.ktmongo.bson.types
ObjectId
ObjectId
Companion
Companion
COUNTER_BOUND
MAX
MIN
PROCESS_ID_BOUND
maxAt
minAt
ObjectId
bytes
compareTo
counter
equals
hashCode
hex
processId
timestamp
toString
ObjectIdGenerator
ObjectIdGenerator
Companion
Companion
Default
Default
Default
newId
Hardcoded
Hardcoded
Hardcoded
newId
newId
Timestamp
Timestamp
Companion
Companion
MAX
MAX_COUNTER
MAX_INSTANT
MIN
Timestamp
compareTo
counter
equals
hashCode
instant
toString
value
compareTo
toObjectIdRange
Kotlin BSON • Pure Kotlin Multiplatform implementation
Kotlin BSON • Pure Kotlin Multiplatform implementation
opensavvy.ktmongo.bson.multiplatform
opensavvy.ktmongo.bson.multiplatform
Bson
Bson
reader
toByteArray
toString
BsonArray
BsonArray
reader
toByteArray
toString
BsonContext
BsonContext
BsonContext
buildArray
buildDocument
readArray
readDocument
Kotlin BSON • Test suites
Kotlin BSON • Test suites
opensavvy.ktmongo.bson
opensavvy.ktmongo.bson
writerTests
opensavvy.ktmongo.bson.raw
opensavvy.ktmongo.bson.raw
BsonDeclaration
BsonDeclaration
Companion
Companion
document
hex
json
verify
array
binary
boolean
code
datetime
document
double
int32
int64
minMaxKey
objectId
regex
reprNull
reprUndefined
shouldBeHex
string
testBson
timestamp
KtMongo annotations
KtMongo annotations
opensavvy.ktmongo.dsl
opensavvy.ktmongo.dsl
DangerousMongoApi
DangerousMongoApi
LowLevelApi
LowLevelApi
MongoDB driver for Kotlin (coroutines)
MongoDB driver for Kotlin (coroutines)
opensavvy.ktmongo.coroutines
opensavvy.ktmongo.coroutines
JvmMongoCollection
JvmMongoCollection
aggregate
asKotlinClient
bulkWrite
context
count
countEstimated
deleteMany
deleteOne
drop
find
findOneAndUpdate
insertMany
insertOne
toString
updateMany
updateManyWithPipeline
updateOne
updateOneWithPipeline
upsertOne
upsertOneWithPipeline
JvmMongoIterable
JvmMongoIterable
asFlow
asKotlinMongoIterable
first
firstOrNull
forEach
toList
toString
MongoAggregationPipeline
MongoAggregationPipeline
asIterable
embedInUnionWith
limit
match
project
reinterpret
sample
set
skip
sort
unionWith
unset
withStage
MongoCollection
MongoCollection
MongoIterable
MongoIterable
asFlow
asSequence
first
firstOrNull
forEach
toList
toSequence
toSet
asKtMongo
filter
opensavvy.ktmongo.coroutines.operations
opensavvy.ktmongo.coroutines.operations
AggregationOperations
AggregationOperations
aggregate
BaseOperations
BaseOperations
context
CollectionOperations
CollectionOperations
drop
CountOperations
CountOperations
count
countEstimated
DeleteOperations
DeleteOperations
deleteMany
deleteOne
FindOperations
FindOperations
find
findOne
InsertOperations
InsertOperations
insertMany
insertOne
UpdateOperations
UpdateOperations
bulkWrite
findOneAndUpdate
updateMany
updateOne
upsertOne
UpdatePipelineOperations
UpdatePipelineOperations
updateManyWithPipeline
updateOneWithPipeline
upsertOneWithPipeline
MongoDB driver for Kotlin (synchronous)
MongoDB driver for Kotlin (synchronous)
opensavvy.ktmongo.sync
opensavvy.ktmongo.sync
JvmMongoCollection
JvmMongoCollection
aggregate
asKotlinClient
bulkWrite
context
count
countEstimated
deleteMany
deleteOne
drop
find
findOneAndUpdate
insertMany
insertOne
toString
updateMany
updateManyWithPipeline
updateOne
updateOneWithPipeline
upsertOne
upsertOneWithPipeline
JvmMongoIterable
JvmMongoIterable
asKotlinMongoIterable
asStream
first
firstOrNull
forEach
toList
toString
MongoAggregationPipeline
MongoAggregationPipeline
asIterable
embedInUnionWith
limit
match
project
reinterpret
sample
set
skip
sort
unionWith
unset
withStage
MongoCollection
MongoCollection
MongoIterable
MongoIterable
asSequence
first
firstOrNull
forEach
toList
toSequence
toSet
asKtMongo
filter
opensavvy.ktmongo.sync.operations
opensavvy.ktmongo.sync.operations
AggregationOperations
AggregationOperations
aggregate
BaseOperations
BaseOperations
context
CollectionOperations
CollectionOperations
drop
CountOperations
CountOperations
count
countEstimated
DeleteOperations
DeleteOperations
deleteMany
deleteOne
FindOperations
FindOperations
find
findOne
InsertOperations
InsertOperations
insertMany
insertOne
UpdateOperations
UpdateOperations
bulkWrite
findOneAndUpdate
updateMany
updateOne
upsertOne
UpdatePipelineOperations
UpdatePipelineOperations
updateManyWithPipeline
updateOneWithPipeline
upsertOneWithPipeline
MongoDB driver for Kotlin (synchronous, with Java helpers)
MongoDB driver for Kotlin (synchronous, with Java helpers)
opensavvy.ktmongo.sync
opensavvy.ktmongo.sync
JavaField
JavaField
Companion
Companion
of
child
path
KtMongo
KtMongo
from
filter
options
sort
MongoDB request DSL
MongoDB request DSL
opensavvy.ktmongo.dsl
opensavvy.ktmongo.dsl
KtMongoDsl
KtMongoDsl
opensavvy.ktmongo.dsl.aggregation
opensavvy.ktmongo.dsl.aggregation
AbstractPipeline
AbstractPipeline
AbstractPipeline
chain
context
toString
withStage
writeTo
AbstractValue
AbstractValue
AbstractValue
context
simplify
toString
writeTo
AccumulationOperators
AccumulationOperators
AggregationOperators
AggregationOperators
AggregationPipeline
AggregationPipeline
Pipeline
Pipeline
context
reinterpret
toString
withStage
writeTo
PipelineChainLink
PipelineChainLink
PipelineChainLink
toBsonList
toList
toString
withStage
writeTo
UpdatePipeline
UpdatePipeline
Value
Value
context
freeze
simplify
toString
writeTo
opensavvy.ktmongo.dsl.aggregation.accumulators
opensavvy.ktmongo.dsl.aggregation.accumulators
ArithmeticValueAccumulators
ArithmeticValueAccumulators
sum
ValueAccumulators
ValueAccumulators
opensavvy.ktmongo.dsl.aggregation.operators
opensavvy.ktmongo.dsl.aggregation.operators
ArithmeticValueOperators
ArithmeticValueOperators
abs
ceil
concat
div
floor
minus
plus
times
ArrayValueOperators
ArrayValueOperators
filter
map
sorted
sortedBy
sortedDescending
take
takeLast
ComparisonValueOperators
ComparisonValueOperators
eq
gt
gte
lt
lte
ne
ConditionalValueOperators
ConditionalValueOperators
cond
switch
StringValueOperators
StringValueOperators
length
lengthUTF8
lowercase
replace
replaceFirst
split
substring
substringUTF8
trim
trimEnd
trimStart
uppercase
TrigonometryValueOperators
TrigonometryValueOperators
acos
acosh
asin
asinh
atan
atanh
cos
cosh
sin
sinh
tan
tanh
toDegrees
toRadians
TypeValueOperators
TypeValueOperators
isArray
isNumber
toBoolean
toDouble
toInstant
toInt
toLong
toObjectId
toText
toUuid
type
ValueOperators
ValueOperators
context
div
of
opensavvy.ktmongo.dsl.aggregation.stages
opensavvy.ktmongo.dsl.aggregation.stages
HasCount
HasCount
countTo
HasGroup
HasGroup
group
HasLimit
HasLimit
limit
HasMatch
HasMatch
match
HasProject
HasProject
project
HasSample
HasSample
sample
HasSet
HasSet
set
HasSkip
HasSkip
skip
HasSort
HasSort
sort
HasUnionWith
HasUnionWith
unionWith
HasUnionWithCompatibility
HasUnionWithCompatibility
embedInUnionWith
HasUnset
HasUnset
unset
ProjectStageOperators
ProjectStageOperators
excludeId
include
SetStageOperators
SetStageOperators
set
setIf
setUnless
UnsetStageOperators
UnsetStageOperators
exclude
opensavvy.ktmongo.dsl.command
opensavvy.ktmongo.dsl.command
AvailableInBulkWrite
AvailableInBulkWrite
BulkWrite
BulkWrite
BulkWrite
accept
filtered
insertMany
insertOne
operations
options
updateMany
updateOne
upsertOne
BulkWriteOptions
BulkWriteOptions
BulkWriteOptions
Command
Command
Count
Count
Count
filter
options
CountOptions
CountOptions
CountOptions
DeleteMany
DeleteMany
DeleteMany
filter
options
DeleteManyOptions
DeleteManyOptions
DeleteManyOptions
DeleteOne
DeleteOne
DeleteOne
filter
options
DeleteOneOptions
DeleteOneOptions
DeleteOneOptions
Drop
Drop
Drop
options
DropOptions
DropOptions
DropOptions
Find
Find
Find
filter
options
FindOptions
FindOptions
FindOptions
InsertMany
InsertMany
InsertMany
documents
options
InsertManyOptions
InsertManyOptions
InsertManyOptions
InsertOne
InsertOne
InsertOne
document
options
InsertOneOptions
InsertOneOptions
InsertOneOptions
UpdateMany
UpdateMany
UpdateMany
filter
options
update
UpdateManyWithPipeline
UpdateManyWithPipeline
UpdateManyWithPipeline
filter
options
update
updates
UpdateOne
UpdateOne
UpdateOne
filter
options
update
UpdateOneWithPipeline
UpdateOneWithPipeline
UpdateOneWithPipeline
filter
options
update
updates
UpdateOptions
UpdateOptions
UpdateOptions
UpsertOne
UpsertOne
UpsertOne
filter
options
update
UpsertOneWithPipeline
UpsertOneWithPipeline
UpsertOneWithPipeline
filter
options
update
updates
opensavvy.ktmongo.dsl.options
opensavvy.ktmongo.dsl.options
AbstractCompoundOption
AbstractCompoundOption
AbstractCompoundOption
simplify
AbstractOption
AbstractOption
AbstractOption
name
read
LimitOption
LimitOption
LimitOption
limit
MaxTimeOption
MaxTimeOption
MaxTimeOption
timeout
Option
Option
name
read
Options
Options
allOptions
toString
ReadConcern
ReadConcern
Available
Available
Linearizable
Linearizable
Local
Local
Majority
Majority
Snapshot
Snapshot
bsonName
valueOf
values
ReadConcernOption
ReadConcernOption
ReadConcernOption
concern
ReadPreference
ReadPreference
Nearest
Nearest
Primary
Primary
PrimaryPreferred
PrimaryPreferred
Secondary
Secondary
SecondaryPreferred
SecondaryPreferred
bsonName
valueOf
values
ReadPreferenceOption
ReadPreferenceOption
ReadPreferenceOption
concern
SkipOption
SkipOption
SkipOption
skip
SortOption
SortOption
SortOption
block
SortOptionDsl
SortOptionDsl
ascending
descending
WithLimit
WithLimit
limit
WithMaxTime
WithMaxTime
maxTime
WithReadConcern
WithReadConcern
readConcern
WithReadPreference
WithReadPreference
readPreference
WithSkip
WithSkip
skip
WithSort
WithSort
sort
WithWriteConcern
WithWriteConcern
writeConcern
WriteAcknowledgment
WriteAcknowledgment
Majority
Majority
Nodes
Nodes
Nodes
count
Tagged
Tagged
Tagged
tag
WriteConcern
WriteConcern
Companion
Companion
FireAndForget
Majority
Primary
WriteConcern
acknowledgment
copy
writeTimeout
writeToJournal
WriteConcernOption
WriteConcernOption
WriteConcernOption
concern
option
opensavvy.ktmongo.dsl.path
opensavvy.ktmongo.dsl.path
Field
Field
Companion
Companion
unsafe
div
path
unsafe
FieldDsl
FieldDsl
div
field
get
Path
Path
Companion
Companion
Path
asSequence
parent
segment
toString
Path
PathSegment
PathSegment
AllPositional
AllPositional
toString
Field
Field
Field
name
toString
Indexed
Indexed
index
Indexed
toString
Positional
Positional
toString
div
get
opensavvy.ktmongo.dsl.query
opensavvy.ktmongo.dsl.query
FilterQuery
FilterQuery
and
any
anyValue
bitsAllClear
bitsAllSet
bitsAnyClear
bitsAnySet
containsAll
div
doesNotExist
eq
eqNotNull
exists
expr
gt
gtNotNull
gte
gteNotNull
hasType
invoke
isEmpty
isIn
isMapEmpty
isMapNotEmpty
isNotEmpty
isNotNull
isNotOneOf
isNotUndefined
isNull
isOneOf
isUndefined
lt
ltNotNull
lte
lteNotNull
ne
nor
not
or
regex
size
FilterQuery
FilterQueryPredicate
FilterQueryPredicate
bitsAllClear
bitsAllSet
bitsAnyClear
bitsAnySet
doesNotExist
eq
eqNotNull
exists
gt
gtNotNull
gte
gteNotNull
hasType
isNotNull
isNotOneOf
isNotUndefined
isNull
isOneOf
isUndefined
lt
ltNotNull
lte
lteNotNull
ne
not
regex
FilterQueryPredicate
UpdateQuery
UpdateQuery
addToSet
all
inc
max
min
mul
plusAssign
renameTo
selected
set
setIf
setToCurrentDate
setUnless
unset
UpdateQuery
UpdateWithPipelineQuery
UpdateWithPipelineQuery
project
set
unset
UpdateWithPipelineQuery
UpsertQuery
UpsertQuery
setOnInsert
UpsertQuery
opensavvy.ktmongo.dsl.tree
opensavvy.ktmongo.dsl.tree
AbstractBsonNode
AbstractBsonNode
AbstractBsonNode
Companion
Companion
context
simplify
toString
writeTo
AbstractCompoundBsonNode
AbstractCompoundBsonNode
AbstractCompoundBsonNode
Companion
Companion
accept
simplify
BsonNode
BsonNode
Companion
Companion
context
freeze
simplify
toBson
toString
writeTo
CompoundBsonNode
CompoundBsonNode
Companion
Companion
accept
CompoundNode
CompoundNode
accept
Node
Node
freeze
acceptAll
Shared utilities for the sync and coroutinesBased KtMongo drivers based on the official Kotlin driver
Shared utilities for the sync and coroutinesBased KtMongo drivers based on the official Kotlin driver
opensavvy.ktmongo.official
opensavvy.ktmongo.official
toJava
opensavvy.ktmongo.official.command
opensavvy.ktmongo.official.command
toJava
opensavvy.ktmongo.official.options
opensavvy.ktmongo.official.options
readLimit
readMaxTimeMS
readReadConcern
readReadPreference
readSkip
readSortDocument
toJava
Reference (external)
Reference (external)
Reference
News
News
News by category
Archive
Archive
2025
2024
jvm
MongoDB request DSL
•
opensavvy.ktmongo.dsl.command
•
Drop
•
Drop
Drop
¶
constructor
(
context
:
)
Back to top