0.32.0 • The Unified API, $lookup and date-time aggregation operators¶
The Unified API¶
Since the start of the project, KtMongo only contained collection types (MongoCollection) and no database or client types.
With this version, we're introducing MongoClient and MongoDatabase.
Along with this change, the two KtMongo drivers are tested under the same integration test suite, both with KotlinX.Serialization and with reflection. This will ensure we can catch differences earlier.
Breaking changes: with the occasion of the Unified API, some types have been renamed:
opensavvy.ktmongo.coroutines.JvmMongoCollection→opensavvy.ktmongo.coroutines.CoroutineMongoCollectionopensavvy.ktmongo.sync.JvmMongoCollection→opensavvy.ktmongo.sync.SyncMongoCollection- Similar renaming for
JvmMongoIterable
Soon, the Multiplatform driver will join both official drivers to follow the same API.
- Created the new
:driver-apimodule with common documentation (#129, !259, !260, !262, !263, !276) :driver-coroutinesnow follows the Unified API (!259, !260, !263):driver-syncnow follows the Unified API (!277)
Drivers¶
- Fixed
MongoCollection.asOfficial()which returned a collection not aware of Kotlin types (4a75b28c) - Fixed
deleteManywhich only deleted one document (07d82316)
DSL¶
- Improved compilation errors when the types are incorrect for update operations (!269, with help from the Kotlin team!)
- Added the
matchExpraggregation stage as syntax sugar for$match { $expr: { … } }(3a704e4c) - Added direct array item access in projections (c29fc188)
- Added the
$lookupaggregation stage with all its options (!271) - Added the datetime aggregation operators:
$year,$week,$second,$month,$minute,$millisecond,$isoWeek,$isoWeekYear,$isoDayOfWeek,$hour,$dayOfMonth,$dayOfWeekand$dayOfYear(!274)
Multiplatform¶
Documentation¶
- Added the Quick navigation page which makes it easier to find specific operators (!275)
- The modules
:driver-multiplatformand:driver-multiplatform-wireare now included in the Reference (!258)
Dependencies¶
- Kotlin 2.4.10
- KotlinX.Coroutines 1.11.0
- KotlinX.Serialization 1.11.0
- KotlinX.IO 0.9.1
- Ktor 3.5.1
- Slf4j 2.0.18
- MongoDB JVM Driver 5.9.1
- KMongo 5.6.0
Browse the documentation for this version • View release in GitLab