0.20.0 • $addToSet, $currentDate and the new documentation website
BSON
- Added support for reading and writing
ObjectId(!110)
DSL
- Added support for the update operator
$addToSet(!107) - Added support for the update operator
$currentDate(!108)
ObjectId (!110)$addToSet (!107)$currentDate (!108)ObjectId to opensavvy.ktmongo.bson.types (6e455683, !80)ObjectIdGenerator with multiple implementations (!80)ObjectId.MIN and ObjectId.MAX (!80)BsonContext.newId (!80)BsonReader.readInstant and BsonWriter.writeInstant (244237ed, !88)opensavvy.ktmongo.bson.types.Timestamp (!89)Long to the new Timestamp type (!89)BsonType.DateTime as kotlin.time.Instant (e15001f4, !88)BsonType.RegExp (2bb5e544, !88)BsonType.Timestamp (aa3c9a9e, !89)JvmMongoCollection.find now returns a JvmMongoIterable instead of a MongoIterable (!85)$switch (!90)$type, $isArray, $isNumber, $toBoolean, $toDate, $toDouble, $toInt, $toLong, $toObjectId, $toString and $toUUID (!91)$bitAllClear, $bitsAllSet, $bitsAnyClear and $bitsAnySet (!92)writeConcern (!93)readPreference (!94)Command interface and reorganized all commands to emit their BSON representation (!95)isIn operator to query on ranges (!75)$size filter operator (659dae51, !82)$nor filter operator (20378994, !82)$min and $max update operators (b298039f, !82)readConcern option (0b9520aa, !83):driver-sync-java, with utilities for using KtMongo from Java (!69)JavaField.of(Customer::name) syntax (!69)KtMongo.from() helper (!69)options(s -> s.) syntax (!69)Field's Root type parameter as contravariant (2424b984)Field.unsafe to access field names using a stringly API (508d0ca9, !71)$mul update operator (!74)$regex flexibility, simpler options, Reader.toBson$regex on a nullable String field (!59)BsonDocumentReader.toBson and BsonArrayReader.toBson (9148b99c, !61)BsonDocumentReader.asValue and BsonArrayReader.asValue (19348ff2, !63)BsonValueWriter.pipe (#41, 48267c74, !63)Bson.read to Bson.reader (f503f49e, !61)undefined (c233d391, !62)BsonContext.buildArray (#48, 37f0b868, !63)BsonFieldWriter.write (627ec56e, !63)$in and $nin in FilterQuery (a1e04fe8, !57)BsonDocumentReader (34ca574d, !57)This version contains a major rename that affects almost everything in the DSL module. To learn more about the reasons we did it, see #35 and !54. Although future versions may still have breakages, this was the last planned major change.
models to commandexpr to queryexpr.common to treeoptions to commandoptions.common to commandFilterOperators to FilterQuery, removed FilterExpressionPredicateOperators to FilterQueryPredicate, removed PredicateExpressionUpdateOperators to UpdateQuery, removed UpdateExpressionUpsertOperators to UpsertQueryExpression (and its hierarchy) to BsonNodeValueDsl to AggregationOperatorsBson.toByteArray() and BsonArray.toByteArray() to access the raw binary BSON representation (!49)writeBinaryData's subtype parameter was changed from Byte to UByte to better mirror the BSON spec (!49)BsonType.fromCode() to more easily access a BSON type from its binary representation (!50)Bson.read() and BsonArray.read() to access contents of BSON objects (!50)BsonContext.readDocument() and BsonContext.readArray() to convert from the binary BSON representation to driver objects (!50)toString with a JSON representation (!54)bson since it is currently unused (!49)This new module is a pure Kotlin implementation of the BSON spec (#48, #49).
$nin (!52)$regex (!56)BsonNode.toBson() (!54)UpdatePipelineOperators into the correct package (!54)The :bson module's documentation on the Kotlin MongoDB driver has been removed.
There are multiple breaking changes related to this refactor. For example, buildBsonDocument and buildBsonArray are now members of BsonContext instead of being top-level functions.
:bson module:bson-official (67567b42):bson-tests (5bef8c13):driver-shared-official internal module (404cbb38)Updated Dokka for MkDocs to version 0.5.0, bringing many improvements to the embedded API reference in the website.