Swiftpack.co - Swift Packages by mongodb

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.

Packages published by mongodb

mongodb/mongo-swift-driver v1.3.1
The official MongoDB driver for Swift
⭐️ 338
🕓 1 year ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
1.3.1
1 year ago
This release corrects a minor error that occurred during the 1.3.0 release process, where v1.3.0 was inadvertently tagged before the version string the driver reports in its handshake with the server was updated. As a result, "1.3.0-beta.1" would be incorrectly reported as the driver version in MongoDB server logs. There are no other changes from the 1.3.0 release.
1.3.0
1 year ago
We are pleased to announce the GA of our 1.3.0 release, which contains no changes from our last pre-release, 1.3.0-beta.1. This release most notably adds the following features: ## Async/Await APIs This release adds a new async/await version of our entire API surface to allow you to start using the driver with Swift concurrency! For example, to create a collection and insert a document: ```swift let collection = try await db.createCollection("foo") try await collection.insertOne(["x": 1]) ``` We’ve also made `MongoCursor` and `ChangeStream` conform to [`AsyncSequence`](https://developer.apple.com/documentation/swift/asyncsequence). This protocol provides a number of convenience methods for working with sequences, and enables you to consume their values via a for loop, for example: ```swift for try await doc in try await collection.find() { print(doc) } ``` We’ve written a [blog post](https://kaitlin.dev/2022/01/28/adopting-structured-concurrency.html) that discusses this in more detail, and have also updated all of our documentation and our [Vapor example project](https://github.com/mongodb/mongo-swift-driver/tree/main/Examples/VaporExample) to use Swift concurrency to help you get started using these new APIs. These APIs are available for Swift 5.5.2+ developers on Linux and macOS 10.15+. Please feel free to file an issue if you run into any problems or have suggestions for improving the new APIs! ## New `MongoConnectionString` type This release also adds a new `MongoConnectionString` type modeling a MongoDB [connection string](https://docs.mongodb.com/manual/reference/connection-string/), and moves the driver logic for parsing and validating a connection string, which was previously handled by the C driver, into the Swift layer. This type conforms to `LosslessStringConvertible` and so can be initialized via and converted to a `String` , and has mutable properties to allow setting/changing values. For example: ```swift var connStr = MongoConnectionString("mongodb://localhost:27017") connStr.readConcern = .local print(connStr) // prints "mongodb://localhost:27017/?readconcernlevel=local" ``` You can now use this type to initialize a `MongoClient`: ```swift var connStr = MongoConnectionString("mongodb://localhost:27017") connStr.readConcern = .local let client = try MongoClient(connStr, using: yourEventLoopGroup) ``` ## Included Tickets Below are a selected list of tickets with user-facing implications; for a full list of completed tickets see this [Jira query](https://jira.mongodb.org/issues/?jql=project%20%3D%20SWIFT%20and%20fixVersion%20%3D%201.3.0%20and%20resolution%20%3D%20Fixed%20). ### New Feature * [ [SWIFT-1160](https://jira.mongodb.org/browse/SWIFT-1160) ] - Introduce new MongoConnectionString type * [ [SWIFT-1161](https://jira.mongodb.org/browse/SWIFT-1161) ] - MongoConnectionString authentication options support * [ [SWIFT-1162](https://jira.mongodb.org/browse/SWIFT-1162) ] - MongoConnectionString TLS options support * [ [SWIFT-1163](https://jira.mongodb.org/browse/SWIFT-1163) ] - MongoConnectionString non-auth, non-TLS options support * [ [SWIFT-1165](https://jira.mongodb.org/browse/SWIFT-1165) ] - Initialization of MongoClient via MongoConnectionString * [ [SWIFT-1174](https://jira.mongodb.org/browse/SWIFT-1174) ] - MongoConnectionString Unix domain socket support * [ [SWIFT-1384](https://jira.mongodb.org/browse/SWIFT-1384) ] - Support ‘let’ option for multiple CRUD commands * [ [SWIFT-1389](https://jira.mongodb.org/browse/SWIFT-1389) ] - Implement MongoClient and ClientSession async/await APIs * [ [SWIFT-1390](https://jira.mongodb.org/browse/SWIFT-1390) ] - Implement MongoDatabase async/await API methods * [ [SWIFT-1391](https://jira.mongodb.org/browse/SWIFT-1391) ] - Implement MongoCollection async/await API methods * [ [SWIFT-1392](https://jira.mongodb.org/browse/SWIFT-1392) ] - Make MongoCursor and ChangeStream conform to AsyncSequence * [ [SWIFT-1405](https://jira.mongodb.org/browse/SWIFT-1405) ] - Implement description for MongoConnectionString * [ [SWIFT-1407](https://jira.mongodb.org/browse/SWIFT-1407) ] - Support ipv4 address parsing in MongoConnectionString ### Improvement * [ [SWIFT-1451](https://jira.mongodb.org/browse/SWIFT-1451) ] - Use -cross-module-optimization flag in Vapor example ### Task * [ [SWIFT-1493](https://jira.mongodb.org/browse/SWIFT-1493) ] - Update vendored libmongoc to 1.21.0
1.3.0-beta.1
2 years ago
We are pleased to announce the first beta for our 1.3.0 driver release, which follows two previous alphas. We have recently gained the capability to test our new `async` APIs on macOS in CI (previously, we only could on Linux) and are moving toward a stable 1.3.0 GA release in the near future. Compared to the previous pre-release 1.3.0-alpha.2, this release contains a single bug fix, for SWIFT-1510. The bug was that, although we document that `MongoCursor`, `ChangeStream` and `ClientSession` will be automatically cleaned up upon `deinit` on any platform and Swift version where concurrency is available, this automatic cleanup would not actually occur on macOS < 12. ## Included Tickets * SWIFT-1510: Update #available statements for automatic cleanup logic in deinits to macOS 10.15+
1.3.0-alpha.2
2 years ago
We are pleased to announce the second alpha of our 1.3.0 release. The primary changes in this release from the previous alpha: * The minimum Swift version required to use the new `async` APIs has increased to Swift 5.5.2 from Swift 5.5.0, and the new `async` APIs are now available on macOS 10.15+, rather than macOS 12+. Thank you to @atultw for contributing these changes! * The driver’s vendors copy of libmongoc has been updated from version 1.19.2 to version 1.21.0. Please see the libmongoc [release notes](https://github.com/mongodb/mongo-c-driver/releases) for details on the included changes. ## Contributors Thanks to everyone who contributed to this release! * @atultw * @isabelatkinson * @kmahar
1.3.0-alpha.1
2 years ago
We are pleased to announce the first alpha of our 1.3.0 release, containing the following new features: ## Async/Await APIs This release adds a new async/await version of our entire API surface to allow you to start using the driver with Swift concurrency! For example, to create a collection and insert a document: ```swift let collection = try await db.createCollection("foo") try await collection.insertOne(["x": 1]) ``` We’ve also made `MongoCursor` and `ChangeStream` conform to [`AsyncSequence`](https://developer.apple.com/documentation/swift/asyncsequence). This protocol provides a number of convenience methods for working with sequences, and enables you to consume their values via a for loop, for example: ```swift for try await doc in try await collection.find() { print(doc) } ``` We’ve written a [blog post](https://kaitlin.dev/2022/01/28/adopting-structured-concurrency.html) that discusses this in more detail, and have also updated all of our documentation and our [Vapor example project](https://github.com/mongodb/mongo-swift-driver/tree/main/Examples/VaporExample) to use Swift concurrency to help you get started using these new APIs. Currently, these APIs are available for Swift 5.5.0+ developers on Linux and macOS 12. For future alpha releases we are exploring making these APIs available on older macOS versions as well where concurrency has recently become available. Please feel free to file an issue if you run into any problems or have suggestions for improving the new APIs! ## New `MongoConnectionString` type This release also adds a new `MongoConnectionString` type modeling a MongoDB [connection string](https://docs.mongodb.com/manual/reference/connection-string/), and moves the driver logic for parsing and validating a connection string, which was previously handled by the C driver, into the Swift layer. This type conforms to `LosslessStringConvertible` and so can be initialized via and converted to a `String` , and has mutable properties to allow setting/changing values. For example: ```swift var connStr = MongoConnectionString("mongodb://localhost:27017") connStr.readConcern = .local print(connStr) // prints "mongodb://localhost:27017/?readconcernlevel=local" ``` You can now use this type to initialize a `MongoClient`: ```swift var connStr = MongoConnectionString("mongodb://localhost:27017") connStr.readConcern = .local let client = try MongoClient(connStr, using: yourEventLoopGroup) ``` ## Included Tickets Below are a selected list of tickets with user-facing implications; for a full list of completed tickets see this [Jira query](https://jira.mongodb.org/issues/?jql=project%20%3D%20SWIFT%20and%20fixVersion%20%3D%201.3.0%20and%20resolution%20%3D%20Fixed%20). ### New Feature * [ [SWIFT-1160](https://jira.mongodb.org/browse/SWIFT-1160) ] - Introduce new MongoConnectionString type * [ [SWIFT-1161](https://jira.mongodb.org/browse/SWIFT-1161) ] - MongoConnectionString authentication options support * [ [SWIFT-1162](https://jira.mongodb.org/browse/SWIFT-1162) ] - MongoConnectionString TLS options support * [ [SWIFT-1163](https://jira.mongodb.org/browse/SWIFT-1163) ] - MongoConnectionString non-auth, non-TLS options support * [ [SWIFT-1165](https://jira.mongodb.org/browse/SWIFT-1165) ] - Initialization of MongoClient via MongoConnectionString * [ [SWIFT-1174](https://jira.mongodb.org/browse/SWIFT-1174) ] - MongoConnectionString Unix domain socket support * [ [SWIFT-1384](https://jira.mongodb.org/browse/SWIFT-1384) ] - Support ‘let’ option for multiple CRUD commands * [ [SWIFT-1389](https://jira.mongodb.org/browse/SWIFT-1389) ] - Implement MongoClient and ClientSession async/await APIs * [ [SWIFT-1390](https://jira.mongodb.org/browse/SWIFT-1390) ] - Implement MongoDatabase async/await API methods * [ [SWIFT-1391](https://jira.mongodb.org/browse/SWIFT-1391) ] - Implement MongoCollection async/await API methods * [ [SWIFT-1392](https://jira.mongodb.org/browse/SWIFT-1392) ] - Make MongoCursor and ChangeStream conform to AsyncSequence * [ [SWIFT-1405](https://jira.mongodb.org/browse/SWIFT-1405) ] - Implement description for MongoConnectionString * [ [SWIFT-1407](https://jira.mongodb.org/browse/SWIFT-1407) ] - Support ipv4 address parsing in MongoConnectionString ### Improvement * [ [SWIFT-1451](https://jira.mongodb.org/browse/SWIFT-1451) ] - Use -cross-module-optimization flag in Vapor example
v1.2.0
2 years ago
We are pleased to announce the 1.2.0 release of the Swift driver. This release most notably adds support for the following features: ## MongoDB Versioned API MongoDB 5.0 introduced supported for the [versioned API](https://docs.mongodb.com/manual/reference/versioned-api/), which will make it much easier for users to upgrade their server versions without experiencing backward-breaking changes. To specify an API version for your application, provide a version via `MongoClientOptions` (currently, the only supported API version is 1): ```swift let opts = MongoClientOptions( serverAPI: MongoServerAPI(version: .v1) ) // Create an async client let client = try MongoClient("mongodb://localhost:27017", using: myEventLoopGroup, options: opts) // Or, create a sync client let client = try MongoClient("mongodb://localhost:27017", options: opts) ``` ## Serverless MongoDB Support / Load Balancer Support This release adds support for using the driver with [Serverless MongoDB](https://www.mongodb.com/cloud/atlas/serverless), which is currently in preview. This is enabled via new support for connecting to a MongoDB cluster behind a TCP load balancer, which is supported via the `loadBalanced` connection string option or by setting the `loadBalanced` property on `MongoClientOptions`. ## MongoDB 5.0 Support This release adds full support for using new MongoDB 5.0 features, including creating and working with time series collections as well as extended support for the “snapshot” read concern; see the [MongoDB 5.0 release notes](https://docs.mongodb.com/manual/release-notes/5.0/) for more details. ## OCSP Support The driver previously had implicit support for the Online Certificate Status Protocol (OCSP) via the underlying C driver, however as part of this release we have added explicit testing for this from Swift along with support for configuring it programmatically via `MongoClientOptions`, using the `tlsDisableCertificateRevocationCheck` and `tlsDisableOCSPEndpointCheck` options. Please see our [TLS Guide](https://github.com/mongodb/mongo-swift-driver/blob/main/Guides/TLS-Guide.md#server-certificate-validation) for more information. Below are a selected list of tickets with user-facing implications; for a full list of completed tickets see this [Jira query](https://jira.mongodb.org/browse/SWIFT-1347?jql=project%20%3D%20SWIFT%20and%20fixVersion%20%3D%201.2.0%20and%20resolution%20%3D%20Fixed%20). ## Included Tickets ### Bug * SWIFT-1322 - listCollections does not respect batchSize option * SWIFT-1347 - ClientSession.pinnedServerAddress leaks memory (in tests only) ### New Feature * SWIFT-787 - OCSP Support * SWIFT-1025 - Versioned MongoDB API for Drivers * SWIFT-1094 - Load Balancer Support * SWIFT-797 - Allow hinting the delete command * SWIFT-801 - support ability to pass hint to update * SWIFT-788 - Allow passing hint to findAndModify update and replace operations * SWIFT-904 - Add connectTimeoutMS option to MongoClientOptions * SWIFT-1157 - Implement ExpressibleByXLiteral for IndexHint * SWIFT-1102 - Snapshot reads on Secondaries * SWIFT-560 - Add the ability to specify a pipeline to an update command * SWIFT-1108 - Time-series Collections * SWIFT-1225 - Support ‘let’ option for aggregate command * SWIFT-1100 - Support truncatedArrays field in ChangeStream update descriptions * SWIFT-1307 - Expose serviceId in command monitoring events ### Improvement * SWIFT-910 - Lift restriction on authSource without credentials * SWIFT-1099 - Change estimatedDocumentCount() to use the $collStats Agg Stage Instead of Count Command * SWIFT-1107 - Mitigate pain of using field names with dots and dollars * SWIFT-1211 - Use “hello” command for monitoring if supported * SWIFT-1173 - Use “hello” command when API version is declared ### Task * SWIFT-1256 - Vendor libmongoc 1.19.0 * SWIFT-1363 - Vendor libmongoc 1.19.1 * SWIFT-1409 - Vendor libmongoc 1.19.2 * SWIFT-1224 - Increase maxWireVersion for MongoDB 5.0 ## Contributors Thanks to everyone who contributed to this release! * @agolin95 * @bynn * @isabelatkinson * @kmahar * @patrickfreed
1.2.0-beta.1
2 years ago
We are pleased to announce our first beta release for the upcoming 1.2.0 release of the Swift driver. We would love for you to try it out! This release most notably adds support for the following features: ## MongoDB Versioned API MongoDB 5.0 introduced supported for the [versioned API](https://docs.mongodb.com/manual/reference/versioned-api/), which will make it much easier for users to upgrade their server versions without experiencing backward-breaking changes. To specify an API version for your application, provide a version via `MongoClientOptions` (currently, the only supported API version is 1): ```swift let opts = MongoClientOptions( serverAPI: MongoServerAPI(version: .v1) ) // Create an async client let client = try MongoClient("mongodb://localhost:27017", using: myEventLoopGroup, options: opts) // Or, create a sync client let client = try MongoClient("mongodb://localhost:27017", options: opts) ``` ## Serverless MongoDB Support / Load Balancer Support This release adds support for using the driver with [Serverless MongoDB](https://www.mongodb.com/cloud/atlas/serverless), which is currently in preview. This is enabled via new support for connecting to a MongoDB cluster behind a TCP load balancer, which is supported via the `loadBalanced` connection string option or by setting the `loadBalanced` property on `MongoClientOptions`. ## OCSP Support The driver previously had implicit support for the Online Certificate Status Protocol (OCSP) via the underlying C driver, however as part of this release we have added explicit testing for this from Swift along with support for configuring it programmatically via `MongoClientOptions`, using the `tlsDisableCertificateRevocationCheck` and `tlsDisableOCSPEndpointCheck` options. Please see our [TLS Guide](https://github.com/mongodb/mongo-swift-driver/blob/main/Guides/TLS-Guide.md#server-certificate-validation) for more information. Below are a selected list of tickets with user-facing implications; for a full list of completed tickets see this [Jira query](https://jira.mongodb.org/browse/SWIFT-1347?jql=project%20%3D%20SWIFT%20and%20fixVersion%20%3D%201.2.0%20and%20resolution%20%3D%20Fixed%20). ## Included Tickets ### Bug * SWIFT-1322 - listCollections does not respect batchSize option * SWIFT-1347 - ClientSession.pinnedServerAddress leaks memory (in tests only) ### New Feature * SWIFT-787 - OCSP Support * SWIFT-1025 - Versioned MongoDB API for Drivers * SWIFT-1094 - Load Balancer Support * SWIFT-797 - Allow hinting the delete command * SWIFT-801 - support ability to pass hint to update * SWIFT-904 - Add connectTimeoutMS option to MongoClientOptions * SWIFT-1157 - Implement ExpressibleByXLiteral for IndexHint * SWIFT-788 - Allow passing hint to findAndModify update and replace operations ### Improvement * SWIFT-910 - Lift restriction on authSource without credentials * SWIFT-1099 - Change estimatedDocumentCount() to use the $collStats Agg Stage Instead of Count Command * SWIFT-1100 - Implement change stream oplog parsing code for delta oplog entries * SWIFT-1107 - Mitigate pain of using field names with dots and dollars * SWIFT-1224 - Bump maxWireVersion for MongoDB 5.0 * SWIFT-1307 - Expose serviceId in command monitoring events ### Task * SWIFT-1256 - Vendor libmongoc 1.19.0
1.1.1
2 years ago
The MongoDB Swift driver team is pleased to announce our 1.1.1 release. This patch release is a recommended upgrade which updates the vendored MongoDB C driver code from version 1.17.4 to 1.17.7 and thus pulls in a number of bug fixes. You can find the details of the fixes included in the following C driver release notes: [1.17.7](https://github.com/mongodb/mongo-c-driver/releases/tag/1.17.7), [1.17.6](https://github.com/mongodb/mongo-c-driver/releases/tag/1.17.6), [1.17.5](https://github.com/mongodb/mongo-c-driver/releases/tag/1.17.5).
1.1.0
3 years ago
The MongoDB Swift driver team is pleased to announce our 1.1.0 release. ## Highlights ### New BSON Library Last week, we released [version 3.0.0](https://github.com/mongodb/swift-bson/releases/tag/v3.0.0) of `SwiftBSON`. This is a brand new, pure Swift BSON library. While the internals are all-new, the API is identical to the one that previously lived in the driver with a few additions as described in the release notes, and we've now switched the driver to depend on this library. For convenience, we re-export all symbols from `SwiftBSON` from `MongoSwift` and `MongoSwiftSync`, so you can continue to use BSON types as if they were defined directly in the driver with no breaking changes. ### Event Loop "Binding" for Core Async Driver Types Previously, there was no way to specify at the API level a particular `EventLoop` that a core driver type (client, database, or collection) should return `EventLoopFuture`s on. We've now introduced a special `EventLoopBoundClient` type to support this for clients, and added support directly to `MongoDatabase` and `MongoCollection` for it as well. Please see our [Multithreaded Usage Guide](https://github.com/mongodb/mongo-swift-driver/blob/main/Guides/Multithreaded-Usage.md) for more details. ### Aggregation Improvements We've added a new helper method to `MongoDatabase` via [SWIFT-577](https://jira.mongodb.org/browse/SWIFT-577) to support performing database-level aggregations. We've also added support via [SWIFT-506](https://jira.mongodb.org/browse/SWIFT-506) to both `MongoDatabase.aggregate` and `MongoCollection.aggregate` for specifying a `Codable` type that the returned `MongoCursor` should decode resulting documents into. Previously, these methods could only return `MongoCursor<BSONDocument>`s. For example: ```swift /// Collection type. struct Person: Codable { let _id: BSONObjectID let name: String let age: Int let favoriteColor: String } let coll = db.collection("people", withType: Person.self) try coll.insertMany([ Person(_id: BSONObjectID(), name: "Kaitlin", age: 26, favoriteColor: "blue") Person(_id: BSONObjectID(), name: "Buffalo", age: 27, favoriteColor: "green") ]).wait() /// Transformed aggregation output type. struct PersonOutput: Codable { let name: String let age: Int } let resultsFuture = coll.aggregate([ ["$project": ["age": 1, "name": 1, "_id": 0]] // only keep the age and name fields ], withOutputType: PersonOutput.self).flatMap { cursor in cursor.toArray() } // prints [PersonOutput(name: "Kaitlin", age: 26), PersonOutput(name: "Buffalo", age: 27)] print(try resultsFuture.wait()) ``` ### `MongoClientOptions` Improvements Previously, a number of driver options were only specifiable via connection string, and not supported via `MongoClientOptions`. We've now added support for specifying a number of options via the options struct as well, such as `replicaSet` and `serverSelectionTimeoutMS`. ## Included Tickets ### Bug * [<a href='https://jira.mongodb.org/browse/SWIFT-957'>SWIFT-957</a>] - DecodingError when encountering dropDatabase event in change stream * [<a href='https://jira.mongodb.org/browse/SWIFT-958'>SWIFT-958</a>] - Ensure nil is returned from cursor before returning LogicError * [<a href='https://jira.mongodb.org/browse/SWIFT-969'>SWIFT-969</a>] - Manually clean up mongoc_uri_t when ConnectionString options validation fails * [<a href='https://jira.mongodb.org/browse/SWIFT-974'>SWIFT-974</a>] - Cursor gets leaked in findOne after DecodingError * [<a href='https://jira.mongodb.org/browse/SWIFT-1045'>SWIFT-1045</a>] - MongoClient initializer performs blocking DNS lookup ### New Feature * [<a href='https://jira.mongodb.org/browse/SWIFT-481'>SWIFT-481</a>] - Support index all paths * [<a href='https://jira.mongodb.org/browse/SWIFT-828'>SWIFT-828</a>] - Hidden Indexes * [<a href='https://jira.mongodb.org/browse/SWIFT-577'>SWIFT-577</a>] - Add database aggregation helper * [<a href='https://jira.mongodb.org/browse/SWIFT-1028'>SWIFT-1028</a>] - Create EventLoopBoundMongoClient type * [<a href='https://jira.mongodb.org/browse/SWIFT-1029'>SWIFT-1029</a>] - Implement EventLoop binding support for database and collection objects * [<a href='https://jira.mongodb.org/browse/SWIFT-1030'>SWIFT-1030</a>] - Implement EventLoop binding support for change streams and cursors * [<a href='https://jira.mongodb.org/browse/SWIFT-1031'>SWIFT-1031</a>] - Implement EventLoop binding support for sessions * [<a href='https://jira.mongodb.org/browse/SWIFT-459'>SWIFT-459</a>] - Add a renameCollection helper * [<a href='https://jira.mongodb.org/browse/SWIFT-519'>SWIFT-519</a>] - Support startAfter option for change streams * [<a href='https://jira.mongodb.org/browse/SWIFT-506'>SWIFT-506</a>] - Allow users to specify the output type of an aggregation ### Task * [<a href='https://jira.mongodb.org/browse/SWIFT-734'>SWIFT-734</a>] - Maintain multiple versions of the documentation * [<a href='https://jira.mongodb.org/browse/SWIFT-791'>SWIFT-791</a>] - Support shorter SCRAM conversation * [<a href='https://jira.mongodb.org/browse/SWIFT-854'>SWIFT-854</a>] - Organize API documentation in a more useful way * [<a href='https://jira.mongodb.org/browse/SWIFT-936'>SWIFT-936</a>] - Update the driver to use the new BSON library * [<a href='https://jira.mongodb.org/browse/SWIFT-1010'>SWIFT-1010</a>] - Test against Swift 5.3 + Linux on Evergreen * [<a href='https://jira.mongodb.org/browse/SWIFT-1034'>SWIFT-1034</a>] - Update readme with how to sort all records after running collection.find() * [<a href='https://jira.mongodb.org/browse/SWIFT-1092'>SWIFT-1092</a>] - Vendor libmongoc 1.17.4 * [<a href='https://jira.mongodb.org/browse/SWIFT-763'>SWIFT-763</a>] - Deprecate geoHaystack and geoSearch ### Improvement * [<a href='https://jira.mongodb.org/browse/SWIFT-805'>SWIFT-805</a>] - Make ExceededTimeLimit retryable writes error * [<a href='https://jira.mongodb.org/browse/SWIFT-872'>SWIFT-872</a>] - Reduce default keepalive time to align with Azure defaults * [<a href='https://jira.mongodb.org/browse/SWIFT-903'>SWIFT-903</a>] - Add compressors option to MongoClientOptions * [<a href='https://jira.mongodb.org/browse/SWIFT-905'>SWIFT-905</a>] - Add heartbeatFrequencyMS option to MongoClientOptions * [<a href='https://jira.mongodb.org/browse/SWIFT-906'>SWIFT-906</a>] - Add localThresholdMS option to MongoClientOptions * [<a href='https://jira.mongodb.org/browse/SWIFT-907'>SWIFT-907</a>] - Add serverSelectionTimeoutMS option to MongoClientOptions * [<a href='https://jira.mongodb.org/browse/SWIFT-909'>SWIFT-909</a>] - Add zLibCompressionLevel option to MongoClientOptions * [<a href='https://jira.mongodb.org/browse/SWIFT-897'>SWIFT-897</a>] - Add appname option to MongoClientOptions * [<a href='https://jira.mongodb.org/browse/SWIFT-898'>SWIFT-898</a>] - Add replicaSet option to MongoClientOptions * [<a href='https://jira.mongodb.org/browse/SWIFT-901'>SWIFT-901</a>] - Add tlsInsecure option to MongoClientOptions * [<a href='https://jira.mongodb.org/browse/SWIFT-912'>SWIFT-912</a>] - Error if minPoolSize option is provided in connection string * [<a href='https://jira.mongodb.org/browse/SWIFT-929'>SWIFT-929</a>] - Validate options provided via MongoClientOptions * [<a href='https://jira.mongodb.org/browse/SWIFT-1015'>SWIFT-1015</a>] - Only create monitoring events if the user is actually subscribing to them * [<a href='https://jira.mongodb.org/browse/SWIFT-1072'>SWIFT-1072</a>] - Improve performance of insertion
1.0.2
3 years ago
I'm pleased to announce our 1.0.2 release. This contains a fix (14afd20d3b2f75a373b990fa5ffcc5219ed2266e) for a memory leak on Linux: [SWIFT-1051](https://jira.mongodb.org/browse/SWIFT-1051) / #571. Thank you to @NikolayJuly for bringing this to our attention. This leak was due to our usage of `String.cString(using:)`, a Foundation method whose Linux implementation has apparently had a longstanding, known memory leak (see [SR-4036](https://bugs.swift.org/browse/SR-4036), and the [source code](https://github.com/apple/swift-corelibs-foundation/blob/14893a089982a08c65a961f79c9a2114d059827f/Sources/Foundation/NSString.swift#L197)).
macOS linux iOS
mongodb/swift-bson v3.1.0
pure Swift BSON library
⭐️ 42
🕓 2 years ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
SwiftBSON v3.1.0
2 years ago
The MongoDB Swift driver team is pleased to announce the 3.1.0 release of SwiftBSON. With this release, the library now officially supports use on iOS versions 13+. ### Included Tickets <h2> New Feature </h2> <ul> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-1301'>SWIFT-1301</a>] - Add a new BSON Binary subtype 7 </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-1500'>SWIFT-1500</a>] - Set the minimum supported iOS version for the SwiftBSON library to iOS 13 </li> </ul> A full list of tickets included in this release can be found [here](https://jira.mongodb.org/projects/SWIFT/versions/33189).
SwiftBSON v3.0.1
3 years ago
The MongoDB Swift driver team is pleased to announce the 3.0.1 release of SwiftBSON. This release contains fixes for the following bugs that were included in the 3.0.0 release: - [SWIFT-1126] SwiftBSON fails to parse legacy extended JSON - [SWIFT-1137] Dates greater than or equal to Int64.max ms from epoch cause SwiftBSON to crash Any existing applications depending on the Swift driver can update to this version of SwiftBSON simply by running `swift package update` without any modifications to the their `Package.swift`s. Any new applications depending on the driver will automatically pull this version in.
SwiftBSON v3.0.0
3 years ago
The MongoDB Swift driver team is pleased to announce the 3.0.0 release of SwiftBSON. This release is technically a version 3.0 as this GitHub repository previously contained Swift bindings for libbson, a BSON library written in C. However, it is a 1.0 in spirit, as we have written a brand-new BSON library from scratch entirely in Swift. While the internals are all new, this library provides the same familiar API as the C-based one that previously resided directly in our [Swift driver](https://github.com/mongodb/mongo-swift-driver)’s codebase, with the addition of a couple new features: * We’ve added a new encoder/decoder pair, `ExtendedJSONEncoder` and `ExtendedJSONDecoder`, which support converting between your custom Swift types and [extended JSON](https://docs.mongodb.com/manual/reference/mongodb-extended-json/). See our new [JSON Interop Guide](https://mongodb.github.io/swift-bson/docs/current/SwiftBSON/json-interop.html) for more details. * We’ve added a new method to `BSONDocument`, `equalsIgnoreKeyOrder`, which returns true if two documents contain the same (key, value) pairs in any order. See [the documentation](https://mongodb.github.io/swift-bson/docs/current/SwiftBSON/Structs/BSONDocument.html#/s:9SwiftBSON12BSONDocumentV20equalsIgnoreKeyOrderySbACF) for more details. The Swift driver will switch to using this library in our upcoming 1.1 release. You can view the full API documentation [here](https://mongodb.github.io/swift-bson/docs/current/SwiftBSON/index.html). A special thanks to @nbbeeken and @nspektor for their hard work on this library! ### Included Tickets <h2> Bug </h2> <ul> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-968'>SWIFT-968</a>] - Decimal128 parsing does not throw for error inputs </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-971'>SWIFT-971</a>] - Overload of BSONEncoder.encode breaks type inference </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-973'>SWIFT-973</a>] - Encoding top level arrays crashes </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-999'>SWIFT-999</a>] - swift-bson is missing Timestamp initializer that takes in Ints </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-1086'>SWIFT-1086</a>] - equalsIgnoreKeyOrder respects key order in documents contained in arrays </li> </ul> <h2> New Feature </h2> <ul> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-915'>SWIFT-915</a>] - Port BSONEncoder and BSONDecoder to swift-bson </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-916'>SWIFT-916</a>] - Implement JSON enum </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-917'>SWIFT-917</a>] - Add sketch of ExtendedJSONDecoder public API </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-918'>SWIFT-918</a>] - Implement JSON to BSON conversion </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-920'>SWIFT-920</a>] - Support decoding from BSON in BSONDecoder </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-921'>SWIFT-921</a>] - Implement ExtendedJSONDecoder&#39;s public API methods </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-922'>SWIFT-922</a>] - Add sketch of ExtendedJSONEncoder&#39;s public API </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-923'>SWIFT-923</a>] - Support encoding to a BSON in BSONEncoder </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-924'>SWIFT-924</a>] - Implement extended JSON conversion methods </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-925'>SWIFT-925</a>] - Implement ExtendedJSONEncoder&#39;s public API methods </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-959'>SWIFT-959</a>] - Support userInfo in ExtendedJSONDecoder </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-960'>SWIFT-960</a>] - Support outputFormatting options in ExtendedJSONEncoder </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-1044'>SWIFT-1044</a>] - Extended JSON generation performance improvements </li> </ul> <h2> Task </h2> <ul> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-400'>SWIFT-400</a>] - Improve evergreen test result output </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-734'>SWIFT-734</a>] - Maintain multiple versions of the documentation </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-837'>SWIFT-837</a>] - Set up repository and sketch out API </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-838'>SWIFT-838</a>] - Copy over all BSON tests from the driver </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-839'>SWIFT-839</a>] - Set up an Evergreen project for the library </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-840'>SWIFT-840</a>] - Implement Decimal128 support </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-841'>SWIFT-841</a>] - Add support for reading/writing Integer BSON types in documents </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-843'>SWIFT-843</a>] - Make Document conform to Collection and Sequence </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-844'>SWIFT-844</a>] - Implement ObjectId and ObjectIdGenerator </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-845'>SWIFT-845</a>] - Add support for Array, Bool, String, Double, Date </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-846'>SWIFT-846</a>] - Add support for RegularExpression, Symbol, Timestamp, and Binary </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-847'>SWIFT-847</a>] - Implement DBPointer, Code, CodeWithScope </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-848'>SWIFT-848</a>] - Update README </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-914'>SWIFT-914</a>] - Setup Jazzy for Swift BSON </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-919'>SWIFT-919</a>] - Support initializing BSON enum from extended JSON </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-926'>SWIFT-926</a>] - Enable extended JSON BSON corpus tests </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-930'>SWIFT-930</a>] - Implement existing extended JSON API </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-935'>SWIFT-935</a>] - Run Swift API digester on driver before and after switching to new BSON library </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-937'>SWIFT-937</a>] - Write a BSON release script </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-1088'>SWIFT-1088</a>] - Add ByteBuffer API to ExtendedJSONDecoder and ExtendedJSONEncoder </li> </ul> <h2> Improvement </h2> <ul> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-866'>SWIFT-866</a>] - Add validation to BSON construction </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-867'>SWIFT-867</a>] - Make BSON Documents Mutable </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-868'>SWIFT-868</a>] - Fill out DocumentIterator findByteRange and filter </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-892'>SWIFT-892</a>] - Fix max BSON size limit to be Int32.max rather than server&#39;s default max BSON size </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-893'>SWIFT-893</a>] - Add timestamp property to BSONObjectID </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-939'>SWIFT-939</a>] - Add timestamp test with high-order bit set that&#39;s not 2^32-1 </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-941'>SWIFT-941</a>] - Add a bson corpus test with invalid type for $code when $scope is also present </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-995'>SWIFT-995</a>] - Rename swift-bson target to SwiftBSON </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-1016'>SWIFT-1016</a>] - Implement an efficient method for pre-pending _ids in the new BSON library </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-1026'>SWIFT-1026</a>] - Extended JSON parsing performance improvements </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-1064'>SWIFT-1064</a>] - Use a struct instead of enum for ExtendedJSONEncoder.mode </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-1070'>SWIFT-1070</a>] - Improve performance of BSONDecoder </li> <li>[<a href='https://jira.mongodb.org/browse/SWIFT-1085'>SWIFT-1085</a>] - Add more spec tests for invalid relaxed UUIDs </li> </ul>
5 years ago
iOS macOS
mongodb/mongodb-vapor v1.1.0
MongoDB + Vapor integration
⭐️ 38
🕓 1 year ago
🔖 Release Notes

Releases

The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
1.1.0
1 year ago
We are pleased to announce our 1.1.0 release. This release does not make any changes to MongoDBVapor itself, but pins to the latest stable release of MongoSwift, [1.3.1](https://github.com/mongodb/mongo-swift-driver/releases/tag/v1.3.1).
1.1.0-beta.1
2 years ago
We are pleased to announce the first beta for our 1.1.0 release, which follows two previous alpha releases. This release does not make any changes to MongoDBVapor itself, but pins to the latest beta of MongoSwift, [1.3.0-beta.1](https://github.com/mongodb/mongo-swift-driver/releases/tag/v1.3.0-beta.1).
1.1.0-alpha.2
2 years ago
We are pleased to announce the second alpha of our 1.1.0 release. This alpha updates the library to depend on the [1.3.0-alpha.2 release of MongoSwift](https://github.com/mongodb/mongo-swift-driver/releases/tag/v1.3.0-alpha.2). The primary changes in that release from the previous alpha are: * The minimum Swift version required to use the new `async` APIs has increased to Swift 5.5.2 from Swift 5.5.0, and the new `async` APIs are now available on macOS 10.15+, rather than macOS 12+. (Note however that Vapor itself still requires macOS 12+ for its own `async` APIs). * The driver’s vendors copy of libmongoc has been updated from version 1.19.2 to version 1.21.0. Please see the [libmongoc release notes](https://github.com/mongodb/mongo-c-driver/releases) for details on the included changes. We’ve also updated our [example project](https://github.com/mongodb/mongo-swift-driver/tree/main/Examples/VaporExample) and [Vapor toolbox template](https://github.com/mongodb/mongodb-vapor-template/) which utilize this library to pin to this release.
1.1.0-alpha.1
2 years ago
We are pleased to announce the first alpha of our 1.1.0 release. This release does not add any new features directly to this library, but updates the dependency on MongoSwift to 1.3.0-alpha.1, which most notably adds new API to support using the driver with structured concurrency. Please see the [release notes](https://github.com/mongodb/mongo-swift-driver/releases/tag/v1.3.0-alpha.1) for that release for full details on new features. We’ve also updated our [example project](https://github.com/mongodb/mongo-swift-driver/tree/main/Examples/VaporExample) and [Vapor toolbox template](https://github.com/mongodb/mongodb-vapor-template/) which utilize this library to pin to this release.
MongoDBVapor 1.0.1
2 years ago
We are pleased to announce the 1.0.1 release of MongoDBVapor. This patch release corrects an issue where an outdated version string for this library is reported in the metadata for the handshake performed with a MongoDB server. (see #19)
MongoDBVapor 1.0.0
2 years ago
We are pleased to announce the 1.0.0 release of this library! This release contains no changes from the previous beta release. Please see the [README](https://github.com/mongodb/mongodb-vapor/blob/main/README.md) for instructions on getting started! We've also put together a blog post [here](https://kaitlin.dev/2021/07/30/mongodb-vapor.html) walking through creating a new application using this library, and a complete example application is available [here](https://github.com/mongodb/mongo-swift-driver/tree/main/Examples/VaporExample).
MongoDBVapor v1.0.0-beta.0
2 years ago
We are pleased to announce a first beta release of the library! We would love for you to try it out and provide any feedback you have. Some resources to help you get started: * [Instructions](https://github.com/mongodb/mongodb-vapor#installation) on how to use the library in a new or existing project * An [example project](https://github.com/mongodb/mongo-swift-driver/tree/main/Examples/VaporExample) utilizing the library * [API documentation](https://mongodb.github.io/mongodb-vapor/current/index.html) * [Usage examples](https://github.com/mongodb/mongodb-vapor#example-usage)
macOS

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics