KtMongo 0.4.0 is out!
It's the first time I really talk about this project publicly, so let's do this well.
KtMongo is a new MongoDB driver for Kotlin. Currently, it only supports the JVM, based on the official Kotlin driver—but the codebase is ready for the addition of any other driver to support the other platforms.
KtMongo takes inspiration from the ideas behind
#CQ5JC5T0F, but rethinks everything from the bottom up. Operator functions are replaced by a DSL, which is both easier to work with (we can use regular Kotlin conditions and loops) and safer (we cannot use operators in an incorrect context). BSON queries are built in a single pass, without intermediary values. All operators have a JSON representation in their toString implementation.
Currently, KtMongo supports:
• insertOne, insertMany
• updateOne, updateMany, upsertOne
• bulkWrite
• find
• count
• drop
as well as the operators:
• $eq, $gt, $gte, $in, $lt, $lte, $ne, $and, $not, $or, $exists, $type, $all, $elemMatch
• $inc, $rename, $set, $setOnInsert, $unset, $.0.
Interested by learning more?
Visit the documentation!