Skip to content

0.19.0 • Pure Kotlin ObjectId and Timestamp, $switch, type aggregation operators, bitwise filter operators, writeConcern and readPreference

BSON

  • Moved ObjectId to opensavvy.ktmongo.bson.types (#6e455683, !80)
  • Added ObjectIdGenerator with multiple implementations (!80)
  • Added ObjectId.MIN and ObjectId.MAX (!80)
  • Added BsonContext.newId (!80)
  • Added BsonReader.readInstant and BsonWriter.writeInstant (#244237ed, !88)
  • Added opensavvy.ktmongo.bson.types.Timestamp (!89)
  • Changed timestamp APIs from Long to the new Timestamp type (!89)

BSON (official)

  • Deleted the old expect class opensavvy.ktmongo.bson.official.types.ObjectId (!80)
  • Added a codec for the new ObjectId (!80)

BSON (multiplatform)

  • Decreased data copying when reading data (#417128b5, !84)
  • Removed autoboxing in the implementation of the reader (#17cab93a, !84)
  • Added no-copy piping of BSON from a reader to a writer (!86)
  • Added support for reading and writing BsonType.DateTime as kotlin.time.Instant (#e15001f4, !88)
  • Added support for reading and writing BsonType.RegExp (#2bb5e544, !88)
  • Added support for reading and writing BsonType.Timestamp (#aa3c9a9e, !89)

Official driver

  • JvmMongoCollection.find now returns a JvmMongoIterable instead of a MongoIterable (!85)

DSL

  • Added the aggregation operator $switch (!90)
  • Added the aggregation operators $type, $isArray, $isNumber, $toBoolean, $toDate, $toDouble, $toInt, $toLong, $toObjectId, $toString and $toUUID (!91)
  • Added the filter operators $bitAllClear, $bitsAllSet, $bitsAnyClear and $bitsAnySet (!92)
  • Added the option writeConcern (!93)
  • Added the option readPreference (!94)
  • Created the Command interface and reorganized all commands to emit their BSON representation (!95)

Documentation

  • Added a section on aggregation support to the KMongo migration page (#87, !103)

Dependencies

  • Kotlin 2.2.0

Browse the documentation for this versionView release in GitLab