Skip to content

MongoSwift 0.2.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@kmahar kmahar released this 18 Dec 20:45

We are pleased to announce the 0.2.0 release of the MongoDB Swift driver.

This release includes a number of major improvements, detailed in the following sections.

Please note that as of this release we now require using Swift version 5.0 or greater, and version 1.15.3 or greater of the MongoDB C driver.

Thank you to everyone who contributed to this release!

Improvements for use in multithreaded applications

MongoClients now automatically pool connections to the server. We recommend sharing clients across threads in your application when possible in order to decrease the total number of connections to the server your application has open at a time.

MongoClient, MongoDatabase, and MongoCollection are now all safe to share across threads.

Please see our new multithreading guide for more information.

New BSON API

We've significantly changed the API for the driver's BSON library to make using BSON types and constructing Documents much easier.

Please see our guide describing how to use the BSON library, including a migration guide for updating from the old API.

Other new features of note

A number of other new features have been added since our last release, including:

  • Change streams support (please see our guide on using change streams here)
  • API for specifying TLS options for use with a MongoClient

Included tickets

Bug

  • [SWIFT-395] - wtimeoutMS is truncated if set to a value > Int32.max

New Feature

  • [SWIFT-133] - Implement new count API
  • [SWIFT-173] - Implement Initial DNS Seedlist discovery spec
  • [SWIFT-174] - Implement Database Enumeration spec
  • [SWIFT-176] - Implement change streams API and basic tests
  • [SWIFT-178] - All writes retryable support
  • [SWIFT-374] - Integrate libmongoc client pool into operation execution
  • [SWIFT-471] - Allow user-specified SSL options at the client level
  • [SWIFT-489] - Errors raised by drivers should include codeName string from server response
  • [SWIFT-561] - Document connection string and URI option precedence rules
  • [SWIFT-587] - Retryable Reads
  • [SWIFT-629] - Introduce the BSON enum
  • [SWIFT-630] - Integrate BSON enum into the existing API and update tests

Task

  • [SWIFT-364] - Update minimum required version to libmongoc 1.15.3
  • [SWIFT-389] - Remove deprecated bsonEquals functions
  • [SWIFT-632] - Drop Swift 4.2 support
  • [SWIFT-645] - Remove ReadConcern(_ doc: Document) initializer
  • [SWIFT-656] - Remove embedded driver
  • [SWIFT-659] - Document should not conform to ExpressibleByArrayLiteral

Improvement

  • [SWIFT-185] - Support maxTimeMS for createIndexes and dropIndexes command
  • [SWIFT-215] - Array should conditionally conform to BSONValue
  • [SWIFT-320] - All BSONValue types should be Hashable using 4.2+ Hashable API
  • [SWIFT-375] - Ensure MongoClient, MongoCollection and MongoDatabase are thread safe
  • [SWIFT-412] - MongoDatabase.drop and MongoCollection.drop should allow specifying a WriteConcern
  • [SWIFT-501] - Rationalize how we handle client options provided in URI vs. options struct
  • [SWIFT-503] - Validate that w and wtimeoutMS are non-negative in WriteConcern initializer
  • [SWIFT-504] - ReadConcern and WriteConcern should no longer wrap mongoc types
  • [SWIFT-513] - Standardize on parameter ordering for options initializers
  • [SWIFT-514] - Make MongoDatabase and MongoCollection structs
  • [SWIFT-515] - Rationalize handling of server default vs. not-provided read concern, write concern
  • [SWIFT-517] - Return Connection to pool as soon as MongoCursor is exhausted
  • [SWIFT-522] - Move listCollections filter to top level
  • [SWIFT-526] - Standardize index command options
  • [SWIFT-600] - Decimal128.writeToCurrentPosition should pass a non-mutable pointer to bson_iter_overwrite_decimal128
  • [SWIFT-607] - Implement collection enumeration spec
  • [SWIFT-608] - Implement index enumeration spec