kmongo
kmongo copied to clipboard
Mongo query type-safe builder
like https://kotlinlang.org/docs/reference/type-safe-builders.html
Would this be an acceptable syntax?
val ret = database.findOne<User> {
User::name.filter {
eq("test")
}
}
or
val ret = database.getCollection<User>().findOne {
User::name.filter {
eq("test")
}
}
I think so. But we need more complex examples. Look at this samples: https://litote.org/kmongo/typed-queries/#samples