CLOVIS
02/03/2025, 8:00 AMcollection.aggregate()
.match { User::role eq Role.Player }
.skip(30)
.limit(20)
.toList()
In this version, KtMongo also gains support for update pipelines, allowing to use some pipeline operations to update data:
collection.updateManyWithPipeline {
set {
User::isPlayer set (of(User::role) eq of(Role.Player))
}
}
Additionally, this documentation adds a dedicated documentation page to filtered operators:
collection.find {
Invoice::paidAt gteNotNull criteria.minPaidAt
}
as well as filtered collections, which are convenient for logical deletion:
val drafts = collection.filter {
Invoice::status eq Status.Draft
}
drafts.find()
drafts.updateMany { Draft::age inc 1 }
https://opensavvy.gitlab.io/ktmongo/docs