Skip to content

News

0.23.0 • Multiplatform KotlinX.Serialization, Field.unsafe expansion, replace and KMongo utilities

BSON (Multiplatform)

  • Multiplatform KotlinX.Serialization support (#50, !117, thanks @UnknownJo#e796)

DSL

  • Added Field.unsafe() overloads to allow more use-cases (!132)
  • $concat now allows nullability, and has been moved from ArithmeticValueOperators to StringValueOperators (!134)

Drivers

  • Added replaceOne() and repsertOne() (!133)
  • Added :driver-sync-kmongo and :driver-coroutines-kmongo with a utility function to convert KMongo objects to KtMongo objects (!132)

Documentation

0.21.0 • $group and string aggregation operators

DSL

  • Projections are now represented with booleans instead of integers, for smaller request payloads (#81, !121)

Aggregation stages:

  • Added $group (!120)

Accumulation operators:

Aggregation operators:

  • Added $multiply, $divide and $subtract (!122)
  • Added $trim, $ltrim and $rtrim (!123)
  • Added $toLower and $toUpper (!123)
  • Added $substrCP, $substrBytes, $strLenCP and $strLenBytes (!123)
  • Added $split (!123)
  • Added $replaceOne and $replaceAll (!123)

Dependencies

  • KotlinX.Serialization 1.9.0
  • KotlinX.Coroutines 1.10.2
  • KotlinX.IO 0.8.0
  • MongoDB Java driver 5.5.1

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

0.18.0 • ObjectId, range operators, $min and $max, read concern and Java usage

BSON

  • Pure Kotlin ObjectId implementation (!72)
  • Added utilities for comparing ObjectId and Instant (!72)

DSL

Synchronous driver

  • Added a new experimental module, :driver-sync-java, with utilities for using KtMongo from Java (!69)
  • Java: Added JavaField.of(Customer::name) syntax (!69)
  • Java: Added KtMongo.from() helper (!69)
  • Java: Added options(s -> s.) syntax (!69)

Dependencies