diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 2c3071281..71be27442 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -31,10 +31,6 @@ What does this command give you? ``` $ cat Package.resolved # Applies if you are using Swift package manager ``` -*or* -``` -$ cat Podfile.lock # Applies if you are using Cocoapods -``` ### What is the version(s) of `mongod` that you are running with the driver? @@ -53,28 +49,6 @@ or, running this in a MongoDB shell connected to the relevant node(s): How is your MongoDB deployment configured? -### How did you install `libmongoc` and `libbson` on your system - -Did you use `brew`? Did you install them manually? etc. - - -### Version of `libmongoc` and `libbson` - -What does this command give you? -``` -$ brew list --versions mongo-c-driver # Applies if you installed via brew -``` -*or* -``` -$ apt list --installed | grep -E '(libmongoc|libbson)' # Applies if you installed via apt -``` -*or* -``` -$ pkg-config --modversion libmongoc-1.0 # Applies if you use pkg-config -$ pkg-config --modversion libbson-1.0 -``` - - ## What is the problem? **BE SPECIFIC**: diff --git a/.jazzy.yaml b/.jazzy.yaml deleted file mode 100644 index 09e1d9337..000000000 --- a/.jazzy.yaml +++ /dev/null @@ -1,5 +0,0 @@ -module: MongoSwift -root_url: https://mongodb.github.io/mongo-swift-driver -github_url: https://github.com/mongodb/mongo-swift-driver -documentation: Guides/*.md -author: Matt Broadstone, Kaitlin Mahar, and Patrick Freed diff --git a/Examples/.swiftlint.yml b/Examples/.swiftlint.yml new file mode 100644 index 000000000..6d8f25e1b --- /dev/null +++ b/Examples/.swiftlint.yml @@ -0,0 +1,3 @@ +disabled_rules: + - explicit_acl + - nesting diff --git a/Examples/Docker/Dockerfile b/Examples/Docker/Dockerfile deleted file mode 100644 index 20b2a5c5c..000000000 --- a/Examples/Docker/Dockerfile +++ /dev/null @@ -1,14 +0,0 @@ -FROM ubuntu:16.04 - -# Getting the tools needed for building from source -RUN apt-get -qq update && apt-get install -y \ - git cmake libssl-dev libsasl2-dev \ - && rm -r /var/lib/apt/lists/* - -# Compiling latest libmongoc and libbson -RUN git clone -b r1.13 https://github.com/mongodb/mongo-c-driver /tmp/libmongoc -WORKDIR /tmp/libmongoc -RUN cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -RUN make -j8 install - -WORKDIR /app \ No newline at end of file diff --git a/Examples/Docker/Dockerfile.vapor b/Examples/Docker/Dockerfile.vapor deleted file mode 100644 index f64f4b173..000000000 --- a/Examples/Docker/Dockerfile.vapor +++ /dev/null @@ -1,65 +0,0 @@ -# --------------------------------------------------------------------------- -# Builder container -# --------------------------------------------------------------------------- - -# You can set the Swift version to what you need for your app. -# Versions can be found here: https://hub.docker.com/_/swift -FROM swift:4.2 as builder - -# For local build, add `--build-arg env=docker` -# In your application, you can use `Environment.custom(name: "docker")` to check if you're in this env -# ARG env - -RUN apt-get -qq update && apt-get -q -y install \ - tzdata \ - git cmake libssl-dev libsasl2-dev \ - && rm -r /var/lib/apt/lists/* - -# Compiling latest libmongoc and libbson -RUN git clone -b r1.13 https://github.com/mongodb/mongo-c-driver /tmp/libmongoc -WORKDIR /tmp/libmongoc -RUN cmake \ - -DCMAKE_INSTALL_PREFIX:PATH=/usr \ - -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF \ - -DCMAKE_BUILD_TYPE=Release -RUN make -j8 install - -WORKDIR /app -COPY . . -RUN mkdir -p /build/lib && cp -R /usr/lib/swift/linux/*.so /build/lib -RUN swift build -c release && mv `swift build -c release --show-bin-path` /build/bin - -# --------------------------------------------------------------------------- -# Production image -# --------------------------------------------------------------------------- - -FROM ubuntu:16.04 - -RUN apt-get -qq update && apt-get install -y \ - libicu55 libxml2 libbsd0 libcurl3 libatomic1 \ - tzdata \ - git cmake libssl-dev libsasl2-dev \ - && rm -r /var/lib/apt/lists/* - -# Compiling latest libmongoc and libbson -RUN git clone -b r1.13 https://github.com/mongodb/mongo-c-driver /tmp/libmongoc -WORKDIR /tmp/libmongoc -RUN cmake \ - -DCMAKE_INSTALL_PREFIX:PATH=/usr \ - -DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF \ - -DCMAKE_BUILD_TYPE=Release -RUN make -j8 install - -WORKDIR /app -COPY .env.development .env -COPY --from=builder /build/bin/Run . -COPY --from=builder /build/lib/* /usr/lib/ - -# Uncomment the next line if you need to load resources from the `Public` directory -#COPY --from=builder /app/Public ./Public -# Uncommand the next line if you are using Leaf -#COPY --from=builder /app/Resources ./Resources -# ENV ENVIRONMENT=$env - -EXPOSE 8080 -ENTRYPOINT ./Run serve --env production --hostname 0.0.0.0 --port 8080 \ No newline at end of file diff --git a/Examples/Docker/README.md b/Examples/Docker/README.md deleted file mode 100644 index 9a14a43d2..000000000 --- a/Examples/Docker/README.md +++ /dev/null @@ -1,34 +0,0 @@ -# Building `libmongoc` From Source With Docker - -For the `mongo-swift-driver` to run, **the minimum required version of the -C Driver is 1.15.3**. The easiest way to get the correct version -of `libmongoc` and `libbson` is to checkout the correct -[branch](https://github.com/mongodb/mongo-c-driver/tree/r1.15) from git and -build the sources. - -## Dependencies - -* Ubuntu 16.04 / 18.04 -* git -* cmake -* libssl-dev -* libsasl2-dev - -## Build - -```Dockerfile -RUN git clone -b r1.15 https://github.com/mongodb/mongo-c-driver /tmp/libmongoc -WORKDIR /tmp/libmongoc -RUN cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -RUN make -j8 install -``` - -Further useful `cmake` prefixes are: - -- `-DENABLE_AUTOMATIC_INIT_AND_CLEANUP=OFF` see [reference here](http://mongoc.org/libmongoc/current/init-cleanup.html). -- `-DCMAKE_BUILD_TYPE=Release` to build a release optimized build. - -## Vapor - -When building and running Vapor in Docker, the C Driver is needed in both the -builder and runner containers. See `Dockerfile.vapor` for an example. diff --git a/Examples/Docs/Package.swift b/Examples/Docs/Package.swift index 16f53de38..d628ac726 100644 --- a/Examples/Docs/Package.swift +++ b/Examples/Docs/Package.swift @@ -1,12 +1,14 @@ -// swift-tools-version:4.2 +// swift-tools-version:5.0 import PackageDescription let package = Package( name: "DocsExamples", dependencies: [ - .package(url: "https://github.com/mongodb/mongo-swift-driver", .upToNextMajor(from: "0.1.0")) + .package(url: "https://github.com/mongodb/mongo-swift-driver", .upToNextMajor(from: "1.0.0")), + .package(url: "https://github.com/apple/swift-nio", .upToNextMajor(from: "2.0.0")) ], targets: [ - .target(name: "DocsExamples", dependencies: ["MongoSwift"]) + .target(name: "SyncExamples", dependencies: ["MongoSwiftSync"]), + .target(name: "AsyncExamples", dependencies: ["MongoSwift", "NIO"]) ] ) diff --git a/Examples/Docs/Sources/AsyncExamples/main.swift b/Examples/Docs/Sources/AsyncExamples/main.swift new file mode 100644 index 000000000..edf07eb7a --- /dev/null +++ b/Examples/Docs/Sources/AsyncExamples/main.swift @@ -0,0 +1,149 @@ +import Foundation +import MongoSwift +import NIO + +// swiftlint:disable force_unwrapping + +/// Examples used for the MongoDB documentation on Causal Consistency. +/// - SeeAlso: https://docs.mongodb.com/manual/core/read-isolation-consistency-recency/#examples +private func causalConsistency() throws { + let elg = MultiThreadedEventLoopGroup(numberOfThreads: 1) + let client1 = try MongoClient(using: elg) + defer { + client1.syncShutdown() + try? elg.syncShutdownGracefully() + } + + // Start Causal Consistency Example 1 + let s1 = client1.startSession(options: ClientSessionOptions(causalConsistency: true)) + let currentDate = Date() + var dbOptions = DatabaseOptions( + readConcern: ReadConcern(.majority), + writeConcern: try WriteConcern(w: .majority, wtimeoutMS: 1000) + ) + let items = client1.db("test", options: dbOptions).collection("items") + let result1 = items.updateOne( + filter: ["sku": "111", "end": .null], + update: ["$set": ["end": .datetime(currentDate)]], + session: s1 + ).flatMap { _ in + items.insertOne(["sku": "nuts-111", "name": "Pecans", "start": .datetime(currentDate)], session: s1) + } + // End Causal Consistency Example 1 + + let client2 = try MongoClient(using: elg) + + // Start Causal Consistency Example 2 + let options = ClientSessionOptions(causalConsistency: true) + let result2: EventLoopFuture = client2.withSession(options: options) { s2 in + // The cluster and operation times are guaranteed to be non-nil since we already used s1 for operations above. + s2.advanceClusterTime(to: s1.clusterTime!) + s2.advanceOperationTime(to: s1.operationTime!) + + dbOptions.readPreference = ReadPreference(.secondary) + let items2 = client2.db("test", options: dbOptions).collection("items") + + return items2.find(["end": .null], session: s2).flatMap { cursor in + cursor.forEach { item in + print(item) + } + } + } + // End Causal Consistency Example 2 +} + +/// Examples used for the MongoDB documentation on Change Streams. +/// - SeeAlso: https://docs.mongodb.com/manual/changeStreams/ +private func changeStreams() throws { + let elg = MultiThreadedEventLoopGroup(numberOfThreads: 1) + let client = try MongoClient(using: elg) + let db = client.db("example") + + // The following examples assume that you have connected to a MongoDB replica set and have + // accessed a database that contains an inventory collection. + + do { + // Start Changestream Example 1 + let inventory = db.collection("inventory") + + // Option 1: retrieve next document via next() + let next = inventory.watch().flatMap { cursor in + cursor.next() + } + + // Option 2: register a callback to execute for each document + let result = inventory.watch().flatMap { cursor in + cursor.forEach { event in + // process event + print(event) + } + } + // End Changestream Example 1 + } + + do { + // Start Changestream Example 2 + let inventory = db.collection("inventory") + + // Option 1: use next() to iterate + let next = inventory.watch(options: ChangeStreamOptions(fullDocument: .updateLookup)) + .flatMap { changeStream in + changeStream.next() + } + + // Option 2: register a callback to execute for each document + let result = inventory.watch(options: ChangeStreamOptions(fullDocument: .updateLookup)) + .flatMap { changeStream in + changeStream.forEach { event in + // process event + print(event) + } + } + // End Changestream Example 2 + } + + do { + // Start Changestream Example 3 + let inventory = db.collection("inventory") + + inventory.watch(options: ChangeStreamOptions(fullDocument: .updateLookup)) + .flatMap { changeStream in + changeStream.next().map { _ in + changeStream.resumeToken + }.always { _ in + _ = changeStream.kill() + } + }.flatMap { resumeToken in + inventory.watch(options: ChangeStreamOptions(resumeAfter: resumeToken)).flatMap { newStream in + newStream.forEach { event in + // process event + print(event) + } + } + } + // End Changestream Example 3 + } + + do { + // Start Changestream Example 4 + let pipeline: [Document] = [ + ["$match": ["fullDocument.username": "alice"]], + ["$addFields": ["newField": "this is an added field!"]] + ] + let inventory = db.collection("inventory") + + // Option 1: use next() to iterate + let next = inventory.watch(pipeline, withEventType: Document.self).flatMap { changeStream in + changeStream.next() + } + + // Option 2: register a callback to execute for each document + let result = inventory.watch(pipeline, withEventType: Document.self).flatMap { changeStream in + changeStream.forEach { event in + // process event + print(event) + } + } + // End Changestream Example 4 + } +} diff --git a/Examples/Docs/Sources/DocsExamples/main.swift b/Examples/Docs/Sources/SyncExamples/main.swift similarity index 76% rename from Examples/Docs/Sources/DocsExamples/main.swift rename to Examples/Docs/Sources/SyncExamples/main.swift index 0b430f455..09bf4c467 100644 --- a/Examples/Docs/Sources/DocsExamples/main.swift +++ b/Examples/Docs/Sources/SyncExamples/main.swift @@ -1,5 +1,5 @@ import Foundation -import MongoSwift +import MongoSwiftSync // swiftlint:disable force_unwrapping @@ -9,7 +9,7 @@ private func causalConsistency() throws { let client1 = try MongoClient() // Start Causal Consistency Example 1 - let s1 = try client1.startSession(options: ClientSessionOptions(causalConsistency: true)) + let s1 = client1.startSession(options: ClientSessionOptions(causalConsistency: true)) let currentDate = Date() var dbOptions = DatabaseOptions( readConcern: ReadConcern(.majority), @@ -53,28 +53,28 @@ private func changeStreams() throws { do { // Start Changestream Example 1 let inventory = db.collection("inventory") - let cursor = try inventory.watch() - let next = try cursor.nextOrError() + let changeStream = try inventory.watch() + let next = changeStream.next() // End Changestream Example 1 } do { // Start Changestream Example 2 let inventory = db.collection("inventory") - let cursor = try inventory.watch(options: ChangeStreamOptions(fullDocument: .updateLookup)) - let next = try cursor.nextOrError() + let changeStream = try inventory.watch(options: ChangeStreamOptions(fullDocument: .updateLookup)) + let next = changeStream.next() // End Changestream Example 2 } do { // Start Changestream Example 3 let inventory = db.collection("inventory") - let cursor = try inventory.watch(options: ChangeStreamOptions(fullDocument: .updateLookup)) - let next = try cursor.nextOrError() + let changeStream = try inventory.watch(options: ChangeStreamOptions(fullDocument: .updateLookup)) + let next = changeStream.next() - let resumeToken = cursor.resumeToken - let resumedCursor = try inventory.watch(options: ChangeStreamOptions(resumeAfter: resumeToken)) - let nextAfterResume = try resumedCursor.nextOrError() + let resumeToken = changeStream.resumeToken + let resumedChangeStream = try inventory.watch(options: ChangeStreamOptions(resumeAfter: resumeToken)) + let nextAfterResume = resumedChangeStream.next() // End Changestream Example 3 } @@ -85,8 +85,8 @@ private func changeStreams() throws { ["$addFields": ["newField": "this is an added field!"]] ] let inventory = db.collection("inventory") - let cursor = try inventory.watch(pipeline, withEventType: Document.self) - let next = try cursor.nextOrError() + let changeStream = try inventory.watch(pipeline, withEventType: Document.self) + let next = changeStream.next() // End Changestream Example 4 } } diff --git a/Examples/KituraExample/Package.swift b/Examples/KituraExample/Package.swift index 7c732ea41..e0fccbce0 100644 --- a/Examples/KituraExample/Package.swift +++ b/Examples/KituraExample/Package.swift @@ -1,13 +1,14 @@ -// swift-tools-version:4.2 +// swift-tools-version:5.0 import PackageDescription let package = Package( name: "KituraExample", dependencies: [ - .package(url: "https://github.com/IBM-Swift/Kitura", .upToNextMajor(from: "2.6.3")), - .package(url: "https://github.com/mongodb/mongo-swift-driver", .upToNextMajor(from: "0.1.0")) + .package(url: "https://github.com/IBM-Swift/Kitura", .upToNextMajor(from: "2.9.1")), + .package(url: "https://github.com/mongodb/mongo-swift-driver", .upToNextMajor(from: "1.0.0")), + .package(url: "https://github.com/apple/swift-nio", .upToNextMajor(from: "2.14.0")) ], targets: [ - .target(name: "KituraExample", dependencies: ["Kitura", "MongoSwift"]) + .target(name: "KituraExample", dependencies: ["Kitura", "MongoSwift", "NIO"]) ] ) diff --git a/Examples/KituraExample/README.md b/Examples/KituraExample/README.md index 23b5cee38..a2dd40d52 100644 --- a/Examples/KituraExample/README.md +++ b/Examples/KituraExample/README.md @@ -7,5 +7,6 @@ To test it out, do the following: 1. Navigate to the `Examples/` directory (one level up from this one.) 1. Run `../loadExampleData.sh` to load sample data into the database. 1. Navigate to the root directory of this example. -1. Run `swift run`. +1. Build with `export KITURA_NIO=1 && swift build` to enable using SwiftNIO for the networking layer. +1. Start the server with `swift run`. 1. Navigate to `localhost:8080/kittens` to see the example data loaded on the web page. diff --git a/Examples/KituraExample/Sources/KituraExample/main.swift b/Examples/KituraExample/Sources/KituraExample/main.swift index 792baf9c8..e8c800a28 100644 --- a/Examples/KituraExample/Sources/KituraExample/main.swift +++ b/Examples/KituraExample/Sources/KituraExample/main.swift @@ -1,30 +1,52 @@ import Kitura import MongoSwift +import NIO /// A Codable type that matches the data in our home.kittens collection. -private struct Kitten: Codable { +struct Kitten: Codable { var name: String var color: String } -/// A single collection with type `Kitten`. This allows us to directly retrieve instances of -/// `Kitten` from the collection. `MongoCollection` is safe to share across threads. -private let collection = try MongoClient().db("home").collection("kittens", withType: Kitten.self) +// Create a single EventLoopGroup for Kitura and the MongoClient to share. +let eventLoopGroup = MultiThreadedEventLoopGroup(numberOfThreads: 4) +let mongoClient = try MongoClient(using: eventLoopGroup) -private let router: Router = { +defer { + mongoClient.syncShutdown() + cleanupMongoSwift() + try? eventLoopGroup.syncShutdownGracefully() +} + +let router: Router = { let router = Router() - router.get("kittens") { _, response, _ in - let cursor = try collection.find() - let results = Array(cursor) - if let error = cursor.error { - throw error + /// A single collection with type `Kitten`. This allows us to directly retrieve instances of + /// `Kitten` from the collection. `MongoCollection` is safe to share across threads. + let collection = mongoClient.db("home").collection("kittens", withType: Kitten.self) + + router.get("kittens") { _, response, next -> Void in + let res = collection.find().flatMap { cursor in + cursor.toArray() + } + + res.whenSuccess { results in + response.send(results) + next() + } + + res.whenFailure { error in + response.error = error + response.send("Error: \(error)") + next() } - response.send(results) } return router }() -Kitura.addHTTPServer(onPort: 8080, with: router) +let server = Kitura.addHTTPServer(onPort: 8080, with: router) +// Use the EventLoopGroup created above for the Kitura server. To call this method we must build with +// `export KITURA_NIO=1 && swift build`. +try server.setEventLoopGroup(eventLoopGroup) Kitura.run() diff --git a/Examples/PerfectExample/Package.swift b/Examples/PerfectExample/Package.swift index de453934d..c2cb2c693 100644 --- a/Examples/PerfectExample/Package.swift +++ b/Examples/PerfectExample/Package.swift @@ -1,11 +1,12 @@ -// swift-tools-version:4.2 +// swift-tools-version:5.0 import PackageDescription let package = Package( name: "PerfectExample", dependencies: [ .package(url: "https://github.com/PerfectlySoft/Perfect-HTTPServer.git", from: "3.0.0"), - .package(url: "https://github.com/mongodb/mongo-swift-driver", .upToNextMajor(from: "0.1.0")), + .package(url: "https://github.com/mongodb/mongo-swift-driver", .upToNextMajor(from: "1.0.0")), + .package(url: "https://github.com/apple/swift-nio", .upToNextMajor(from: "2.14.0")) ], targets: [ .target(name: "PerfectExample", dependencies: ["PerfectHTTPServer", "MongoSwift"]) diff --git a/Examples/PerfectExample/Sources/PerfectExample/main.swift b/Examples/PerfectExample/Sources/PerfectExample/main.swift index 038e76d11..d2e18f43d 100644 --- a/Examples/PerfectExample/Sources/PerfectExample/main.swift +++ b/Examples/PerfectExample/Sources/PerfectExample/main.swift @@ -1,32 +1,44 @@ import Foundation import MongoSwift +import NIO import PerfectHTTP import PerfectHTTPServer /// A Codable type that matches the data in our home.kittens collection. -private struct Kitten: Codable { +struct Kitten: Codable { var name: String var color: String } +// Create a SwiftNIO EventLoopGroup for the client to use. +let elg = MultiThreadedEventLoopGroup(numberOfThreads: 4) +let mongoClient = try MongoClient(using: elg) + +defer { + // Close the client and clean up global driver resources. + mongoClient.syncShutdown() + cleanupMongoSwift() + // Shut down the EventLoopGroup. + try? elg.syncShutdownGracefully() +} + /// A single collection with type `Kitten`. This allows us to directly retrieve instances of /// `Kitten` from the collection. `MongoCollection` is safe to share across threads. -private let collection = try MongoClient().db("home").collection("kittens", withType: Kitten.self) +let collection = mongoClient.db("home").collection("kittens", withType: Kitten.self) private var routes = Routes() routes.add(method: .get, uri: "/kittens") { _, response in - response.setHeader(.contentType, value: "application/json") - do { - let cursor = try collection.find() - let json = try JSONEncoder().encode(Array(cursor)) - if let error = cursor.error { - throw error - } + collection.find().flatMap { cursor in + cursor.toArray() + }.flatMapThrowing { results in + response.setHeader(.contentType, value: "application/json") + let json = try JSONEncoder().encode(results) response.setBody(bytes: Array(json)) - } catch { - print("error: \(error)") + response.completed() + }.whenFailure { error in + response.setBody(string: "Error: \(error)") + response.completed() } - response.completed() } try HTTPServer.launch(name: "localhost", port: 8080, routes: routes) diff --git a/Examples/VaporExample/Package.swift b/Examples/VaporExample/Package.swift index 7e3b089c3..dc34eae6f 100644 --- a/Examples/VaporExample/Package.swift +++ b/Examples/VaporExample/Package.swift @@ -1,11 +1,15 @@ -// swift-tools-version:4.2 +// swift-tools-version:5.0 import PackageDescription let package = Package( name: "VaporExample", + platforms: [ + .macOS(.v10_14) + ], dependencies: [ - .package(url: "https://github.com/vapor/vapor", .upToNextMajor(from: "3.3.0")), - .package(url: "https://github.com/mongodb/mongo-swift-driver", .upToNextMajor(from: "0.1.0")) + // The driver depends on SwiftNIO 2 and therefore is only compatible with Vapor 4. + .package(url: "https://github.com/vapor/vapor", .exact("4.0.0-beta.3.24")), + .package(url: "https://github.com/mongodb/mongo-swift-driver", .upToNextMajor(from: "1.0.0")) ], targets: [ .target(name: "VaporExample", dependencies: ["Vapor", "MongoSwift"]) diff --git a/Examples/VaporExample/README.md b/Examples/VaporExample/README.md index 30799f3dd..81a053a35 100644 --- a/Examples/VaporExample/README.md +++ b/Examples/VaporExample/README.md @@ -2,6 +2,8 @@ This is a minimal working example of using the driver in a Vapor application. +**Note**: Since the driver depends on SwiftNIO 2 as of the 1.0.0-rc0 release, it is only compatible with Vapor 4. + To test it out, do the following: 1. Run `mongod` to start MongoDB running on `localhost:27017`. 1. Navigate to the `Examples/` directory (one level up from this one.) diff --git a/Examples/VaporExample/Sources/VaporExample/configure.swift b/Examples/VaporExample/Sources/VaporExample/configure.swift new file mode 100644 index 000000000..d1ebc72d0 --- /dev/null +++ b/Examples/VaporExample/Sources/VaporExample/configure.swift @@ -0,0 +1,25 @@ +import MongoSwift +import Vapor + +extension Application { + /// A global `MongoClient` for use throughout the application. + var mongoClient: MongoClient { + get { + return self.storage[MongoClientKey.self]! + } + set { + self.storage[MongoClientKey.self] = newValue + } + } + + private struct MongoClientKey: StorageKey { + typealias Value = MongoClient + } +} + +func configure(_ app: Application) throws { + // Initialize a client using the application's EventLoopGroup. + let client = try MongoClient(using: app.eventLoopGroup) + app.mongoClient = client + try routes(app) +} diff --git a/Examples/VaporExample/Sources/VaporExample/main.swift b/Examples/VaporExample/Sources/VaporExample/main.swift index d078f9ec5..453625ae0 100644 --- a/Examples/VaporExample/Sources/VaporExample/main.swift +++ b/Examples/VaporExample/Sources/VaporExample/main.swift @@ -1,26 +1,17 @@ import MongoSwift import Vapor -/// A Codable type that matches the data in our home.kittens collection. -private struct Kitten: Content { - var name: String - var color: String -} - -private let app = try Application() -private let router = try app.make(Router.self) +var env = try Environment.detect() +try LoggingSystem.bootstrap(from: &env) -/// A single collection with type `Kitten`. This allows us to directly retrieve instances of -/// `Kitten` from the collection. `MongoCollection` is safe to share across threads. -private let collection = try MongoClient().db("home").collection("kittens", withType: Kitten.self) +let app = Application(env) -router.get("kittens") { _ -> [Kitten] in - let cursor = try collection.find() - let results = Array(cursor) - if let error = cursor.error { - throw error - } - return results +defer { + // shut down the client and clean up the driver's global resources. + app.mongoClient.syncShutdown() + cleanupMongoSwift() + app.shutdown() } +try configure(app) try app.run() diff --git a/Examples/VaporExample/Sources/VaporExample/routes.swift b/Examples/VaporExample/Sources/VaporExample/routes.swift new file mode 100644 index 000000000..92d8dfc13 --- /dev/null +++ b/Examples/VaporExample/Sources/VaporExample/routes.swift @@ -0,0 +1,20 @@ +import MongoSwift +import Vapor + +/// A Codable type that matches the data in our home.kittens collection. +struct Kitten: Content { + var name: String + var color: String +} + +func routes(_ app: Application) throws { + /// A collection with type `Kitten`. This allows us to directly retrieve instances of + /// `Kitten` from the collection. `MongoCollection` is safe to share across threads. + let collection = app.mongoClient.db("home").collection("kittens", withType: Kitten.self) + + app.get("kittens") { _ -> EventLoopFuture<[Kitten]> in + collection.find().flatMap { cursor in + cursor.toArray() + } + } +} diff --git a/Guides/Development.md b/Guides/Development.md index 5c3787d55..9777b7038 100644 --- a/Guides/Development.md +++ b/Guides/Development.md @@ -70,7 +70,7 @@ Documentation comments should generally be complete sentences and should end wit Our documentation site is automatically generated from the source code using [Jazzy](https://github.com/realm/jazzy#installation). We regenerate it via our release script each time we release a new version of the driver. -If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `make documentation` and then inspecting the generated HTML files in `/docs`. +If you'd like to preview how new documentation you've written will look when published, you can regenerate it by running `./etc/generate-docs.sh` and then inspecting the generated HTML files in `/docs`. ## Linting and Style We use [SwiftLint](https://github.com/realm/SwiftLint#using-homebrew) for linting. You can see our configuration in the `.swiftlint.yml` file in the project's root directory. Run `swiftlint` in the root directory to lint all of our files. Running `swiftlint autocorrect` will correct some types of violations. diff --git a/Makefile b/Makefile index 3b6c433de..b4cb60a62 100644 --- a/Makefile +++ b/Makefile @@ -56,7 +56,3 @@ clean: rm -rf MongoSwift.xcodeproj rm Package.resolved -documentation: - make project - @$(call check_for_gem,jazzy) - jazzy $(DOCSARG) diff --git a/README.md b/README.md index 2dae23d7b..82d18890b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Code Coverage](https://codecov.io/gh/mongodb/mongo-swift-driver/branch/master/graph/badge.svg)](https://codecov.io/gh/mongodb/mongo-swift-driver/branch/master) # MongoSwift -The official [MongoDB](https://www.mongodb.com/) driver for Swift. +The official [MongoDB](https://www.mongodb.com/) driver for Swift applications on macOS and Linux. ### Index - [Documentation](#documentation) @@ -37,20 +37,15 @@ Core Server (i.e. SERVER) project are **public**. Installation is supported via [Swift Package Manager](https://swift.org/package-manager/). -### Step 1: Install the MongoDB C Driver -The driver wraps the MongoDB C driver, and using it requires having the C driver's two components, `libbson` and `libmongoc`, installed on your system. **The minimum required version of the C Driver is 1.15.3**. +### Step 1: Install required system libraries (Linux Only) +The driver vendors and wraps the MongoDB C driver (`libmongoc`), which depends on a number of external C libraries when built in Linux environments. As a result, these libraries must be installed on your system in order to build MongoSwift. -*On a Mac*, you can install both components at once using [Homebrew](https://brew.sh/): -`brew install mongo-c-driver`. - -*On Linux*: please follow the [instructions](http://mongoc.org/libmongoc/current/installing.html#building-on-unix) from `libmongoc`'s documentation. Note that the versions provided by your package manager may be too old, in which case you can follow the instructions for building and installing from source. - -See example installation from source on Ubuntu in [Docker](https://github.com/mongodb/mongo-swift-driver/tree/master/Examples/Docker). +To install those libraries, please follow the [instructions](http://mongoc.org/libmongoc/current/installing.html#prerequisites-for-libmongoc) from `libmongoc`'s documentation. ### Step 2: Install MongoSwift -*Please follow the instructions in the previous section on installing the MongoDB C Driver before proceeding.* +The driver contains two modules to support a variety of use cases: an asynchronous API in `MongoSwift`, and a synchronous API in `MongoSwiftSync`. The modules share a BSON implementation and a number of core types such as options `struct`s. -Add MongoSwift to your dependencies in `Package.swift`: +To install the driver, add the package and relevant module as a dependency in your project's `Package.swift` file: ```swift // swift-tools-version:5.0 @@ -62,7 +57,10 @@ let package = Package( .package(url: "https://github.com/mongodb/mongo-swift-driver.git", from: "VERSION.STRING.HERE"), ], targets: [ - .target(name: "MyPackage", dependencies: ["MongoSwift"]) + // Async module + .target(name: "MyAsyncTarget", dependencies: ["MongoSwift"]), + // Sync module + .target(name: "MySyncTarget", dependencies: ["MongoSwiftSync"]) ] ) ``` @@ -74,20 +72,59 @@ Then run `swift build` to download, compile, and link all your dependencies. Note: You should call `cleanupMongoSwift()` exactly once at the end of your application to release all memory and other resources allocated by `libmongoc`. ### Connect to MongoDB and Create a Collection + +**Async**: ```swift import MongoSwift +import NIO + +let elg = MultiThreadedEventLoopGroup(numberOfThreads: 4) +let client = try MongoClient("mongodb://localhost:27017", using: elg) + +defer { + // clean up driver resources + client.syncShutdown() + cleanupMongoSwift() + + // shut down EventLoopGroup + try? elg.syncShutdownGracefully() +} + +let db = client.db("myDB") +let result = db.createCollection("myCollection").flatMap { collection in + // use collection... +} +``` + +**Sync**: +```swift +import MongoSwiftSync + +defer { + // free driver resources + cleanupMongoSwift() +} let client = try MongoClient("mongodb://localhost:27017") + let db = client.db("myDB") let collection = try db.createCollection("myCollection") -// free all resources -cleanupMongoSwift() +// use collection... ``` -Note: we have included the client `connectionString` parameter for clarity, but if connecting to the default `"mongodb://localhost:27017"`it may be omitted: `let client = try MongoClient()`. +Note: we have included the client `connectionString` parameter for clarity, but if connecting to the default `"mongodb://localhost:27017"`it may be omitted. ### Create and Insert a Document +**Async**: +```swift +let doc: Document = ["_id": 100, "a": 1, "b": 2, "c": 3] +collection.insertOne(doc).whenSuccess { result in + print(result?.insertedId ?? "") // prints `.int64(100)` +} +``` + +**Sync**: ```swift let doc: Document = ["_id": 100, "a": 1, "b": 2, "c": 3] let result = try collection.insertOne(doc) @@ -95,15 +132,22 @@ print(result?.insertedId ?? "") // prints `.int64(100)` ``` ### Find Documents +**Async**: +```swift +let query: Document = ["a": 1] +let result = collection.find(query).flatMap { cursor in + cursor.forEach { doc in + print(doc) + } +} +``` + +**Sync**: ```swift let query: Document = ["a": 1] let documents = try collection.find(query) for d in documents { - print(d) -} -// check if an error occurred while iterating the cursor -if let error = documents.error { - throw error + print(try d.get()) } ``` @@ -146,6 +190,8 @@ methods. ### Usage With Kitura, Vapor, and Perfect The `Examples/` directory contains sample projects that use the driver with [Kitura](https://github.com/mongodb/mongo-swift-driver/tree/master/Examples/Kitura), [Vapor](https://github.com/mongodb/mongo-swift-driver/tree/master/Examples/Vapor), and [Perfect](https://github.com/mongodb/mongo-swift-driver/tree/master/Examples/Perfect). +Please note that the driver is built using SwiftNIO 2, and therefore is incompatible with frameworks built upon SwiftNIO 1. SwiftNIO 2 is used as of Vapor 4.0 and Kitura 2.5. + ## Development Instructions See our [development guide](https://mongodb.github.io/mongo-swift-driver/development.html) for instructions for building and testing the driver. diff --git a/docs/Classes.html b/docs/Classes.html deleted file mode 100644 index 128c15663..000000000 --- a/docs/Classes.html +++ /dev/null @@ -1,774 +0,0 @@ - - - - Classes Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Classes

-

The following classes are available globally.

- -
-
-
-
    -
  • -
    - - - - BSONDecoder - -
    -
    -
    -
    -
    -
    -

    BSONDecoder facilitates the decoding of BSON into semantic Decodable types.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class BSONDecoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - BSONEncoder - -
    -
    -
    -
    -
    -
    -

    BSONEncoder facilitates the encoding of Encodable values into BSON.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class BSONEncoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DocumentStorage - -
    -
    -
    -
    -
    -
    -

    The storage backing a MongoSwift Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class DocumentStorage
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DocumentIterator - -
    -
    -
    -
    -
    -
    -

    An iterator over the values in a Document.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class DocumentIterator : IteratorProtocol
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ChangeStream - -
    -
    -
    -
    -
    -
    -

    A MongoDB change stream.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class ChangeStream<T> : Sequence, IteratorProtocol where T : Decodable, T : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ClientSession - -
    -
    -
    -
    -
    -
    -

    A MongoDB client session. - This class represents a logical session used for ordering sequential operations.

    - -

    To create a client session, use startSession or withSession on a MongoClient.

    - -

    If causalConsistency is not set to false when starting a session, read and write operations that use the session - will be provided causal consistency guarantees depending on the read and write concerns used. Using “majority” - read and write preferences will provide the full set of guarantees. See - https://docs.mongodb.com/manual/core/read-isolation-consistency-recency/#sessions for more details.

    - -

    e.g.

    -
       let opts = CollectionOptions(readConcern: ReadConcern(.majority), writeConcern: try WriteConcern(w: .majority))
    -   let collection = database.collection("mycoll", options: opts)
    -   try client.withSession { session in
    -       try collection.insertOne(["x": 1], session: session)
    -       try collection.find(["x": 1], session: session)
    -   }
    -
    - -

    To disable causal consistency, set causalConsistency to false in the ClientSessionOptions passed in to either - withSession or startSession.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public final class ClientSession
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoClient - -
    -
    -
    -
    -
    -
    -

    A MongoDB Client.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class MongoClient
    -
    extension MongoClient: Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoCursor - -
    -
    -
    -
    -
    -
    -

    A MongoDB cursor.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class MongoCursor<T> : Sequence, IteratorProtocol where T : Decodable, T : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ReadPreference - -
    -
    -
    -
    -
    -
    -

    A class to represent a MongoDB read preference.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public final class ReadPreference
    -
    extension ReadPreference: Equatable
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/BSONDecoder.html b/docs/Classes/BSONDecoder.html deleted file mode 100644 index b6764368c..000000000 --- a/docs/Classes/BSONDecoder.html +++ /dev/null @@ -1,932 +0,0 @@ - - - - BSONDecoder Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONDecoder

-
-
-
public class BSONDecoder
- -
-
-

BSONDecoder facilitates the decoding of BSON into semantic Decodable types.

- -
-
-
-
    -
  • -
    - - - - DateDecodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various strategies for decoding Dates from BSON.

    - -

    As per the BSON specification, the default strategy is to decode Dates from BSON datetime objects.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum DateDecodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UUIDDecodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various strategies for decoding UUIDs from BSON.

    - -

    As per the BSON specification, the default strategy is to decode UUIDs from BSON binary types with the UUID -subtype.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum UUIDDecodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DataDecodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various strategies for decoding Datas from BSON.

    - -

    As per the BSON specification, the default strategy is to decode Datas from BSON binary types with the generic -binary subtype.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum DataDecodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - userInfo - -
    -
    -
    -
    -
    -
    -

    Contextual user-provided information for use during decoding.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var userInfo: [CodingUserInfoKey : Any]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dateDecodingStrategy - -
    -
    -
    -
    -
    -
    -

    The strategy used for decoding Dates with this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dateDecodingStrategy: BSONDecoder.DateDecodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuidDecodingStrategy - -
    -
    -
    -
    -
    -
    -

    The strategy used for decoding UUIDs with this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var uuidDecodingStrategy: BSONDecoder.UUIDDecodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dataDecodingStrategy - -
    -
    -
    -
    -
    -
    -

    The strategy used for decoding Datas with this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dataDecodingStrategy: BSONDecoder.DataDecodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(options:) - -
    -
    -
    -
    -
    -
    -

    Initializes self.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(options: CodingStrategyProvider? = nil)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decode(_:from:) - -
    -
    -
    -
    -
    -
    -

    Decodes a top-level value of the given type from the given BSON document.

    -
    -

    Throws

    - DecodingError if any value throws an error during decoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func decode<T>(_ type: T.Type, from document: Document) throws -> T where T : Decodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - type - - -
    -

    The type of the value to decode.

    -
    -
    - - document - - -
    -

    The BSON document to decode from.

    -
    -
    -
    -
    -

    Return Value

    -

    A value of the requested type.

    -
    -
    -
    -
  • -
  • -
    - - - - decode(_:from:) - -
    -
    -
    -
    -
    -
    -

    Decodes a top-level value of the given type from the given BSON data.

    -
    -

    Throws

    - DecodingError if the BSON data is corrupt or if any value throws an error during decoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func decode<T>(_ type: T.Type, from data: Data) throws -> T where T : Decodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - type - - -
    -

    The type of the value to decode.

    -
    -
    - - data - - -
    -

    The BSON data to decode from.

    -
    -
    -
    -
    -

    Return Value

    -

    A value of the requested type.

    -
    -
    -
    -
  • -
  • -
    - - - - decode(_:from:) - -
    -
    -
    -
    -
    -
    -

    Decodes a top-level value of the given type from the given JSON/extended JSON string.

    -
    -

    Throws

    - DecodingError if the JSON data is corrupt or if any value throws an error during decoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func decode<T>(_: T.Type, from json: String) throws -> T where T : Decodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - type - - -
    -

    The type of the value to decode.

    -
    -
    - - json - - -
    -

    The JSON string to decode from.

    -
    -
    -
    -
    -

    Return Value

    -

    A value of the requested type.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/BSONDecoder/DataDecodingStrategy.html b/docs/Classes/BSONDecoder/DataDecodingStrategy.html deleted file mode 100644 index 5b1747279..000000000 --- a/docs/Classes/BSONDecoder/DataDecodingStrategy.html +++ /dev/null @@ -1,610 +0,0 @@ - - - - DataDecodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DataDecodingStrategy

-
-
-
public enum DataDecodingStrategy
- -
-
-

Enum representing the various strategies for decoding Datas from BSON.

- -

As per the BSON specification, the default strategy is to decode Datas from BSON binary types with the generic -binary subtype.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - deferredToData - -
    -
    -
    -
    -
    -
    -

    Decode Datas by deferring to their default decoding implementation.

    - -

    Note: The default decoding implementation attempts to decode the Data from a [UInt8], but because BSON -does not support integer types other Int32 and Int64, it actually decodes from an [Int32] stored -in BSON. This strategy paired with its corresponding encoding strategy results in an inefficient storage of -the Data in BSON.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToData
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Decode Datas stored as the BSON Binary type (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - base64 - -
    -
    -
    -
    -
    -
    -

    Decode Datas stored as base64 encoded strings.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case base64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - custom(_:) - -
    -
    -
    -
    -
    -
    -

    Decode Datas using the provided closure.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case custom((_ decoder: Decoder) throws -> Data)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/BSONDecoder/DateDecodingStrategy.html b/docs/Classes/BSONDecoder/DateDecodingStrategy.html deleted file mode 100644 index 86f63524c..000000000 --- a/docs/Classes/BSONDecoder/DateDecodingStrategy.html +++ /dev/null @@ -1,685 +0,0 @@ - - - - DateDecodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DateDecodingStrategy

-
-
-
public enum DateDecodingStrategy
- -
-
-

Enum representing the various strategies for decoding Dates from BSON.

- -

As per the BSON specification, the default strategy is to decode Dates from BSON datetime objects.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - bsonDateTime - -
    -
    -
    -
    -
    -
    -

    Decode Dates stored as BSON datetimes (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case bsonDateTime
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - millisecondsSince1970 - -
    -
    -
    -
    -
    -
    -

    Decode Dates stored as numbers of seconds since January 1, 1970.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case millisecondsSince1970
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - secondsSince1970 - -
    -
    -
    -
    -
    -
    -

    Decode Dates stored as numbers of milliseconds since January 1, 1970.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case secondsSince1970
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - deferredToDate - -
    -
    -
    -
    -
    -
    -

    Decode Dates by deferring to their default decoding implementation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToDate
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - iso8601 - -
    -
    -
    -
    -
    -
    -

    Decode Dates stored as ISO8601 formatted strings.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case iso8601
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - formatted(_:) - -
    -
    -
    -
    -
    -
    -

    Decode Dates stored as strings parsable by the given formatter.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case formatted(DateFormatter)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - custom(_:) - -
    -
    -
    -
    -
    -
    -

    Decode Dates using the provided closure.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case custom((_ decoder: Decoder) throws -> Date)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/BSONDecoder/UUIDDecodingStrategy.html b/docs/Classes/BSONDecoder/UUIDDecodingStrategy.html deleted file mode 100644 index b38287f9d..000000000 --- a/docs/Classes/BSONDecoder/UUIDDecodingStrategy.html +++ /dev/null @@ -1,551 +0,0 @@ - - - - UUIDDecodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UUIDDecodingStrategy

-
-
-
public enum UUIDDecodingStrategy
- -
-
-

Enum representing the various strategies for decoding UUIDs from BSON.

- -

As per the BSON specification, the default strategy is to decode UUIDs from BSON binary types with the UUID -subtype.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - deferredToUUID - -
    -
    -
    -
    -
    -
    -

    Decode UUIDs by deferring to their default decoding implementation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToUUID
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Decode UUIDs stored as the BSON Binary type (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/BSONEncoder.html b/docs/Classes/BSONEncoder.html deleted file mode 100644 index 15b56e974..000000000 --- a/docs/Classes/BSONEncoder.html +++ /dev/null @@ -1,954 +0,0 @@ - - - - BSONEncoder Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONEncoder

-
-
-
public class BSONEncoder
- -
-
-

BSONEncoder facilitates the encoding of Encodable values into BSON.

- -
-
-
-
    -
  • -
    - - - - DateEncodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various strategies for encoding Dates.

    - -

    As per the BSON specification, the default strategy is to encode Dates as BSON datetime objects.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum DateEncodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UUIDEncodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various strategies for encoding UUIDs.

    - -

    As per the BSON specification, the default strategy is to encode UUIDs as BSON binary types with the UUID - subtype.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum UUIDEncodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DataEncodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various strategies for encoding Datas.

    - -

    As per the BSON specification, the default strategy is to encode Datas as BSON binary types with the generic - binary subtype.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum DataEncodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dateEncodingStrategy - -
    -
    -
    -
    -
    -
    -

    The strategy to use for encoding Dates with this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dateEncodingStrategy: BSONEncoder.DateEncodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuidEncodingStrategy - -
    -
    -
    -
    -
    -
    -

    The strategy to use for encoding UUIDs with this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var uuidEncodingStrategy: BSONEncoder.UUIDEncodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dataEncodingStrategy - -
    -
    -
    -
    -
    -
    -

    The strategy to use for encoding Datas with this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dataEncodingStrategy: BSONEncoder.DataEncodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - userInfo - -
    -
    -
    -
    -
    -
    -

    Contextual user-provided information for use during encoding.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var userInfo: [CodingUserInfoKey : Any]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(options:) - -
    -
    -
    -
    -
    -
    -

    Initializes self.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(options: CodingStrategyProvider? = nil)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(_:) - -
    -
    -
    -
    -
    -
    -

    Encodes the given top-level value and returns its BSON representation.

    -
    -

    Throws

    - EncodingError if any value throws an error during encoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode<T>(_ value: T) throws -> Document where T : Encodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - value - - -
    -

    The value to encode.

    -
    -
    -
    -
    -

    Return Value

    -

    A new Document containing the encoded BSON data.

    -
    -
    -
    -
  • -
  • -
    - - - - encode(_:) - -
    -
    -
    -
    -
    -
    -

    Encodes the given top-level optional value and returns its BSON representation. Returns nil if the - value is nil or if it contains no data.

    -
    -

    Throws

    - EncodingError if any value throws an error during encoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode<T>(_ value: T?) throws -> Document? where T : Encodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - value - - -
    -

    The value to encode.

    -
    -
    -
    -
    -

    Return Value

    -

    A new Document containing the encoded BSON data, or nil if there is no data to encode.

    -
    -
    -
    -
  • -
  • -
    - - - - encode(_:) - -
    -
    -
    -
    -
    -
    -

    Encodes the given array of top-level values and returns an array of their BSON representations.

    -
    -

    Throws

    - EncodingError if any value throws an error during encoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode<T>(_ values: [T]) throws -> [Document] where T : Encodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - values - - -
    -

    The values to encode.

    -
    -
    -
    -
    -

    Return Value

    -

    A new [Document] containing the encoded BSON data.

    -
    -
    -
    -
  • -
  • -
    - - - - encode(_:) - -
    -
    -
    -
    -
    -
    -

    Encodes the given array of top-level optional values and returns an array of their BSON representations. - Any value that is nil or contains no data will be mapped to nil.

    -
    -

    Throws

    - EncodingError if any value throws an error during encoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode<T>(_ values: [T?]) throws -> [Document?] where T : Encodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - values - - -
    -

    The values to encode.

    -
    -
    -
    -
    -

    Return Value

    -

    A new [Document?] containing the encoded BSON data. Any value that is nil or - contains no data will be mapped to nil.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/BSONEncoder/DataEncodingStrategy.html b/docs/Classes/BSONEncoder/DataEncodingStrategy.html deleted file mode 100644 index 53072a85f..000000000 --- a/docs/Classes/BSONEncoder/DataEncodingStrategy.html +++ /dev/null @@ -1,610 +0,0 @@ - - - - DataEncodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DataEncodingStrategy

-
-
-
public enum DataEncodingStrategy
- -
-
-

Enum representing the various strategies for encoding Datas.

- -

As per the BSON specification, the default strategy is to encode Datas as BSON binary types with the generic - binary subtype.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - deferredToData - -
    -
    -
    -
    -
    -
    -

    Encode the Data by deferring to its default encoding implementation.

    - -

    Note: The default encoding implementation attempts to encode the Data as a [UInt8], but because BSON - does not support integer types besides Int32 or Int64, it actually gets encoded to BSON as an [Int32]. - This results in a space inefficient storage of the Data (using 4 bytes of BSON storage per byte of data).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToData
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Encode the Data as a BSON binary type (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - base64 - -
    -
    -
    -
    -
    -
    -

    Encode the Data as a base64 encoded string.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case base64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - custom(_:) - -
    -
    -
    -
    -
    -
    -

    Encode the Data by using the given closure. -If the closure does not encode a value, an empty document will be encoded in its place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case custom((Data, Encoder) throws -> Void)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/BSONEncoder/DateEncodingStrategy.html b/docs/Classes/BSONEncoder/DateEncodingStrategy.html deleted file mode 100644 index 8fef3ea16..000000000 --- a/docs/Classes/BSONEncoder/DateEncodingStrategy.html +++ /dev/null @@ -1,686 +0,0 @@ - - - - DateEncodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DateEncodingStrategy

-
-
-
public enum DateEncodingStrategy
- -
-
-

Enum representing the various strategies for encoding Dates.

- -

As per the BSON specification, the default strategy is to encode Dates as BSON datetime objects.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - deferredToDate - -
    -
    -
    -
    -
    -
    -

    Encode the Date by deferring to its default encoding implementation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToDate
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonDateTime - -
    -
    -
    -
    -
    -
    -

    Encode the Date as a BSON datetime object (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case bsonDateTime
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - millisecondsSince1970 - -
    -
    -
    -
    -
    -
    -

    Encode the Date as a 64-bit integer counting the number of milliseconds since January 1, 1970.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case millisecondsSince1970
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - secondsSince1970 - -
    -
    -
    -
    -
    -
    -

    Encode the Date as a BSON double counting the number of seconds since January 1, 1970.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case secondsSince1970
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - iso8601 - -
    -
    -
    -
    -
    -
    -

    Encode the Date as an ISO-8601-formatted string (in RFC 339 format).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case iso8601
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - formatted(_:) - -
    -
    -
    -
    -
    -
    -

    Encode the Date as a string formatted by the given formatter.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case formatted(DateFormatter)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - custom(_:) - -
    -
    -
    -
    -
    -
    -

    Encode the Date by using the given closure. -If the closure does not encode a value, an empty document will be encoded in its place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case custom((Date, Encoder) throws -> Void)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/BSONEncoder/UUIDEncodingStrategy.html b/docs/Classes/BSONEncoder/UUIDEncodingStrategy.html deleted file mode 100644 index 9cff0c205..000000000 --- a/docs/Classes/BSONEncoder/UUIDEncodingStrategy.html +++ /dev/null @@ -1,551 +0,0 @@ - - - - UUIDEncodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UUIDEncodingStrategy

-
-
-
public enum UUIDEncodingStrategy
- -
-
-

Enum representing the various strategies for encoding UUIDs.

- -

As per the BSON specification, the default strategy is to encode UUIDs as BSON binary types with the UUID - subtype.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - deferredToUUID - -
    -
    -
    -
    -
    -
    -

    Encode the UUID by deferring to its default encoding implementation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToUUID
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Encode the UUID as a BSON binary type (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/BulkWriteOperation.html b/docs/Classes/BulkWriteOperation.html deleted file mode 100644 index cf3c3122d..000000000 --- a/docs/Classes/BulkWriteOperation.html +++ /dev/null @@ -1,509 +0,0 @@ - - - - BulkWriteOperation Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BulkWriteOperation

-
-
-
public class BulkWriteOperation
- -
-
-

A class encapsulating a mongoc_bulk_operation_t.

- -
-
-
-
    -
  • -
    - - - - deinit - -
    -
    -
    -
    -
    -
    -

    Cleans up internal state.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    deinit
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/ChangeStream.html b/docs/Classes/ChangeStream.html deleted file mode 100644 index 08cc214ef..000000000 --- a/docs/Classes/ChangeStream.html +++ /dev/null @@ -1,622 +0,0 @@ - - - - ChangeStream Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ChangeStream

-
-
-
public class ChangeStream<T> : Sequence, IteratorProtocol where T : Decodable, T : Encodable
- -
-
-

A MongoDB change stream.

- - -
-
-
-
    -
  • -
    - - - - resumeToken - -
    -
    -
    -
    -
    -
    -

    A ResumeToken associated with the most recent event seen by the change stream.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public internal(set) var resumeToken: ResumeToken?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - error - -
    -
    -
    -
    -
    -
    -

    The error that occurred while iterating the change stream, if one exists. This should be used to check -for errors after next() returns nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public private(set) var error: Error?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - next() - -
    -
    -
    -
    -
    -
    -

    Returns the next T in the change stream or nil if there is no next value. Will block for a maximum of -maxAwaitTimeMS milliseconds as specified in the ChangeStreamOptions, or for the server default timeout -if omitted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func next() -> T?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - nextOrError() - -
    -
    -
    -
    -
    -
    -

    Returns the next T in this change stream or nil, or throws an error if one occurs – compared to next(), -which returns nil and requires manually checking for an error afterward. Will block for a maximum of -maxAwaitTimeMS milliseconds as specified in the ChangeStreamOptions, or for the server default timeout if -omitted.

    -
    -

    Throws

    -
      -
    • ServerError.commandError if an error occurs on the server while iterating the change stream cursor.
    • -
    • UserError.logicError if this function is called and the session associated with this change stream is -inactive.
    • -
    • DecodingError if an error occurs while decoding the server’s response.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func nextOrError() throws -> T?
    - -
    -
    -
    -

    Return Value

    -

    the next T in this change stream, or nil if at the end of the change stream cursor.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/ClientSession.html b/docs/Classes/ClientSession.html deleted file mode 100644 index 3de7ec96a..000000000 --- a/docs/Classes/ClientSession.html +++ /dev/null @@ -1,759 +0,0 @@ - - - - ClientSession Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ClientSession

-
-
-
public final class ClientSession
- -
-
-

A MongoDB client session. - This class represents a logical session used for ordering sequential operations.

- -

To create a client session, use startSession or withSession on a MongoClient.

- -

If causalConsistency is not set to false when starting a session, read and write operations that use the session - will be provided causal consistency guarantees depending on the read and write concerns used. Using “majority” - read and write preferences will provide the full set of guarantees. See - https://docs.mongodb.com/manual/core/read-isolation-consistency-recency/#sessions for more details.

- -

e.g.

-
   let opts = CollectionOptions(readConcern: ReadConcern(.majority), writeConcern: try WriteConcern(w: .majority))
-   let collection = database.collection("mycoll", options: opts)
-   try client.withSession { session in
-       try collection.insertOne(["x": 1], session: session)
-       try collection.find(["x": 1], session: session)
-   }
-
- -

To disable causal consistency, set causalConsistency to false in the ClientSessionOptions passed in to either - withSession or startSession.

- - -
-
-
-
    -
  • -
    - - - - client - -
    -
    -
    -
    -
    -
    -

    The client used to start this session.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let client: MongoClient
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - id - -
    -
    -
    -
    -
    -
    -

    The session ID of this session.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let id: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - clusterTime - -
    -
    -
    -
    -
    -
    -

    The most recent cluster time seen by this session. This value will be nil if either of the following are true:

    - -
      -
    • No operations have been executed using this session and advanceClusterTime has not been called.
    • -
    • This session has been ended.
    • -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var clusterTime: Document? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - operationTime - -
    -
    -
    -
    -
    -
    -

    The operation time of the most recent operation performed using this session. This value will be nil if either -of the following are true:

    - -
      -
    • No operations have been performed using this session.
    • -
    • This session has been ended.
    • -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var operationTime: Timestamp? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - options - -
    -
    -
    -
    -
    -
    -

    The options used to start this session.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let options: ClientSessionOptions?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Advances the clusterTime for this session to the given time, if it is greater than the current clusterTime. If - the session has been ended, or if the provided clusterTime is less than the current clusterTime, this method has - no effect.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func advanceClusterTime(to clusterTime: Document)
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - clusterTime - - -
    -

    The session’s new cluster time, as a Document like ["cluster time": Timestamp(...)]

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Advances the operationTime for this session to the given time if it is greater than the current operationTime. - If the session has been ended, or if the provided operationTime is less than the current operationTime, this - method has no effect.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func advanceOperationTime(to operationTime: Timestamp)
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - operationTime - - -
    -

    The session’s new operationTime

    -
    -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/DocumentIterator.html b/docs/Classes/DocumentIterator.html deleted file mode 100644 index c5380406a..000000000 --- a/docs/Classes/DocumentIterator.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - DocumentIterator Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DocumentIterator

-
-
-
public class DocumentIterator : IteratorProtocol
- -
-
-

An iterator over the values in a Document.

- -
-
-
-
    -
  • -
    - - - - next() - -
    -
    -
    -
    -
    -
    -

    Returns the next value in the sequence, or nil if the iterator is exhausted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func next() -> Document.KeyValuePair?
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/DocumentStorage.html b/docs/Classes/DocumentStorage.html deleted file mode 100644 index afad2e278..000000000 --- a/docs/Classes/DocumentStorage.html +++ /dev/null @@ -1,509 +0,0 @@ - - - - DocumentStorage Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

Install in Dash

-
-
-
- -
-
- - -
- - - diff --git a/docs/Classes/MongoClient.html b/docs/Classes/MongoClient.html deleted file mode 100644 index 799030ac9..000000000 --- a/docs/Classes/MongoClient.html +++ /dev/null @@ -1,1435 +0,0 @@ - - - - MongoClient Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoClient

-
-
-
public class MongoClient
-
extension MongoClient: Equatable
- -
-
-

A MongoDB Client.

- -
-
-
-
    -
  • -
    - - - - encoder - -
    -
    -
    -
    -
    -
    -

    Encoder whose options are inherited by databases derived from this client.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let encoder: BSONEncoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decoder - -
    -
    -
    -
    -
    -
    -

    Decoder whose options are inherited by databases derived from this client.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let decoder: BSONDecoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    The read concern set on this client, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    The ReadPreference set on this client.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readPreference: ReadPreference
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    The write concern set on this client, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:options:) - -
    -
    -
    -
    -
    -
    -

    Create a new client connection to a MongoDB server. For options that included in both the connection string URI - and the ClientOptions struct, the final value is set in descending order of priority: the value specified in - ClientOptions (if non-nil), the value specified in the URI, or the default value if both are unset.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • A UserError.invalidArgumentError if the connection string passed in is improperly formatted.
    • -
    • A UserError.invalidArgumentError if the connection string specifies the use of TLS but libmongoc was not -built with TLS support.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ connectionString: String = "mongodb://localhost:27017", options: ClientOptions? = nil) throws
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - connectionString - - -
    -

    the connection string to connect to.

    -
    -
    - - options - - -
    -

    optional ClientOptions to use for this client

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a new ClientSession with the provided options.

    -
    -

    Throws

    -
      -
    • RuntimeError.compatibilityError if the deployment does not support sessions.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func startSession(options: ClientSessionOptions? = nil) throws -> ClientSession
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a new ClientSession with the provided options and passes it to the provided closure. - The session is only valid within the body of the closure and will be ended after the body completes.

    -
    -

    Throws

    -
      -
    • RuntimeError.compatibilityError if the deployment does not support sessions.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func withSession<T>(
    -    options: ClientSessionOptions? = nil,
    -    _ sessionBody: (ClientSession) throws -> T
    -) throws -> T
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Run the listDatabases command.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error is encountered while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listDatabases(
    -    _ filter: Document? = nil,
    -    session: ClientSession? = nil
    -) throws -> [DatabaseSpecification]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    Optional Document specifying a filter that the listed databases must pass. This filter can be based -on the “name”, “sizeOnDisk”, “empty”, or “shards” fields of the output.

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command.

    -
    -
    -
    -
    -

    Return Value

    -

    A [DatabaseSpecification] containing the databases matching provided criteria.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Get a list of MongoDatabases.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.logicError if the provided session is inactive.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listMongoDatabases(
    -    _ filter: Document? = nil,
    -    session: ClientSession? = nil
    -) throws -> [MongoDatabase]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    Optional Document specifying a filter on the names of the returned databases.

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    An Array of MongoDatabases that match the provided filter.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Get a list of names of databases.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.logicError if the provided session is inactive.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listDatabaseNames(_ filter: Document? = nil, session: ClientSession? = nil) throws -> [String]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    Optional Document specifying a filter on the names of the returned databases.

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A [String] containing names of databases that match the provided filter.

    -
    -
    -
    -
  • -
  • -
    - - - - db(_:options:) - -
    -
    -
    -
    -
    -
    -

    Gets a MongoDatabase instance for the given database name. If an option is not specified in the optional - DatabaseOptions param, the database will inherit the value from the parent client or the default if - the client’s option is not set. To override an option inherited from the client (e.g. a read concern) with the - default value, it must be explicitly specified in the options param (e.g. ReadConcern(), not nil).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func db(_ name: String, options: DatabaseOptions? = nil) -> MongoDatabase
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    the name of the database to retrieve

    -
    -
    - - options - - -
    -

    Optional DatabaseOptions to use for the retrieved database

    -
    -
    -
    -
    -

    Return Value

    -

    a MongoDatabase corresponding to the provided database name

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a MongoClient. Allows the client to observe all changes in a cluster - - excluding system collections and the “config”, “local”, and “admin” databases.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    -

    Note

    -

    Supported in MongoDB version 4.0+ only.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> ChangeStream<ChangeStreamEvent<Document>>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    -
    -
    -

    Return Value

    -

    a ChangeStream on all collections in all databases in a cluster.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a MongoClient. Allows the client to observe all changes in a cluster - - excluding system collections and the “config”, “local”, and “admin” databases. Associates the specified - Codable type T with the fullDocument field in the ChangeStreamEvents emitted by the returned - ChangeStream.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    -

    Note

    -

    Supported in MongoDB version 4.0+ only.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch<FullDocType: Codable>(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil,
    -    withFullDocumentType _: FullDocType.Type
    -)
    -    throws -> ChangeStream<ChangeStreamEvent<FullDocType>>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    - - withFullDocumentType - - -
    -

    The type that the fullDocument field of the emitted ChangeStreamEvents will be - decoded to.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on all collections in all databases in a cluster.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a MongoClient. Allows the client to observe all changes in a cluster - - excluding system collections and the “config”, “local”, and “admin” databases. Associates the specified - Codable type T with the returned ChangeStream.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    -

    Note

    -

    Supported in MongoDB version 4.0+ only.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch<EventType: Codable>(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil,
    -    withEventType _: EventType.Type
    -) throws -> ChangeStream<EventType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    - - withEventType - - -
    -

    The type that the entire change stream response will be decoded to and that will be returned - when iterating through the change stream.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on all collections in all databases in a cluster.

    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: MongoClient, rhs: MongoClient) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/MongoCollection.html b/docs/Classes/MongoCollection.html deleted file mode 100644 index 22074321a..000000000 --- a/docs/Classes/MongoCollection.html +++ /dev/null @@ -1,2734 +0,0 @@ - - - - MongoCollection Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoCollection

-
-
-
public class MongoCollection<T> where T : Decodable, T : Encodable
- -
-
-

A MongoDB collection.

- -
-
-
-
    -
  • -
    - - - - encoder - -
    -
    -
    -
    -
    -
    -

    Encoder used by this collection for BSON conversions. (e.g. converting CollectionTypes, indexes, and options -to documents).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let encoder: BSONEncoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decoder - -
    -
    -
    -
    -
    -
    -

    Decoder used by this collection for BSON conversions (e.g. converting documents to CollectionTypes).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let decoder: BSONDecoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CollectionType - -
    -
    -
    -
    -
    -
    -

    A Codable type associated with this MongoCollection instance. - This allows CollectionType values to be directly inserted into and retrieved from the collection, by - encoding/decoding them using the BSONEncoder and BSONDecoder. The strategies to be used by the encoder and - decoder for certain types can be configured by setting the coding strategies on the options used to create this - collection instance. The default strategies are inherited from those set on the database this collection derived - from.

    - -

    This type association only exists in the context of this particular MongoCollection instance. It is the - responsibility of the user to ensure that any data already stored in the collection was encoded - from this same type and according to the coding strategies set on this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias CollectionType = T
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    The name of this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var name: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    The ReadConcern set on this collection, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    The ReadPreference set on this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    The WriteConcern set on this collection, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - drop(session:) - -
    -
    -
    -
    -
    -
    -

    Drops this collection from its parent database.

    -
    -

    Throws

    -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func drop(session: ClientSession? = nil) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Execute multiple write operations.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if requests is empty.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.bulkWriteError if any error occurs while performing the writes.
    • -
    • ServerError.commandError if an error occurs that prevents the operation from being performed.
    • -
    • EncodingError if an error occurs while encoding the CollectionType or the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func bulkWrite(_ requests: [WriteModel],
    -                      options: BulkWriteOptions? = nil,
    -                      session: ClientSession? = nil) throws -> BulkWriteResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - requests - - -
    -

    a [WriteModel] containing the writes to perform.

    -
    -
    - - options - - -
    -

    optional BulkWriteOptions to use while executing the operation.

    -
    -
    -
    -
    -

    Return Value

    -

    a BulkWriteResult, or nil if the write concern is unacknowledged.

    -
    -
    -
    -
  • -
  • -
    - - - - DeleteOneModel - -
    -
    -
    -
    -
    -
    -

    A model for a deleteOne operation within a bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DeleteOneModel : WriteModel, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DeleteManyModel - -
    -
    -
    -
    -
    -
    -

    A model for a deleteMany operation within a bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DeleteManyModel : WriteModel, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - InsertOneModel - -
    -
    -
    -
    -
    -
    -

    A model for an insertOne operation within a bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct InsertOneModel : WriteModel, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ReplaceOneModel - -
    -
    -
    -
    -
    -
    -

    A model for a replaceOne operation within a bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ReplaceOneModel : WriteModel, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UpdateOneModel - -
    -
    -
    -
    -
    -
    -

    A model for an updateOne operation within a bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct UpdateOneModel : WriteModel, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UpdateManyModel - -
    -
    -
    -
    -
    -
    -

    A model for an updateMany operation within a bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct UpdateManyModel : WriteModel, Decodable
    - -
    -
    -
    -
    -
  • -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Finds a single document and deletes it, returning the original.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if any of the provided options are invalid.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • ServerError.writeError if an error occurs while executing the command.
    • -
    • DecodingError if the deleted document cannot be decoded to a CollectionType value.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func findOneAndDelete(_ filter: Document,
    -                             options: FindOneAndDeleteOptions? = nil,
    -                             session: ClientSession? = nil) throws -> CollectionType?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - options - - -
    -

    Optional FindOneAndDeleteOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The deleted document, represented as a CollectionType, or nil if no document was deleted.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds a single document and replaces it, returning either the original or the replaced document.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if any of the provided options are invalid.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • ServerError.writeError if an error occurs while executing the command.
    • -
    • DecodingError if the replaced document cannot be decoded to a CollectionType value.
    • -
    • EncodingError if replacement cannot be encoded to a Document.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func findOneAndReplace(filter: Document,
    -                              replacement: CollectionType,
    -                              options: FindOneAndReplaceOptions? = nil,
    -                              session: ClientSession? = nil) throws -> CollectionType?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - replacement - - -
    -

    a CollectionType to replace the found document

    -
    -
    - - options - - -
    -

    Optional FindOneAndReplaceOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    A CollectionType, representing either the original document or its replacement, - depending on selected options, or nil if there was no match.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds a single document and updates it, returning either the original or the updated document.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if any of the provided options are invalid.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • ServerError.writeError if an error occurs while executing the command.
    • -
    • DecodingError if the updated document cannot be decoded to a CollectionType value.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func findOneAndUpdate(filter: Document,
    -                             update: Document,
    -                             options: FindOneAndUpdateOptions? = nil,
    -                             session: ClientSession? = nil) throws -> CollectionType?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - update - - -
    -

    a Document containing updates to apply

    -
    -
    - - options - - -
    -

    Optional FindOneAndUpdateOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    A CollectionType representing either the original or updated document, - depending on selected options, or nil if there was no match.

    -
    -
    -
    -
  • -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Creates an index over the collection for the provided keys with the provided options.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the index specification or options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func createIndex(_ keys: Document,
    -                        options: IndexOptions? = nil,
    -                        commandOptions: CreateIndexOptions? = nil,
    -                        session: ClientSession? = nil) throws -> String
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - keys - - -
    -

    a Document specifing the keys for the index

    -
    -
    - - options - - -
    -

    Optional IndexOptions to use for the index

    -
    -
    - - commandOptions - - -
    -

    Optional CreateIndexOptions to use for the command

    -
    -
    -
    -
    -

    Return Value

    -

    The name of the created index.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates an index over the collection for the provided keys with the provided options.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the index specification or options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func createIndex(_ model: IndexModel,
    -                        options: CreateIndexOptions? = nil,
    -                        session: ClientSession? = nil) throws -> String
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - model - - -
    -

    An IndexModel representing the keys and options for the index

    -
    -
    - - options - - -
    -

    Optional CreateIndexOptions to use for the command

    -
    -
    -
    -
    -

    Return Value

    -

    The name of the created index.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates multiple indexes in the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the index specifications or options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func createIndexes(_ models: [IndexModel],
    -                          options: CreateIndexOptions? = nil,
    -                          session: ClientSession? = nil) throws -> [String]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - models - - -
    -

    An [IndexModel] specifying the indexes to create

    -
    -
    - - options - - -
    -

    Optional CreateIndexOptions to use for the command

    -
    -
    -
    -
    -

    Return Value

    -

    An [String] containing the names of all the indexes that were created.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Drops a single index from the collection by the index name.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndex(_ name: String,
    -                      options: DropIndexOptions? = nil,
    -                      session: ClientSession? = nil) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    The name of the index to drop

    -
    -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Attempts to drop a single index from the collection given the keys describing it.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndex(_ keys: Document,
    -                      commandOptions: DropIndexOptions? = nil,
    -                      session: ClientSession? = nil) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - keys - - -
    -

    a Document containing the keys for the index to drop

    -
    -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server’s response to the command.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Attempts to drop a single index from the collection given an IndexModel describing it.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndex(_ model: IndexModel,
    -                      options: DropIndexOptions? = nil,
    -                      session: ClientSession? = nil) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - model - - -
    -

    An IndexModel describing the index to drop

    -
    -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server’s response to the command.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Drops all indexes in the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndexes(options: DropIndexOptions? = nil, session: ClientSession? = nil) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server’s response to the command.

    -
    -
    -
    -
  • -
  • -
    - - - - listIndexes(session:) - -
    -
    -
    -
    -
    -
    -

    Retrieves a list of the indexes currently on this collection.

    -
    -

    Throws

    -

    UserError.logicError if the provided session is inactive.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listIndexes(session: ClientSession? = nil) throws -> MongoCursor<Document>
    - -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the index names.

    -
    -
    -
    -
  • -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Finds the documents in this collection which match the provided filter.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func find(_ filter: Document = [:],
    -                 options: FindOptions? = nil,
    -                 session: ClientSession? = nil) throws -> MongoCursor<CollectionType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    A Document that should match the query

    -
    -
    - - options - - -
    -

    Optional FindOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the resulting Documents

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Runs an aggregation framework pipeline against this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func aggregate(_ pipeline: [Document],
    -                      options: AggregateOptions? = nil,
    -                      session: ClientSession? = nil) throws -> MongoCursor<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - pipeline - - -
    -

    an [Document] containing the pipeline of aggregation operations to perform

    -
    -
    - - options - - -
    -

    Optional AggregateOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the resulting Documents

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Counts the number of documents in this collection matching the provided filter.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from performing the write.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func count(_ filter: Document = [:],
    -                  options: CountOptions? = nil,
    -                  session: ClientSession? = nil) throws -> Int
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    a Document, the filter that documents must match in order to be counted

    -
    -
    - - options - - -
    -

    Optional CountOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The count of the documents that matched the filter

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds the distinct values for a specified field across the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func distinct(fieldName: String,
    -                     filter: Document = [:],
    -                     options: DistinctOptions? = nil,
    -                     session: ClientSession? = nil) throws -> [BSONValue]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - fieldName - - -
    -

    The field for which the distinct values will be found

    -
    -
    - - filter - - -
    -

    a Document representing the filter documents must match in order to be considered for the operation

    -
    -
    - - options - - -
    -

    Optional DistinctOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    A [BSONValue] containing the distinct values for the specified criteria

    -
    -
    -
    -
  • -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Encodes the provided value to BSON and inserts it. If the value is missing an identifier, one will be - generated for it.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the CollectionType to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func insertOne(_ value: CollectionType,
    -                      options: InsertOneOptions? = nil,
    -                      session: ClientSession? = nil) throws -> InsertOneResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - value - - -
    -

    A CollectionType value to encode and insert

    -
    -
    - - options - - -
    -

    Optional InsertOneOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to perform the insert. If the WriteConcern - is unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Encodes the provided values to BSON and inserts them. If any values are - missing identifiers, the driver will generate them.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.bulkWriteError if an error occurs while performing any of the writes.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the CollectionType or options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func insertMany(_ values: [CollectionType],
    -                       options: InsertManyOptions? = nil,
    -                       session: ClientSession? = nil) throws -> InsertManyResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - values - - -
    -

    The CollectionType values to insert

    -
    -
    - - options - - -
    -

    optional InsertManyOptions to use while executing the operation

    -
    -
    -
    -
    -

    Return Value

    -

    an InsertManyResult, or nil if the write concern is unacknowledged.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Replaces a single document matching the provided filter in this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the CollectionType or options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func replaceOne(filter: Document,
    -                       replacement: CollectionType,
    -                       options: ReplaceOptions? = nil,
    -                       session: ClientSession? = nil) throws -> UpdateResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - replacement - - -
    -

    The replacement value, a CollectionType value to be encoded and inserted

    -
    -
    - - options - - -
    -

    Optional ReplaceOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to replace a document. If the WriteConcern - is unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Updates a single document matching the provided filter in this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func updateOne(filter: Document,
    -                      update: Document,
    -                      options: UpdateOptions? = nil,
    -                      session: ClientSession? = nil) throws -> UpdateResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - update - - -
    -

    A Document representing the update to be applied to a matching document

    -
    -
    - - options - - -
    -

    Optional UpdateOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to update a document. If the WriteConcern is - unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Updates multiple documents matching the provided filter in this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func updateMany(filter: Document,
    -                       update: Document,
    -                       options: UpdateOptions? = nil,
    -                       session: ClientSession? = nil) throws -> UpdateResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - update - - -
    -

    A Document representing the update to be applied to matching documents

    -
    -
    - - options - - -
    -

    Optional UpdateOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to update multiple documents. If the write - concern is unacknowledged, nil is returned

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Deletes a single matching document from the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func deleteOne(_ filter: Document,
    -                      options: DeleteOptions? = nil,
    -                      session: ClientSession? = nil) throws -> DeleteResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - options - - -
    -

    Optional DeleteOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of performing the deletion. If the WriteConcern is - unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Deletes multiple documents

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func deleteMany(_ filter: Document,
    -                       options: DeleteOptions? = nil,
    -                       session: ClientSession? = nil) throws -> DeleteResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - options - - -
    -

    Optional DeleteOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of performing the deletion. If the WriteConcern is - unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/MongoCollection/DeleteManyModel.html b/docs/Classes/MongoCollection/DeleteManyModel.html deleted file mode 100644 index 8b7f9b84e..000000000 --- a/docs/Classes/MongoCollection/DeleteManyModel.html +++ /dev/null @@ -1,636 +0,0 @@ - - - - DeleteManyModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DeleteManyModel

-
-
-
public struct DeleteManyModel : WriteModel, Decodable
- -
-
-

A model for a deleteMany operation within a bulk write.

- -
-
-
-
    -
  • -
    - - - - filter - -
    -
    -
    -
    -
    -
    -

    A Document representing the match criteria.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let filter: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    The collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:collation:) - -
    -
    -
    -
    -
    -
    -

    Create a deleteMany operation for a bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ filter: Document, collation: Document? = nil)
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria.

    -
    -
    - - collation - - -
    -

    Specifies a collation to use.

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Adds the deleteMany operation to a bulk write.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/MongoCollection/DeleteOneModel.html b/docs/Classes/MongoCollection/DeleteOneModel.html deleted file mode 100644 index 3adfa1628..000000000 --- a/docs/Classes/MongoCollection/DeleteOneModel.html +++ /dev/null @@ -1,636 +0,0 @@ - - - - DeleteOneModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DeleteOneModel

-
-
-
public struct DeleteOneModel : WriteModel, Decodable
- -
-
-

A model for a deleteOne operation within a bulk write.

- -
-
-
-
    -
  • -
    - - - - filter - -
    -
    -
    -
    -
    -
    -

    A Document representing the match criteria.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let filter: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    The collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:collation:) - -
    -
    -
    -
    -
    -
    -

    Create a deleteOne operation for a bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ filter: Document, collation: Document? = nil)
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria.

    -
    -
    - - collation - - -
    -

    Specifies a collation to use.

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Adds the deleteOne operation to a bulk write.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/MongoCollection/InsertOneModel.html b/docs/Classes/MongoCollection/InsertOneModel.html deleted file mode 100644 index 3df0a9fca..000000000 --- a/docs/Classes/MongoCollection/InsertOneModel.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - InsertOneModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

InsertOneModel

-
-
-
public struct InsertOneModel : WriteModel, Decodable
- -
-
-

A model for an insertOne operation within a bulk write.

- -
-
-
-
    -
  • -
    - - - - document - -
    -
    -
    -
    -
    -
    -

    The CollectionType to insert.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let document: CollectionType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Create an insertOne operation for a bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ document: CollectionType)
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - document - - -
    -

    The CollectionType to insert.

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Adds the insertOne operation to a bulk write.

    -
    -

    Throws

    -
      -
    • EncodingError if an error occurs while encoding the CollectionType to BSON.
    • -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/MongoCollection/ReplaceOneModel.html b/docs/Classes/MongoCollection/ReplaceOneModel.html deleted file mode 100644 index b6d665d61..000000000 --- a/docs/Classes/MongoCollection/ReplaceOneModel.html +++ /dev/null @@ -1,714 +0,0 @@ - - - - ReplaceOneModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReplaceOneModel

-
-
-
public struct ReplaceOneModel : WriteModel, Decodable
- -
-
-

A model for a replaceOne operation within a bulk write.

- -
-
-
-
    -
  • -
    - - - - filter - -
    -
    -
    -
    -
    -
    -

    A Document representing the match criteria.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let filter: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - replacement - -
    -
    -
    -
    -
    -
    -

    The CollectionType to use as the replacement value.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let replacement: CollectionType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    The collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a replaceOne operation for a bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(filter: Document, replacement: CollectionType, collation: Document? = nil, upsert: Bool? = nil)
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria.

    -
    -
    - - replacement - - -
    -

    The CollectionType to use as the replacement value.

    -
    -
    - - collation - - -
    -

    Specifies a collation to use.

    -
    -
    - - upsert - - -
    -

    When true, creates a new document if no document matches the query.

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Adds the replaceOne operation to a bulk write.

    -
    -

    Throws

    -
      -
    • EncodingError if an error occurs while encoding the CollectionType or options to BSON.
    • -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/MongoCollection/UpdateManyModel.html b/docs/Classes/MongoCollection/UpdateManyModel.html deleted file mode 100644 index b1a57048b..000000000 --- a/docs/Classes/MongoCollection/UpdateManyModel.html +++ /dev/null @@ -1,757 +0,0 @@ - - - - UpdateManyModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UpdateManyModel

-
-
-
public struct UpdateManyModel : WriteModel, Decodable
- -
-
-

A model for an updateMany operation within a bulk write.

- -
-
-
-
    -
  • -
    - - - - filter - -
    -
    -
    -
    -
    -
    -

    A Document representing the match criteria.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let filter: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - update - -
    -
    -
    -
    -
    -
    -

    A Document containing update operators.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let update: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - arrayFilters - -
    -
    -
    -
    -
    -
    -

    A set of filters specifying to which array elements an update should apply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let arrayFilters: [Document]?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    A collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a updateMany operation for a bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(filter: Document,
    -            update: Document,
    -            arrayFilters: [Document]? = nil,
    -            collation: Document? = nil,
    -            upsert: Bool? = nil)
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria.

    -
    -
    - - update - - -
    -

    A Document containing update operators.

    -
    -
    - - arrayFilters - - -
    -

    A set of filters specifying to which array elements an update should apply.

    -
    -
    - - collation - - -
    -

    Specifies a collation to use.

    -
    -
    - - upsert - - -
    -

    When true, creates a new document if no document matches the query.

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Adds the updateMany operation to a bulk write.

    -
    -

    Throws

    -
      -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/MongoCollection/UpdateOneModel.html b/docs/Classes/MongoCollection/UpdateOneModel.html deleted file mode 100644 index cc5122c99..000000000 --- a/docs/Classes/MongoCollection/UpdateOneModel.html +++ /dev/null @@ -1,757 +0,0 @@ - - - - UpdateOneModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UpdateOneModel

-
-
-
public struct UpdateOneModel : WriteModel, Decodable
- -
-
-

A model for an updateOne operation within a bulk write.

- -
-
-
-
    -
  • -
    - - - - filter - -
    -
    -
    -
    -
    -
    -

    A Document representing the match criteria.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let filter: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - update - -
    -
    -
    -
    -
    -
    -

    A Document containing update operators.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let update: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - arrayFilters - -
    -
    -
    -
    -
    -
    -

    A set of filters specifying to which array elements an update should apply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let arrayFilters: [Document]?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    A collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create an updateOne operation for a bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(filter: Document,
    -            update: Document,
    -            arrayFilters: [Document]? = nil,
    -            collation: Document? = nil,
    -            upsert: Bool? = nil)
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria.

    -
    -
    - - update - - -
    -

    A Document containing update operators.

    -
    -
    - - arrayFilters - - -
    -

    A set of filters specifying to which array elements an update should apply.

    -
    -
    - - collation - - -
    -

    Specifies a collation to use.

    -
    -
    - - upsert - - -
    -

    When true, creates a new document if no document matches the query.

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Adds the updateOne operation to a bulk write.

    -
    -

    Throws

    -
      -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/MongoCursor.html b/docs/Classes/MongoCursor.html deleted file mode 100644 index 432ccd905..000000000 --- a/docs/Classes/MongoCursor.html +++ /dev/null @@ -1,618 +0,0 @@ - - - - MongoCursor Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoCursor

-
-
-
public class MongoCursor<T> : Sequence, IteratorProtocol where T : Decodable, T : Encodable
- -
-
-

A MongoDB cursor.

- -
-
-
-
    -
  • -
    - - - - error - -
    -
    -
    -
    -
    -
    -

    The error that occurred while iterating this cursor, if one exists. This should be used to check for errors -after next() returns nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public private(set) var error: Error?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isAlive - -
    -
    -
    -
    -
    -
    -

    Indicates whether this cursor has the potential to return more data. This property is mainly useful for -tailable cursors, where the cursor may be empty but contain more results later on. For non-tailable cursors, -the cursor will always be dead as soon as next() returns nil, or as soon as nextOrError() returns nil or -throws an error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isAlive: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - nextOrError() - -
    -
    -
    -
    -
    -
    -

    Returns the next Document in this cursor or nil, or throws an error if one occurs – compared to next(), -which returns nil and requires manually checking for an error afterward.

    -
    -

    Throws

    -
      -
    • ServerError.commandError if an error occurs on the server while iterating the cursor.
    • -
    • UserError.logicError if this function is called after the cursor has died.
    • -
    • UserError.logicError if this function is called and the session associated with this cursor is inactive.
    • -
    • DecodingError if an error occurs decoding the server’s response.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func nextOrError() throws -> T?
    - -
    -
    -
    -

    Return Value

    -

    the next Document in this cursor, or nil if at the end of the cursor

    -
    -
    -
    -
  • -
  • -
    - - - - next() - -
    -
    -
    -
    -
    -
    -

    Returns the next Document in this cursor, or nil. After this function returns nil, the caller should use -the .error property to check for errors. For tailable cursors, users should also check isAlive after this -method returns nil, to determine if the cursor has the potential to return any more data in the future.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func next() -> T?
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/MongoDatabase.html b/docs/Classes/MongoDatabase.html deleted file mode 100644 index 6ea29cc37..000000000 --- a/docs/Classes/MongoDatabase.html +++ /dev/null @@ -1,1120 +0,0 @@ - - - - MongoDatabase Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoDatabase

-
-
-
public class MongoDatabase
- -
-
-

A MongoDB Database.

- -
-
-
-
    -
  • -
    - - - - encoder - -
    -
    -
    -
    -
    -
    -

    Encoder used by this database for BSON conversions. This encoder’s options are inherited by collections derived -from this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let encoder: BSONEncoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decoder - -
    -
    -
    -
    -
    -
    -

    Decoder whose options are inherited by collections derived from this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let decoder: BSONDecoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    The name of this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var name: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    The ReadConcern set on this database, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    The ReadPreference set on this database

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    The WriteConcern set on this database, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - drop(session:) - -
    -
    -
    -
    -
    -
    -

    Drops this database.

    -
    -

    Throws

    -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func drop(session: ClientSession? = nil) throws
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Access a collection within this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func collection(_ name: String, options: CollectionOptions? = nil) -> MongoCollection<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    the name of the collection to get

    -
    -
    - - options - - -
    -

    options to set on the returned collection

    -
    -
    -
    -
    -

    Return Value

    -

    the requested MongoCollection<Document>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Access a collection within this database, and associates the specified Codable type T with the - returned MongoCollection. This association only exists in the context of this particular - MongoCollection instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func collection<T: Codable>(_ name: String,
    -                                   withType: T.Type,
    -                                   options: CollectionOptions? = nil) -> MongoCollection<T>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    the name of the collection to get

    -
    -
    - - options - - -
    -

    options to set on the returned collection

    -
    -
    -
    -
    -

    Return Value

    -

    the requested MongoCollection<T>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates a collection in this database with the specified options.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func createCollection(_ name: String,
    -                             options: CreateCollectionOptions? = nil,
    -                             session: ClientSession? = nil) throws -> MongoCollection<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    a String, the name of the collection to create

    -
    -
    - - options - - -
    -

    Optional CreateCollectionOptions to use for the collection

    -
    -
    -
    -
    -

    Return Value

    -

    the newly created MongoCollection<Document>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates a collection in this database with the specified options, and associates the - specified Codable type T with the returned MongoCollection. This association only - exists in the context of this particular MongoCollection instance.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func createCollection<T: Codable>(_ name: String,
    -                                         withType type: T.Type,
    -                                         options: CreateCollectionOptions? = nil,
    -                                         session: ClientSession? = nil) throws -> MongoCollection<T>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    a String, the name of the collection to create

    -
    -
    - - options - - -
    -

    Optional CreateCollectionOptions to use for the collection

    -
    -
    -
    -
    -

    Return Value

    -

    the newly created MongoCollection<T>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Lists all the collections in this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • userError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listCollections(options: ListCollectionsOptions? = nil,
    -                            session: ClientSession? = nil) throws -> MongoCursor<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    a Document, optional criteria to filter results by

    -
    -
    - - options - - -
    -

    Optional ListCollectionsOptions to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a MongoCursor over an array of collections

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Issues a MongoDB command against this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if requests is empty.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.writeError if any error occurs while the command was performing a write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from being performed.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func runCommand(_ command: Document,
    -                       options: RunCommandOptions? = nil,
    -                       session: ClientSession? = nil) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - command - - -
    -

    a Document containing the command to issue against the database

    -
    -
    - - options - - -
    -

    Optional RunCommandOptions to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server response for the command

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/MongoSwift.html b/docs/Classes/MongoSwift.html deleted file mode 100644 index 8f59dafb7..000000000 --- a/docs/Classes/MongoSwift.html +++ /dev/null @@ -1,569 +0,0 @@ - - - - MongoSwift Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoSwift

-
-
-
public final class MongoSwift
- -
-
-

A utility class for libmongoc initialization and cleanup.

- -
-
-
-
    -
  • -
    - - - - versionString - -
    -
    -
    -
    -
    -
    -

    The version of MongoSwift.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static let versionString: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - initialize() - -
    -
    -
    -
    -
    -
    -

    Initializes libmongoc.

    - -

    This function should be called once at the start of the application - before interacting with the driver.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func initialize()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - cleanup() - -
    -
    -
    -
    -
    -
    -

    Cleans up libmongoc.

    - -

    This function should be called once at the end of the application. Users - should not interact with the driver after calling this function.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func cleanup()
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/ReadConcern.html b/docs/Classes/ReadConcern.html deleted file mode 100644 index 082147453..000000000 --- a/docs/Classes/ReadConcern.html +++ /dev/null @@ -1,820 +0,0 @@ - - - - ReadConcern Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReadConcern

-
-
-
public class ReadConcern : Codable
- -
-
-

A class to represent a MongoDB read concern.

- -
-
-
-
    -
  • -
    - - - - Level - -
    -
    -
    -
    -
    -
    -

    An enumeration of possible ReadConcern levels.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum Level : String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - level - -
    -
    -
    -
    -
    -
    -

    The level of this ReadConcern, or nil if the level is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var level: String? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isDefault - -
    -
    -
    -
    -
    -
    -

    Indicates whether this ReadConcern is the server default.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isDefault: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new ReadConcern from a ReadConcern.Level.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public convenience init(_ level: Level)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new ReadConcern from a String corresponding to a read concern level.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ level: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initialize a new empty ReadConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new ReadConcern from a Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public convenience init(_ doc: Document)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new ReadConcern by copying an existing ReadConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from readConcern: ReadConcern)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public required convenience init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
    -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Returns the relaxed extended JSON representation of this ReadConcern. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
    -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: ReadConcern, rhs: ReadConcern) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/ReadConcern/Level.html b/docs/Classes/ReadConcern/Level.html deleted file mode 100644 index 771b2dd7d..000000000 --- a/docs/Classes/ReadConcern/Level.html +++ /dev/null @@ -1,624 +0,0 @@ - - - - Level Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Level

-
-
-
public enum Level : String
- -
-
-

An enumeration of possible ReadConcern levels.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/Classes/ReadPreference.html b/docs/Classes/ReadPreference.html deleted file mode 100644 index d76c75bc6..000000000 --- a/docs/Classes/ReadPreference.html +++ /dev/null @@ -1,818 +0,0 @@ - - - - ReadPreference Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReadPreference

-
-
-
public final class ReadPreference
-
extension ReadPreference: Equatable
- -
-
-

A class to represent a MongoDB read preference.

- - -
-
-
-
    -
  • -
    - - - - Mode - -
    -
    -
    -
    -
    -
    -

    An enumeration of possible ReadPreference modes.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum Mode : String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - mode - -
    -
    -
    -
    -
    -
    -

    The mode of this ReadPreference

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var mode: Mode { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - tagSets - -
    -
    -
    -
    -
    -
    -

    The tags of this ReadPreference

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var tagSets: [Document] { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxStalenessSeconds - -
    -
    -
    -
    -
    -
    -

    The maxStalenessSeconds of this ReadPreference

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxStalenessSeconds: Int64? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes a ReadPreference from a Mode.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ mode: Mode)
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - mode - - -
    -

    a Mode

    -
    -
    -
    -
    -

    Return Value

    -

    a new ReadPreference

    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new ReadPreference with the default mode (primary).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public convenience init()
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializes a ReadPreference.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • A UserError.invalidArgumentError if mode is .primary and tagSets is non-empty
    • -
    • A UserError.invalidArgumentError if maxStalenessSeconds non-nil and < 90
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ mode: Mode, tagSets: [Document]? = nil, maxStalenessSeconds: Int64? = nil) throws
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - mode - - -
    -

    a Mode

    -
    -
    - - tagSets - - -
    -

    an optional [Document]

    -
    -
    - - maxStalenessSeconds - - -
    -

    an optional Int64

    -
    -
    -
    -
    -

    Return Value

    -

    a new ReadPreference

    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new ReadPreference by copying an existing ReadPreference.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from readPreference: ReadPreference)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: ReadPreference, rhs: ReadPreference) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/ReadPreference/Mode.html b/docs/Classes/ReadPreference/Mode.html deleted file mode 100644 index a2dc2dd4d..000000000 --- a/docs/Classes/ReadPreference/Mode.html +++ /dev/null @@ -1,627 +0,0 @@ - - - - Mode Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Mode

-
-
-
public enum Mode : String
- -
-
-

An enumeration of possible ReadPreference modes.

- -
-
-
-
    -
  • -
    - - - - primary - -
    -
    -
    -
    -
    -
    -

    Default mode. All operations read from the current replica set primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case primary
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - primaryPreferred - -
    -
    -
    -
    -
    -
    -

    In most situations, operations read from the primary but if it is -unavailable, operations read from secondary members.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case primaryPreferred
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - secondary - -
    -
    -
    -
    -
    -
    -

    All operations read from the secondary members of the replica set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case secondary
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - secondaryPreferred - -
    -
    -
    -
    -
    -
    -

    In most situations, operations read from secondary members but if no -secondary members are available, operations read from the primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case secondaryPreferred
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - nearest - -
    -
    -
    -
    -
    -
    -

    Operations read from member of the replica set with the least network -latency, irrespective of the member’s type.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case nearest
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/WriteConcern.html b/docs/Classes/WriteConcern.html deleted file mode 100644 index 0a35d6634..000000000 --- a/docs/Classes/WriteConcern.html +++ /dev/null @@ -1,828 +0,0 @@ - - - - WriteConcern Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

WriteConcern

-
-
-
public class WriteConcern : Codable
- -
-
-

A class to represent a MongoDB write concern.

- -
-
-
-
    -
  • -
    - - - - W - -
    -
    -
    -
    -
    -
    -

    An option to request acknowledgement that the write operation has propagated to specified mongod instances.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum W : Codable, Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - w - -
    -
    -
    -
    -
    -
    -

    Indicates the W value for this WriteConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var w: W? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - journal - -
    -
    -
    -
    -
    -
    -

    Indicates whether to wait for the write operation to get committed to the journal.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var journal: Bool? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - wtimeoutMS - -
    -
    -
    -
    -
    -
    -

    If the write concern is not satisfied within this timeout (in milliseconds), -the operation will return an error. The value MUST be greater than or equal to 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var wtimeoutMS: Int64? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isAcknowledged - -
    -
    -
    -
    -
    -
    -

    Indicates whether this is an acknowledged write concern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isAcknowledged: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isDefault - -
    -
    -
    -
    -
    -
    -

    Indicates whether this is the default write concern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isDefault: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new, empty WriteConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializes a new WriteConcern.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(journal: Bool? = nil, w: W? = nil, wtimeoutMS: Int64? = nil) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public required convenience init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
    -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Returns the relaxed extended JSON representation of this WriteConcern. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
    -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: WriteConcern, rhs: WriteConcern) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Classes/WriteConcern/W.html b/docs/Classes/WriteConcern/W.html deleted file mode 100644 index dcd24ad34..000000000 --- a/docs/Classes/WriteConcern/W.html +++ /dev/null @@ -1,622 +0,0 @@ - - - - W Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

W

-
-
-
public enum W : Codable, Equatable
- -
-
-

An option to request acknowledgement that the write operation has propagated to specified mongod instances.

- -
-
-
-
    -
  • -
    - - - - number(_:) - -
    -
    -
    -
    -
    -
    -

    Specifies the number of nodes that should acknowledge the write. MUST be greater than or equal to 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case number(Int32)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - tag(_:) - -
    -
    -
    -
    -
    -
    -

    Indicates a tag for nodes that should acknowledge the write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case tag(String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - majority - -
    -
    -
    -
    -
    -
    -

    Specifies that a majority of nodes should acknowledge the write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case majority
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums.html b/docs/Enums.html deleted file mode 100644 index 1be13a87c..000000000 --- a/docs/Enums.html +++ /dev/null @@ -1,952 +0,0 @@ - - - - Enumerations Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Enumerations

-

The following enumerations are available globally.

- -
-
-
-
    -
  • -
    - - - - BSON - -
    -
    -
    -
    -
    -
    -

    Enum representing a BSON value.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum BSON
    -
    extension BSON: ExpressibleByStringLiteral
    -
    extension BSON: ExpressibleByBooleanLiteral
    -
    extension BSON: ExpressibleByFloatLiteral
    -
    extension BSON: ExpressibleByIntegerLiteral
    -
    extension BSON: ExpressibleByDictionaryLiteral
    -
    extension BSON: ExpressibleByArrayLiteral
    -
    extension BSON: Equatable
    -
    extension BSON: Hashable
    -
    extension BSON: Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - BSONType - -
    -
    -
    -
    -
    -
    -

    The possible types of BSON values and their corresponding integer values.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum BSONType : UInt32
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DateCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various encoding/decoding strategy pairs for Dates. - Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when - converting Dates between their BSON representations and their representations in (non Document) Codable types.

    - -

    As per the BSON specification, the default strategy is to encode Dates as BSON datetime objects.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum DateCodingStrategy : RawRepresentable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UUIDCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various encoding/decoding strategy pairs for Dates. - Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when - converting UUIDs between their BSON representations and their representations in (non Document) Codable types.

    - -

    As per the BSON specification, the default strategy is to encode UUIDs as BSON binary types with the UUID - subtype.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum UUIDCodingStrategy : RawRepresentable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DataCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various encoding/decoding strategy pairs for Dates. - Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when - converting Datas between their BSON representations and their representations in (non Document) Codable types.

    - -

    As per the BSON specification, the default strategy is to encode Datas as BSON binary types with the generic - binary subtype.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum DataCodingStrategy : RawRepresentable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - OperationType - -
    -
    -
    -
    -
    -
    -

    An enum representing the type of operation for this change event.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum OperationType : String, Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - FullDocument - -
    -
    -
    -
    -
    -
    -

    Describes the modes for configuring the fullDocument field of a change stream document.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum FullDocument : RawRepresentable, Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - WriteModel - -
    -
    -
    -
    -
    -
    -

    Enum encompassing operations that can be run as part of a bulkWrite.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum WriteModel<CollectionType> where CollectionType : Decodable, CollectionType : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ReturnDocument - -
    -
    -
    -
    -
    -
    -

    Indicates which document to return in a find and modify operation.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum ReturnDocument : String, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Hint - -
    -
    -
    -
    -
    -
    -

    An index to “hint” or force MongoDB to use when performing a query.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum Hint : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CursorType - -
    -
    -
    -
    -
    -
    -

    The possible types of MongoCursor or MongoCursor an operation can return.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum CursorType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ServerError - -
    -
    -
    -
    -
    -
    -

    The possible errors corresponding to types of errors encountered in the MongoDB server. -These errors may contain labels providing additional information on their origin.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum ServerError : MongoError
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UserError - -
    -
    -
    -
    -
    -
    -

    The possible errors caused by improper use of the driver by the user.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum UserError : MongoError
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - RuntimeError - -
    -
    -
    -
    -
    -
    -

    The possible errors that can occur unexpectedly during runtime.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum RuntimeError : MongoError
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CollectionType - -
    -
    -
    -
    -
    -
    -

    Describes the type of data store returned when executing listCollections.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum CollectionType : RawRepresentable, Codable
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/BSON.html b/docs/Enums/BSON.html deleted file mode 100644 index e41f1f649..000000000 --- a/docs/Enums/BSON.html +++ /dev/null @@ -1,1959 +0,0 @@ - - - - BSON Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSON

-
-
-
public enum BSON
-
extension BSON: ExpressibleByStringLiteral
-
extension BSON: ExpressibleByBooleanLiteral
-
extension BSON: ExpressibleByFloatLiteral
-
extension BSON: ExpressibleByIntegerLiteral
-
extension BSON: ExpressibleByDictionaryLiteral
-
extension BSON: ExpressibleByArrayLiteral
-
extension BSON: Equatable
-
extension BSON: Hashable
-
extension BSON: Codable
- -
-
-

Enum representing a BSON value.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - double(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON double.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case double(Double)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - string(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON string.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case string(String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - document(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case document(Document)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - array(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON array.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    indirect case array([BSON])
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON binary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary(Binary)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - undefined - -
    -
    -
    -
    -
    -
    -

    A BSON undefined.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case undefined
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - objectId(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON ObjectId.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case objectId(ObjectId)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bool(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON boolean.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case bool(Bool)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - datetime(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON UTC datetime.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case datetime(Date)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - null - -
    -
    -
    -
    -
    -
    -

    A BSON null.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case null
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - regex(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON regular expression.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case regex(RegularExpression)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dbPointer(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON dbPointer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case dbPointer(DBPointer)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - symbol(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON symbol.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case symbol(Symbol)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - code(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON JavaScript code.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case code(Code)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeWithScope(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON JavaScript code with scope.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case codeWithScope(CodeWithScope)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int32(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON int32.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case int32(Int32)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - timestamp(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON timestamp.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case timestamp(Timestamp)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int64(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON int64.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case int64(Int64)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decimal128(_:) - -
    -
    -
    -
    -
    - -
    -

    Declaration

    -
    -

    Swift

    -
    case decimal128(Decimal128)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - minKey - -
    -
    -
    -
    -
    -
    -

    A BSON minKey.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case minKey
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxKey - -
    -
    -
    -
    -
    -
    -

    A BSON maxKey.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case maxKey
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a BSON from an integer. On 64-bit systems, this will result in an .int64. On 32-bit systems, -this will result in an .int32.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ int: Int)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - type - -
    -
    -
    -
    -
    -
    -

    Get the BSONType of this BSON.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var type: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int32Value - -
    -
    -
    -
    -
    -
    -

    If this BSON is an .int32, return it as an Int32. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var int32Value: Int32? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - regexValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .regex, return it as a RegularExpression. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var regexValue: RegularExpression? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeWithScopeValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .codeWithScope, return it as a CodeWithScope. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var codeWithScopeValue: CodeWithScope? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .code, return it as a Code. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var codeValue: Code? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int64Value - -
    -
    -
    -
    -
    -
    -

    If this BSON is an .int64, return it as an Int64. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var int64Value: Int64? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - objectIdValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is an .objectId, return it as an ObjectId. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var objectIdValue: ObjectId? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dateValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .date, return it as a Date. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dateValue: Date? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - arrayValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is an .array, return it as an [BSON]. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var arrayValue: [BSON]? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - stringValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .string, return it as a String. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var stringValue: String? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - documentValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .document, return it as a Document. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var documentValue: Document? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - boolValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .bool, return it as an Bool. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var boolValue: Bool? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binaryValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .binary, return it as a Binary. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var binaryValue: Binary? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - doubleValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .double, return it as a Double. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var doubleValue: Double? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decimal128Value - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .decimal128, return it as a Decimal128. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var decimal128Value: Decimal128? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - symbolValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .symbol, return it as a Symbol. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var symbolValue: Symbol? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dbPointerValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .dbPointer, return it as a DBPointer. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dbPointerValue: DBPointer? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - timestampValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .timestamp, return it as a Timestamp. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var timestampValue: Timestamp? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - asInt() - -
    -
    -
    -
    -
    -
    -

    Return this BSON as an Int if possible. -This will coerce non-integer numeric cases (e.g. .double) into an Int if such coercion would be lossless.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func asInt() -> Int?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - asInt32() - -
    -
    -
    -
    -
    -
    -

    Return this BSON as an Int32 if possible. -This will coerce numeric cases (e.g. .double) into an Int32 if such coercion would be lossless.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func asInt32() -> Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - asInt64() - -
    -
    -
    -
    -
    -
    -

    Return this BSON as an Int64 if possible. -This will coerce numeric cases (e.g. .double) into an Int64 if such coercion would be lossless.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func asInt64() -> Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - asDouble() - -
    -
    -
    -
    -
    -
    -

    Return this BSON as a Double if possible. -This will coerce numeric cases (e.g. .decimal128) into a Double if such coercion would be lossless.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func asDouble() -> Double?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - asDecimal128() - -
    -
    -
    -
    -
    -
    -

    Return this BSON as a Decimal128 if possible. -This will coerce numeric cases (e.g. .double) into a Decimal128 if such coercion would be lossless.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func asDecimal128() -> Decimal128?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(stringLiteral:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(stringLiteral value: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(booleanLiteral:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(booleanLiteral value: Bool)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(floatLiteral:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(floatLiteral value: Double)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(integerLiteral:) - -
    -
    -
    -
    -
    -
    -

    Initialize a BSON from an integer. On 64-bit systems, this will result in an .int64. On 32-bit systems, -this will result in an .int32.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(integerLiteral value: Int)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(dictionaryLiteral elements: (String, BSON)...)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(arrayLiteral:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(arrayLiteral elements: BSON...)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/BSONType.html b/docs/Enums/BSONType.html deleted file mode 100644 index c29c3f3aa..000000000 --- a/docs/Enums/BSONType.html +++ /dev/null @@ -1,1088 +0,0 @@ - - - - BSONType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONType

-
-
-
public enum BSONType : UInt32
- -
-
-

The possible types of BSON values and their corresponding integer values.

- -
-
-
-
    -
  • -
    - - - - invalid - -
    -
    -
    -
    -
    -
    -

    An invalid type

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case invalid = 0x00
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - double - -
    -
    -
    -
    -
    -
    -

    64-bit binary floating point

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case double = 0x01
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - string - -
    -
    -
    -
    -
    -
    -

    UTF-8 string

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case string = 0x02
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - document - -
    -
    -
    -
    -
    -
    -

    BSON document

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case document = 0x03
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - array - -
    -
    -
    -
    -
    -
    -

    Array

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case array = 0x04
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Binary data

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary = 0x05
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - undefined - -
    -
    -
    -
    -
    -
    -

    Undefined value - deprecated

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case undefined = 0x06
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - objectId - -
    -
    -
    -
    -
    -
    -

    A MongoDB ObjectId.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case objectId = 0x07
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bool - -
    -
    -
    -
    -
    -
    -

    A boolean

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case bool = 0x08
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - datetime - -
    -
    -
    -
    -
    -
    -

    UTC datetime, stored as UTC milliseconds since the Unix epoch

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case datetime = 0x09
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - null - -
    -
    -
    -
    -
    -
    -

    Null value

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case null = 0x0A
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - regex - -
    -
    -
    -
    -
    -
    -

    A regular expression

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case regex = 0x0B
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dbPointer - -
    -
    -
    -
    -
    -
    -

    A database pointer - deprecated

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case dbPointer = 0x0C
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - code - -
    -
    -
    -
    -
    -
    -

    Javascript code

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case code = 0x0D
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - symbol - -
    -
    -
    -
    -
    -
    -

    A symbol - deprecated

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case symbol = 0x0E
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeWithScope - -
    -
    -
    -
    -
    -
    -

    JavaScript code w/ scope

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case codeWithScope = 0x0F
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int32 - -
    -
    -
    -
    -
    -
    -

    32-bit integer

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case int32 = 0x10
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - timestamp - -
    -
    -
    -
    -
    -
    -

    Special internal type used by MongoDB replication and sharding

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case timestamp = 0x11
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int64 - -
    -
    -
    -
    -
    -
    -

    64-bit integer

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case int64 = 0x12
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decimal128 - -
    -
    -
    -
    -
    -
    -

    128-bit decimal floating point

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case decimal128 = 0x13
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - minKey - -
    -
    -
    -
    -
    -
    -

    Special type which compares lower than all other possible BSON element values

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case minKey = 0xFF
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxKey - -
    -
    -
    -
    -
    -
    -

    Special type which compares higher than all other possible BSON element values

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case maxKey = 0x7F
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/CollectionType.html b/docs/Enums/CollectionType.html deleted file mode 100644 index b3e7d9a11..000000000 --- a/docs/Enums/CollectionType.html +++ /dev/null @@ -1,622 +0,0 @@ - - - - CollectionType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CollectionType

-
-
-
public enum CollectionType : RawRepresentable, Codable
- -
-
-

Describes the type of data store returned when executing listCollections.

- -
-
-
-
    -
  • -
    - - - - collection - -
    -
    -
    -
    -
    -
    -

    Specifies that the data store returned is a collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case collection
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - view - -
    -
    -
    -
    -
    -
    -

    Specifies that the data store returned is a view.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case view
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - other(_:) - -
    -
    -
    -
    -
    -
    -

    For an unknown value. For forwards compatibility, no error will be thrown when an unknown value is provided.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case other(String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var rawValue: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(rawValue:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(rawValue: String)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/CursorType.html b/docs/Enums/CursorType.html deleted file mode 100644 index 0960526b3..000000000 --- a/docs/Enums/CursorType.html +++ /dev/null @@ -1,589 +0,0 @@ - - - - CursorType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CursorType

-
-
-
public enum CursorType
- -
-
-

The possible types of MongoCursor or MongoCursor an operation can return.

- -
-
-
-
    -
  • -
    - - - - nonTailable - -
    -
    -
    -
    -
    -
    -

    The default value. A vast majority of cursors will be of this type.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case nonTailable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - tailable - -
    -
    -
    -
    -
    -
    -

    Tailable means the cursor is not closed when the last data is retrieved. - Rather, the cursor marks the final object’s position. You can resume - using the cursor later, from where it was located, if more data were - received. Like any “latent cursor”, the cursor may become invalid at - some point (CursorNotFound) – for example if the final object it - references were deleted.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case tailable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - tailableAwait - -
    -
    -
    -
    -
    -
    -

    Combines the tailable option with awaitData, as defined below.

    - -

    Use with TailableCursor. If we are at the end of the data, block for a - while rather than returning no data. After a timeout period, we do return - as normal. The default is true.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case tailableAwait
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/DataCodingStrategy.html b/docs/Enums/DataCodingStrategy.html deleted file mode 100644 index b08f379f6..000000000 --- a/docs/Enums/DataCodingStrategy.html +++ /dev/null @@ -1,690 +0,0 @@ - - - - DataCodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DataCodingStrategy

-
-
-
public enum DataCodingStrategy : RawRepresentable
- -
-
-

Enum representing the various encoding/decoding strategy pairs for Dates. - Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when - converting Datas between their BSON representations and their representations in (non Document) Codable types.

- -

As per the BSON specification, the default strategy is to encode Datas as BSON binary types with the generic - binary subtype.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - RawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias RawValue = (encoding: BSONEncoder.DataEncodingStrategy, decoding: BSONDecoder.DataDecodingStrategy)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - deferredToData - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Data by deferring to its default encoding implementations.

    - -

    Note: The default encoding implementation attempts to encode the Data as a [UInt8], but because BSON - does not support integer types besides Int32 or Int64, it actually gets encoded to BSON as an [Int32]. - This results in a space inefficient storage of the Data (using 4 bytes of BSON storage per byte of data).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToData
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Data to/from a BSON binary type (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - base64 - -
    -
    -
    -
    -
    -
    -

    Encode the Data to/from a base64 encoded string.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case base64
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Encode the Data by using the given encodeFunc. Decode the Data by using the given decodeFunc. -If encodeFunc does not encode a value, an empty document will be encoded in its place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case custom(encodeFunc: (Data, Encoder) throws -> Void, decodeFunc: (Decoder) throws -> Data)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(rawValue:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?(rawValue: RawValue)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var rawValue: RawValue { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/DateCodingStrategy.html b/docs/Enums/DateCodingStrategy.html deleted file mode 100644 index 7f871e7ea..000000000 --- a/docs/Enums/DateCodingStrategy.html +++ /dev/null @@ -1,766 +0,0 @@ - - - - DateCodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DateCodingStrategy

-
-
-
public enum DateCodingStrategy : RawRepresentable
- -
-
-

Enum representing the various encoding/decoding strategy pairs for Dates. - Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when - converting Dates between their BSON representations and their representations in (non Document) Codable types.

- -

As per the BSON specification, the default strategy is to encode Dates as BSON datetime objects.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - RawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias RawValue = (encoding: BSONEncoder.DateEncodingStrategy, decoding: BSONDecoder.DateDecodingStrategy)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - deferredToDate - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Date by deferring to its default encoding/decoding implementations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToDate
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonDateTime - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Date to/from a BSON datetime object (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case bsonDateTime
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - millisecondsSince1970 - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Date to/from a 64-bit integer counting the number of milliseconds since January 1, 1970.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case millisecondsSince1970
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - secondsSince1970 - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Date to/from a BSON double counting the number of seconds since January 1, 1970.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case secondsSince1970
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - iso8601 - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Date to/from an ISO-8601-formatted string (in RFC 339 format).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case iso8601
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - formatted(_:) - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Date to/from a string formatted by the given formatter.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case formatted(DateFormatter)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Encode the Date by using the given encodeFunc. Decode the Date by using the given decodeFunc. -If encodeFunc does not encode a value, an empty document will be encoded in its place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case custom(encodeFunc: (Date, Encoder) throws -> Void, decodeFunc: (Decoder) throws -> Date)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(rawValue:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?(rawValue: RawValue)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var rawValue: RawValue { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/FullDocument.html b/docs/Enums/FullDocument.html deleted file mode 100644 index dd04cc07e..000000000 --- a/docs/Enums/FullDocument.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - FullDocument Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

FullDocument

-
-
-
public enum FullDocument : RawRepresentable, Codable
- -
-
-

Describes the modes for configuring the fullDocument field of a change stream document.

- -
-
-
-
    -
  • -
    - - - - updateLookup - -
    -
    -
    -
    -
    -
    -

    Specifies that the fullDocument field of an update event will contain a copy of the entire document that -was changed from some time after the change occurred. If the document was deleted since the updated happened, -it will be nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case updateLookup
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - other(_:) - -
    -
    -
    -
    -
    -
    -

    For an unknown value. For forwards compatibility, no error will be thrown when an unknown value is provided.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case other(String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var rawValue: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(rawValue:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?(rawValue: String)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/Hint.html b/docs/Enums/Hint.html deleted file mode 100644 index dfa616f86..000000000 --- a/docs/Enums/Hint.html +++ /dev/null @@ -1,595 +0,0 @@ - - - - Hint Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Hint

-
-
-
public enum Hint : Codable
- -
-
-

An index to “hint” or force MongoDB to use when performing a query.

- -
-
-
-
    -
  • -
    - - - - indexName(_:) - -
    -
    -
    -
    -
    -
    -

    Specifies an index to use by its name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case indexName(String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - indexSpec(_:) - -
    -
    -
    -
    -
    -
    -

    Specifies an index to use by a specification Document containing the index key(s).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case indexSpec(Document)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/MongoEventType.html b/docs/Enums/MongoEventType.html deleted file mode 100644 index 141bdfcc7..000000000 --- a/docs/Enums/MongoEventType.html +++ /dev/null @@ -1,545 +0,0 @@ - - - - MongoEventType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoEventType

-
-
-
public enum MongoEventType
- -
-
-

The two categories of events that can be monitored. One or both can be enabled for a MongoClient.

- -
-
-
-
    -
  • -
    - - - - commandMonitoring - -
    -
    -
    -
    -
    -
    -

    Encompasses events named .commandStarted, .commandSucceeded, .commandFailed

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case commandMonitoring
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - serverMonitoring - -
    -
    -
    -
    -
    -
    -

    Encompasses events named .serverChanged, .serverOpening, .serverClosed, -.topologyChangedEvent, .topologyOpening, .topologyClosed, -.serverHeartbeatStarted, .serverHeartbeatClosed, .serverHeartbeatFailed

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case serverMonitoring
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/OperationType.html b/docs/Enums/OperationType.html deleted file mode 100644 index 569b34e34..000000000 --- a/docs/Enums/OperationType.html +++ /dev/null @@ -1,745 +0,0 @@ - - - - OperationType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

OperationType

-
-
-
public enum OperationType : String, Codable
- -
-
-

An enum representing the type of operation for this change event.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/Enums/ReturnDocument.html b/docs/Enums/ReturnDocument.html deleted file mode 100644 index 6332169ed..000000000 --- a/docs/Enums/ReturnDocument.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - ReturnDocument Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReturnDocument

-
-
-
public enum ReturnDocument : String, Decodable
- -
-
-

Indicates which document to return in a find and modify operation.

- -
-
-
-
    -
  • -
    - - - - before - -
    -
    -
    -
    -
    -
    -

    Indicates to return the document before the update, replacement, or insert occurred.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case before = "Before"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - after - -
    -
    -
    -
    -
    -
    -

    Indicates to return the document after the update, replacement, or insert occurred.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case after = "After"
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/RuntimeError.html b/docs/Enums/RuntimeError.html deleted file mode 100644 index 81392ff58..000000000 --- a/docs/Enums/RuntimeError.html +++ /dev/null @@ -1,625 +0,0 @@ - - - - RuntimeError Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

RuntimeError

-
-
-
public enum RuntimeError : MongoError
- -
-
-

The possible errors that can occur unexpectedly during runtime.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Thrown when the driver encounters a internal error not caused by the user. This is usually indicative of a bug -or system related failure (e.g. during memory allocation).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case internalError(message: String)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Thrown when encountering a connection or socket related error. -May contain labels providing additional information on the nature of the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case connectionError(message: String, errorLabels: [String]?)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Thrown when encountering an authentication related error (e.g. invalid credentials).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case authenticationError(message: String)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Thrown when trying to use a feature that the deployment does not support.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case compatibilityError(message: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - errorDescription - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var errorDescription: String? { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/ServerError.html b/docs/Enums/ServerError.html deleted file mode 100644 index bba3da61b..000000000 --- a/docs/Enums/ServerError.html +++ /dev/null @@ -1,606 +0,0 @@ - - - - ServerError Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerError

-
-
-
public enum ServerError : MongoError
- -
-
-

The possible errors corresponding to types of errors encountered in the MongoDB server. -These errors may contain labels providing additional information on their origin.

- - -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Thrown when commands experience errors on the server that prevent execution.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case commandError(code: ServerErrorCode, codeName: String, message: String, errorLabels: [String]?)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Thrown when a single write command fails on the server. -Note: Only one of writeConcernError or writeError will be populated at a time.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case writeError(writeError: WriteError?, writeConcernError: WriteConcernError?, errorLabels: [String]?)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Thrown when the server returns errors as part of an executed bulk write. -Note: writeErrors may not be present if the error experienced was a Write Concern related error. -Note: otherError may be populated if a non-write error occurs as part of one of the operations (e.g. a -connection failure occurs after already successfully performing a few inserts).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case bulkWriteError(writeErrors: [BulkWriteError]?, writeConcernError: WriteConcernError?, otherError: Error?, result: BulkWriteResult?, errorLabels: [String]?)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - errorDescription - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var errorDescription: String? { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/UUIDCodingStrategy.html b/docs/Enums/UUIDCodingStrategy.html deleted file mode 100644 index 50e8d7299..000000000 --- a/docs/Enums/UUIDCodingStrategy.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - UUIDCodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UUIDCodingStrategy

-
-
-
public enum UUIDCodingStrategy : RawRepresentable
- -
-
-

Enum representing the various encoding/decoding strategy pairs for Dates. - Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when - converting UUIDs between their BSON representations and their representations in (non Document) Codable types.

- -

As per the BSON specification, the default strategy is to encode UUIDs as BSON binary types with the UUID - subtype.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - RawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias RawValue = (encoding: BSONEncoder.UUIDEncodingStrategy, decoding: BSONDecoder.UUIDDecodingStrategy)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - deferredToUUID - -
    -
    -
    -
    -
    -
    -

    Encode/decode the UUID by deferring to its default encoding/decoding implementations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToUUID
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Encode/decode the UUID to/from a BSON binary type (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(rawValue:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?(rawValue: RawValue)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var rawValue: RawValue { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/UserError.html b/docs/Enums/UserError.html deleted file mode 100644 index 98500ac26..000000000 --- a/docs/Enums/UserError.html +++ /dev/null @@ -1,569 +0,0 @@ - - - - UserError Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UserError

-
-
-
public enum UserError : MongoError
- -
-
-

The possible errors caused by improper use of the driver by the user.

- -
-
-
-
    -
  • -
    - - - - logicError(message:) - -
    -
    -
    -
    -
    -
    -

    Thrown when the driver is incorrectly used.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case logicError(message: String)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Thrown when the user passes in invalid arguments to a driver method.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case invalidArgumentError(message: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - errorDescription - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var errorDescription: String? { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Enums/WriteModel.html b/docs/Enums/WriteModel.html deleted file mode 100644 index 3b65b798f..000000000 --- a/docs/Enums/WriteModel.html +++ /dev/null @@ -1,689 +0,0 @@ - - - - WriteModel Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

WriteModel

-
-
-
public enum WriteModel<CollectionType> where CollectionType : Decodable, CollectionType : Encodable
- -
-
-

Enum encompassing operations that can be run as part of a bulkWrite.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/Extensions.html b/docs/Extensions.html deleted file mode 100644 index 67f3e7cfb..000000000 --- a/docs/Extensions.html +++ /dev/null @@ -1,586 +0,0 @@ - - - - Extensions Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Extensions

-

The following extensions are available globally.

- -
-
-
-
    -
  • -
    - - - - Notification - -
    -
    -
    -
    -
    -
    - - See more -
    -
    -
    -
  • -
  • -
    - - - - Date - -
    -
    -
    -
    -
    -
    -

    An extension of Date to represent the BSON Datetime type. Supports millisecond level precision.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    extension Date: BSONValue
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UUID - -
    -
    -
    -
    -
    -
    -

    Extension to allow a UUID to be initialized from a Binary BSONValue.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    extension UUID
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - NSRegularExpression - -
    -
    -
    -
    -
    -
    -

    An extension of NSRegularExpression to allow it to be initialized from a RegularExpression BSONValue.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    extension NSRegularExpression
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Extensions/Array.html b/docs/Extensions/Array.html deleted file mode 100644 index 16b460a6d..000000000 --- a/docs/Extensions/Array.html +++ /dev/null @@ -1,593 +0,0 @@ - - - - Array Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Array

-
-
-
struct Array<Element> : _DestructorSafeContainer
- -
-
-

An extension of Array to represent the BSON array type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> Array
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonEquals(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func bsonEquals(_ other: BSONValue?) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Extensions/Bool.html b/docs/Extensions/Bool.html deleted file mode 100644 index 8d3d7de09..000000000 --- a/docs/Extensions/Bool.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - Bool Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Bool

-
-
-
struct Bool
- -
-
-

An extension of Bool to represent the BSON Boolean type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Extensions/Date.html b/docs/Extensions/Date.html deleted file mode 100644 index 311476220..000000000 --- a/docs/Extensions/Date.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - Date Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Date

-
-
-
extension Date: BSONValue
- -
-
-

An extension of Date to represent the BSON Datetime type. Supports millisecond level precision.

- -
-
-
-
    -
  • -
    - - - - init(msSinceEpoch:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new Date representing the instance msSinceEpoch milliseconds -since the Unix epoch.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(msSinceEpoch: Int64)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - msSinceEpoch - -
    -
    -
    -
    -
    -
    -

    The number of milliseconds after the Unix epoch that this Date occurs.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var msSinceEpoch: Int64 { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Extensions/Double.html b/docs/Extensions/Double.html deleted file mode 100644 index c0ecda431..000000000 --- a/docs/Extensions/Double.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - Double Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Double

-
-
-
struct Double
- -
-
-

An extension of Double to represent the BSON Double type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> Double
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Extensions/Int.html b/docs/Extensions/Int.html deleted file mode 100644 index 7f574480e..000000000 --- a/docs/Extensions/Int.html +++ /dev/null @@ -1,594 +0,0 @@ - - - - Int Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Int

-
-
-
struct Int : FixedWidthInteger, SignedInteger
- -
-
-

An extension of Int to represent the BSON Int32 or Int64 type. -On 64-bit systems, Int corresponds to a BSON Int64. On 32-bit systems, it corresponds to a BSON Int32.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonEquals(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func bsonEquals(_ other: BSONValue?) -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> Int
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Extensions/Int32.html b/docs/Extensions/Int32.html deleted file mode 100644 index f829a1c01..000000000 --- a/docs/Extensions/Int32.html +++ /dev/null @@ -1,593 +0,0 @@ - - - - Int32 Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Int32

-
-
-
struct Int32 : FixedWidthInteger, SignedInteger
- -
-
-

An extension of Int32 to represent the BSON Int32 type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> Int32
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonEquals(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func bsonEquals(_ other: BSONValue?) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Extensions/Int64.html b/docs/Extensions/Int64.html deleted file mode 100644 index 375042634..000000000 --- a/docs/Extensions/Int64.html +++ /dev/null @@ -1,593 +0,0 @@ - - - - Int64 Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Int64

-
-
-
struct Int64 : FixedWidthInteger, SignedInteger
- -
-
-

An extension of Int64 to represent the BSON Int64 type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonEquals(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func bsonEquals(_ other: BSONValue?) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Extensions/NSRegularExpression.html b/docs/Extensions/NSRegularExpression.html deleted file mode 100644 index 3c35ce0e0..000000000 --- a/docs/Extensions/NSRegularExpression.html +++ /dev/null @@ -1,518 +0,0 @@ - - - - NSRegularExpression Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

NSRegularExpression

-
-
-
extension NSRegularExpression
- -
-
-

An extension of NSRegularExpression to allow it to be initialized from a RegularExpression BSONValue.

- -
-
-
-
    -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new NSRegularExpression with the pattern and options of the provided RegularExpression. -Note: NSRegularExpression does not support the l locale dependence option, so it will -be omitted if set on the provided RegularExpression.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public convenience init(from regex: RegularExpression) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Extensions/Notification.html b/docs/Extensions/Notification.html deleted file mode 100644 index bd2ccefa3..000000000 --- a/docs/Extensions/Notification.html +++ /dev/null @@ -1,511 +0,0 @@ - - - - Notification Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Notification

- -
-
-
-
    -
  • -
    - - - - Name - -
    -
    -
    -
    -
    -
    -

    Extend Notification.Name to have class properties corresponding to each type -of event. This allows creating notifications and observers using these names.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    extension Notification.Name
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Extensions/Notification/Name.html b/docs/Extensions/Notification/Name.html deleted file mode 100644 index 8e6be573c..000000000 --- a/docs/Extensions/Notification/Name.html +++ /dev/null @@ -1,814 +0,0 @@ - - - - Name Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Name

-
-
-
extension Notification.Name
- -
-
-

Extend Notification.Name to have class properties corresponding to each type -of event. This allows creating notifications and observers using these names.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/Extensions/String.html b/docs/Extensions/String.html deleted file mode 100644 index 47a38a1d1..000000000 --- a/docs/Extensions/String.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - String Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

String

-
-
-
struct String
- -
-
-

An extension of String to represent the BSON string type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> String
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Extensions/UUID.html b/docs/Extensions/UUID.html deleted file mode 100644 index e9521cf21..000000000 --- a/docs/Extensions/UUID.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - UUID Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UUID

-
-
-
extension UUID
- -
-
-

Extension to allow a UUID to be initialized from a Binary BSONValue.

- -
-
-
-
    -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a UUID instance from a Binary BSONValue.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if a non-UUID subtype is set on the Binary.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from binary: Binary) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Functions.html b/docs/Functions.html deleted file mode 100644 index c343f2c27..000000000 --- a/docs/Functions.html +++ /dev/null @@ -1,513 +0,0 @@ - - - - Functions Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Functions

-

The following functions are available globally.

- -
-
-
-
    -
  • -
    - - - - cleanupMongoSwift() - -
    -
    -
    -
    -
    -
    -

    Release all internal memory and other resources allocated by MongoSwift.

    - -

    This function should be called once at the end of the application. Users - should not interact with the driver after calling this function.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func cleanupMongoSwift()
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Guides.html b/docs/Guides.html deleted file mode 100644 index 067df95aa..000000000 --- a/docs/Guides.html +++ /dev/null @@ -1,528 +0,0 @@ - - - - Guides Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- - -
- - - diff --git a/docs/Protocols.html b/docs/Protocols.html deleted file mode 100644 index 4e35fd3ac..000000000 --- a/docs/Protocols.html +++ /dev/null @@ -1,594 +0,0 @@ - - - - Protocols Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Protocols

-

The following protocols are available globally.

- -
-
-
-
    -
  • -
    - - - - MongoEvent - -
    -
    -
    -
    -
    -
    -

    A protocol for monitoring events to implement, specifying their name.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public protocol MongoEvent
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoCommandEvent - -
    -
    -
    -
    -
    -
    -

    A protocol for command monitoring events to implement, specifying the command name and other shared fields.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public protocol MongoCommandEvent : MongoEvent
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Protocol indicating a set of options can be used to configure BSONEncoder and BSONDecoder.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public protocol CodingStrategyProvider
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoError - -
    -
    -
    -
    -
    -
    -

    An empty protocol for encapsulating all errors that this package can throw.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public protocol MongoError : LocalizedError
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Protocols/BSONNumber.html b/docs/Protocols/BSONNumber.html deleted file mode 100644 index 39f0459c2..000000000 --- a/docs/Protocols/BSONNumber.html +++ /dev/null @@ -1,675 +0,0 @@ - - - - BSONNumber Protocol Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONNumber

-
-
-
public protocol BSONNumber : BSONValue
- -
-
-

A protocol that numeric BSONValues should conform to. It provides functionality for converting to BSON’s native -number types.

- -
-
-
-
    -
  • -
    - - - - intValue - - - Default implementation - -
    -
    -
    -
    -
    -
    -

    Create an Int from this BSONNumber. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -

    Default Implementation

    -
    -

    Create an Int from this BinaryFloatingPoint. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var intValue: Int? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int32Value - - - Default implementation - -
    -
    -
    -
    -
    -
    -

    Create an Int32 from this BSONNumber. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -

    Default Implementation

    -
    -

    Create an Int32 from this BinaryFloatingPoint. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var int32Value: Int32? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int64Value - - - Default implementation - -
    -
    -
    -
    -
    -
    -

    Create an Int64 from this BSONNumber. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -

    Default Implementation

    -
    -

    Create an Int64 from this BinaryFloatingPoint. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var int64Value: Int64? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - doubleValue - - - Default implementation - -
    -
    -
    -
    -
    -
    -

    Create a Double from this BSONNumber. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -

    Default Implementation

    -
    -

    Create a Double from this BinaryFloatingPoint. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var doubleValue: Double? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decimal128Value - - - Default implementation - -
    -
    -
    -
    -
    -
    -

    Create a Decimal128 from this BSONNumber. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -

    Default Implementation

    -
    -

    Create a Decimal128 from this Numeric. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var decimal128Value: Decimal128? { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Protocols/BSONValue.html b/docs/Protocols/BSONValue.html deleted file mode 100644 index 342d5a01b..000000000 --- a/docs/Protocols/BSONValue.html +++ /dev/null @@ -1,662 +0,0 @@ - - - - BSONValue Protocol Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONValue

-
-
-
public protocol BSONValue
- -
-
-

A protocol all types representing BSONTypes must implement.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    -

    The BSONType of this value.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    -

    Given the DocumentStorage backing a Document, appends this BSONValue to the end.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • RuntimeError.internalError if the DocumentStorage would exceed the maximum size by encoding this -key-value pair.
    • -
    • UserError.logicError if the value is an Array and it contains a non-BSONValue element.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - storage - - -
    -

    A DocumentStorage to write to.

    -
    -
    - - key - - -
    -

    A String, the key under which to store the value.

    -
    -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonEquals(_:) - - - Default implementation - -
    -
    -
    -
    -
    -
    -

    Function to test equality with another BSONValue. This function tests for exact BSON equality. - This means that differing types with equivalent value are not equivalent.

    - -

    e.g. - 4.0 (Double) != 4 (Int)

    - -
    -

    Default Implementation

    -
    -

    Default implementation of bsonEquals for BSONValues that conform to Equatable.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    func bsonEquals(_ other: BSONValue?) -> Bool
    - -
    -
    -
    -

    Return Value

    -

    true if self is equal to rhs, false otherwise.

    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    -

    Given a DocumentIterator known to have a next value of this type, - initializes the value.

    -
    -

    Throws

    - UserError.logicError if the current type of the DocumentIterator does not correspond to the - associated type of this BSONValue. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    static func from(iterator iter: DocumentIterator) throws -> Self
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Protocols/CodingStrategyProvider.html b/docs/Protocols/CodingStrategyProvider.html deleted file mode 100644 index 70af6da38..000000000 --- a/docs/Protocols/CodingStrategyProvider.html +++ /dev/null @@ -1,573 +0,0 @@ - - - - CodingStrategyProvider Protocol Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CodingStrategyProvider

-
-
-
public protocol CodingStrategyProvider
- -
-
-

Protocol indicating a set of options can be used to configure BSONEncoder and BSONDecoder.

- -
-
-
-
    -
  • -
    - - - - dateCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the strategy to use when converting Dates between their BSON representations and their -representations in (non Document) Codable types.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var dateCodingStrategy: DateCodingStrategy? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuidCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the strategy to use when converting UUIDs between their BSON representations and their -representations in (non Document) Codable types.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var uuidCodingStrategy: UUIDCodingStrategy? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dataCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the strategy to use when converting Datas between their BSON representations and their -representations in (non Document) Codable types.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var dataCodingStrategy: DataCodingStrategy? { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Protocols/MongoCommandEvent.html b/docs/Protocols/MongoCommandEvent.html deleted file mode 100644 index 6d0770ee2..000000000 --- a/docs/Protocols/MongoCommandEvent.html +++ /dev/null @@ -1,598 +0,0 @@ - - - - MongoCommandEvent Protocol Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoCommandEvent

-
-
-
public protocol MongoCommandEvent : MongoEvent
- -
-
-

A protocol for command monitoring events to implement, specifying the command name and other shared fields.

- -
-
-
-
    -
  • -
    - - - - commandName - -
    -
    -
    -
    -
    -
    -

    The command name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var commandName: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - requestId - -
    -
    -
    -
    -
    -
    -

    The driver generated request id.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var requestId: Int64 { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - operationId - -
    -
    -
    -
    -
    -
    -

    The driver generated operation id. This is used to link events together such -as bulk write operations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var operationId: Int64 { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection id for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var connectionId: ConnectionId { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Protocols/MongoEvent.html b/docs/Protocols/MongoEvent.html deleted file mode 100644 index b647ebb64..000000000 --- a/docs/Protocols/MongoEvent.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - MongoEvent Protocol Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoEvent

-
-
-
public protocol MongoEvent
- -
-
-

A protocol for monitoring events to implement, specifying their name.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Protocols/WriteModel.html b/docs/Protocols/WriteModel.html deleted file mode 100644 index 4c117ba7a..000000000 --- a/docs/Protocols/WriteModel.html +++ /dev/null @@ -1,551 +0,0 @@ - - - - WriteModel Protocol Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

WriteModel

-
-
-
public protocol WriteModel
- -
-
-

A protocol indicating write operations that can be batched together using MongoCollection.bulkWrite.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Adds the operation to a bulk write.

    - -

    The index argument denotes the operation’s order within the bulk write - and should match its index within the requests array parameter for - MongoCollection.bulkWrite.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - bulk - - - -
    - - index - - -
    -

    Index of the operation within the MongoCollection.bulkWrite requests array.

    -
    -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 000000000..f467bbe44 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,6 @@ +# mongo-swift-driver Docs + +The MongoDB Swift driver contains two modules: + +- [MongoSwift](../MongoSwift/index.html), containing an asynchronous API and a BSON library +- [MongoSwiftSync](../MongoSwiftSync/index.html), containing a synchronous wrapper of the API in `MongoSwift` diff --git a/docs/Structs.html b/docs/Structs.html deleted file mode 100644 index e529dc43b..000000000 --- a/docs/Structs.html +++ /dev/null @@ -1,2656 +0,0 @@ - - - - Structures Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Structures

-

The following structures are available globally.

- -
-
-
-
    -
  • -
    - - - - CommandStartedEvent - -
    -
    -
    -
    -
    -
    -

    An event published when a command starts. The event is stored under the key event -in the userInfo property of Notifications posted under the name .commandStarted.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CommandStartedEvent : MongoCommandEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CommandSucceededEvent - -
    -
    -
    -
    -
    -
    -

    An event published when a command succeeds. The event is stored under the key event -in the userInfo property of Notifications posted under the name .commandSucceeded.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CommandSucceededEvent : MongoCommandEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CommandFailedEvent - -
    -
    -
    -
    -
    -
    -

    An event published when a command fails. The event is stored under the key event -in the userInfo property of Notifications posted under the name .commandFailed.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CommandFailedEvent : MongoCommandEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Published when a server description changes. This does NOT include changes to the server’s roundTripTime property.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerDescriptionChangedEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ServerOpeningEvent - -
    -
    -
    -
    -
    -
    -

    Published when a server is initialized.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerOpeningEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ServerClosedEvent - -
    -
    -
    -
    -
    -
    -

    Published when a server is closed.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerClosedEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Published when a topology description changes.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct TopologyDescriptionChangedEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - TopologyOpeningEvent - -
    -
    -
    -
    -
    -
    -

    Published when a topology is initialized.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct TopologyOpeningEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - TopologyClosedEvent - -
    -
    -
    -
    -
    -
    -

    Published when a topology is closed.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct TopologyClosedEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Published when the server monitor’s ismaster command is started - immediately before -the ismaster command is serialized into raw BSON and written to the socket.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerHeartbeatStartedEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Published when the server monitor’s ismaster succeeds.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerHeartbeatSucceededEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Published when the server monitor’s ismaster fails, either with an “ok: 0” or a socket exception.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerHeartbeatFailedEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Binary - -
    -
    -
    -
    -
    -
    -

    A struct to represent the BSON Binary type.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Binary : BSONValue, Equatable, Codable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DBPointer - -
    -
    -
    -
    -
    -
    -

    A struct to represent the deprecated DBPointer type. -DBPointers cannot be instantiated, but they can be read from existing documents that contain them.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DBPointer : BSONValue, Codable, Equatable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Decimal128 - -
    -
    -
    -
    -
    -
    -

    A struct to represent the BSON Decimal128 type.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Decimal128 : BSONValue, Equatable, Codable, CustomStringConvertible
    -
    extension Decimal128: Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CodeWithScope - -
    -
    -
    -
    -
    -
    -

    A struct to represent BSON CodeWithScope.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CodeWithScope : BSONValue, Equatable, Codable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Code - -
    -
    -
    -
    -
    -
    -

    A struct to represent the BSON Code type.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Code : BSONValue, Equatable, Codable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ObjectId - -
    -
    -
    -
    -
    -
    -

    A struct to represent the BSON ObjectId type.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ObjectId : BSONValue, Equatable, CustomStringConvertible, Codable
    -
    extension ObjectId: Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - RegularExpression - -
    -
    -
    -
    -
    -
    -

    A struct to represent a BSON regular expression.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct RegularExpression : BSONValue, Equatable, Codable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Symbol - -
    -
    -
    -
    -
    -
    -

    A struct to represent the deprecated Symbol type. -Symbols cannot be instantiated, but they can be read from existing documents that contain them.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Symbol : BSONValue, CustomStringConvertible, Codable, Equatable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Timestamp - -
    -
    -
    -
    -
    -
    -

    A struct to represent the BSON Timestamp type.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Timestamp : BSONValue, Equatable, Codable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - BSONCoderOptions - -
    -
    -
    -
    -
    -
    -

    Options struct used for configuring the coding strategies on BSONEncoder and BSONDecoder.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct BSONCoderOptions : CodingStrategyProvider
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Document - -
    -
    -
    -
    -
    -
    -

    A struct representing the BSON document type.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @dynamicMemberLookup
    -public struct Document
    -
    extension Document: Codable
    -
    extension Document: Collection
    -
    extension Document: Sequence
    -
    extension Document: Equatable
    -
    extension Document: CustomStringConvertible
    -
    extension Document: ExpressibleByDictionaryLiteral
    -
    extension Document: Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ResumeToken - -
    -
    -
    -
    -
    -
    -

    A token used for manually resuming a change stream. Pass this to the resumeAfter field of -ChangeStreamOptions to resume or start a change stream where a previous one left off.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ResumeToken : Codable, Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UpdateDescription - -
    -
    -
    -
    -
    -
    -

    An UpdateDescription containing fields that will be present in the change stream document for -operations of type update.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct UpdateDescription : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ChangeStreamEvent - -
    -
    -
    -
    -
    -
    -

    The response document type from a ChangeStream.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ChangeStreamEvent<T> : Codable where T : Decodable, T : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ChangeStreamOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when creating a ChangeStream.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ChangeStreamOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ClientSessionOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when creating a ClientSession.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ClientSessionOptions
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ClientOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when creating a MongoClient.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ClientOptions : CodingStrategyProvider, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DatabaseOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when retrieving a MongoDatabase from a MongoClient.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DatabaseOptions : CodingStrategyProvider
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - TLSOptions - -
    -
    -
    -
    -
    -
    -

    Options used to configure TLS/SSL connections to the database.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct TLSOptions
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoCollection - -
    -
    -
    -
    -
    -
    -

    A MongoDB collection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct MongoCollection<T> where T : Decodable, T : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DeleteModelOptions - -
    -
    -
    -
    -
    -
    -

    Options to use with a WriteModel.deleteOne or WriteModel.deleteMany.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DeleteModelOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use with a WriteModel.replaceOne.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ReplaceOneModelOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UpdateModelOptions - -
    -
    -
    -
    -
    -
    -

    Options to use with a WriteModel.updateOne or WriteModel.updateMany.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct UpdateModelOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - BulkWriteOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when performing a bulk write operation on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct BulkWriteOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - BulkWriteResult - -
    -
    -
    -
    -
    -
    -

    The result of a bulk write operation on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct BulkWriteResult : Decodable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use when executing a findOneAndDelete command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct FindOneAndDeleteOptions : FindAndModifyOptionsConvertible, Decodable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use when executing a findOneAndReplace command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct FindOneAndReplaceOptions : FindAndModifyOptionsConvertible, Decodable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use when executing a findOneAndUpdate command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct FindOneAndUpdateOptions : FindAndModifyOptionsConvertible, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - IndexModel - -
    -
    -
    -
    -
    -
    -

    A struct representing an index on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct IndexModel : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - IndexOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when creating an index for a collection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct IndexOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - AggregateOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing an aggregate command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct AggregateOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - FindOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing a find command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct FindOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - InsertOneOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing an insertOne command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct InsertOneOptions : Codable, BulkWriteOptionsConvertible
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UpdateOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing an update command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct UpdateOptions : Codable, BulkWriteOptionsConvertible
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ReplaceOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing a replace command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ReplaceOptions : Codable, BulkWriteOptionsConvertible
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DeleteOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing a delete command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DeleteOptions : Codable, BulkWriteOptionsConvertible
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - InsertOneResult - -
    -
    -
    -
    -
    -
    -

    The result of an insertOne command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct InsertOneResult : Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - InsertManyResult - -
    -
    -
    -
    -
    -
    -

    The result of a multi-document insert operation on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct InsertManyResult
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DeleteResult - -
    -
    -
    -
    -
    -
    -

    The result of a delete command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DeleteResult : Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UpdateResult - -
    -
    -
    -
    -
    -
    -

    The result of an update operation on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct UpdateResult : Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DropCollectionOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when dropping a collection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DropCollectionOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CollectionOptions - -
    -
    -
    -
    -
    -
    -

    Options to set on a retrieved MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CollectionOptions : CodingStrategyProvider
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DropDatabaseOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing a dropDatabase command.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DropDatabaseOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoDatabase - -
    -
    -
    -
    -
    -
    -

    A MongoDB Database.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct MongoDatabase
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - WriteError - -
    -
    -
    -
    -
    -
    -

    A struct to represent a single write error not resulting from an executed bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct WriteError : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - WriteConcernError - -
    -
    -
    -
    -
    -
    -

    A struct to represent a write concern error resulting from an executed bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct WriteConcernError : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - BulkWriteError - -
    -
    -
    -
    -
    -
    -

    A struct to represent a write error resulting from an executed bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct BulkWriteError : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoNamespace - -
    -
    -
    -
    -
    -
    -

    Represents a MongoDB namespace for a database or collection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct MongoNamespace : Codable, Equatable
    -
    extension MongoNamespace: CustomStringConvertible
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CountDocumentsOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing a countDocuments command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CountDocumentsOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use when executing a createCollection command on a MongoDatabase.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CreateCollectionOptions : Codable, CodingStrategyProvider
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CreateIndexOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when creating a new index on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CreateIndexOptions : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DistinctOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing a distinct command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DistinctOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DropIndexOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when dropping an index from a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DropIndexOptions : Encodable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use when executing an estimatedDocumentCount command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct EstimatedDocumentCountOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Info about the collection that is returned with a listCollections call.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CollectionSpecificationInfo : Codable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Specifications of a collection returned when executing listCollections.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CollectionSpecification : Codable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use when executing a listCollections command on a MongoDatabase.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ListCollectionsOptions : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DatabaseSpecification - -
    -
    -
    -
    -
    -
    -

    A struct modeling the information returned from the listDatabases command about a single database.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DatabaseSpecification : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - RunCommandOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when running a command against a MongoDatabase.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct RunCommandOptions : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ReadConcern - -
    -
    -
    -
    -
    -
    -

    A struct to represent a MongoDB read concern.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ReadConcern : Codable
    -
    extension ReadConcern: CustomStringConvertible
    -
    extension ReadConcern: Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ConnectionId - -
    -
    -
    -
    -
    -
    -

    A struct representing a server connection, consisting of a host and port.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ConnectionId : Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ServerDescription - -
    -
    -
    -
    -
    -
    -

    A struct describing a mongod or mongos process.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerDescription
    -
    extension ServerDescription: Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - TopologyDescription - -
    -
    -
    -
    -
    -
    -

    A struct describing the state of a MongoDB deployment: its type (standalone, replica set, or sharded), -which servers are up, what type of servers they are, which is primary, and so on.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct TopologyDescription
    -
    extension TopologyDescription: Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - WriteConcern - -
    -
    -
    -
    -
    -
    -

    A class to represent a MongoDB write concern.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct WriteConcern : Codable
    -
    extension WriteConcern: CustomStringConvertible
    -
    extension WriteConcern: Equatable
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/AggregateOptions.html b/docs/Structs/AggregateOptions.html deleted file mode 100644 index ea00f9a26..000000000 --- a/docs/Structs/AggregateOptions.html +++ /dev/null @@ -1,800 +0,0 @@ - - - - AggregateOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

AggregateOptions

-
-
-
public struct AggregateOptions : Codable
- -
-
-

Options to use when executing an aggregate command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - allowDiskUse - -
    -
    -
    -
    -
    -
    -

    Enables writing to temporary files. When set to true, aggregation stages -can write data to the _tmp subdirectory in the dbPath directory.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var allowDiskUse: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - batchSize - -
    -
    -
    -
    -
    -
    -

    The number of Documents to return per batch.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var batchSize: Int32?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation. This only applies -when the $out stage is specified.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - comment - -
    -
    -
    -
    -
    -
    -

    Enables users to specify an arbitrary string to help trace the operation through -the database profiler, currentOp and logs. The default is to not send a value.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var comment: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hint - -
    -
    -
    -
    -
    -
    -

    The index hint to use for the aggregation. The hint does not apply to $lookup and $graphLookup stages.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hint: Hint?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A ReadConcern to use in read stages of this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A ReadPreference to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    A WriteConcern to use in $out stages of this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    allowDiskUse: Bool? = nil,
    -    batchSize: Int32? = nil,
    -    bypassDocumentValidation: Bool? = nil,
    -    collation: Document? = nil,
    -    comment: String? = nil,
    -    hint: Hint? = nil,
    -    maxTimeMS: Int64? = nil,
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/AnyBSONValue.html b/docs/Structs/AnyBSONValue.html deleted file mode 100644 index db860f500..000000000 --- a/docs/Structs/AnyBSONValue.html +++ /dev/null @@ -1,670 +0,0 @@ - - - - AnyBSONValue Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

AnyBSONValue

-
-
-
public struct AnyBSONValue : Codable, Equatable, Hashable
- -
-
-

A struct wrapping a BSONValue type that allows for encoding/ -decoding BSONValues of unknown type.

- -
-
-
-
    -
  • -
    - - - - hash(into:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hash(into hasher: inout Hasher)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - value - -
    -
    -
    -
    -
    -
    -

    The BSONValue wrapped by this struct.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let value: BSONValue
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new AnyBSONValue wrapping the provided BSONValue.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ value: BSONValue)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: AnyBSONValue, rhs: AnyBSONValue) -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new AnyBSONValue from a Decoder.

    - -

    Caveats for usage with Decoders other than MongoSwift’s BSONDecoder - - 1) This method does not support initializing an AnyBSONValue wrapping - a Date. This is because, in non-BSON formats, Dates are encoded - as other types such as Double or String. We have no way of knowing - which type is the intended one when decoding to a Document, as Documents - can contain any BSONValue type, so for simplicity we always go with a - Double or a String over a Date. - 2) Numeric values will be attempted to be decoded in the following - order of types: Int, Int32, Int64, Double. The first one - that can successfully represent the value with no loss of precision will - be used.

    -
    -

    Throws

    -
      -
    • DecodingError if a BSONValue could not be decoded from the given decoder (which is not a BSONDecoder).
    • -
    • DecodingError if a BSON datetime is encountered but a non-default date decoding strategy was set on the -decoder (which is a BSONDecoder).
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/BSONCoderOptions.html b/docs/Structs/BSONCoderOptions.html deleted file mode 100644 index 81bf77b94..000000000 --- a/docs/Structs/BSONCoderOptions.html +++ /dev/null @@ -1,598 +0,0 @@ - - - - BSONCoderOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONCoderOptions

-
-
-
public struct BSONCoderOptions : CodingStrategyProvider
- -
-
-

Options struct used for configuring the coding strategies on BSONEncoder and BSONDecoder.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/Structs/BSONNull.html b/docs/Structs/BSONNull.html deleted file mode 100644 index 713ccd79f..000000000 --- a/docs/Structs/BSONNull.html +++ /dev/null @@ -1,646 +0,0 @@ - - - - BSONNull Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONNull

-
-
-
public struct BSONNull : BSONValue, Codable, Equatable
- -
-
-

A struct to represent the BSON null type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> BSONNull
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new BSONNull instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/BSONUndefined.html b/docs/Structs/BSONUndefined.html deleted file mode 100644 index 198c7b63b..000000000 --- a/docs/Structs/BSONUndefined.html +++ /dev/null @@ -1,620 +0,0 @@ - - - - BSONUndefined Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONUndefined

-
-
-
public struct BSONUndefined : BSONValue, Equatable, Codable
- -
-
-

A struct to represent the deprecated Undefined type. -Undefined instances cannot be created, but they can be read from existing documents that contain them.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> BSONUndefined
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/Binary.html b/docs/Structs/Binary.html deleted file mode 100644 index 64cf6ba4a..000000000 --- a/docs/Structs/Binary.html +++ /dev/null @@ -1,795 +0,0 @@ - - - - Binary Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Binary

-
-
-
public struct Binary : BSONValue, Equatable, Codable, Hashable
- -
-
-

A struct to represent the BSON Binary type.

- -
-
-
-
    -
  • -
    - - - - data - -
    -
    -
    -
    -
    -
    -

    The binary data.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let data: Data
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - subtype - -
    -
    -
    -
    -
    -
    -

    The binary subtype for this data.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let subtype: UInt8
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Subtype - -
    -
    -
    -
    -
    -
    -

    Subtypes for BSON Binary values.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum Subtype : UInt8
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a Binary instance from a UUID.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if a Binary cannot be constructed from this UUID.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from uuid: UUID) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(data:subtype:) - -
    -
    -
    -
    -
    -
    -

    Initializes a Binary instance from a Data object and a UInt8 subtype.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the provided data is incompatible with the specified subtype.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(data: Data, subtype: UInt8) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(data:subtype:) - -
    -
    -
    -
    -
    -
    -

    Initializes a Binary instance from a Data object and a Subtype.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the provided data is incompatible with the specified subtype.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(data: Data, subtype: Subtype) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(base64:subtype:) - -
    -
    -
    -
    -
    -
    -

    Initializes a Binary instance from a base64 String and a UInt8 subtype.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the base64 String is invalid or if the provided data is -incompatible with the specified subtype.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(base64: String, subtype: UInt8) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(base64:subtype:) - -
    -
    -
    -
    -
    -
    -

    Initializes a Binary instance from a base64 String and a Subtype.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the base64 String is invalid or if the provided data is -incompatible with the specified subtype.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(base64: String, subtype: Subtype) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/Binary/Subtype.html b/docs/Structs/Binary/Subtype.html deleted file mode 100644 index 99a9a3cf6..000000000 --- a/docs/Structs/Binary/Subtype.html +++ /dev/null @@ -1,678 +0,0 @@ - - - - Subtype Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Subtype

-
-
-
public enum Subtype : UInt8
- -
-
-

Subtypes for BSON Binary values.

- -
-
-
-
    -
  • -
    - - - - generic - -
    -
    -
    -
    -
    -
    -

    Generic binary subtype

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case generic
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - function - -
    -
    -
    -
    -
    -
    -

    A function

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case function
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binaryDeprecated - -
    -
    -
    -
    -
    -
    -

    Binary (old)

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binaryDeprecated
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuidDeprecated - -
    -
    -
    -
    -
    -
    -

    UUID (old)

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case uuidDeprecated
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuid - -
    -
    -
    -
    -
    -
    -

    UUID (RFC 4122)

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case uuid
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - md5 - -
    -
    -
    -
    -
    -
    -

    MD5

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case md5
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - userDefined - -
    -
    -
    -
    -
    -
    -

    User defined

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case userDefined = 0x80
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/BulkWriteError.html b/docs/Structs/BulkWriteError.html deleted file mode 100644 index 61799be0f..000000000 --- a/docs/Structs/BulkWriteError.html +++ /dev/null @@ -1,623 +0,0 @@ - - - - BulkWriteError Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BulkWriteError

-
-
-
public struct BulkWriteError : Codable
- -
-
-

A struct to represent a write error resulting from an executed bulk write.

- -
-
-
-
    -
  • -
    - - - - code - -
    -
    -
    -
    -
    -
    -

    An integer value identifying the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let code: ServerErrorCode
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeName - -
    -
    -
    -
    -
    -
    -

    A human-readable string identifying the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let codeName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - message - -
    -
    -
    -
    -
    -
    -

    A description of the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let message: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - index - -
    -
    -
    -
    -
    -
    -

    The index of the request that errored.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let index: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/BulkWriteOptions.html b/docs/Structs/BulkWriteOptions.html deleted file mode 100644 index 995e5aaf1..000000000 --- a/docs/Structs/BulkWriteOptions.html +++ /dev/null @@ -1,601 +0,0 @@ - - - - BulkWriteOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BulkWriteOptions

-
-
-
public struct BulkWriteOptions : Codable
- -
-
-

Options to use when performing a bulk write operation on a MongoCollection.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ordered - -
    -
    -
    -
    -
    -
    -

    If true (the default), operations will be executed serially in order -and a write error will abort execution of the entire bulk write. If -false, operations may execute in an arbitrary order and execution will -not stop after encountering a write error (i.e. multiple errors may be -reported after all operations have been attempted).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var ordered: Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(bypassDocumentValidation: Bool? = nil, ordered: Bool? = nil, writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/BulkWriteResult.html b/docs/Structs/BulkWriteResult.html deleted file mode 100644 index 2e517aa0a..000000000 --- a/docs/Structs/BulkWriteResult.html +++ /dev/null @@ -1,704 +0,0 @@ - - - - BulkWriteResult Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BulkWriteResult

-
-
-
public struct BulkWriteResult : Decodable
- -
-
-

The result of a bulk write operation on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - deletedCount - -
    -
    -
    -
    -
    -
    -

    Number of documents deleted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let deletedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - insertedCount - -
    -
    -
    -
    -
    -
    -

    Number of documents inserted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let insertedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - insertedIds - -
    -
    -
    -
    -
    -
    -

    Map of the index of the operation to the id of the inserted document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let insertedIds: [Int : BSON]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - matchedCount - -
    -
    -
    -
    -
    -
    -

    Number of documents matched for update.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let matchedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - modifiedCount - -
    -
    -
    -
    -
    -
    -

    Number of documents modified.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let modifiedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsertedCount - -
    -
    -
    -
    -
    -
    -

    Number of documents upserted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsertedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsertedIds - -
    -
    -
    -
    -
    -
    -

    Map of the index of the operation to the id of the upserted document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsertedIds: [Int : BSON]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ChangeStreamEvent.html b/docs/Structs/ChangeStreamEvent.html deleted file mode 100644 index 8ea206317..000000000 --- a/docs/Structs/ChangeStreamEvent.html +++ /dev/null @@ -1,668 +0,0 @@ - - - - ChangeStreamEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ChangeStreamEvent

-
-
-
public struct ChangeStreamEvent<T> : Codable where T : Decodable, T : Encodable
- -
-
-

The response document type from a ChangeStream.

- -
-
-
-
    -
  • -
    - - - - operationType - -
    -
    -
    -
    -
    -
    -

    Describes the type of operation for this change.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let operationType: OperationType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - _id - -
    -
    -
    -
    -
    -
    -

    An opaque token for use when resuming an interrupted change stream.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let _id: ResumeToken
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ns - -
    -
    -
    -
    -
    -
    -

    A document containing the database and collection names in which this change happened.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let ns: MongoNamespace
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - documentKey - -
    -
    -
    -
    -
    -
    -

    Only present for options of type insert, update, replace and delete. For unsharded collections this -contains a single field, _id, with the value of the _id of the document updated. For sharded collections, this -will contain all the components of the shard key in order, followed by the _id if the _id isn’t part of the -shard key.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let documentKey: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - updateDescription - -
    -
    -
    -
    -
    -
    -

    An UpdateDescription containing updated and removed fields in this operation. Only present for operations of -typeupdate.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let updateDescription: UpdateDescription?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - fullDocument - -
    -
    -
    -
    -
    -
    -

    Always present for operations of type insert and replace. Also present for operations of type update if - the user has specified .updateLookup for the fullDocument option in the ChangeStreamOptions used to create - the change stream that emitted this document.

    - -

    For operations of type insert’ andreplace’, this key will contain the document being inserted, or the new - version of the document that is replacing the existing document, respectively.

    - -

    For operations of type `update’, this key will contain a copy of the full version of the document from some - point after the update occurred. If the document was deleted since the updated happened, it will be nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let fullDocument: T?
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ChangeStreamOptions.html b/docs/Structs/ChangeStreamOptions.html deleted file mode 100644 index 21cd02e68..000000000 --- a/docs/Structs/ChangeStreamOptions.html +++ /dev/null @@ -1,716 +0,0 @@ - - - - ChangeStreamOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ChangeStreamOptions

-
-
-
public struct ChangeStreamOptions : Codable
- -
-
-

Options to use when creating a ChangeStream.

- -
-
-
-
    -
  • -
    - - - - batchSize - -
    -
    -
    -
    -
    -
    -

    The number of documents to return per batch. If omitted, the server will use its default batch size.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var batchSize: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - fullDocument - -
    -
    -
    -
    -
    -
    -

    Indicates how the fullDocument field of a change stream document should be filled out by the server. -By default (indicated by a nil value for this option), the fullDocument field in the change stream document -will always be present in the case of ‘insert’ and ‘replace’ operations (containing the document being inserted) -and will be nil for all other operations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var fullDocument: FullDocument?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxAwaitTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time in milliseconds for the server to wait on new documents to satisfy a -change stream query. If omitted, the server will use its default timeout.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxAwaitTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - resumeAfter - -
    -
    -
    -
    -
    -
    -

    A ResumeToken that manually specifies the logical starting point for the new change stream. -The change stream will attempt to resume notifications starting after the operation associated with -the provided token.

    -
    -

    Note

    - A change stream cannot be resumed after an invalidate event (e.g. a collection drop or rename). - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var resumeAfter: ResumeToken?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - startAtOperationTime - -
    -
    -
    -
    -
    -
    -

    The change stream will only provide changes that occurred at or after the specified timestamp. -Any command run against the server will return an operation time that can be used here.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var startAtOperationTime: Timestamp?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializes a ChangeStreamOptions.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    batchSize: Int32? = nil,
    -    collation: Document? = nil,
    -    fullDocument: FullDocument? = nil,
    -    maxAwaitTimeMS: Int64? = nil,
    -    resumeAfter: ResumeToken? = nil,
    -    startAtOperationTime: Timestamp? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ClientOptions.html b/docs/Structs/ClientOptions.html deleted file mode 100644 index b70c4c73e..000000000 --- a/docs/Structs/ClientOptions.html +++ /dev/null @@ -1,877 +0,0 @@ - - - - ClientOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ClientOptions

-
-
-
public struct ClientOptions : CodingStrategyProvider, Decodable
- -
-
-

Options to use when creating a MongoClient.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/Structs/ClientSessionOptions.html b/docs/Structs/ClientSessionOptions.html deleted file mode 100644 index 0a2e789e5..000000000 --- a/docs/Structs/ClientSessionOptions.html +++ /dev/null @@ -1,548 +0,0 @@ - - - - ClientSessionOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ClientSessionOptions

-
-
-
public struct ClientSessionOptions
- -
-
-

Options to use when creating a ClientSession.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/Structs/Code.html b/docs/Structs/Code.html deleted file mode 100644 index af08503d3..000000000 --- a/docs/Structs/Code.html +++ /dev/null @@ -1,595 +0,0 @@ - - - - Code Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Code

-
-
-
public struct Code : BSONValue, Equatable, Codable, Hashable
- -
-
-

A struct to represent the BSON Code type.

- -
-
-
-
    -
  • -
    - - - - code - -
    -
    -
    -
    -
    -
    -

    A string containing Javascript code.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let code: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(code:) - -
    -
    -
    -
    -
    -
    -

    Initializes a CodeWithScope with an optional scope value.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(code: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/CodeWithScope.html b/docs/Structs/CodeWithScope.html deleted file mode 100644 index c3427e40f..000000000 --- a/docs/Structs/CodeWithScope.html +++ /dev/null @@ -1,623 +0,0 @@ - - - - CodeWithScope Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CodeWithScope

-
-
-
public struct CodeWithScope : BSONValue, Equatable, Codable, Hashable
- -
-
-

A struct to represent BSON CodeWithScope.

- -
-
-
-
    -
  • -
    - - - - code - -
    -
    -
    -
    -
    -
    -

    A string containing Javascript code.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let code: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - scope - -
    -
    -
    -
    -
    -
    -

    An optional scope Document containing a mapping of identifiers to values, -representing the context in which code should be evaluated.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let scope: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(code:scope:) - -
    -
    -
    -
    -
    -
    -

    Initializes a CodeWithScope with an optional scope value.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(code: String, scope: Document)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/CollectionOptions.html b/docs/Structs/CollectionOptions.html deleted file mode 100644 index ef323db00..000000000 --- a/docs/Structs/CollectionOptions.html +++ /dev/null @@ -1,691 +0,0 @@ - - - - CollectionOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CollectionOptions

-
-
-
public struct CollectionOptions : CodingStrategyProvider
- -
-
-

Options to set on a retrieved MongoCollection.

- -
-
-
-
    -
  • -
    - - - - dataCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the DataCodingStrategy to use for BSON encoding/decoding operations performed by this collection. -It is the responsibility of the user to ensure that any Datas already stored in this collection can be -decoded using this strategy.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dataCodingStrategy: DataCodingStrategy?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dateCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this collection. -It is the responsibility of the user to ensure that any Dates already stored in this collection can be -decoded using this strategy.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dateCodingStrategy: DateCodingStrategy?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A read concern to set on the returned collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A read preference to set on the returned collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuidCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the UUIDCodingStrategy to use for BSON encoding/decoding operations performed by this collection. -It is the responsibility of the user to ensure that any UUIDs already stored in this collection can be -decoded using this strategy.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var uuidCodingStrategy: UUIDCodingStrategy?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    A write concern to set on the returned collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all arguments to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    dataCodingStrategy: DataCodingStrategy? = nil,
    -    dateCodingStrategy: DateCodingStrategy? = nil,
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil,
    -    uuidCodingStrategy: UUIDCodingStrategy? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/CollectionSpecification.html b/docs/Structs/CollectionSpecification.html deleted file mode 100644 index 148c2339c..000000000 --- a/docs/Structs/CollectionSpecification.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - CollectionSpecification Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CollectionSpecification

-
-
-
public struct CollectionSpecification : Codable
- -
-
-

Specifications of a collection returned when executing listCollections.

- - -
-
-
-
    -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    The name of the collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let name: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - type - -
    -
    -
    -
    -
    -
    -

    The type of data store returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let type: CollectionType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - options - -
    -
    -
    -
    -
    -
    -

    Options that were used when creating this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let options: CreateCollectionOptions?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - info - -
    -
    -
    -
    -
    -
    -

    Contains info pertaining to the collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let info: CollectionSpecificationInfo
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - idIndex - -
    -
    -
    -
    -
    -
    -

    Provides info on the _id index of the collection. nil when this data store is of type view.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let idIndex: IndexModel?
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/CollectionSpecificationInfo.html b/docs/Structs/CollectionSpecificationInfo.html deleted file mode 100644 index 91f510971..000000000 --- a/docs/Structs/CollectionSpecificationInfo.html +++ /dev/null @@ -1,551 +0,0 @@ - - - - CollectionSpecificationInfo Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CollectionSpecificationInfo

-
-
-
public struct CollectionSpecificationInfo : Codable
- -
-
-

Info about the collection that is returned with a listCollections call.

- - -
-
-
-
    -
  • -
    - - - - readOnly - -
    -
    -
    -
    -
    -
    -

    Indicates whether or not the data store is read-only.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readOnly: Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuid - -
    -
    -
    -
    -
    -
    -

    The collection’s UUID - once established, this does not change and remains the same across replica -set members and shards in a sharded cluster. If the data store is a view, this field is nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let uuid: UUID?
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/CommandFailedEvent.html b/docs/Structs/CommandFailedEvent.html deleted file mode 100644 index 3c33addbc..000000000 --- a/docs/Structs/CommandFailedEvent.html +++ /dev/null @@ -1,680 +0,0 @@ - - - - CommandFailedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CommandFailedEvent

-
-
-
public struct CommandFailedEvent : MongoCommandEvent, InitializableFromOpaquePointer
- -
-
-

An event published when a command fails. The event is stored under the key event -in the userInfo property of Notifications posted under the name .commandFailed.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - duration - -
    -
    -
    -
    -
    -
    -

    The execution time of the event, in microseconds.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let duration: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - commandName - -
    -
    -
    -
    -
    -
    -

    The command name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let commandName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - failure - -
    -
    -
    -
    -
    -
    -

    The failure, represented as a MongoError.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let failure: MongoError
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - requestId - -
    -
    -
    -
    -
    -
    -

    The client generated request id.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let requestId: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - operationId - -
    -
    -
    -
    -
    -
    -

    The driver generated operation id. This is used to link events together such -as bulk write operations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let operationId: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection id for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/CommandStartedEvent.html b/docs/Structs/CommandStartedEvent.html deleted file mode 100644 index 91d823e10..000000000 --- a/docs/Structs/CommandStartedEvent.html +++ /dev/null @@ -1,680 +0,0 @@ - - - - CommandStartedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CommandStartedEvent

-
-
-
public struct CommandStartedEvent : MongoCommandEvent, InitializableFromOpaquePointer
- -
-
-

An event published when a command starts. The event is stored under the key event -in the userInfo property of Notifications posted under the name .commandStarted.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - command - -
    -
    -
    -
    -
    -
    -

    The command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let command: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - databaseName - -
    -
    -
    -
    -
    -
    -

    The database name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let databaseName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - commandName - -
    -
    -
    -
    -
    -
    -

    The command name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let commandName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - requestId - -
    -
    -
    -
    -
    -
    -

    The driver generated request id.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let requestId: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - operationId - -
    -
    -
    -
    -
    -
    -

    The driver generated operation id. This is used to link events together such -as bulk write operations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let operationId: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection id for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/CommandSucceededEvent.html b/docs/Structs/CommandSucceededEvent.html deleted file mode 100644 index 70842d609..000000000 --- a/docs/Structs/CommandSucceededEvent.html +++ /dev/null @@ -1,680 +0,0 @@ - - - - CommandSucceededEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CommandSucceededEvent

-
-
-
public struct CommandSucceededEvent : MongoCommandEvent, InitializableFromOpaquePointer
- -
-
-

An event published when a command succeeds. The event is stored under the key event -in the userInfo property of Notifications posted under the name .commandSucceeded.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - duration - -
    -
    -
    -
    -
    -
    -

    The execution time of the event, in microseconds.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let duration: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - reply - -
    -
    -
    -
    -
    -
    -

    The command reply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let reply: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - commandName - -
    -
    -
    -
    -
    -
    -

    The command name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let commandName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - requestId - -
    -
    -
    -
    -
    -
    -

    The driver generated request id.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let requestId: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - operationId - -
    -
    -
    -
    -
    -
    -

    The driver generated operation id. This is used to link events together such -as bulk write operations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let operationId: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection id for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ConnectionId.html b/docs/Structs/ConnectionId.html deleted file mode 100644 index beabbad21..000000000 --- a/docs/Structs/ConnectionId.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - ConnectionId Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ConnectionId

-
-
-
public struct ConnectionId : Equatable
- -
-
-

A struct representing a server connection, consisting of a host and port.

- -
-
-
-
    -
  • -
    - - - - host - -
    -
    -
    -
    -
    -
    -

    A string representing the host for this connection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let host: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - port - -
    -
    -
    -
    -
    -
    -

    The port number for this connection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let port: UInt16
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/CountDocumentsOptions.html b/docs/Structs/CountDocumentsOptions.html deleted file mode 100644 index e58ec27ee..000000000 --- a/docs/Structs/CountDocumentsOptions.html +++ /dev/null @@ -1,713 +0,0 @@ - - - - CountDocumentsOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CountDocumentsOptions

-
-
-
public struct CountDocumentsOptions : Codable
- -
-
-

Options to use when executing a countDocuments command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hint - -
    -
    -
    -
    -
    -
    -

    A hint for the index to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hint: Hint?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - limit - -
    -
    -
    -
    -
    -
    -

    The maximum number of documents to count.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var limit: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A ReadConcern to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A ReadPreference to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - skip - -
    -
    -
    -
    -
    -
    -

    The number of documents to skip before counting.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var skip: Int64?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    collation: Document? = nil,
    -    hint: Hint? = nil,
    -    limit: Int64? = nil,
    -    maxTimeMS: Int64? = nil,
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil,
    -    skip: Int64? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/CountOptions.html b/docs/Structs/CountOptions.html deleted file mode 100644 index 789c63798..000000000 --- a/docs/Structs/CountOptions.html +++ /dev/null @@ -1,711 +0,0 @@ - - - - CountOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CountOptions

-
-
-
public struct CountOptions : Codable
- -
-
-

Options to use when executing a count command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hint - -
    -
    -
    -
    -
    -
    -

    A hint for the index to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hint: Hint?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - limit - -
    -
    -
    -
    -
    -
    -

    The maximum number of documents to count.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var limit: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - skip - -
    -
    -
    -
    -
    -
    -

    The number of documents to skip before counting.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var skip: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A ReadConcern to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A ReadPreference to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(collation: Document? = nil,
    -            hint: Hint? = nil,
    -            limit: Int64? = nil,
    -            maxTimeMS: Int64? = nil,
    -            readConcern: ReadConcern? = nil,
    -            readPreference: ReadPreference? = nil,
    -            skip: Int64? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/CreateCollectionOptions.html b/docs/Structs/CreateCollectionOptions.html deleted file mode 100644 index 2bb52b0f8..000000000 --- a/docs/Structs/CreateCollectionOptions.html +++ /dev/null @@ -1,974 +0,0 @@ - - - - CreateCollectionOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CreateCollectionOptions

-
-
-
public struct CreateCollectionOptions : Codable, CodingStrategyProvider
- -
-
-

Options to use when executing a createCollection command on a MongoDatabase.

- -
-
-
-
    -
  • -
    - - - - autoIndexId - -
    -
    -
    -
    -
    -
    -

    Whether or not this collection will automatically generate an index on _id.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var autoIndexId: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - capped - -
    -
    -
    -
    -
    -
    -

    Indicates whether this will be a capped collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var capped: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies the default collation for the collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dataCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the DataCodingStrategy to use for BSON encoding/decoding operations performed by this collection. -It is the responsibility of the user to ensure that any Datas already stored in this collection can be -decoded using this strategy.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dataCodingStrategy: DataCodingStrategy?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dateCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this collection. -It is the responsibility of the user to ensure that any Dates already stored in this collection can be -decoded using this strategy.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dateCodingStrategy: DateCodingStrategy?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - indexOptionDefaults - -
    -
    -
    -
    -
    -
    -

    Specify a default configuration for indexes created on this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var indexOptionDefaults: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - max - -
    -
    -
    -
    -
    -
    -

    Maximum number of documents allowed in the collection (if capped).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var max: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - pipeline - -
    -
    -
    -
    -
    -
    -

    An array consisting of aggregation pipeline stages. When used with viewOn, will create the view by applying -this pipeline to the source collection or view.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var pipeline: [Document]?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - size - -
    -
    -
    -
    -
    -
    -

    Maximum size, in bytes, of this collection (if capped).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var size: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - storageEngine - -
    -
    -
    -
    -
    -
    -

    Specifies storage engine configuration for this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var storageEngine: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuidCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the UUIDCodingStrategy to use for BSON encoding/decoding operations performed by this collection. -It is the responsibility of the user to ensure that any UUIDs already stored in this collection can be -decoded using this strategy.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var uuidCodingStrategy: UUIDCodingStrategy?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - validationAction - -
    -
    -
    -
    -
    -
    -

    Determines whether to error on invalid documents or just warn about the violations but allow invalid documents -to be inserted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var validationAction: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - validationLevel - -
    -
    -
    -
    -
    -
    -

    Determines how strictly MongoDB applies the validation rules to existing documents during an update.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var validationLevel: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - validator - -
    -
    -
    -
    -
    -
    -

    What validator should be used for the collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var validator: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - viewOn - -
    -
    -
    -
    -
    -
    -

    The name of the source collection or view from which to create the view.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var viewOn: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    A write concern to use when executing this command. To set a read or write concern for the collection itself, -retrieve the collection using MongoDatabase.collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    autoIndexId: Bool? = nil,
    -    capped: Bool? = nil,
    -    collation: Document? = nil,
    -    dataCodingStrategy: DataCodingStrategy? = nil,
    -    dateCodingStrategy: DateCodingStrategy? = nil,
    -    indexOptionDefaults: Document? = nil,
    -    max: Int64? = nil,
    -    pipeline: [Document]? = nil,
    -    size: Int64? = nil,
    -    storageEngine: Document? = nil,
    -    uuidCodingStrategy: UUIDCodingStrategy? = nil,
    -    validationAction: String? = nil,
    -    validationLevel: String? = nil,
    -    validator: Document? = nil,
    -    viewOn: String? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/CreateIndexOptions.html b/docs/Structs/CreateIndexOptions.html deleted file mode 100644 index 36fbad6d8..000000000 --- a/docs/Structs/CreateIndexOptions.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - CreateIndexOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CreateIndexOptions

-
-
-
public struct CreateIndexOptions : Encodable
- -
-
-

Options to use when creating a new index on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run - enforced server-side.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializer allowing any/all parameters to be omitted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(maxTimeMS: Int64? = nil, writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/DBPointer.html b/docs/Structs/DBPointer.html deleted file mode 100644 index b87eda24f..000000000 --- a/docs/Structs/DBPointer.html +++ /dev/null @@ -1,596 +0,0 @@ - - - - DBPointer Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DBPointer

-
-
-
public struct DBPointer : BSONValue, Codable, Equatable, Hashable
- -
-
-

A struct to represent the deprecated DBPointer type. -DBPointers cannot be instantiated, but they can be read from existing documents that contain them.

- -
-
-
-
    -
  • -
    - - - - ref - -
    -
    -
    -
    -
    -
    -

    Destination namespace of the pointer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let ref: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - id - -
    -
    -
    -
    -
    -
    -

    Destination _id (assumed to be an ObjectId) of the pointed-to document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let id: ObjectId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/DatabaseOptions.html b/docs/Structs/DatabaseOptions.html deleted file mode 100644 index aff6ddf2c..000000000 --- a/docs/Structs/DatabaseOptions.html +++ /dev/null @@ -1,688 +0,0 @@ - - - - DatabaseOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DatabaseOptions

-
-
-
public struct DatabaseOptions : CodingStrategyProvider
- -
-
-

Options to use when retrieving a MongoDatabase from a MongoClient.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/Structs/DatabaseSpecification.html b/docs/Structs/DatabaseSpecification.html deleted file mode 100644 index f97f5346d..000000000 --- a/docs/Structs/DatabaseSpecification.html +++ /dev/null @@ -1,598 +0,0 @@ - - - - DatabaseSpecification Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DatabaseSpecification

-
-
-
public struct DatabaseSpecification : Codable
- -
-
-

A struct modeling the information returned from the listDatabases command about a single database.

- -
-
-
-
    -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    The name of the database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let name: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sizeOnDisk - -
    -
    -
    -
    -
    -
    -

    The amount of disk space consumed by this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let sizeOnDisk: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - empty - -
    -
    -
    -
    -
    -
    -

    Whether or not this database is empty.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let empty: Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - shards - -
    -
    -
    -
    -
    -
    -

    For sharded clusters, this field includes a document which maps each shard to the size in bytes of the database -on disk on that shard. For non sharded environments, this field is nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let shards: Document?
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/Decimal128.html b/docs/Structs/Decimal128.html deleted file mode 100644 index 2ad8cd4ac..000000000 --- a/docs/Structs/Decimal128.html +++ /dev/null @@ -1,653 +0,0 @@ - - - - Decimal128 Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Decimal128

-
-
-
public struct Decimal128 : BSONValue, Equatable, Codable, CustomStringConvertible
-
extension Decimal128: Hashable
- -
-
-

A struct to represent the BSON Decimal128 type.

- -
-
-
-
    -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes a Decimal128 value from the provided String. Returns nil if the input is not a valid -Decimal128 string.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?(_ data: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: Decimal128, rhs: Decimal128) -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hash(into:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hash(into hasher: inout Hasher)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/DeleteModelOptions.html b/docs/Structs/DeleteModelOptions.html deleted file mode 100644 index 286c0631a..000000000 --- a/docs/Structs/DeleteModelOptions.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - DeleteModelOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DeleteModelOptions

-
-
-
public struct DeleteModelOptions : Codable
- -
-
-

Options to use with a WriteModel.deleteOne or WriteModel.deleteMany.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    The collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(collation:) - -
    -
    -
    -
    -
    -
    -

    Initializer allowing any/all options to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(collation: Document? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/DeleteOptions.html b/docs/Structs/DeleteOptions.html deleted file mode 100644 index 223437176..000000000 --- a/docs/Structs/DeleteOptions.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - DeleteOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DeleteOptions

-
-
-
public struct DeleteOptions : Codable, BulkWriteOptionsConvertible
- -
-
-

Options to use when executing a delete command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing collation to be omitted or optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(collation: Document? = nil, writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/DeleteResult.html b/docs/Structs/DeleteResult.html deleted file mode 100644 index b3ddc3c02..000000000 --- a/docs/Structs/DeleteResult.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - DeleteResult Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- - -
- - - diff --git a/docs/Structs/DistinctOptions.html b/docs/Structs/DistinctOptions.html deleted file mode 100644 index 5178ba357..000000000 --- a/docs/Structs/DistinctOptions.html +++ /dev/null @@ -1,629 +0,0 @@ - - - - DistinctOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DistinctOptions

-
-
-
public struct DistinctOptions : Codable
- -
-
-

Options to use when executing a distinct command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A ReadConcern to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A ReadPreference to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    collation: Document? = nil,
    -    maxTimeMS: Int64? = nil,
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/Document.html b/docs/Structs/Document.html deleted file mode 100644 index 1f619fa23..000000000 --- a/docs/Structs/Document.html +++ /dev/null @@ -1,1926 +0,0 @@ - - - - Document Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Document

-
-
-
@dynamicMemberLookup
-public struct Document
-
extension Document: Codable
-
extension Document: Collection
-
extension Document: Sequence
-
extension Document: Equatable
-
extension Document: CustomStringConvertible
-
extension Document: ExpressibleByDictionaryLiteral
-
extension Document: Hashable
- -
-
-

A struct representing the BSON document type.

- -
-
-
-
    -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    This method will work with any Decoder, but for non-BSON -decoders, we do not support decoding Dates, because of limitations -of decoding to AnyBSONValues. See AnyBSONValue.init(from:) for -more information.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Index - -
    -
    -
    -
    -
    -
    -

    The index type of a document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Index = Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - startIndex - -
    -
    -
    -
    -
    -
    -

    Returns the start index of the Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var startIndex: Index { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - endIndex - -
    -
    -
    -
    -
    -
    -

    Returns the end index of the Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var endIndex: Index { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - index(after:) - -
    -
    -
    -
    -
    -
    -

    Returns the index after the given index for this Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func index(after i: Index) -> Index
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - subscript(_:) - -
    -
    -
    -
    -
    -
    -

    Allows access to a KeyValuePair from the Document, given the position of the desired KeyValuePair held -within. This method does not guarantee constant-time (O(1)) access.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(position: Index) -> KeyValuePair { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - subscript(_:) - -
    -
    -
    -
    -
    -
    -

    Allows access to a KeyValuePair from the Document, given a range of indices of the desired KeyValuePair‘s -held within. This method does not guarantee constant-time (O(1)) access.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(bounds: Range<Index>) -> Document { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - KeyValuePair - -
    -
    -
    -
    -
    -
    -

    The element type of a document: a tuple containing an individual key-value pair.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias KeyValuePair = (key: String, value: BSON)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - SubSequence - -
    -
    -
    -
    -
    -
    -

    The type that is returned from methods such as dropFirst() and split().

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias SubSequence = Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isEmpty - -
    -
    -
    -
    -
    -
    -

    Returns a Bool indicating whether the document is empty.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isEmpty: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - makeIterator() - -
    -
    -
    -
    -
    -
    -

    Returns a DocumentIterator over the values in this Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func makeIterator() -> DocumentIterator
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - mapValues(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a new document containing the keys of this document with the values transformed by the given closure.

    -
    -

    Throws

    -

    An error if transform throws an error.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func mapValues(_ transform: (BSON) throws -> BSON) rethrows -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - transform - - -
    -

    A closure that transforms a BSONValue. transform accepts each value of the document as its - parameter and returns a transformed BSONValue of the same or of a different type.

    -
    -
    -
    -
    -

    Return Value

    -

    A document containing the keys and transformed values of this document.

    -
    -
    -
    -
  • -
  • -
    - - - - dropFirst(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a document containing all but the given number of initial key-value pairs.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func dropFirst(_ n: Int) -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - k - - -
    -

    The number of key-value pairs to drop from the beginning of the document. k must be > 0.

    -
    -
    -
    -
    -

    Return Value

    -

    A document starting after the specified number of key-value pairs.

    -
    -
    -
    -
  • -
  • -
    - - - - dropLast(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a document containing all but the given number of final key-value pairs.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func dropLast(_ n: Int) -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - k - - -
    -

    The number of key-value pairs to drop from the end of the document. Must be greater than or equal to zero.

    -
    -
    -
    -
    -

    Return Value

    -

    A document leaving off the specified number of final key-value pairs.

    -
    -
    -
    -
  • -
  • -
    - - - - drop(while:) - -
    -
    -
    -
    -
    -
    -

    Returns a document by skipping the initial, consecutive key-value pairs that satisfy the given predicate.

    -
    -

    Throws

    -

    An error if predicate throws an error.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func drop(while predicate: (KeyValuePair) throws -> Bool) rethrows -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - predicate - - -
    -

    A closure that takes a key-value pair as its argument and returns a boolean indicating whether - the key-value pair should be included in the result.

    -
    -
    -
    -
    -

    Return Value

    -

    A document starting after the initial, consecutive key-value pairs that satisfy predicate.

    -
    -
    -
    -
  • -
  • -
    - - - - prefix(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a document, up to the specified maximum length, containing the initial key-value pairs of the document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func prefix(_ maxLength: Int) -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - maxLength - - -
    -

    The maximum length for the returned document. Must be greater than or equal to zero.

    -
    -
    -
    -
    -

    Return Value

    -

    A document starting at the beginning of this document with at most maxLength key-value pairs.

    -
    -
    -
    -
  • -
  • -
    - - - - prefix(while:) - -
    -
    -
    -
    -
    -
    -

    Returns a document containing the initial, consecutive key-value pairs that satisfy the given predicate.

    -
    -

    Throws

    -

    An error if predicate throws an error.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func prefix(while predicate: (KeyValuePair) throws -> Bool) rethrows -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - predicate - - -
    -

    A closure that takes a key-value pair as its argument and returns a boolean indicating whether - the key-value pair should be included in the result.

    -
    -
    -
    -
    -

    Return Value

    -

    A document containing the initial, consecutive key-value pairs that satisfy predicate.

    -
    -
    -
    -
  • -
  • -
    - - - - suffix(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a document, up to the specified maximum length, containing the final key-value pairs of the document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func suffix(_ maxLength: Int) -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - maxLength - - -
    -

    The maximum length for the returned document. Must be greater than or equal to zero.

    -
    -
    -
    -
    -

    Return Value

    -

    A document ending at the end of this document with at most maxLength key-value pairs.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Returns the longest possible subsequences of the document, in order, that don’t contain key-value pairs - satisfying the given predicate. Key-value pairs that are used to split the document are not returned as part of - any subsequence.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func split(
    -    maxSplits: Int = Int.max,
    -    omittingEmptySubsequences: Bool = true,
    -    whereSeparator isSeparator: (KeyValuePair) throws -> Bool
    -) rethrows -> [Document]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - maxSplits - - -
    -

    The maximum number of times to split the document, or one less than the number of subsequences to - return. If maxSplits + 1 subsequences are returned, the last one is a suffix of the original - document containing the remaining key-value pairs. maxSplits must be greater than or equal to - zero. The default value is Int.max.

    -
    -
    - - omittingEmptySubsequences - - -
    -

    If false, an empty document is returned in the result for each pair of - consecutive key-value pairs satisfying the isSeparator predicate and for each - key-value pair at the start or end of the document satisfying the isSeparator - predicate. If true, only nonempty documents are returned. The default value is - true.

    -
    -
    - - isSeparator - - -
    -

    A closure that returns true if its argument should be used to split the document and otherwise - returns false.

    -
    -
    -
    -
    -

    Return Value

    -

    An array of documents, split from this document’s key-value pairs.

    -
    -
    -
    -
  • -
  • -
    - - - - filter(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a new document containing the elements of the document that satisfy the given predicate.

    -
    -

    Throws

    -

    An error if isIncluded throws an error.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func filter(_ isIncluded: (KeyValuePair) throws -> Bool) rethrows -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - isIncluded - - -
    -

    A closure that takes a key-value pair as its argument and returns a Bool indicating whether - the pair should be included in the returned document.

    -
    -
    -
    -
    -

    Return Value

    -

    A document containing the key-value pairs that isIncluded allows.

    -
    -
    -
    -
  • -
  • -
    - - - - keys - -
    -
    -
    -
    -
    -
    -

    Returns a [String] containing the keys in this Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var keys: [String] { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - values - -
    -
    -
    -
    -
    -
    -

    Returns a [BSONValue] containing the values stored in this Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var values: [BSON] { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - count - -
    -
    -
    -
    -
    -
    -

    Returns the number of (key, value) pairs stored at the top level of this Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var count: Int { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - extendedJSON - -
    -
    -
    -
    -
    -
    -

    Returns the relaxed extended JSON representation of this Document. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var extendedJSON: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - canonicalExtendedJSON - -
    -
    -
    -
    -
    -
    -

    Returns the canonical extended JSON representation of this Document. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var canonicalExtendedJSON: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rawBSON - -
    -
    -
    -
    -
    -
    -

    Returns a copy of the raw BSON data for this Document, represented as Data.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var rawBSON: Data { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new, empty Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(fromJSON:) - -
    -
    -
    -
    -
    -
    -

    Constructs a new Document from the provided JSON text.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • A UserError.invalidArgumentError if the data passed in is invalid JSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(fromJSON: Data) throws
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - fromJSON - - -
    -

    a JSON document as Data to parse into a Document

    -
    -
    -
    -
    -

    Return Value

    -

    the parsed Document

    -
    -
    -
    -
  • -
  • -
    - - - - init(fromJSON:) - -
    -
    -
    -
    -
    -
    -

    Convenience initializer for constructing a Document from a String.

    -
    -

    Throws

    -
      -
    • A UserError.invalidArgumentError if the string passed in is invalid JSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(fromJSON json: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(fromBSON:) - -
    -
    -
    -
    -
    -
    -

    Constructs a Document from raw BSON Data.

    -
    -

    Throws

    -
      -
    • A UserError.invalidArgumentError if bson is too short or too long to be valid BSON.
    • -
    • A UserError.invalidArgumentError if the first four bytes of bson do not contain bson.count.
    • -
    • A UserError.invalidArgumentError if the final byte of bson is not a null byte.
    • -
    - -
    -

    See also

    - http://bsonspec.org/ - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(fromBSON bson: Data) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hasKey(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a Boolean indicating whether this Document contains the provided key.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hasKey(_ key: String) -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - subscript(_:) - -
    -
    -
    -
    -
    -
    -

    Allows setting values and retrieving values using subscript syntax. -For example:

    -
     let d = Document()
    - d["a"] = 1
    - print(d["a"]) // prints 1
    -
    - -

    A nil return suggests that the subscripted key does not exist in the Document. A true BSON null is returned as -a BSONNull.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(key: String) -> BSON? { get set }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - subscript(_:default:) - -
    -
    -
    -
    -
    -
    -

    An implementation identical to subscript(key: String), but offers the ability to choose a default value if the -key is missing. -For example:

    -
     let d: Document = ["hello": "world"]
    - print(d["hello", default: "foo"]) // prints "world"
    - print(d["a", default: "foo"]) // prints "foo"
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(key: String, default defaultValue: @autoclosure () -> BSON) -> BSON
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Allows setting values and retrieving values using dot-notation syntax. - For example:

    -
      let d = Document()
    -  d.a = 1
    -  print(d.a) // prints 1
    -
    - -

    A nil return suggests that the key does not exist in the Document. A true BSON null is returned as - a BSONNull.

    - -

    Only available in Swift 4.2+.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @available(swift 4.2)
    -public subscript(dynamicMember member: String) -> BSON? { get set }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: Document, rhs: Document) -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Returns the relaxed extended JSON representation of this Document. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializes a Document using a dictionary literal where the - keys are Strings and the values are BSONValues. For example: - d: Document = ["a" : 1 ]

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(dictionaryLiteral keyValuePairs: (String, BSON)...)
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - dictionaryLiteral - - -
    -

    a [String: BSONValue]

    -
    -
    -
    -
    -

    Return Value

    -

    a new Document

    -
    -
    -
    -
  • -
  • -
    - - - - hash(into:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hash(into hasher: inout Hasher)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/DropCollectionOptions.html b/docs/Structs/DropCollectionOptions.html deleted file mode 100644 index 78620c6a9..000000000 --- a/docs/Structs/DropCollectionOptions.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - DropCollectionOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DropCollectionOptions

-
-
-
public struct DropCollectionOptions : Codable
- -
-
-

Options to use when dropping a collection.

- -
-
-
-
    -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(writeConcern:) - -
    -
    -
    -
    -
    -
    -

    Initializer allowing any/all parameters to be omitted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/DropDatabaseOptions.html b/docs/Structs/DropDatabaseOptions.html deleted file mode 100644 index 2923eab4c..000000000 --- a/docs/Structs/DropDatabaseOptions.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - DropDatabaseOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DropDatabaseOptions

-
-
-
public struct DropDatabaseOptions : Codable
- -
-
-

Options to use when executing a dropDatabase command.

- -
-
-
-
    -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(writeConcern:) - -
    -
    -
    -
    -
    -
    -

    Initializer allowing any/all parameters to be omitted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/DropIndexOptions.html b/docs/Structs/DropIndexOptions.html deleted file mode 100644 index 6bc801c93..000000000 --- a/docs/Structs/DropIndexOptions.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - DropIndexOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DropIndexOptions

-
-
-
public struct DropIndexOptions : Encodable
- -
-
-

Options to use when dropping an index from a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run - enforced server-side.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializer allowing any/all parameters to be omitted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(maxTimeMS: Int64? = nil, writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/EstimatedDocumentCountOptions.html b/docs/Structs/EstimatedDocumentCountOptions.html deleted file mode 100644 index 773b81efc..000000000 --- a/docs/Structs/EstimatedDocumentCountOptions.html +++ /dev/null @@ -1,601 +0,0 @@ - - - - EstimatedDocumentCountOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

EstimatedDocumentCountOptions

-
-
-
public struct EstimatedDocumentCountOptions : Codable
- -
-
-

Options to use when executing an estimatedDocumentCount command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A ReadConcern to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A ReadPreference to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    maxTimeMS: Int64? = nil,
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/FindOneAndDeleteOptions.html b/docs/Structs/FindOneAndDeleteOptions.html deleted file mode 100644 index 2ac6b1f39..000000000 --- a/docs/Structs/FindOneAndDeleteOptions.html +++ /dev/null @@ -1,657 +0,0 @@ - - - - FindOneAndDeleteOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

FindOneAndDeleteOptions

-
-
-
public struct FindOneAndDeleteOptions : FindAndModifyOptionsConvertible, Decodable
- -
-
-

Options to use when executing a findOneAndDelete command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - projection - -
    -
    -
    -
    -
    -
    -

    Limits the fields to return for the matching document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var projection: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sort - -
    -
    -
    -
    -
    -
    -

    Determines which document the operation modifies if the query selects multiple documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sort: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted/optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    collation: Document? = nil,
    -    maxTimeMS: Int64? = nil,
    -    projection: Document? = nil,
    -    sort: Document? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/FindOneAndReplaceOptions.html b/docs/Structs/FindOneAndReplaceOptions.html deleted file mode 100644 index 62bef69ea..000000000 --- a/docs/Structs/FindOneAndReplaceOptions.html +++ /dev/null @@ -1,741 +0,0 @@ - - - - FindOneAndReplaceOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

FindOneAndReplaceOptions

-
-
-
public struct FindOneAndReplaceOptions : FindAndModifyOptionsConvertible, Decodable
- -
-
-

Options to use when executing a findOneAndReplace command on a MongoCollection.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - projection - -
    -
    -
    -
    -
    -
    -

    Limits the fields to return for the matching document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var projection: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - returnDocument - -
    -
    -
    -
    -
    -
    -

    When ReturnDocument.After, returns the replaced or inserted document rather than the original.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var returnDocument: ReturnDocument?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sort - -
    -
    -
    -
    -
    -
    -

    Determines which document the operation modifies if the query selects multiple documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sort: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted/optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    bypassDocumentValidation: Bool? = nil,
    -    collation: Document? = nil,
    -    maxTimeMS: Int64? = nil,
    -    projection: Document? = nil,
    -    returnDocument: ReturnDocument? = nil,
    -    sort: Document? = nil,
    -    upsert: Bool? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/FindOneAndUpdateOptions.html b/docs/Structs/FindOneAndUpdateOptions.html deleted file mode 100644 index c741dcef5..000000000 --- a/docs/Structs/FindOneAndUpdateOptions.html +++ /dev/null @@ -1,769 +0,0 @@ - - - - FindOneAndUpdateOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

FindOneAndUpdateOptions

-
-
-
public struct FindOneAndUpdateOptions : FindAndModifyOptionsConvertible, Decodable
- -
-
-

Options to use when executing a findOneAndUpdate command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - arrayFilters - -
    -
    -
    -
    -
    -
    -

    A set of filters specifying to which array elements an update should apply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var arrayFilters: [Document]?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - projection - -
    -
    -
    -
    -
    -
    -

    Limits the fields to return for the matching document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var projection: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - returnDocument - -
    -
    -
    -
    -
    -
    -

    WhenReturnDocument.After, returns the updated or inserted document rather than the original.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var returnDocument: ReturnDocument?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sort - -
    -
    -
    -
    -
    -
    -

    Determines which document the operation modifies if the query selects multiple documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sort: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted/optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    arrayFilters: [Document]? = nil,
    -    bypassDocumentValidation: Bool? = nil,
    -    collation: Document? = nil,
    -    maxTimeMS: Int64? = nil,
    -    projection: Document? = nil,
    -    returnDocument: ReturnDocument? = nil,
    -    sort: Document? = nil,
    -    upsert: Bool? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/FindOptions.html b/docs/Structs/FindOptions.html deleted file mode 100644 index e0fb93d9d..000000000 --- a/docs/Structs/FindOptions.html +++ /dev/null @@ -1,1080 +0,0 @@ - - - - FindOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

FindOptions

-
-
-
public struct FindOptions : Codable
- -
-
-

Options to use when executing a find command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - allowPartialResults - -
    -
    -
    -
    -
    -
    -

    Get partial results from a mongos if some shards are down (instead of throwing an error).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var allowPartialResults: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - batchSize - -
    -
    -
    -
    -
    -
    -

    The number of documents to return per batch.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var batchSize: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - comment - -
    -
    -
    -
    -
    -
    -

    Attaches a comment to the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var comment: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - cursorType - -
    -
    -
    -
    -
    -
    -

    Indicates the type of cursor to use. This value includes both the tailable and awaitData options.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var cursorType: CursorType? { get set }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hint - -
    -
    -
    -
    -
    -
    -

    A hint for the index to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hint: Hint?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - limit - -
    -
    -
    -
    -
    -
    -

    The maximum number of documents to return.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var limit: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - max - -
    -
    -
    -
    -
    -
    -

    The exclusive upper bound for a specific index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var max: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxAwaitTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor -query. This only applies when used with CursorType.tailableAwait. Otherwise, this option is ignored.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxAwaitTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxScan - -
    -
    -
    -
    -
    -
    -

    Maximum number of documents or index keys to scan when executing the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxScan: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - min - -
    -
    -
    -
    -
    -
    -

    The inclusive lower bound for a specific index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var min: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - noCursorTimeout - -
    -
    -
    -
    -
    -
    -

    The server normally times out idle cursors after an inactivity period (10 minutes) -to prevent excess memory use. Set this option to prevent that.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var noCursorTimeout: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - projection - -
    -
    -
    -
    -
    -
    -

    Limits the fields to return for all matching documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var projection: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A ReadConcern to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A ReadPreference to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - returnKey - -
    -
    -
    -
    -
    -
    -

    If true, returns only the index keys in the resulting documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var returnKey: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - showRecordId - -
    -
    -
    -
    -
    -
    -

    Determines whether to return the record identifier for each document. If true, adds a field $recordId -to the returned documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var showRecordId: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - skip - -
    -
    -
    -
    -
    -
    -

    The number of documents to skip before returning.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var skip: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sort - -
    -
    -
    -
    -
    -
    -

    The order in which to return matching documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sort: Document?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    allowPartialResults: Bool? = nil,
    -    batchSize: Int32? = nil,
    -    collation: Document? = nil,
    -    comment: String? = nil,
    -    cursorType: CursorType? = nil,
    -    hint: Hint? = nil,
    -    limit: Int64? = nil,
    -    max: Document? = nil,
    -    maxAwaitTimeMS: Int64? = nil,
    -    maxScan: Int64? = nil,
    -    maxTimeMS: Int64? = nil,
    -    min: Document? = nil,
    -    noCursorTimeout: Bool? = nil,
    -    projection: Document? = nil,
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil,
    -    returnKey: Bool? = nil,
    -    showRecordId: Bool? = nil,
    -    skip: Int64? = nil,
    -    sort: Document? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/IndexModel.html b/docs/Structs/IndexModel.html deleted file mode 100644 index f4d9b10a3..000000000 --- a/docs/Structs/IndexModel.html +++ /dev/null @@ -1,622 +0,0 @@ - - - - IndexModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

IndexModel

-
-
-
public struct IndexModel : Codable
- -
-
-

A struct representing an index on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - keys - -
    -
    -
    -
    -
    -
    -

    Contains the required keys for the index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let keys: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - options - -
    -
    -
    -
    -
    -
    -

    Contains the options for the index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let options: IndexOptions?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(keys:options:) - -
    -
    -
    -
    -
    -
    -

    Convenience initializer providing a default options value

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(keys: Document, options: IndexOptions? = nil)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/IndexOptions.html b/docs/Structs/IndexOptions.html deleted file mode 100644 index 272bbb352..000000000 --- a/docs/Structs/IndexOptions.html +++ /dev/null @@ -1,1034 +0,0 @@ - - - - IndexOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

IndexOptions

-
-
-
public struct IndexOptions : Codable
- -
-
-

Options to use when creating an index for a collection.

- -
-
-
-
    -
  • -
    - - - - background - -
    -
    -
    -
    -
    -
    -

    Optionally tells the server to build the index in the background and not block other tasks.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var background: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bits - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the precision of the stored geo hash in the 2d index, from 1 to 32.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bits: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bucketSize - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the number of units within which to group the location values in a geo haystack index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bucketSize: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Optionally specifies a collation to use for the index in MongoDB 3.4 and higher. If not specified, no collation -is sent and the default collation of the collection server-side is used.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - defaultLanguage - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the default language for text indexes. Is ‘english’ if none is provided.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var defaultLanguage: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - expireAfterSeconds - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the length in time, in seconds, for documents to remain in a collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var expireAfterSeconds: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - languageOverride - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the field in the document to override the language.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var languageOverride: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - max - -
    -
    -
    -
    -
    -
    -

    Optionally sets the maximum boundary for latitude and longitude in the 2d index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var max: Double?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - min - -
    -
    -
    -
    -
    -
    -

    Optionally sets the minimum boundary for latitude and longitude in the index in a 2d index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var min: Double?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    Optionally specify a specific name for the index outside of the default generated name. If none is provided then - the name is generated in the format “[field]_[direction]”.

    - -

    Note that if an index is created for the same key pattern with different collations, a name must be provided by - the user to avoid ambiguity.

    - -
      -
    • Example: For an index of name: 1, age: -1, the generated name would be “name_1_age_-1”.
    • -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var name: String?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Optionally specifies a filter for use in a partial index. Only documents that match the filter expression are -included in the index. New in MongoDB 3.2.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var partialFilterExpression: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sparse - -
    -
    -
    -
    -
    -
    -

    Optionally tells the index to only reference documents with the specified field in the index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sparse: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sphereIndexVersion - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the 2dsphere index version number. MongoDB 2.4 can only support version 1. MongoDB 2.6 and -higher may support version 1 or 2.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sphereIndexVersion: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - storageEngine - -
    -
    -
    -
    -
    -
    -

    Optionally used only in MongoDB 3.0.0 and higher. Allows users to configure the storage engine on a per-index -basis when creating an index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var storageEngine: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - textIndexVersion - -
    -
    -
    -
    -
    -
    -

    Optionally provides the text index version number. MongoDB 2.4 can only support version 1. MongoDB 2.6 and -higher may support version 1 or 2.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var textIndexVersion: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - unique - -
    -
    -
    -
    -
    -
    -

    Optionally forces the index to be unique.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var unique: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - version - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the index version number, either 0 or 1.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var version: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - weights - -
    -
    -
    -
    -
    -
    -

    Optionally specifies fields in the index and their corresponding weight values.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var weights: Document?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    background: Bool? = nil,
    -    bits: Int32? = nil,
    -    bucketSize: Int32? = nil,
    -    collation: Document? = nil,
    -    defaultLanguage: String? = nil,
    -    expireAfterSeconds: Int32? = nil,
    -    languageOverride: String? = nil,
    -    max: Double? = nil,
    -    min: Double? = nil,
    -    name: String? = nil,
    -    partialFilterExpression: Document? = nil,
    -    sparse: Bool? = nil,
    -    sphereIndexVersion: Int32? = nil,
    -    storageEngine: Document? = nil,
    -    textIndexVersion: Int32? = nil,
    -    unique: Bool? = nil,
    -    version: Int32? = nil,
    -    weights: Document? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/InsertManyOptions.html b/docs/Structs/InsertManyOptions.html deleted file mode 100644 index 35f90e25c..000000000 --- a/docs/Structs/InsertManyOptions.html +++ /dev/null @@ -1,592 +0,0 @@ - - - - InsertManyOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

InsertManyOptions

-
-
-
public struct InsertManyOptions : Encodable
- -
-
-

Options to use when executing a multi-document insert operation on a MongoCollection.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ordered - -
    -
    -
    -
    -
    -
    -

    If true, when an insert fails, return without performing the remaining -writes. If false, when a write fails, continue with the remaining writes, -if any. Defaults to true.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let ordered: Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(bypassDocumentValidation: Bool? = nil, ordered: Bool? = nil, writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/InsertManyResult.html b/docs/Structs/InsertManyResult.html deleted file mode 100644 index 64927ae40..000000000 --- a/docs/Structs/InsertManyResult.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - InsertManyResult Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

InsertManyResult

-
-
-
public struct InsertManyResult
- -
-
-

The result of a multi-document insert operation on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - insertedCount - -
    -
    -
    -
    -
    -
    -

    Number of documents inserted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let insertedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - insertedIds - -
    -
    -
    -
    -
    -
    -

    Map of the index of the document in values to the value of its ID

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let insertedIds: [Int : BSON]
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/InsertOneOptions.html b/docs/Structs/InsertOneOptions.html deleted file mode 100644 index d9717564e..000000000 --- a/docs/Structs/InsertOneOptions.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - InsertOneOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

InsertOneOptions

-
-
-
public struct InsertOneOptions : Codable, BulkWriteOptionsConvertible
- -
-
-

Options to use when executing an insertOne command on a MongoCollection.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing bypassDocumentValidation to be omitted or optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(bypassDocumentValidation: Bool? = nil, writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/InsertOneResult.html b/docs/Structs/InsertOneResult.html deleted file mode 100644 index 661bf2a66..000000000 --- a/docs/Structs/InsertOneResult.html +++ /dev/null @@ -1,517 +0,0 @@ - - - - InsertOneResult Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

InsertOneResult

-
-
-
public struct InsertOneResult : Decodable
- -
-
-

The result of an insertOne command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - insertedId - -
    -
    -
    -
    -
    -
    -

    The identifier that was inserted. If the document doesn’t have an identifier, this value -will be generated and added to the document before insertion.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let insertedId: BSON
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ListCollectionsOptions.html b/docs/Structs/ListCollectionsOptions.html deleted file mode 100644 index 13806a448..000000000 --- a/docs/Structs/ListCollectionsOptions.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - ListCollectionsOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ListCollectionsOptions

-
-
-
public struct ListCollectionsOptions : Encodable
- -
-
-

Options to use when executing a listCollections command on a MongoDatabase.

- -
-
-
-
    -
  • -
    - - - - batchSize - -
    -
    -
    -
    -
    -
    -

    The batchSize for the returned cursor.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var batchSize: Int?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(batchSize:) - -
    -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(batchSize: Int? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ListDatabasesOptions.html b/docs/Structs/ListDatabasesOptions.html deleted file mode 100644 index 0a3e14638..000000000 --- a/docs/Structs/ListDatabasesOptions.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - ListDatabasesOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ListDatabasesOptions

-
-
-
public struct ListDatabasesOptions : Encodable
- -
-
-

Options to use when listing available databases.

- -
-
-
-
    -
  • -
    - - - - filter - -
    -
    -
    -
    -
    -
    -

    An optional filter for the returned databases.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var filter: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - nameOnly - -
    -
    -
    -
    -
    -
    -

    Optionally indicate whether only names should be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var nameOnly: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience constructor for basic construction

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(filter: Document? = nil, nameOnly: Bool? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/MaxKey.html b/docs/Structs/MaxKey.html deleted file mode 100644 index 852c7ea00..000000000 --- a/docs/Structs/MaxKey.html +++ /dev/null @@ -1,646 +0,0 @@ - - - - MaxKey Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MaxKey

-
-
-
public struct MaxKey : BSONValue, Equatable, Codable
- -
-
-

A struct to represent the BSON MaxKey type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new MaxKey instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> MaxKey
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/MinKey.html b/docs/Structs/MinKey.html deleted file mode 100644 index f598d15bb..000000000 --- a/docs/Structs/MinKey.html +++ /dev/null @@ -1,646 +0,0 @@ - - - - MinKey Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MinKey

-
-
-
public struct MinKey : BSONValue, Equatable, Codable
- -
-
-

A struct to represent the BSON MinKey type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new MinKey instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> MinKey
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/MongoCollection.html b/docs/Structs/MongoCollection.html deleted file mode 100644 index 12f2b0fc9..000000000 --- a/docs/Structs/MongoCollection.html +++ /dev/null @@ -1,3318 +0,0 @@ - - - - MongoCollection Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoCollection

-
-
-
public struct MongoCollection<T> where T : Decodable, T : Encodable
- -
-
-

A MongoDB collection.

- -
-
-
-
    -
  • -
    - - - - encoder - -
    -
    -
    -
    -
    -
    -

    Encoder used by this collection for BSON conversions. (e.g. converting CollectionTypes, indexes, and options -to documents).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let encoder: BSONEncoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decoder - -
    -
    -
    -
    -
    -
    -

    Decoder used by this collection for BSON conversions (e.g. converting documents to CollectionTypes).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let decoder: BSONDecoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CollectionType - -
    -
    -
    -
    -
    -
    -

    A Codable type associated with this MongoCollection instance. - This allows CollectionType values to be directly inserted into and retrieved from the collection, by - encoding/decoding them using the BSONEncoder and BSONDecoder. The strategies to be used by the encoder and - decoder for certain types can be configured by setting the coding strategies on the options used to create this - collection instance. The default strategies are inherited from those set on the database this collection derived - from.

    - -

    This type association only exists in the context of this particular MongoCollection instance. It is the - responsibility of the user to ensure that any data already stored in the collection was encoded - from this same type and according to the coding strategies set on this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias CollectionType = T
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    The name of this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var name: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    The ReadConcern set on this collection, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    The ReadPreference set on this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readPreference: ReadPreference
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    The WriteConcern set on this collection, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Drops this collection from its parent database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func drop(options: DropCollectionOptions? = nil, session: ClientSession? = nil) throws
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Execute multiple write operations.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if requests is empty.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.bulkWriteError if any error occurs while performing the writes. This includes errors that would -typically be thrown as RuntimeErrors or ServerError.commandErrors elsewhere.
    • -
    • EncodingError if an error occurs while encoding the CollectionType or the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func bulkWrite(
    -    _ requests: [WriteModel<T>],
    -    options: BulkWriteOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> BulkWriteResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - requests - - -
    -

    a [WriteModel] containing the writes to perform.

    -
    -
    - - options - - -
    -

    optional BulkWriteOptions to use while executing the operation.

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a BulkWriteResult, or nil if the write concern is unacknowledged.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a collection. The CollectionType will be associated with the fullDocument - field in ChangeStreamEvents emitted by the returned ChangeStream. The server will return an error if - this method is called on a system collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> ChangeStream<ChangeStreamEvent<CollectionType>>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on a specific collection.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a collection. Associates the specified Codable type T with the fullDocument - field in the ChangeStreamEvents emitted by the returned ChangeStream. The server will return an error - if this method is called on a system collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch<FullDocType: Codable>(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil,
    -    withFullDocumentType _: FullDocType.Type
    -)
    -    throws -> ChangeStream<ChangeStreamEvent<FullDocType>>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    - - withFullDocumentType - - -
    -

    The type that the fullDocument field of the emitted ChangeStreamEvents will be - decoded to.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on a specific collection.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a collection. Associates the specified Codable type T with the returned - ChangeStream. The server will return an error if this method is called on a system collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch<EventType: Codable>(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil,
    -    withEventType _: EventType.Type
    -) throws -> ChangeStream<EventType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    - - withEventType - - -
    -

    The type that the entire change stream response will be decoded to and that will be returned - when iterating through the change stream.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on a specific collection.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds a single document and deletes it, returning the original.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if any of the provided options are invalid.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • ServerError.writeError if an error occurs while executing the command.
    • -
    • DecodingError if the deleted document cannot be decoded to a CollectionType value.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func findOneAndDelete(
    -    _ filter: Document,
    -    options: FindOneAndDeleteOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> CollectionType?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - options - - -
    -

    Optional FindOneAndDeleteOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The deleted document, represented as a CollectionType, or nil if no document was deleted.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds a single document and replaces it, returning either the original or the replaced document.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if any of the provided options are invalid.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • ServerError.writeError if an error occurs while executing the command.
    • -
    • DecodingError if the replaced document cannot be decoded to a CollectionType value.
    • -
    • EncodingError if replacement cannot be encoded to a Document.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func findOneAndReplace(
    -    filter: Document,
    -    replacement: CollectionType,
    -    options: FindOneAndReplaceOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> CollectionType?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - replacement - - -
    -

    a CollectionType to replace the found document

    -
    -
    - - options - - -
    -

    Optional FindOneAndReplaceOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A CollectionType, representing either the original document or its replacement, - depending on selected options, or nil if there was no match.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds a single document and updates it, returning either the original or the updated document.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if any of the provided options are invalid.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • ServerError.writeError if an error occurs while executing the command.
    • -
    • DecodingError if the updated document cannot be decoded to a CollectionType value.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func findOneAndUpdate(
    -    filter: Document,
    -    update: Document,
    -    options: FindOneAndUpdateOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> CollectionType?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - update - - -
    -

    a Document containing updates to apply

    -
    -
    - - options - - -
    -

    Optional FindOneAndUpdateOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A CollectionType representing either the original or updated document, - depending on selected options, or nil if there was no match.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates an index over the collection for the provided keys with the provided options.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the index specification or options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func createIndex(
    -    _ keys: Document,
    -    indexOptions: IndexOptions? = nil,
    -    options: CreateIndexOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> String
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - keys - - -
    -

    a Document specifing the keys for the index

    -
    -
    - - indexOptions - - -
    -

    Optional IndexOptions to use for the index

    -
    -
    - - options - - -
    -

    Optional CreateIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The name of the created index.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates an index over the collection for the provided keys with the provided options.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the index specification or options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func createIndex(
    -    _ model: IndexModel,
    -    options: CreateIndexOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> String
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - model - - -
    -

    An IndexModel representing the keys and options for the index

    -
    -
    - - options - - -
    -

    Optional CreateIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The name of the created index.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates multiple indexes in the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the index specifications or options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func createIndexes(
    -    _ models: [IndexModel],
    -    options: CreateIndexOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> [String]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - models - - -
    -

    An [IndexModel] specifying the indexes to create

    -
    -
    - - options - - -
    -

    Optional CreateIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    An [String] containing the names of all the indexes that were created.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Drops a single index from the collection by the index name.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndex(
    -    _ name: String,
    -    options: DropIndexOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - name - - -
    -

    The name of the index to drop

    -
    -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Attempts to drop a single index from the collection given the keys describing it.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndex(
    -    _ keys: Document,
    -    options: DropIndexOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - keys - - -
    -

    a Document containing the keys for the index to drop

    -
    -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server’s response to the command.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Attempts to drop a single index from the collection given an IndexModel describing it.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndex(
    -    _ model: IndexModel,
    -    options: DropIndexOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - model - - -
    -

    An IndexModel describing the index to drop

    -
    -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server’s response to the command.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Drops all indexes in the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndexes(options: DropIndexOptions? = nil, session: ClientSession? = nil) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server’s response to the command.

    -
    -
    -
    -
  • -
  • -
    - - - - listIndexes(session:) - -
    -
    -
    -
    -
    -
    -

    Retrieves a list of the indexes currently on this collection.

    -
    -

    Throws

    -

    UserError.logicError if the provided session is inactive.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listIndexes(session: ClientSession? = nil) throws -> MongoCursor<IndexModel>
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the IndexModels.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Retrieves a list of names of the indexes currently on this collection.

    -
    -

    Throws

    -

    UserError.logicError if the provided session is inactive.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listIndexNames(session: ClientSession? = nil) throws -> [String]
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the index names.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds the documents in this collection which match the provided filter.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func find(
    -    _ filter: Document = [:],
    -    options: FindOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> MongoCursor<CollectionType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document that should match the query

    -
    -
    - - options - - -
    -

    Optional FindOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the resulting Documents

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Runs an aggregation framework pipeline against this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func aggregate(
    -    _ pipeline: [Document],
    -    options: AggregateOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> MongoCursor<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    an [Document] containing the pipeline of aggregation operations to perform

    -
    -
    - - options - - -
    -

    Optional AggregateOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the resulting Documents

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Counts the number of documents in this collection matching the provided filter. Note that an empty filter will - force a scan of the entire collection. For a fast count of the total documents in a collection see - estimatedDocumentCount.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func countDocuments(
    -    _ filter: Document = [:],
    -    options: CountDocumentsOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> Int
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    a Document, the filter that documents must match in order to be counted

    -
    -
    - - options - - -
    -

    Optional CountDocumentsOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The count of the documents that matched the filter

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Gets an estimate of the count of documents in this collection using collection metadata.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func estimatedDocumentCount(
    -    options: EstimatedDocumentCountOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> Int
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - options - - -
    -

    Optional EstimatedDocumentCountOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    an estimate of the count of documents in this collection

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds the distinct values for a specified field across the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func distinct(
    -    fieldName: String,
    -    filter: Document = [:],
    -    options: DistinctOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> [BSON]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - fieldName - - -
    -

    The field for which the distinct values will be found

    -
    -
    - - filter - - -
    -

    a Document representing the filter documents must match in order to be considered for the operation

    -
    -
    - - options - - -
    -

    Optional DistinctOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A [BSONValue] containing the distinct values for the specified criteria

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Encodes the provided value to BSON and inserts it. If the value is missing an identifier, one will be - generated for it.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the CollectionType to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func insertOne(
    -    _ value: CollectionType,
    -    options: InsertOneOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> InsertOneResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - value - - -
    -

    A CollectionType value to encode and insert

    -
    -
    - - options - - -
    -

    Optional InsertOneOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to perform the insert. If the WriteConcern - is unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Encodes the provided values to BSON and inserts them. If any values are - missing identifiers, the driver will generate them.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.bulkWriteError if an error occurs while performing any of the writes.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the CollectionType or options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func insertMany(
    -    _ values: [CollectionType],
    -    options: InsertManyOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> InsertManyResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - values - - -
    -

    The CollectionType values to insert

    -
    -
    - - options - - -
    -

    optional InsertManyOptions to use while executing the operation

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    an InsertManyResult, or nil if the write concern is unacknowledged.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Replaces a single document matching the provided filter in this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the CollectionType or options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func replaceOne(
    -    filter: Document,
    -    replacement: CollectionType,
    -    options: ReplaceOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> UpdateResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - replacement - - -
    -

    The replacement value, a CollectionType value to be encoded and inserted

    -
    -
    - - options - - -
    -

    Optional ReplaceOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to replace a document. If the WriteConcern - is unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Updates a single document matching the provided filter in this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func updateOne(
    -    filter: Document,
    -    update: Document,
    -    options: UpdateOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> UpdateResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - update - - -
    -

    A Document representing the update to be applied to a matching document

    -
    -
    - - options - - -
    -

    Optional UpdateOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to update a document. If the WriteConcern is - unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Updates multiple documents matching the provided filter in this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func updateMany(
    -    filter: Document,
    -    update: Document,
    -    options: UpdateOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> UpdateResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - update - - -
    -

    A Document representing the update to be applied to matching documents

    -
    -
    - - options - - -
    -

    Optional UpdateOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to update multiple documents. If the write - concern is unacknowledged, nil is returned

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Deletes a single matching document from the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func deleteOne(
    -    _ filter: Document,
    -    options: DeleteOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> DeleteResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - options - - -
    -

    Optional DeleteOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of performing the deletion. If the WriteConcern is - unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Deletes multiple documents

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func deleteMany(
    -    _ filter: Document,
    -    options: DeleteOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> DeleteResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - options - - -
    -

    Optional DeleteOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of performing the deletion. If the WriteConcern is - unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/MongoDatabase.html b/docs/Structs/MongoDatabase.html deleted file mode 100644 index 018ee03ca..000000000 --- a/docs/Structs/MongoDatabase.html +++ /dev/null @@ -1,1707 +0,0 @@ - - - - MongoDatabase Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoDatabase

-
-
-
public struct MongoDatabase
- -
-
-

A MongoDB Database.

- -
-
-
-
    -
  • -
    - - - - encoder - -
    -
    -
    -
    -
    -
    -

    Encoder used by this database for BSON conversions. This encoder’s options are inherited by collections derived -from this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let encoder: BSONEncoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decoder - -
    -
    -
    -
    -
    -
    -

    Decoder whose options are inherited by collections derived from this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let decoder: BSONDecoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    The name of this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var name: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    The ReadConcern set on this database, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    The ReadPreference set on this database

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readPreference: ReadPreference
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    The WriteConcern set on this database, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Drops this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func drop(options: DropDatabaseOptions? = nil, session: ClientSession? = nil) throws
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Access a collection within this database. If an option is not specified in the CollectionOptions param, the - collection will inherit the value from the parent database or the default if the db’s option is not set. - To override an option inherited from the db (e.g. a read concern) with the default value, it must be explicitly - specified in the options param (e.g. ReadConcern(), not nil).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func collection(_ name: String, options: CollectionOptions? = nil) -> MongoCollection<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    the name of the collection to get

    -
    -
    - - options - - -
    -

    options to set on the returned collection

    -
    -
    -
    -
    -

    Return Value

    -

    the requested MongoCollection<Document>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Access a collection within this database, and associates the specified Codable type T with the - returned MongoCollection. This association only exists in the context of this particular - MongoCollection instance. If an option is not specified in the CollectionOptions param, the - collection will inherit the value from the parent database or the default if the db’s option is not set. - To override an option inherited from the db (e.g. a read concern) with the default value, it must be explicitly - specified in the options param (e.g. ReadConcern(), not nil).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func collection<T: Codable>(
    -    _ name: String,
    -    withType _: T.Type,
    -    options: CollectionOptions? = nil
    -) -> MongoCollection<T>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    the name of the collection to get

    -
    -
    - - options - - -
    -

    options to set on the returned collection

    -
    -
    -
    -
    -

    Return Value

    -

    the requested MongoCollection<T>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates a collection in this database with the specified options.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func createCollection(
    -    _ name: String,
    -    options: CreateCollectionOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> MongoCollection<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - name - - -
    -

    a String, the name of the collection to create

    -
    -
    - - options - - -
    -

    Optional CreateCollectionOptions to use for the collection

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    the newly created MongoCollection<Document>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates a collection in this database with the specified options, and associates the - specified Codable type T with the returned MongoCollection. This association only - exists in the context of this particular MongoCollection instance.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func createCollection<T: Codable>(
    -    _ name: String,
    -    withType type: T.Type,
    -    options: CreateCollectionOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> MongoCollection<T>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - name - - -
    -

    a String, the name of the collection to create

    -
    -
    - - options - - -
    -

    Optional CreateCollectionOptions to use for the collection

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    the newly created MongoCollection<T>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Lists all the collections in this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • userError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listCollections(
    -    _ filter: Document? = nil,
    -    options: ListCollectionsOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> MongoCursor<CollectionSpecification>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    a Document, optional criteria to filter results by

    -
    -
    - - options - - -
    -

    Optional ListCollectionsOptions to use when executing this command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a MongoCursor over an array of CollectionSpecifications

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Gets a list of MongoCollections in this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • userError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listMongoCollections(
    -    _ filter: Document? = nil,
    -    options: ListCollectionsOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> [MongoCollection<Document>]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    a Document, optional criteria to filter results by

    -
    -
    - - options - - -
    -

    Optional ListCollectionsOptions to use when executing this command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    An array of MongoCollections that match the provided filter.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Gets a list of names of collections in this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • userError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listCollectionNames(
    -    _ filter: Document? = nil,
    -    options: ListCollectionsOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> [String]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    a Document, optional criteria to filter results by

    -
    -
    - - options - - -
    -

    Optional ListCollectionsOptions to use when executing this command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A [String] containing names of collections that match the provided filter.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Issues a MongoDB command against this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if requests is empty.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.writeError if any error occurs while the command was performing a write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from being performed.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func runCommand(
    -    _ command: Document,
    -    options: RunCommandOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - command - - -
    -

    a Document containing the command to issue against the database

    -
    -
    - - options - - -
    -

    Optional RunCommandOptions to use when executing this command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server response for the command

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a database. Excludes system collections.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    -

    Note

    -

    Supported in MongoDB version 4.0+ only.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> ChangeStream<ChangeStreamEvent<Document>>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on all collections in a database.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a database. Excludes system collections. - Associates the specified Codable type T with the fullDocument field in the ChangeStreamEvents emitted - by the returned ChangeStream.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    -

    Note

    -

    Supported in MongoDB version 4.0+ only.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch<FullDocType: Codable>(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil,
    -    withFullDocumentType _: FullDocType.Type
    -)
    -    throws -> ChangeStream<ChangeStreamEvent<FullDocType>>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    - - withFullDocumentType - - -
    -

    The type that the fullDocument field of the emitted ChangeStreamEvents will be - decoded to.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on all collections in a database.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a database. Excludes system collections. - Associates the specified Codable type T with the returned ChangeStream.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    -

    Note

    -

    Supported in MongoDB version 4.0+ only.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch<EventType: Codable>(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil,
    -    withEventType _: EventType.Type
    -) throws -> ChangeStream<EventType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the ChangeStream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    - - withEventType - - -
    -

    The type that the entire change stream response will be decoded to and that will be returned - when iterating through the change stream.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on all collections in a database.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/MongoNamespace.html b/docs/Structs/MongoNamespace.html deleted file mode 100644 index 8fba10a45..000000000 --- a/docs/Structs/MongoNamespace.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - MongoNamespace Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoNamespace

-
-
-
public struct MongoNamespace : Codable, Equatable
-
extension MongoNamespace: CustomStringConvertible
- -
-
-

Represents a MongoDB namespace for a database or collection.

- -
-
-
-
    -
  • -
    - - - - db - -
    -
    -
    -
    -
    -
    -

    The database name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let db: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collection - -
    -
    -
    -
    -
    -
    -

    The collection name if this is a collection’s namespace, or nil otherwise.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let collection: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ObjectId.html b/docs/Structs/ObjectId.html deleted file mode 100644 index 583936dbb..000000000 --- a/docs/Structs/ObjectId.html +++ /dev/null @@ -1,733 +0,0 @@ - - - - ObjectId Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ObjectId

-
-
-
public struct ObjectId : BSONValue, Equatable, CustomStringConvertible, Codable
-
extension ObjectId: Hashable
- -
-
-

A struct to represent the BSON ObjectId type.

- -
-
-
-
    -
  • -
    - - - - hex - -
    -
    -
    -
    -
    -
    -

    This ObjectId‘s data represented as a String.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hex: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - timestamp - -
    -
    -
    -
    -
    -
    -

    The timestamp used to create this ObjectId

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var timestamp: UInt32 { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new ObjectId.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes an ObjectId from the provided hex String. Returns nil if the string is not a valid ObjectId.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?(_ hex: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: ObjectId, rhs: ObjectId) -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hash(into:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hash(into hasher: inout Hasher)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ReadConcern.html b/docs/Structs/ReadConcern.html deleted file mode 100644 index bf53c6c57..000000000 --- a/docs/Structs/ReadConcern.html +++ /dev/null @@ -1,708 +0,0 @@ - - - - ReadConcern Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReadConcern

-
-
-
public struct ReadConcern : Codable
-
extension ReadConcern: CustomStringConvertible
-
extension ReadConcern: Equatable
- -
-
-

A struct to represent a MongoDB read concern.

- -
-
-
-
    -
  • -
    - - - - Level - -
    -
    -
    -
    -
    -
    -

    An enumeration of possible ReadConcern levels.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum Level : RawRepresentable, Codable, Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - level - -
    -
    -
    -
    -
    -
    -

    The level of this ReadConcern, or nil if the level is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var level: ReadConcern.Level?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isDefault - -
    -
    -
    -
    -
    -
    -

    Indicates whether this ReadConcern is the server default.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isDefault: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new ReadConcern with a Level.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ level: Level)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new ReadConcern from a String corresponding to a read concern level.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ level: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initialize a new empty ReadConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Returns the relaxed extended JSON representation of this ReadConcern. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: ReadConcern, rhs: ReadConcern) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ReadConcern/Level.html b/docs/Structs/ReadConcern/Level.html deleted file mode 100644 index 06d1bc902..000000000 --- a/docs/Structs/ReadConcern/Level.html +++ /dev/null @@ -1,705 +0,0 @@ - - - - Level Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Level

-
-
-
public enum Level : RawRepresentable, Codable, Equatable
- -
-
-

An enumeration of possible ReadConcern levels.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/Structs/RegularExpression.html b/docs/Structs/RegularExpression.html deleted file mode 100644 index 5bbcaff2d..000000000 --- a/docs/Structs/RegularExpression.html +++ /dev/null @@ -1,654 +0,0 @@ - - - - RegularExpression Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

RegularExpression

-
-
-
public struct RegularExpression : BSONValue, Equatable, Codable, Hashable
- -
-
-

A struct to represent a BSON regular expression.

- -
-
-
-
    -
  • -
    - - - - pattern - -
    -
    -
    -
    -
    -
    -

    The pattern for this regular expression.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let pattern: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - options - -
    -
    -
    -
    -
    -
    -

    A string containing options for this regular expression.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let options: String
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializes a new RegularExpression with the provided pattern and options.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(pattern: String, options: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new RegularExpression with the pattern and options of the provided NSRegularExpression.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from regex: NSRegularExpression)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ReplaceOneModelOptions.html b/docs/Structs/ReplaceOneModelOptions.html deleted file mode 100644 index 18cfea564..000000000 --- a/docs/Structs/ReplaceOneModelOptions.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - ReplaceOneModelOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReplaceOneModelOptions

-
-
-
public struct ReplaceOneModelOptions : Codable
- -
-
-

Options to use with a WriteModel.replaceOne.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    The collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializer allowing any/all options to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(collation: Document? = nil, upsert: Bool? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ReplaceOptions.html b/docs/Structs/ReplaceOptions.html deleted file mode 100644 index b0363c9eb..000000000 --- a/docs/Structs/ReplaceOptions.html +++ /dev/null @@ -1,629 +0,0 @@ - - - - ReplaceOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReplaceOptions

-
-
-
public struct ReplaceOptions : Codable, BulkWriteOptionsConvertible
- -
-
-

Options to use when executing a replace command on a MongoCollection.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    bypassDocumentValidation: Bool? = nil,
    -    collation: Document? = nil,
    -    upsert: Bool? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ResumeToken.html b/docs/Structs/ResumeToken.html deleted file mode 100644 index e519e3a5f..000000000 --- a/docs/Structs/ResumeToken.html +++ /dev/null @@ -1,547 +0,0 @@ - - - - ResumeToken Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ResumeToken

-
-
-
public struct ResumeToken : Codable, Equatable
- -
-
-

A token used for manually resuming a change stream. Pass this to the resumeAfter field of -ChangeStreamOptions to resume or start a change stream where a previous one left off.

- - -
-
-
-
    -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/RunCommandOptions.html b/docs/Structs/RunCommandOptions.html deleted file mode 100644 index 61aa479e9..000000000 --- a/docs/Structs/RunCommandOptions.html +++ /dev/null @@ -1,604 +0,0 @@ - - - - RunCommandOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

RunCommandOptions

-
-
-
public struct RunCommandOptions : Encodable
- -
-
-

Options to use when running a command against a MongoDatabase.

- -
-
-
-
    -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    An optional ReadConcern to use for this operation. This option should only be used when executing a command -that reads.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    An optional ReadPreference to use for this operation. This option should only be used when executing a -command that reads.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for this operation. This option should only be used when executing a command -that writes.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ServerClosedEvent.html b/docs/Structs/ServerClosedEvent.html deleted file mode 100644 index c42ece11e..000000000 --- a/docs/Structs/ServerClosedEvent.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - ServerClosedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerClosedEvent

-
-
-
public struct ServerClosedEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when a server is closed.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection ID (host/port pair) of the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - topologyId - -
    -
    -
    -
    -
    -
    -

    A unique identifier for the topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let topologyId: ObjectId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ServerDescription.html b/docs/Structs/ServerDescription.html deleted file mode 100644 index 796ab7c60..000000000 --- a/docs/Structs/ServerDescription.html +++ /dev/null @@ -1,1061 +0,0 @@ - - - - ServerDescription Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerDescription

-
-
-
public struct ServerDescription
-
extension ServerDescription: Equatable
- -
-
-

A struct describing a mongod or mongos process.

- -
-
-
-
    -
  • -
    - - - - ServerType - -
    -
    -
    -
    -
    -
    -

    The possible types for a server.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum ServerType : String, Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The hostname or IP and the port number that the client connects to. Note that this is not the -server’s ismaster.me field, in the case that the server reports an address different from the -address the client uses.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - error - -
    -
    -
    -
    -
    -
    -

    The last error related to this server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let error: MongoError?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - roundTripTime - -
    -
    -
    -
    -
    -
    -

    The duration of the server’s last ismaster call.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var roundTripTime: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - lastWriteDate - -
    -
    -
    -
    -
    -
    -

    The “lastWriteDate” from the server’s most recent ismaster response.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var lastWriteDate: Date?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - opTime - -
    -
    -
    -
    -
    -
    -

    The last opTime reported by the server. Only mongos and shard servers -record this field when monitoring config servers as replica sets.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var opTime: ObjectId?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - type - -
    -
    -
    -
    -
    -
    -

    The type of this server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var type: ServerDescription.ServerType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - minWireVersion - -
    -
    -
    -
    -
    -
    -

    The minimum wire protocol version supported by the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var minWireVersion: Int32
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxWireVersion - -
    -
    -
    -
    -
    -
    -

    The maximum wire protocol version supported by the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxWireVersion: Int32
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - me - -
    -
    -
    -
    -
    -
    -

    The hostname or IP and the port number that this server was configured with in the replica set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var me: ConnectionId?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hosts - -
    -
    -
    -
    -
    -
    -

    This server’s opinion of the replica set’s hosts, if any.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hosts: [ConnectionId]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - arbiters - -
    -
    -
    -
    -
    -
    -

    This server’s opinion of the replica set’s arbiters, if any.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var arbiters: [ConnectionId]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - passives - -
    -
    -
    -
    -
    -
    -

    “Passives” are priority-zero replica set members that cannot become primary. -The client treats them precisely the same as other members.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var passives: [ConnectionId]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - tags - -
    -
    -
    -
    -
    -
    -

    Tags for this server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var tags: [String : String]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - setName - -
    -
    -
    -
    -
    -
    -

    The replica set name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var setName: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - setVersion - -
    -
    -
    -
    -
    -
    -

    The replica set version.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var setVersion: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - electionId - -
    -
    -
    -
    -
    -
    -

    The election ID where this server was elected, if this is a replica set member that believes it is primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var electionId: ObjectId?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - primary - -
    -
    -
    -
    -
    -
    -

    This server’s opinion of who the primary is.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var primary: ConnectionId?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - lastUpdateTime - -
    -
    -
    -
    -
    -
    -

    When this server was last checked.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let lastUpdateTime: Date?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    The logicalSessionTimeoutMinutes value for this server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var logicalSessionTimeoutMinutes: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: ServerDescription, rhs: ServerDescription) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ServerDescription/ServerType.html b/docs/Structs/ServerDescription/ServerType.html deleted file mode 100644 index a123da43e..000000000 --- a/docs/Structs/ServerDescription/ServerType.html +++ /dev/null @@ -1,732 +0,0 @@ - - - - ServerType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerType

-
-
-
public enum ServerType : String, Equatable
- -
-
-

The possible types for a server.

- -
-
-
-
    -
  • -
    - - - - standalone - -
    -
    -
    -
    -
    -
    -

    A standalone mongod server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case standalone = "Standalone"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - mongos - -
    -
    -
    -
    -
    -
    -

    A router to a sharded cluster, i.e. a mongos server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case mongos = "Mongos"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - possiblePrimary - -
    -
    -
    -
    -
    -
    -

    A replica set member which is not yet checked, but another member thinks it is the primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case possiblePrimary = "PossiblePrimary"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rsPrimary - -
    -
    -
    -
    -
    -
    -

    A replica set primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case rsPrimary = "RSPrimary"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rsSecondary - -
    -
    -
    -
    -
    -
    -

    A replica set secondary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case rsSecondary = "RSSecondary"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rsArbiter - -
    -
    -
    -
    -
    -
    -

    A replica set arbiter.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case rsArbiter = "RSArbiter"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rsOther - -
    -
    -
    -
    -
    -
    -

    A replica set member that is none of the other types (a passive, for example).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case rsOther = "RSOther"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rsGhost - -
    -
    -
    -
    -
    -
    -

    A replica set member that does not report a set name or a hosts list.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case rsGhost = "RSGhost"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - unknown - -
    -
    -
    -
    -
    -
    -

    A server type that is not yet known.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case unknown = "Unknown"
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ServerDescriptionChangedEvent.html b/docs/Structs/ServerDescriptionChangedEvent.html deleted file mode 100644 index 955d12f52..000000000 --- a/docs/Structs/ServerDescriptionChangedEvent.html +++ /dev/null @@ -1,624 +0,0 @@ - - - - ServerDescriptionChangedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerDescriptionChangedEvent

-
-
-
public struct ServerDescriptionChangedEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when a server description changes. This does NOT include changes to the server’s roundTripTime property.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection ID (host/port pair) of the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - topologyId - -
    -
    -
    -
    -
    -
    -

    A unique identifier for the topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let topologyId: ObjectId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - previousDescription - -
    -
    -
    -
    -
    -
    -

    The previous server description.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let previousDescription: ServerDescription
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - newDescription - -
    -
    -
    -
    -
    -
    -

    The new server description.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let newDescription: ServerDescription
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ServerHeartbeatFailedEvent.html b/docs/Structs/ServerHeartbeatFailedEvent.html deleted file mode 100644 index 999747751..000000000 --- a/docs/Structs/ServerHeartbeatFailedEvent.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - ServerHeartbeatFailedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerHeartbeatFailedEvent

-
-
-
public struct ServerHeartbeatFailedEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when the server monitor’s ismaster fails, either with an “ok: 0” or a socket exception.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - duration - -
    -
    -
    -
    -
    -
    -

    The execution time of the event, in microseconds.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let duration: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - failure - -
    -
    -
    -
    -
    -
    -

    The failure.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let failure: MongoError
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection ID (host/port pair) of the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ServerHeartbeatStartedEvent.html b/docs/Structs/ServerHeartbeatStartedEvent.html deleted file mode 100644 index 80a0b1dd2..000000000 --- a/docs/Structs/ServerHeartbeatStartedEvent.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - ServerHeartbeatStartedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerHeartbeatStartedEvent

-
-
-
public struct ServerHeartbeatStartedEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when the server monitor’s ismaster command is started - immediately before -the ismaster command is serialized into raw BSON and written to the socket.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection ID (host/port pair) of the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ServerHeartbeatSucceededEvent.html b/docs/Structs/ServerHeartbeatSucceededEvent.html deleted file mode 100644 index 2c69d57f5..000000000 --- a/docs/Structs/ServerHeartbeatSucceededEvent.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - ServerHeartbeatSucceededEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerHeartbeatSucceededEvent

-
-
-
public struct ServerHeartbeatSucceededEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when the server monitor’s ismaster succeeds.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - duration - -
    -
    -
    -
    -
    -
    -

    The execution time of the event, in microseconds.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let duration: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - reply - -
    -
    -
    -
    -
    -
    -

    The command reply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let reply: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection ID (host/port pair) of the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/ServerOpeningEvent.html b/docs/Structs/ServerOpeningEvent.html deleted file mode 100644 index 898687ef8..000000000 --- a/docs/Structs/ServerOpeningEvent.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - ServerOpeningEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerOpeningEvent

-
-
-
public struct ServerOpeningEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when a server is initialized.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection ID (host/port pair) of the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - topologyId - -
    -
    -
    -
    -
    -
    -

    A unique identifier for the topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let topologyId: ObjectId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/Symbol.html b/docs/Structs/Symbol.html deleted file mode 100644 index 13020bbfb..000000000 --- a/docs/Structs/Symbol.html +++ /dev/null @@ -1,595 +0,0 @@ - - - - Symbol Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Symbol

-
-
-
public struct Symbol : BSONValue, CustomStringConvertible, Codable, Equatable, Hashable
- -
-
-

A struct to represent the deprecated Symbol type. -Symbols cannot be instantiated, but they can be read from existing documents that contain them.

- -
-
-
-
    -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - stringValue - -
    -
    -
    -
    -
    -
    -

    String representation of this Symbol.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let stringValue: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/TLSOptions.html b/docs/Structs/TLSOptions.html deleted file mode 100644 index 72030fc51..000000000 --- a/docs/Structs/TLSOptions.html +++ /dev/null @@ -1,657 +0,0 @@ - - - - TLSOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

TLSOptions

-
-
-
public struct TLSOptions
- -
-
-

Options used to configure TLS/SSL connections to the database.

- -
-
-
-
    -
  • -
    - - - - allowInvalidHostnames - -
    -
    -
    -
    -
    -
    -

    Indicates whether invalid hostnames are allowed. By default this is set to false.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var allowInvalidHostnames: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - caFile - -
    -
    -
    -
    -
    -
    -

    Specifies the path to the certificate authority file.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var caFile: URL?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - pemFile - -
    -
    -
    -
    -
    -
    -

    Specifies the path to the client certificate key file.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var pemFile: URL?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - pemPassword - -
    -
    -
    -
    -
    -
    -

    Specifies the client certificate key password.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var pemPassword: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - weakCertValidation - -
    -
    -
    -
    -
    -
    -

    Indicates whether invalid certificates are allowed. By default this is set to false.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var weakCertValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all arguments to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    allowInvalidHostnames: Bool? = nil,
    -    caFile: URL? = nil,
    -    pemFile: URL? = nil,
    -    pemPassword: String? = nil,
    -    weakCertValidation: Bool? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/Timestamp.html b/docs/Structs/Timestamp.html deleted file mode 100644 index 6d792807a..000000000 --- a/docs/Structs/Timestamp.html +++ /dev/null @@ -1,650 +0,0 @@ - - - - Timestamp Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Timestamp

-
-
-
public struct Timestamp : BSONValue, Equatable, Codable, Hashable
- -
-
-

A struct to represent the BSON Timestamp type.

- -
-
-
-
    -
  • -
    - - - - timestamp - -
    -
    -
    -
    -
    -
    -

    A timestamp representing seconds since the Unix epoch.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let timestamp: UInt32
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - increment - -
    -
    -
    -
    -
    -
    -

    An incrementing ordinal for operations within a given second.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let increment: UInt32
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(timestamp:inc:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new Timestamp with the provided timestamp and increment values.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(timestamp: UInt32, inc: UInt32)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(timestamp:inc:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new Timestamp with the provided timestamp and increment values. Assumes -the values can successfully be converted to UInt32s without loss of precision.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(timestamp: Int, inc: Int)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/TopologyClosedEvent.html b/docs/Structs/TopologyClosedEvent.html deleted file mode 100644 index 6305a9d7d..000000000 --- a/docs/Structs/TopologyClosedEvent.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - TopologyClosedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

TopologyClosedEvent

-
-
-
public struct TopologyClosedEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when a topology is closed.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - topologyId - -
    -
    -
    -
    -
    -
    -

    A unique identifier for the topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let topologyId: ObjectId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/TopologyDescription.html b/docs/Structs/TopologyDescription.html deleted file mode 100644 index da1629861..000000000 --- a/docs/Structs/TopologyDescription.html +++ /dev/null @@ -1,817 +0,0 @@ - - - - TopologyDescription Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

TopologyDescription

-
-
-
public struct TopologyDescription
-
extension TopologyDescription: Equatable
- -
-
-

A struct describing the state of a MongoDB deployment: its type (standalone, replica set, or sharded), -which servers are up, what type of servers they are, which is primary, and so on.

- -
-
-
-
    -
  • -
    - - - - TopologyType - -
    -
    -
    -
    -
    -
    -

    The possible types for a topology.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum TopologyType : String, Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - type - -
    -
    -
    -
    -
    -
    -

    The type of this topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let type: TopologyType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - setName - -
    -
    -
    -
    -
    -
    -

    The replica set name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var setName: String? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxSetVersion - -
    -
    -
    -
    -
    -
    -

    The largest setVersion ever reported by a primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxSetVersion: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxElectionId - -
    -
    -
    -
    -
    -
    -

    The largest electionId ever reported by a primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxElectionId: ObjectId?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - servers - -
    -
    -
    -
    -
    -
    -

    The servers comprising this topology. By default, no servers.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var servers: [ServerDescription]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - stale - -
    -
    -
    -
    -
    -
    -

    For single-threaded clients, indicates whether the topology must be re-scanned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let stale: Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - compatibilityError - -
    -
    -
    -
    -
    -
    -

    Exists if any server’s wire protocol version range is incompatible with the client’s.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let compatibilityError: MongoError?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    The logicalSessionTimeoutMinutes value for this topology. This value is the minimum -of the logicalSessionTimeoutMinutes values across all the servers in servers, -or nil if any of them are nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var logicalSessionTimeoutMinutes: Int64? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hasReadableServer() - -
    -
    -
    -
    -
    -
    -

    Returns true if the topology has a readable server available, and false otherwise.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hasReadableServer() -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hasWritableServer() - -
    -
    -
    -
    -
    -
    -

    Returns true if the topology has a writable server available, and false otherwise.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hasWritableServer() -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: TopologyDescription, rhs: TopologyDescription) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/TopologyDescription/TopologyType.html b/docs/Structs/TopologyDescription/TopologyType.html deleted file mode 100644 index 6c27eb976..000000000 --- a/docs/Structs/TopologyDescription/TopologyType.html +++ /dev/null @@ -1,624 +0,0 @@ - - - - TopologyType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

TopologyType

-
-
-
public enum TopologyType : String, Equatable
- -
-
-

The possible types for a topology.

- -
-
-
-
    -
  • -
    - - - - single - -
    -
    -
    -
    -
    -
    -

    A single mongod server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case single = "Single"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - replicaSetNoPrimary - -
    -
    -
    -
    -
    -
    -

    A replica set with no primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case replicaSetNoPrimary = "ReplicaSetNoPrimary"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - replicaSetWithPrimary - -
    -
    -
    -
    -
    -
    -

    A replica set with a primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case replicaSetWithPrimary = "ReplicaSetWithPrimary"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sharded - -
    -
    -
    -
    -
    -
    -

    Sharded topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case sharded = "Sharded"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - unknown - -
    -
    -
    -
    -
    -
    -

    A topology whose type is not yet known.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case unknown = "Unknown"
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/TopologyDescriptionChangedEvent.html b/docs/Structs/TopologyDescriptionChangedEvent.html deleted file mode 100644 index 264a6ed43..000000000 --- a/docs/Structs/TopologyDescriptionChangedEvent.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - TopologyDescriptionChangedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

TopologyDescriptionChangedEvent

-
-
-
public struct TopologyDescriptionChangedEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when a topology description changes.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - topologyId - -
    -
    -
    -
    -
    -
    -

    A unique identifier for the topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let topologyId: ObjectId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - previousDescription - -
    -
    -
    -
    -
    -
    -

    The old topology description.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let previousDescription: TopologyDescription
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - newDescription - -
    -
    -
    -
    -
    -
    -

    The new topology description.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let newDescription: TopologyDescription
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/TopologyOpeningEvent.html b/docs/Structs/TopologyOpeningEvent.html deleted file mode 100644 index 9c6a0df61..000000000 --- a/docs/Structs/TopologyOpeningEvent.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - TopologyOpeningEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

TopologyOpeningEvent

-
-
-
public struct TopologyOpeningEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when a topology is initialized.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - topologyId - -
    -
    -
    -
    -
    -
    -

    A unique identifier for the topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let topologyId: ObjectId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/UpdateDescription.html b/docs/Structs/UpdateDescription.html deleted file mode 100644 index b5cebd61e..000000000 --- a/docs/Structs/UpdateDescription.html +++ /dev/null @@ -1,545 +0,0 @@ - - - - UpdateDescription Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UpdateDescription

-
-
-
public struct UpdateDescription : Codable
- -
-
-

An UpdateDescription containing fields that will be present in the change stream document for -operations of type update.

- -
-
-
-
    -
  • -
    - - - - updatedFields - -
    -
    -
    -
    -
    -
    -

    A document containing key:value pairs of names of the fields that were changed, and the new -value for those fields.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let updatedFields: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - removedFields - -
    -
    -
    -
    -
    -
    -

    An array of field names that were removed from the document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let removedFields: [String]
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/UpdateModelOptions.html b/docs/Structs/UpdateModelOptions.html deleted file mode 100644 index d36e9fb6d..000000000 --- a/docs/Structs/UpdateModelOptions.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - UpdateModelOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UpdateModelOptions

-
-
-
public struct UpdateModelOptions : Codable
- -
-
-

Options to use with a WriteModel.updateOne or WriteModel.updateMany.

- -
-
-
-
    -
  • -
    - - - - arrayFilters - -
    -
    -
    -
    -
    -
    -

    A set of filters specifying to which array elements an update should apply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var arrayFilters: [Document]?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    The collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializer allowing any/all options to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(arrayFilters: [Document]? = nil, collation: Document? = nil, upsert: Bool? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/UpdateOptions.html b/docs/Structs/UpdateOptions.html deleted file mode 100644 index c1cc2167e..000000000 --- a/docs/Structs/UpdateOptions.html +++ /dev/null @@ -1,657 +0,0 @@ - - - - UpdateOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UpdateOptions

-
-
-
public struct UpdateOptions : Codable, BulkWriteOptionsConvertible
- -
-
-

Options to use when executing an update command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - arrayFilters - -
    -
    -
    -
    -
    -
    -

    A set of filters specifying to which array elements an update should apply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var arrayFilters: [Document]?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    arrayFilters: [Document]? = nil,
    -    bypassDocumentValidation: Bool? = nil,
    -    collation: Document? = nil,
    -    upsert: Bool? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/UpdateResult.html b/docs/Structs/UpdateResult.html deleted file mode 100644 index 448218886..000000000 --- a/docs/Structs/UpdateResult.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - UpdateResult Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UpdateResult

-
-
-
public struct UpdateResult : Decodable
- -
-
-

The result of an update operation on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - matchedCount - -
    -
    -
    -
    -
    -
    -

    The number of documents that matched the filter.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let matchedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - modifiedCount - -
    -
    -
    -
    -
    -
    -

    The number of documents that were modified.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let modifiedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsertedId - -
    -
    -
    -
    -
    -
    -

    The identifier of the inserted document if an upsert took place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsertedId: BSON?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsertedCount - -
    -
    -
    -
    -
    -
    -

    The number of documents that were upserted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsertedCount: Int
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/WriteConcern.html b/docs/Structs/WriteConcern.html deleted file mode 100644 index 93645a70f..000000000 --- a/docs/Structs/WriteConcern.html +++ /dev/null @@ -1,770 +0,0 @@ - - - - WriteConcern Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

WriteConcern

-
-
-
public struct WriteConcern : Codable
-
extension WriteConcern: CustomStringConvertible
-
extension WriteConcern: Equatable
- -
-
-

A class to represent a MongoDB write concern.

- -
-
-
-
    -
  • -
    - - - - W - -
    -
    -
    -
    -
    -
    -

    An option to request acknowledgement that the write operation has propagated to specified mongod instances.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum W : Codable, Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - w - -
    -
    -
    -
    -
    -
    -

    Indicates the W value for this WriteConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let w: W?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - journal - -
    -
    -
    -
    -
    -
    -

    Indicates whether to wait for the write operation to get committed to the journal.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let journal: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - wtimeoutMS - -
    -
    -
    -
    -
    -
    -

    If the write concern is not satisfied within this timeout (in milliseconds), -the operation will return an error. The value MUST be greater than or equal to 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let wtimeoutMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isAcknowledged - -
    -
    -
    -
    -
    -
    -

    Indicates whether this is an acknowledged write concern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isAcknowledged: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isDefault - -
    -
    -
    -
    -
    -
    -

    Indicates whether this is the default write concern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isDefault: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new, empty WriteConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializes a new WriteConcern.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(journal: Bool? = nil, w: W? = nil, wtimeoutMS: Int64? = nil) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Returns the relaxed extended JSON representation of this WriteConcern. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: WriteConcern, rhs: WriteConcern) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/WriteConcern/W.html b/docs/Structs/WriteConcern/W.html deleted file mode 100644 index 4fd4dd81c..000000000 --- a/docs/Structs/WriteConcern/W.html +++ /dev/null @@ -1,622 +0,0 @@ - - - - W Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

W

-
-
-
public enum W : Codable, Equatable
- -
-
-

An option to request acknowledgement that the write operation has propagated to specified mongod instances.

- -
-
-
-
    -
  • -
    - - - - number(_:) - -
    -
    -
    -
    -
    -
    -

    Specifies the number of nodes that should acknowledge the write. MUST be greater than or equal to 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case number(Int32)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - tag(_:) - -
    -
    -
    -
    -
    -
    -

    Indicates a tag for nodes that should acknowledge the write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case tag(String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - majority - -
    -
    -
    -
    -
    -
    -

    Specifies that a majority of nodes should acknowledge the write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case majority
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/WriteConcernError.html b/docs/Structs/WriteConcernError.html deleted file mode 100644 index a94373c64..000000000 --- a/docs/Structs/WriteConcernError.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - WriteConcernError Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

WriteConcernError

-
-
-
public struct WriteConcernError : Codable
- -
-
-

A struct to represent a write concern error resulting from an executed bulk write.

- -
-
-
-
    -
  • -
    - - - - code - -
    -
    -
    -
    -
    -
    -

    An integer value identifying the write concern error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let code: ServerErrorCode
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeName - -
    -
    -
    -
    -
    -
    -

    A human-readable string identifying write concern error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let codeName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - details - -
    -
    -
    -
    -
    -
    -

    A document identifying the write concern setting related to the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let details: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - message - -
    -
    -
    -
    -
    -
    -

    A description of the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let message: String
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Structs/WriteError.html b/docs/Structs/WriteError.html deleted file mode 100644 index 3f1667aa2..000000000 --- a/docs/Structs/WriteError.html +++ /dev/null @@ -1,596 +0,0 @@ - - - - WriteError Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

WriteError

-
-
-
public struct WriteError : Codable
- -
-
-

A struct to represent a single write error not resulting from an executed bulk write.

- -
-
-
-
    -
  • -
    - - - - code - -
    -
    -
    -
    -
    -
    -

    An integer value identifying the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let code: ServerErrorCode
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeName - -
    -
    -
    -
    -
    -
    -

    A human-readable string identifying the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let codeName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - message - -
    -
    -
    -
    -
    -
    -

    A description of the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let message: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/Typealiases.html b/docs/Typealiases.html deleted file mode 100644 index 9806fb944..000000000 --- a/docs/Typealiases.html +++ /dev/null @@ -1,542 +0,0 @@ - - - - Type Aliases Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Type Aliases

-

The following type aliases are available globally.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/badge.svg b/docs/badge.svg deleted file mode 100644 index a096feca8..000000000 --- a/docs/badge.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - documentation - - - documentation - - - 100% - - - 100% - - - diff --git a/docs/bson.html b/docs/bson.html deleted file mode 100644 index 438eb9611..000000000 --- a/docs/bson.html +++ /dev/null @@ -1,904 +0,0 @@ - - - - BSON Reference - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
- -

MongoSwift BSON Library

- -

MongoDB stores and transmits data in the form of BSON documents, and MongoSwift provides a libary that can be used to work with such documents. The following is an example of some of the functionality provided as part of that:

-
// Document construction.
-let doc: Document = [
-    "name": "Bob",
-    "occupation": "Software Engineer",
-    "projects": [
-        ["id": 76, "title": "Documentation"]
-    ]
-]
-// Reading from documents.
-print(doc["name"]) // .string(Bob)
-print(doc["projects"]) // .array([.document({ "id": 76, "title": "Documentation" })])
-
-// Document serialization and deserialization.
-struct Person: Codable {
-    let name: String
-    let occupation: String
-}
-print(try BSONDecoder().decode(Person.self, from: doc)) // Person(name: "Bob", occupation: "Software Engineer")
-print(try BSONEncoder().encode(Person(name: "Ted", occupation: "Janitor")) // { "name": "Ted", "occupation": "Janitor" }
-
- -

This guide will serve as an overview of various parts of the BSON library. To learn more specifics and cover the entirety of the API surface, please refer to the driver’s API reference.

-

BSON values

- -

BSON values have many possible types, ranging from simple 32-bit integers to documents which store more BSON values themselves. To accurately model this, the driver defines the BSON enum, which has a distinct case for each BSON type. For the more simple cases such as BSON null, the case has no associated value. For the more complex ones, such as documents, a separate type is defined that the case wraps. Where possible, the enum case will wrap the standard library/Foundation equivalent (e.g. Double, String, Date)

-
public enum BSON {
-    case .null,
-    case .document(Document)
-    case .double(Double)
-    case .datetime(Date)
-    case .string(String)
-    // ...rest of the cases...
-}
-
-

Initializing a BSON

- -

This enum can be instantiated directly like any other enum in the Swift language, but it also conforms to a number of ExpressibleByXLiteral protocols, meaning it can be instantiated directly from numeric, string, boolean, dictionary, and array literals.

-
let int: BSON = 5 // .int64(5) on 64-bit systems
-let double: BSON = 5.5 // .double(5.5)
-let string: BSON = "hello world" // .string("hello world")
-let bool: BSON = false // .bool(false)
-let document: BSON = ["x": 5, "y": true, "z": ["x": 1]] // .document({ "x": 5, "y": true, "z": { "x": 1 } })
-let array: BSON = ["1", true, 5.5] // .array([.string("1"), .bool(true), .double(5.5)])
-
- -

All other cases must be initialized directly:

-
let date = BSON.datetime(Date())
-let objectId = BSON.objectId(ObjectId())
-// ...rest of cases...
-
-

Unwrapping a BSON

- -

To get a BSON value as a specific type, you can use switch or if/guard case let like any other enum in Swift:

-
func foo(x: BSON, y: BSON) throws {
-    switch x {
-    case let .int32(int32):
-        print("got an Int32: \(int32)")
-    case let .objectId(oid):
-        print("got an objectId: \(oid.hex)")
-    default:
-        print("got something else")
-    }
-    guard case let .double(d) = y else {
-        throw UserError.invalidArgumentError(message: "y must be a double")
-    }
-    print(d * d)
-}
-
- -

While these methods are good for branching, sometimes it is useful to get just the value (e.g. for optional chaining, passing as a parameter, or returning from a function). For those cases, BSON has computed properties for each case that wraps a type. These properties will return nil unless the underlying BSON value is an exact match to the return type of the property.

-
func foo(x: BSON) -> [Document] {
-    guard let documents = x.arrayValue?.compactMap { $0.documentValue } else {
-        print("x is not an array")
-        return
-    }
-    return documents
-}
-print(.int64(5).int32Value) // nil
-print(.int32(5).int32Value) // Int32(5)
-print(.double(5).int64Value) // nil
-print(.double(5).doubleValue) // Double(5.0)
-
-

Converting a BSON

- -

In some cases, especially when dealing with numbers, it may make sense to coerce a BSON‘s wrapped value into a similar one. For those situations, there are several conversion methods defined on BSON that will unwrap the underlying value and attempt to convert it to the desired type. If that conversion would be lossless, a non-nil value is returned.

-
func foo(x: BSON, y: BSON) throws -> Int {
-    guard let x = x.asInt(), let y = y.asInt() else {
-        throw UserError.invalidArugmentError(message: "provide two integer types")
-    }
-    return x + y
-}
-try foo(x: 5, y: 5.0) // 10
-try foo(x: 5, y: 5) // 10
-try foo(x: 5.0, y: 5.0) // 10
-try foo(x: .int32(5), y: .int64(5)) // 10
-try foo(x: 5.01, y: 5) // error
-try foo(x: "5", y: 5) // error
-
- -

There are similar conversion methods for the other types, namely asInt32(), asDouble(), asInt64(), and asDecimal128().

-

Using a BSON value

- -

BSON conforms to a number of useful Foundation protocols, namely Codable, Equatable, and Hashable. This allows them to be compared, encoded/decoded, and used as keys in maps:

-
// Codable conformance synthesized by compiler.
-struct X: Codable {
-    let _id: BSON
-}
-// Equatable
-let x: BSON = "5"
-let y: BSON = 5
-let z: BSON = .string("5")
-print(x == y) // false
-print(x == z) // true
-// Hashable
-let map: [BSON: String] = [
-    "x": "string",
-    false: "bool",
-    [1, 2, 3]: "array",
-    .objectId(ObjectId()): "oid",
-    .null: "null",
-    .maxKey: "maxKey"
-]
-
-

Documents

- -

BSON documents are the top-level structures that contain the aforementioned BSON values, and they are also BSON values themselves. The driver defines the Document struct to model this specific BSON type.

-

Initializing documents

- -

Like BSON, Document can also be initialized by a dictionary literal. The elements within the literal must be BSONs, so further literals can be embedded within the top level literal definition:

-
let x: Document = [
-    "x": 5,
-    "y": 5.5
-    "z": [
-        "a": [1, true, .datetime(Date())]
-    ]
-]
-
- -

Documents can also be initialized directly by passing in a Data containing raw BSON bytes. If the bytes do not constitute valid BSON, an error is thrown.

-
try Document(fromBSON: Data(hexString: "0F00000010246B6579002A00000000")) // { "$key": 42 }
-try Document(fromBSON: Data(hexString: "1200000002666F6F0004000000626172")) // error 
-
- -

Documents may be initialized from an extended JSON string as well:

-
try Document(fromJSON: "{ \"x\": true }") // { "x": true }
-try Document(fromJSON: "{ x: false }}}") // error
-
-

Using documents

- -

Documents define the interface in which an application communicates with a MongoDB deployment. For that reason, Document has been fitted with functionality to make it both powerful and ergonomic to use for developers.

-

Reading / writing to Document

- -

Document conforms to Collection, which allows for easy reading and writing of elements via the subscript operator. On Document, this operator returns and accepts a BSON?:

-
var doc: Document = ["x": 1]
-print(doc["x"]) // .int64(1)
-doc["x"] = ["y": .null]
-print(doc["x"]) // .document({ "y": null })
-doc["x"] = nil
-print(doc["x"]) // nil
-print(doc) // { }
-
- -

Document also has the @dynamicMemberLookup attribute, meaning it’s values can be accessed directly as if they were properties on Document:

-
var doc: Document = ["x": 1]
-print(doc.x) // .int64(1)
-doc.x = ["y": .null]
-print(doc.x) // .document({ "y": null })
-doc.x = nil
-print(doc.x) // nil
-print(doc) // { }
-
- -

Document also conforms to Sequence, which allows it to be iterated over:

-
for (k, v) in Document { 
-    print("\(k) = \(v)")
-}
-
- -

Conforming to Sequence also gives a number of useful methods from the functional programming world, such as map or allSatisfy:

-
let allEvens = doc.allSatisfy { _, v in v.asInt() ?? 1 % 2 == 0 }
-let squares = doc.map { k, v in v.asInt()! * v.asInt()! }
-
- -

See the documentation for Sequence for a full list of methods that Document implements as part of this.

- -

In addition to those protocol conformances, there are a few one-off helpers implemented on Document such as filter (that returns a Document) and mapValues (also returns a Document):

-
let doc = ["_id": .objectId(ObjectId()), "numCats": 2, "numDollars": 1.56, "numPhones": 1]
-doc.filter { k, v in k.contains("num") && v.asInt() != nil }.mapValues { v in .int64(v.asInt64()! + 5) } // { "numCats": 7, "numPhones": 6 }
-
- -

See the driver’s documentation for a full listing of Document’s public API.

-

Codable and Document

- -

Codable is a protocol defined in Foundation that allows for ergonomic conversion between various serialization schemes and Swift data types. As part of the BSON library, MongoSwift defines both BSONEncoder and BSONDecoder to facilitate this serialization and deserialization to and from BSON via Codable. This allows applications to work with BSON documents in a type-safe way, and it removes much of the runtime key presence and type checking required when working with raw documents. It is reccommended that users leverage Codable wherever possible in their applications that use the driver instead of accessing documents directly.

- -

For example, here is an function written using raw documents:

-
let person = [
-    "name": "Bob",
-    "occupation": "Software Engineer"
-    "projects": [
-        ["id": 1, title: "Server Side Swift Application"],
-        ["id": 76, title: "Write documentation"],
-    ]
-]
-
-func prettyPrint(doc: Document) throws {
-    guard let name = doc["name"]?.stringValue else {
-        throw argumentError(message: "missing name")
-    }
-    print("Name: \(name)")
-    guard let occupation = doc["occupation"]?.stringValue else {
-        throw argumentError(message: "missing occupation")
-    }
-    print("Occupation: \(occupation)")
-    guard let projects = doc["projects"]?.arrayValue.compactMap { $0.documentValue } else {
-        throw argumentError(message: "missing projects")
-    }
-    print("Projects:")
-    for project in projects {
-        guard let title = project["title"] else {
-            throw argumentError(message: "missing title")
-        }
-        print(title)
-    }
-}
-
- -

Due to the flexible nature of Document, a number of checks have to be put into the body of the function. This clutters the actual function’s logic and requires a lot of boilerplate code. Now, consider the following function which does the same thing but is written leveraging Codable:

-
struct Project: Codable {
-    let id: BSON
-    let title: String
-}
-
-struct Person: Codable {
-    let name: String
-    let occupation: String
-    let projects: [Project]
-}
-
-func prettyPrint(doc: Document) throws {
-    let person = try BSONDecoder().decode(Person.self, from: doc)
-    print("Name: \(person.name)")
-    print("Occupation: \(person.occupation)")
-    print("Projects:")
-    for project in person.projects {
-        print(project.title)
-    }
-}
-
- -

In this version, the definition of the data type and the logic of the function are defined completely separately, and it leads to far more readable and concise versions of both.

-

Codable in MongoSwift

- -

There are a number of ways for users to leverage Codable via driver’s API. One such example is through MongoCollection<T>. By default, MongoDatabase.collection returns a MongoCollection<Document>. Any find or aggregate method invocation on that returned collection would then return a MongoCursor<Document>, which when iterated returns a Document?:

-
let collection = db.collection("person", withType: Person.self)
-for person in try collection.find(["occupation": "Software Engineer"]) {
-    print(person["name"] ?? "nil")
-}
-try collection.insert(["name": "New Hire", "occupation": "Doctor", "projects": [])
-
- -

However, if the schema of the collection is known, Codable structs can be used to work with the data in a more type safe way. To facilitate this, the alternate collection(name:asType) method on MongoDatabase, which accepts a Codable generic type, can be used. The provided type defines the model for all the documents in that collection, and any cursor returned from find or aggregate on that collection will be generic over that type instead of Document. Iterating such cursors will automatically decode the result documents to the generic type specified. Similarly, insert on that collection will accept an instance of that type.

-
let collection = db.collection("person", withType: Person.self)
-for person in try collection.find(["occupation": "Software Engineer"]) {
-    print(person.name)
-}
-try collection.insert(Person(name: "New Hire", occupation: "Doctor", projects: [])
-
- -

This allows applications that interact with the database to use well-defined Swift types, resulting in clearer and less error-prone code. Similar things can be done with ChangeStream<T> and ChangeStreamEvent<T>.

-

Migrating from the old BSON API

- -

In version 1.0 of MongoSwift, the public API for using BSON values was changed dramatically. This section will describe the process for migrating from the old API (BSON API v1) to this new one (BSON API v2).

-

Overview of BSON API v1

- -

The previous API was based around the BSONValue protocol. Types that conformed to this protocol could be inserted to or read out of Document and could aslo be used in Document literals. The protocol was also used in various places around the driver as an existential type or conformance requirement. A related protocol, BSONNumber, inherited from BSONValue and provided some numeric conversion helpers for the various BSON number types (e.g. Double, Int32, Int).

-
var doc: Document = [
-    "a": 5
-    "b": ObjectId()
-]
-let value: BSONValue? = doc["a"] // 5
-let intValue = (value as? BSONNumber)?.int32Value // Int32(5)
-doc["c"] = "i am a string"
-
- -

This API provided a number of benefits, the principal one being the seamless integration of standard Swift types (e.g. Int) and driver custom ones (e.g ObjectId) into Document’s methods. It also had a few drawbacks, however. In order for BSONValue to be used as an existential type, it could not have Self or associated type requirements. This ended being a big restriction as it meant BSONValue could not be Equatable, Hashable, or Codable. Instead, all of this functionaltiy was put onto the separate wrapper type AnyBSONValue, which was used instead of an existential BSONValue in many places in order to leverage these common protocol conformances.

- -

Another drawback is that subdocument literals could not be inferred and had to be explicitly casted:

-
let x: Document = [
-    "x": [
-        "y": [
-            z: 4
-        ] as Document
-    ] as Document
-]
-
-

Required Updates

- -

In BSON API v2, BSONNumber, BSONValue, and AnyBSONValue no longer exist. They are all entirely replaced by the BSON enum.

-

Updating BSONValue references

- -

Anywhere in the driver that formerly accepted or returned a BSONValue will now accept or return a BSON. Wherever BSONValue is used as an existential value in your application, a BSON will probably work as a drop-in replacement. Any casts will need to be updated to call the appropriate helper property instead.

-
func foo(x: BSONValue) -> String? {
-    guard let stringValue = x as? String else {
-        return nil
-    }
-    return "foo" + stringValue
-}
-
- -

becomes:

-
func foo(x: BSON) -> String? {
-    guard let stringValue = x.stringValue else {
-        return nil
-    }
-    // or
-    guard case let .string(stringValue) = x else {
-        return nil
-    }
-    return "foo" + stringValue
-}
-
- -

Similarly, BSON’s Equatable conformance can be leveraged instead of the old bsonEquals.

-
func foo(x: BSONValue, y: BSONValue) { 
-    if x.bsonEquals(y) { ... }
-}
-
- -

becomes simply:

-
func foo(x: BSON, y: BSON) {
-    if x == y { ... }
-}
-
- -

Generic Requirement -Currently, there is no equivalent protocol in BSON API v2 to BSONValue, so if your application was using it as a generic requirement there is no alternative in the driver. You may have to implement your own similar protocol to achieve the same effect. If such a protocol would be useful to you, please file a ticket on the driver’s Jira project.

-

Updating BSONNumber references

- -

BSON should be a drop-in replacement for anywhere BSONNumber is used, except for as a generic requirement. One thing to note that BSONNumber’s properties (e.g. .int32Value) are conversions, whereas BSON’s are simple unwraps. The conversions on BSON are implemented as methods (e.g. asInt32()).

-
// old
-func foo(doc: Document) -> Int? {
-    // conversion
-    guard let int = (doc["a"] as? BSONNumber)?.intValue else {
-        return nil
-    }
-    // cast
-    guard let otherInt = doc["b"] as? Int32 else {
-        return nil
-    }
-    return int*Int(otherInt)
-}
-
-// new
-func foo(doc: Document) -> Int? {
-    // conversion
-    guard let int = doc["a"]?.asInt() else {
-        return nil
-    }
-    // cast
-    guard let otherInt = doc["b"]?.int32Value else {
-        return nil
-    }
-    // or can use case let
-    guard case let .int32(otherInt) = doc["b"] else {
-        return nil
-    }
-    return int * Int(otherInt)
-}
-
-

Updating AnyBSONValue references

- -

BSON should be able to serve as a complete replacement for AnyBSONValue. -Codable usage:

-
// old
-struct X: Codable {
-    let x: AnyBSONValue
-}
-// new
-struct X: Codable {
-    let x: BSON
-}
-
- -

Equatable usage:

-
// old 
-let a: [BSONValue] = ["1", 2, false]
-let b: [BSONValue] = ["not", "equal"]
-return a.map { AnyBSONValue($0) } == b.map { AnyBSONValue($0) }
-// new
-let a: [BSON] = ["1", 2, false]
-let b: [BSON] = ["not", "equal"]
-return a == b
-
- -

Hashable usage:

-
// old
-let a: [AnyBSONValue: Int] = [AnyBSONValue("hello"): 4, AnyBSONValue(ObjectId()): 26]
-print(a[AnyBSONValue(true)] ?? "nil")
-// new
-let a: [BSON, Int] = ["hello": 4, .objectId(ObjectId()): 26]
-print(a[true] ?? "nil")
-
-

Updating Document literals

- -

BSON can be expressed by a dictionary literal, string literal, integer literal, float literal, boolean literal, and array literal, so document literals consisting of those literals can largely be left alone. All the other types that formerly conformed to BSONValue will need to have their cases explicitly constructed. The cast to Document will no longer be required for subdocuments and will need to be removed. All runtime variables will also need to have their cases explicitly constructed whereas in BSON API v1 they could just be inserted directly.

-
// BSON API v1
-let x: Document = [
-    "_id": self.getDocument()
-    "x": Date()
-    "y": [
-        "z": [1, 2, false, ["x": 123] as Document]
-    ] as Document
-]
-
- -

becomes

-
// BSON API v2
-let x: Document = [
-    "_id": .document(self.getDocument())
-    "x": .datetime(Date()),
-    "y": [
-        "z": [1, 2, false, ["x": 123]
-    ]
-]
-
- -
-
- -
-
- - - diff --git a/docs/change-streams.html b/docs/change-streams.html deleted file mode 100644 index 7873babb2..000000000 --- a/docs/change-streams.html +++ /dev/null @@ -1,626 +0,0 @@ - - - - Change-Streams Reference - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
- -

Using Change Streams

- -

MongoSwift 0.2.0 added support for change streams, which allow applications to access real-time data changes. Applications can use change streams to subscribe to all data changes on a single collection, a database, or an entire deployment, and immediately react to them. Because change streams use the aggregation framework, applications can also filter for specific changes or transform the notifications at will.

- -

Note: Change streams only work with MongoDB replica sets and sharded clusters.

-

Examples

-

Open a Change Stream on a MongoCollection<Document> (MongoDB 3.6+)

-
let client = try MongoClient()
-let inventory = client.db("example").collection("inventory")
-let stream = try inventory.watch() // returns a `ChangeStream<ChangeStreamEvent<Document>>`
-
-// perform some operations using `inventory`...
-
-for change in stream {
-    // process `ChangeStreamEvent<Document>` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
-

Open a Change Stream on a MongoCollection<MyCodableType> (MongoDB 3.6+)

-
let client = try MongoClient()
-let inventory = client.db("example").collection("inventory", withType: MyCodableType.self)
-let stream = try inventory.watch() // returns a `ChangeStream<ChangeStreamEvent<MyCodableType>>`
-
-// perform some operations using `inventory`...
-
-for change in stream {
-    // process `ChangeStreamEvent<MyCodableType>` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
-

Use a Custom Codable Type for the fullDocument Property of Returned ChangeStreamEvents

-
let client = try MongoClient()
-let inventory = client.db("example").collection("inventory")
-let stream = try inventory.watch(withFullDocumentType: MyCodableType.self) // returns a `ChangeStream<ChangeStreamEvent<MyCodableType>>`
-
-// perform some operations using `inventory`...
-
-for change in stream {
-    // process `ChangeStreamEvent<MyCodableType>` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
-

Use a Custom Codable Type for the Return type of ChangeStream.next()

-
let client = try MongoClient()
-let inventory = client.db("example").collection("inventory")
-let stream = try inventory.watch(withEventType: MyCodableType.self) // returns a `ChangeStream<MyCodableType>`
-
-// perform some operations using `inventory`...
-
-for change in stream {
-    // process `MyCodableType` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
-

Open a Change Stream on a MongoDatabase (MongoDB 4.0+)

-
let client = try MongoClient()
-let db = client.db("example")
-let stream = try db.watch()
-
-// perform some operations using `db`...
-
-for change in stream {
-    // process `ChangeStreamEvent<Document>` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
- -

Note: the types of the fullDocument property, as well as the return type of ChangeStream.next(), may be customized in the same fashion as the examples using MongoCollection above.

-

Open a Change Stream on a MongoClient (MongoDB 4.0+)

-
let client = try MongoClient()
-let stream = try client.watch()
-
-// perform some operations using `client`...
-
-for change in stream {
-    // process `ChangeStreamEvent<Document>` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
- -

Note: the types of the fullDocument property, as well as the return type of ChangeStream.next(), may be customized in the same fashion as the examples using MongoCollection above.

-

Resume a Change Stream

-
let client = try MongoClient()
-let inventory = client.db("example").collection("inventory")
-let stream = try inventory.watch()
-
-// perform some operations using `inventory`...
-
-// read the first change event
-let next = try stream.nextOrError()
-
-// create a new change stream that starts after the first change event
-let resumeToken = stream.resumeToken
-let resumedStream = try inventory.watch(options: ChangeStreamOptions(resumeAfter: resumeToken))
-for change in resumedStream {
-    // process `ChangeStreamEvent<Document>` here
-}
-
-// check if any errors occurred while iterating
-if let error = resumedStream.error {
-    // handle error
-}
-
-

Modify Change Stream Output

-
let client = try MongoClient()
-let inventory = client.db("example").collection("inventory")
-
-// Only include events where the changed document's username = "alice"
-let pipeline: [Document] = [
-    ["$match": ["fullDocument.username": "alice"] as Document]
-]
-
-let stream = try inventory.watch(pipeline)
-for change in stream {
-    // process `ChangeStreamEvent<Document>` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
-

See Also

- - - -
-
- -
-
- - - diff --git a/docs/css/highlight.css b/docs/css/highlight.css deleted file mode 100644 index d0db0e13b..000000000 --- a/docs/css/highlight.css +++ /dev/null @@ -1,200 +0,0 @@ -/* Credit to https://gist.github.com/wataru420/2048287 */ -.highlight { - /* Comment */ - /* Error */ - /* Keyword */ - /* Operator */ - /* Comment.Multiline */ - /* Comment.Preproc */ - /* Comment.Single */ - /* Comment.Special */ - /* Generic.Deleted */ - /* Generic.Deleted.Specific */ - /* Generic.Emph */ - /* Generic.Error */ - /* Generic.Heading */ - /* Generic.Inserted */ - /* Generic.Inserted.Specific */ - /* Generic.Output */ - /* Generic.Prompt */ - /* Generic.Strong */ - /* Generic.Subheading */ - /* Generic.Traceback */ - /* Keyword.Constant */ - /* Keyword.Declaration */ - /* Keyword.Pseudo */ - /* Keyword.Reserved */ - /* Keyword.Type */ - /* Literal.Number */ - /* Literal.String */ - /* Name.Attribute */ - /* Name.Builtin */ - /* Name.Class */ - /* Name.Constant */ - /* Name.Entity */ - /* Name.Exception */ - /* Name.Function */ - /* Name.Namespace */ - /* Name.Tag */ - /* Name.Variable */ - /* Operator.Word */ - /* Text.Whitespace */ - /* Literal.Number.Float */ - /* Literal.Number.Hex */ - /* Literal.Number.Integer */ - /* Literal.Number.Oct */ - /* Literal.String.Backtick */ - /* Literal.String.Char */ - /* Literal.String.Doc */ - /* Literal.String.Double */ - /* Literal.String.Escape */ - /* Literal.String.Heredoc */ - /* Literal.String.Interpol */ - /* Literal.String.Other */ - /* Literal.String.Regex */ - /* Literal.String.Single */ - /* Literal.String.Symbol */ - /* Name.Builtin.Pseudo */ - /* Name.Variable.Class */ - /* Name.Variable.Global */ - /* Name.Variable.Instance */ - /* Literal.Number.Integer.Long */ } - .highlight .c { - color: #999988; - font-style: italic; } - .highlight .err { - color: #a61717; - background-color: #e3d2d2; } - .highlight .k { - color: #000000; - font-weight: bold; } - .highlight .o { - color: #000000; - font-weight: bold; } - .highlight .cm { - color: #999988; - font-style: italic; } - .highlight .cp { - color: #999999; - font-weight: bold; } - .highlight .c1 { - color: #999988; - font-style: italic; } - .highlight .cs { - color: #999999; - font-weight: bold; - font-style: italic; } - .highlight .gd { - color: #000000; - background-color: #ffdddd; } - .highlight .gd .x { - color: #000000; - background-color: #ffaaaa; } - .highlight .ge { - color: #000000; - font-style: italic; } - .highlight .gr { - color: #aa0000; } - .highlight .gh { - color: #999999; } - .highlight .gi { - color: #000000; - background-color: #ddffdd; } - .highlight .gi .x { - color: #000000; - background-color: #aaffaa; } - .highlight .go { - color: #888888; } - .highlight .gp { - color: #555555; } - .highlight .gs { - font-weight: bold; } - .highlight .gu { - color: #aaaaaa; } - .highlight .gt { - color: #aa0000; } - .highlight .kc { - color: #000000; - font-weight: bold; } - .highlight .kd { - color: #000000; - font-weight: bold; } - .highlight .kp { - color: #000000; - font-weight: bold; } - .highlight .kr { - color: #000000; - font-weight: bold; } - .highlight .kt { - color: #445588; } - .highlight .m { - color: #009999; } - .highlight .s { - color: #d14; } - .highlight .na { - color: #008080; } - .highlight .nb { - color: #0086B3; } - .highlight .nc { - color: #445588; - font-weight: bold; } - .highlight .no { - color: #008080; } - .highlight .ni { - color: #800080; } - .highlight .ne { - color: #990000; - font-weight: bold; } - .highlight .nf { - color: #990000; } - .highlight .nn { - color: #555555; } - .highlight .nt { - color: #000080; } - .highlight .nv { - color: #008080; } - .highlight .ow { - color: #000000; - font-weight: bold; } - .highlight .w { - color: #bbbbbb; } - .highlight .mf { - color: #009999; } - .highlight .mh { - color: #009999; } - .highlight .mi { - color: #009999; } - .highlight .mo { - color: #009999; } - .highlight .sb { - color: #d14; } - .highlight .sc { - color: #d14; } - .highlight .sd { - color: #d14; } - .highlight .s2 { - color: #d14; } - .highlight .se { - color: #d14; } - .highlight .sh { - color: #d14; } - .highlight .si { - color: #d14; } - .highlight .sx { - color: #d14; } - .highlight .sr { - color: #009926; } - .highlight .s1 { - color: #d14; } - .highlight .ss { - color: #990073; } - .highlight .bp { - color: #999999; } - .highlight .vc { - color: #008080; } - .highlight .vg { - color: #008080; } - .highlight .vi { - color: #008080; } - .highlight .il { - color: #009999; } diff --git a/docs/css/jazzy.css b/docs/css/jazzy.css deleted file mode 100644 index 2d5656d5b..000000000 --- a/docs/css/jazzy.css +++ /dev/null @@ -1,372 +0,0 @@ -html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { - background: transparent; - border: 0; - margin: 0; - outline: 0; - padding: 0; - vertical-align: baseline; } - -body { - background-color: #f2f2f2; - font-family: Helvetica, freesans, Arial, sans-serif; - font-size: 14px; - -webkit-font-smoothing: subpixel-antialiased; - word-wrap: break-word; } - -h1, h2, h3 { - margin-top: 0.8em; - margin-bottom: 0.3em; - font-weight: 100; - color: black; } - -h1 { - font-size: 2.5em; } - -h2 { - font-size: 2em; - border-bottom: 1px solid #e2e2e2; } - -h4 { - font-size: 13px; - line-height: 1.5; - margin-top: 21px; } - -h5 { - font-size: 1.1em; } - -h6 { - font-size: 1.1em; - color: #777; } - -.section-name { - color: gray; - display: block; - font-family: Helvetica; - font-size: 22px; - font-weight: 100; - margin-bottom: 15px; } - -pre, code { - font: 0.95em Menlo, monospace; - color: #777; - word-wrap: normal; } - -p code, li code { - background-color: #eee; - padding: 2px 4px; - border-radius: 4px; } - -a { - color: #0088cc; - text-decoration: none; } - -ul { - padding-left: 15px; } - -li { - line-height: 1.8em; } - -img { - max-width: 100%; } - -blockquote { - margin-left: 0; - padding: 0 10px; - border-left: 4px solid #ccc; } - -.content-wrapper { - margin: 0 auto; - width: 980px; } - -header { - font-size: 0.85em; - line-height: 26px; - background-color: #414141; - position: fixed; - width: 100%; - z-index: 2; } - header img { - padding-right: 6px; - vertical-align: -4px; - height: 16px; } - header a { - color: #fff; } - header p { - float: left; - color: #999; } - header .header-right { - float: right; - margin-left: 16px; } - -#breadcrumbs { - background-color: #f2f2f2; - height: 27px; - padding-top: 17px; - position: fixed; - width: 100%; - z-index: 2; - margin-top: 26px; } - #breadcrumbs #carat { - height: 10px; - margin: 0 5px; } - -.sidebar { - background-color: #f9f9f9; - border: 1px solid #e2e2e2; - overflow-y: auto; - overflow-x: hidden; - position: fixed; - top: 70px; - bottom: 0; - width: 230px; - word-wrap: normal; } - -.nav-groups { - list-style-type: none; - background: #fff; - padding-left: 0; } - -.nav-group-name { - border-bottom: 1px solid #e2e2e2; - font-size: 1.1em; - font-weight: 100; - padding: 15px 0 15px 20px; } - .nav-group-name > a { - color: #333; } - -.nav-group-tasks { - margin-top: 5px; } - -.nav-group-task { - font-size: 0.9em; - list-style-type: none; - white-space: nowrap; } - .nav-group-task a { - color: #888; } - -.main-content { - background-color: #fff; - border: 1px solid #e2e2e2; - margin-left: 246px; - position: absolute; - overflow: hidden; - padding-bottom: 20px; - top: 70px; - width: 734px; } - .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { - margin-bottom: 1em; } - .main-content p { - line-height: 1.8em; } - .main-content section .section:first-child { - margin-top: 0; - padding-top: 0; } - .main-content section .task-group-section .task-group:first-of-type { - padding-top: 10px; } - .main-content section .task-group-section .task-group:first-of-type .section-name { - padding-top: 15px; } - .main-content section .heading:before { - content: ""; - display: block; - padding-top: 70px; - margin: -70px 0 0; } - .main-content .section-name p { - margin-bottom: inherit; - line-height: inherit; } - .main-content .section-name code { - background-color: inherit; - padding: inherit; - color: inherit; } - -.section { - padding: 0 25px; } - -.highlight { - background-color: #eee; - padding: 10px 12px; - border: 1px solid #e2e2e2; - border-radius: 4px; - overflow-x: auto; } - -.declaration .highlight { - overflow-x: initial; - padding: 0 40px 40px 0; - margin-bottom: -25px; - background-color: transparent; - border: none; } - -.section-name { - margin: 0; - margin-left: 18px; } - -.task-group-section { - padding-left: 6px; - border-top: 1px solid #e2e2e2; } - -.task-group { - padding-top: 0px; } - -.task-name-container a[name]:before { - content: ""; - display: block; - padding-top: 70px; - margin: -70px 0 0; } - -.section-name-container { - position: relative; - display: inline-block; } - .section-name-container .section-name-link { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - margin-bottom: 0; } - .section-name-container .section-name { - position: relative; - pointer-events: none; - z-index: 1; } - .section-name-container .section-name a { - pointer-events: auto; } - -.item { - padding-top: 8px; - width: 100%; - list-style-type: none; } - .item a[name]:before { - content: ""; - display: block; - padding-top: 70px; - margin: -70px 0 0; } - .item code { - background-color: transparent; - padding: 0; } - .item .token, .item .direct-link { - padding-left: 3px; - margin-left: 15px; - font-size: 11.9px; - transition: all 300ms; } - .item .token-open { - margin-left: 0px; } - .item .discouraged { - text-decoration: line-through; } - .item .declaration-note { - font-size: .85em; - color: gray; - font-style: italic; } - -.pointer-container { - border-bottom: 1px solid #e2e2e2; - left: -23px; - padding-bottom: 13px; - position: relative; - width: 110%; } - -.pointer { - background: #f9f9f9; - border-left: 1px solid #e2e2e2; - border-top: 1px solid #e2e2e2; - height: 12px; - left: 21px; - top: -7px; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); - position: absolute; - width: 12px; } - -.height-container { - display: none; - left: -25px; - padding: 0 25px; - position: relative; - width: 100%; - overflow: hidden; } - .height-container .section { - background: #f9f9f9; - border-bottom: 1px solid #e2e2e2; - left: -25px; - position: relative; - width: 100%; - padding-top: 10px; - padding-bottom: 5px; } - -.aside, .language { - padding: 6px 12px; - margin: 12px 0; - border-left: 5px solid #dddddd; - overflow-y: hidden; } - .aside .aside-title, .language .aside-title { - font-size: 9px; - letter-spacing: 2px; - text-transform: uppercase; - padding-bottom: 0; - margin: 0; - color: #aaa; - -webkit-user-select: none; } - .aside p:last-child, .language p:last-child { - margin-bottom: 0; } - -.language { - border-left: 5px solid #cde9f4; } - .language .aside-title { - color: #4b8afb; } - -.aside-warning, .aside-deprecated, .aside-unavailable { - border-left: 5px solid #ff6666; } - .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { - color: #ff0000; } - -.graybox { - border-collapse: collapse; - width: 100%; } - .graybox p { - margin: 0; - word-break: break-word; - min-width: 50px; } - .graybox td { - border: 1px solid #e2e2e2; - padding: 5px 25px 5px 10px; - vertical-align: middle; } - .graybox tr td:first-of-type { - text-align: right; - padding: 7px; - vertical-align: top; - word-break: normal; - width: 40px; } - -.slightly-smaller { - font-size: 0.9em; } - -#footer { - position: relative; - top: 10px; - bottom: 0px; - margin-left: 25px; } - #footer p { - margin: 0; - color: #aaa; - font-size: 0.8em; } - -html.dash header, html.dash #breadcrumbs, html.dash .sidebar { - display: none; } - -html.dash .main-content { - width: 980px; - margin-left: 0; - border: none; - width: 100%; - top: 0; - padding-bottom: 0; } - -html.dash .height-container { - display: block; } - -html.dash .item .token { - margin-left: 0; } - -html.dash .content-wrapper { - width: auto; } - -html.dash #footer { - position: static; } diff --git a/docs/development.html b/docs/development.html deleted file mode 100644 index 81f654855..000000000 --- a/docs/development.html +++ /dev/null @@ -1,628 +0,0 @@ - - - - Development Reference - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
- -

Swift Driver Development Guide

-

Index

- - -

Things to install

- -
    -
  • swiftenv: a command-line tool that allows easy installation of and switching between versions of Swift. - -
      -
    • Use this to install Swift 4.2 and Swift 5.0.
    • -
  • -
  • Jazzy: the tool we use to generate documentation.
  • -
  • SwiftLint: the Swift linter we use.
  • -
  • Sourcery: the tool we use to generate lists of test names (required to run the tests on Linux).
  • -
  • libmongoc: the MongoDB C driver, which this library wraps. See the installation instructions provided in our README or on the libmongoc docs.
  • -
-

If you are using (Vim/Neovim)

- -
    -
  • swift.vim: A fork of Keith Smiley’s swift.vim with fixed indenting rules. This adds proper indenting and syntax for Swift to Vim. This fork also provides a match rule for column width highlighting. - -
      -
    • Please read the NOTICE for proper credits.
    • -
  • -
-

The code

- -

You should clone this repository, as well as the MongoDB Driver specifications. -Since this library wraps the MongoDB C Driver, we also recommend cloning mongodb/mongo-c-driver so you have the source code and documentation easily accessible.

-

Building

-

From the Command line

- -

Run swift build or simply make in the project’s root directory.

-

In Xcode

- -

We do not provide or maintain an already-generated .xcodeproj in our repository. Instead, you must generate it locally.

- -

To generate the .xcodeproj file:

- -
    -
  1. Install the Ruby gem xcodeproj with gem install xcodeproj (you may need to sudo)
  2. -
  3. Run make project
  4. -
  5. You’re ready to go! Open MongoSwift.xcodeproj and build and test as normal.
  6. -
- -

Why is this necessary? The project requires a customized “copy resources” build phase to include various test .json files. By default, this phase is not included when you run swift package generate-xcodeproj. So make project first generates the project, and then uses xcodeproj to manually add the files to the appropriate targets (see add_json_files.rb).

-

Running Tests

- -

NOTE: Several of the tests require a mongod instance to be running on the default host/port, localhost:27017. (You can start this by simply running mongod.)

- -

You can run tests from Xcode as usual. If you prefer to test from the command line, keep reading.

-

From the Command Line

- -

We recommend installing the ruby gem xcpretty and running tests by executing make test-pretty, as this provides output in a much more readable format. (Works on MacOS only.)

- -

Alternatively, you can just run the tests with swift test, or make test.

- -

To filter tests by regular expression:

- -
    -
  • If you are using swift test, provide the --filter argument: for example, swift test --filter=MongoClientTests.
  • -
  • If you are using make test or make test-pretty, provide the FILTER environment variable: for example, make test-pretty FILTER=MongoCollectionTests.
  • -
-

Diagnosing Backtraces on Linux

- -

SWIFT-755 documents an outstanding problem on Linux where backtraces do not contain debug symbols. As discussed in this Stack Overflow thread, a symbolicate-linux-fatal script may be used to add symbols to an existing backtrace. Consider the following:

-
$ swift test --filter CrashingTest &> crash.log
-$ symbolicate-linux-fatal /path/to/MongoSwiftPackageTests.xctest crash.log
-
- -

This will require you to manually provide the path to the compiled test binary (e.g. .build/x86_64-unknown-linux/debug/MongoSwiftPackageTests.xctest).

-

Writing and Generating Documentation

- -

We document new code as we write it. We use C-style documentation blocks (/** ... */) for documentation longer than 3 lines, and triple-slash (///) for shorter documentation. -Comments that are not documentation should use two slashes (//).

- -

Documentation comments should generally be complete sentences and should end with periods.

- -

Our documentation site is automatically generated from the source code using Jazzy. We regenerate it each time we release a new version of the driver. -To regenerate the files, run make documentation from the project’s root directory. You can then inspect the changes to the site by opening the files in /docs in your web browser.

-

Linting and Style

- -

We use SwiftLint for linting. You can see our configuration in the .swiftlint.yml file in the project’s root directory. Run swiftlint in the /Sources directory to lint all of our files. Running swiftlint autocorrect will correct some types of violations.

- -

We use SwiftFormat for formatting the code. You can see our configuration in the .swiftformat file in the project’s root directory. Our linter config contains a superset of the rules that our formatter does, so some manual tweaking may be necessary to satisfy both once the formatter is run (e.g. line length enforcement). Most of the time, the formatter should put the code into a format that passes the linter.

- -

To pass all the formatting stages of our testing matrix, both swiftlint --strict and swiftformat --lint . must finish successfully.

- -

For style guidance, look at Swift’s API design guidelines and Google’s Swift Style Guide.

-

Sublime Text Setup

- -

If you use Sublime Text, you can get linting violations shown in the editor by installing the packages SublimeLinter and SublimeLinter-contrib-swiftlint.

-

Vim/Neovim Setup

- -

If you use Vim or Neovim, then you can get linting support by using ale by w0rp. This will show symbols in the gutter for warnings/errors and show linter messages in the status.

-

Workflow

- -
    -
  1. Create a feature branch, named by the corresponding JIRA ticket if exists, along with a short descriptor of the work: for example, SWIFT-30/writeconcern.
  2. -
  3. Do your work on the branch.
  4. -
  5. If you add, remove, or rename any tests, make sure to update LinuxMain.swift accordingly. If you are on MacOS, you can do that by running make sourcery.
  6. -
  7. Make sure your code builds and passes all tests on Travis. Every time you push to GitHub or open a pull request, it will trigger a new build.
  8. -
  9. Open a pull request on the repository. Make sure you have rebased your branch onto the latest commits on master.
  10. -
  11. Go through code review to get the team’s approval on your changes. (See the next section on Code Review for more details on this process.)
  12. -
- -

Once you get the required approvals and your code passes all tests:

- -
    -
  1. Rebase on master again if needed.
  2. -
  3. Build and rerun tests.
  4. -
  5. Squash all commits into a single, descriptive commit method, formatted as: TICKET-NUMBER: Description of changes. For example, SWIFT-30: Implement WriteConcern type.
  6. -
  7. Merge it, or if you don’t have permissions, ask someone to merge it for you.
  8. -
-

Code Review

-

Giving a review

- -

When giving a review, please batch your comments together to cut down on the number of emails sent to others involved in the pull request. You can do this by going to the “Files Changed” tab. When you post your first comment, press “Start a review”. When you’re done commenting, click “Finish your review” (top right). -Please feel free to leave reviews on your own code when you open a pull request in order add additional context, point out an aspect of the design you’re unsure of, etc.

-

Responding to a review

- -

You can use the same batching approach as above to respond to review comments. Once you’ve posted your responses and pushed new commits addressing the comments, re-request reviews from your reviewers by clicking the arrow circle icons next to their names on the list of reviewers.

- -

Note: GitHub allows marking comment threads on pull requests as “resolved”, which hides them from view. Always allow the original commenter to resolve a conversation. This allows them to verify that your changes match what they requested before the conversation is hidden.

-

Resources

-

Swift

- - -

MongoDB and Drivers

- - - -
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Info.plist b/docs/docsets/MongoSwift.docset/Contents/Info.plist deleted file mode 100644 index be459b36f..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Info.plist +++ /dev/null @@ -1,20 +0,0 @@ - - - - - CFBundleIdentifier - com.jazzy.mongoswift - CFBundleName - MongoSwift - DocSetPlatformFamily - mongoswift - isDashDocset - - dashIndexFilePath - index.html - isJavaScriptEnabled - - DashDocSetFamily - dashtoc - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes.html deleted file mode 100644 index 128c15663..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes.html +++ /dev/null @@ -1,774 +0,0 @@ - - - - Classes Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Classes

-

The following classes are available globally.

- -
-
-
-
    -
  • -
    - - - - BSONDecoder - -
    -
    -
    -
    -
    -
    -

    BSONDecoder facilitates the decoding of BSON into semantic Decodable types.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class BSONDecoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - BSONEncoder - -
    -
    -
    -
    -
    -
    -

    BSONEncoder facilitates the encoding of Encodable values into BSON.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class BSONEncoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DocumentStorage - -
    -
    -
    -
    -
    -
    -

    The storage backing a MongoSwift Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class DocumentStorage
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DocumentIterator - -
    -
    -
    -
    -
    -
    -

    An iterator over the values in a Document.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class DocumentIterator : IteratorProtocol
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ChangeStream - -
    -
    -
    -
    -
    -
    -

    A MongoDB change stream.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class ChangeStream<T> : Sequence, IteratorProtocol where T : Decodable, T : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ClientSession - -
    -
    -
    -
    -
    -
    -

    A MongoDB client session. - This class represents a logical session used for ordering sequential operations.

    - -

    To create a client session, use startSession or withSession on a MongoClient.

    - -

    If causalConsistency is not set to false when starting a session, read and write operations that use the session - will be provided causal consistency guarantees depending on the read and write concerns used. Using “majority” - read and write preferences will provide the full set of guarantees. See - https://docs.mongodb.com/manual/core/read-isolation-consistency-recency/#sessions for more details.

    - -

    e.g.

    -
       let opts = CollectionOptions(readConcern: ReadConcern(.majority), writeConcern: try WriteConcern(w: .majority))
    -   let collection = database.collection("mycoll", options: opts)
    -   try client.withSession { session in
    -       try collection.insertOne(["x": 1], session: session)
    -       try collection.find(["x": 1], session: session)
    -   }
    -
    - -

    To disable causal consistency, set causalConsistency to false in the ClientSessionOptions passed in to either - withSession or startSession.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public final class ClientSession
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoClient - -
    -
    -
    -
    -
    -
    -

    A MongoDB Client.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class MongoClient
    -
    extension MongoClient: Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoCursor - -
    -
    -
    -
    -
    -
    -

    A MongoDB cursor.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public class MongoCursor<T> : Sequence, IteratorProtocol where T : Decodable, T : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ReadPreference - -
    -
    -
    -
    -
    -
    -

    A class to represent a MongoDB read preference.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public final class ReadPreference
    -
    extension ReadPreference: Equatable
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONDecoder.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONDecoder.html deleted file mode 100644 index b6764368c..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONDecoder.html +++ /dev/null @@ -1,932 +0,0 @@ - - - - BSONDecoder Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONDecoder

-
-
-
public class BSONDecoder
- -
-
-

BSONDecoder facilitates the decoding of BSON into semantic Decodable types.

- -
-
-
-
    -
  • -
    - - - - DateDecodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various strategies for decoding Dates from BSON.

    - -

    As per the BSON specification, the default strategy is to decode Dates from BSON datetime objects.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum DateDecodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UUIDDecodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various strategies for decoding UUIDs from BSON.

    - -

    As per the BSON specification, the default strategy is to decode UUIDs from BSON binary types with the UUID -subtype.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum UUIDDecodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DataDecodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various strategies for decoding Datas from BSON.

    - -

    As per the BSON specification, the default strategy is to decode Datas from BSON binary types with the generic -binary subtype.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum DataDecodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - userInfo - -
    -
    -
    -
    -
    -
    -

    Contextual user-provided information for use during decoding.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var userInfo: [CodingUserInfoKey : Any]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dateDecodingStrategy - -
    -
    -
    -
    -
    -
    -

    The strategy used for decoding Dates with this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dateDecodingStrategy: BSONDecoder.DateDecodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuidDecodingStrategy - -
    -
    -
    -
    -
    -
    -

    The strategy used for decoding UUIDs with this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var uuidDecodingStrategy: BSONDecoder.UUIDDecodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dataDecodingStrategy - -
    -
    -
    -
    -
    -
    -

    The strategy used for decoding Datas with this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dataDecodingStrategy: BSONDecoder.DataDecodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(options:) - -
    -
    -
    -
    -
    -
    -

    Initializes self.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(options: CodingStrategyProvider? = nil)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decode(_:from:) - -
    -
    -
    -
    -
    -
    -

    Decodes a top-level value of the given type from the given BSON document.

    -
    -

    Throws

    - DecodingError if any value throws an error during decoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func decode<T>(_ type: T.Type, from document: Document) throws -> T where T : Decodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - type - - -
    -

    The type of the value to decode.

    -
    -
    - - document - - -
    -

    The BSON document to decode from.

    -
    -
    -
    -
    -

    Return Value

    -

    A value of the requested type.

    -
    -
    -
    -
  • -
  • -
    - - - - decode(_:from:) - -
    -
    -
    -
    -
    -
    -

    Decodes a top-level value of the given type from the given BSON data.

    -
    -

    Throws

    - DecodingError if the BSON data is corrupt or if any value throws an error during decoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func decode<T>(_ type: T.Type, from data: Data) throws -> T where T : Decodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - type - - -
    -

    The type of the value to decode.

    -
    -
    - - data - - -
    -

    The BSON data to decode from.

    -
    -
    -
    -
    -

    Return Value

    -

    A value of the requested type.

    -
    -
    -
    -
  • -
  • -
    - - - - decode(_:from:) - -
    -
    -
    -
    -
    -
    -

    Decodes a top-level value of the given type from the given JSON/extended JSON string.

    -
    -

    Throws

    - DecodingError if the JSON data is corrupt or if any value throws an error during decoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func decode<T>(_: T.Type, from json: String) throws -> T where T : Decodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - type - - -
    -

    The type of the value to decode.

    -
    -
    - - json - - -
    -

    The JSON string to decode from.

    -
    -
    -
    -
    -

    Return Value

    -

    A value of the requested type.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONDecoder/DataDecodingStrategy.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONDecoder/DataDecodingStrategy.html deleted file mode 100644 index 5b1747279..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONDecoder/DataDecodingStrategy.html +++ /dev/null @@ -1,610 +0,0 @@ - - - - DataDecodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DataDecodingStrategy

-
-
-
public enum DataDecodingStrategy
- -
-
-

Enum representing the various strategies for decoding Datas from BSON.

- -

As per the BSON specification, the default strategy is to decode Datas from BSON binary types with the generic -binary subtype.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - deferredToData - -
    -
    -
    -
    -
    -
    -

    Decode Datas by deferring to their default decoding implementation.

    - -

    Note: The default decoding implementation attempts to decode the Data from a [UInt8], but because BSON -does not support integer types other Int32 and Int64, it actually decodes from an [Int32] stored -in BSON. This strategy paired with its corresponding encoding strategy results in an inefficient storage of -the Data in BSON.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToData
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Decode Datas stored as the BSON Binary type (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - base64 - -
    -
    -
    -
    -
    -
    -

    Decode Datas stored as base64 encoded strings.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case base64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - custom(_:) - -
    -
    -
    -
    -
    -
    -

    Decode Datas using the provided closure.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case custom((_ decoder: Decoder) throws -> Data)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONDecoder/DateDecodingStrategy.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONDecoder/DateDecodingStrategy.html deleted file mode 100644 index 86f63524c..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONDecoder/DateDecodingStrategy.html +++ /dev/null @@ -1,685 +0,0 @@ - - - - DateDecodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DateDecodingStrategy

-
-
-
public enum DateDecodingStrategy
- -
-
-

Enum representing the various strategies for decoding Dates from BSON.

- -

As per the BSON specification, the default strategy is to decode Dates from BSON datetime objects.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - bsonDateTime - -
    -
    -
    -
    -
    -
    -

    Decode Dates stored as BSON datetimes (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case bsonDateTime
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - millisecondsSince1970 - -
    -
    -
    -
    -
    -
    -

    Decode Dates stored as numbers of seconds since January 1, 1970.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case millisecondsSince1970
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - secondsSince1970 - -
    -
    -
    -
    -
    -
    -

    Decode Dates stored as numbers of milliseconds since January 1, 1970.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case secondsSince1970
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - deferredToDate - -
    -
    -
    -
    -
    -
    -

    Decode Dates by deferring to their default decoding implementation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToDate
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - iso8601 - -
    -
    -
    -
    -
    -
    -

    Decode Dates stored as ISO8601 formatted strings.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case iso8601
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - formatted(_:) - -
    -
    -
    -
    -
    -
    -

    Decode Dates stored as strings parsable by the given formatter.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case formatted(DateFormatter)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - custom(_:) - -
    -
    -
    -
    -
    -
    -

    Decode Dates using the provided closure.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case custom((_ decoder: Decoder) throws -> Date)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONDecoder/UUIDDecodingStrategy.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONDecoder/UUIDDecodingStrategy.html deleted file mode 100644 index b38287f9d..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONDecoder/UUIDDecodingStrategy.html +++ /dev/null @@ -1,551 +0,0 @@ - - - - UUIDDecodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UUIDDecodingStrategy

-
-
-
public enum UUIDDecodingStrategy
- -
-
-

Enum representing the various strategies for decoding UUIDs from BSON.

- -

As per the BSON specification, the default strategy is to decode UUIDs from BSON binary types with the UUID -subtype.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - deferredToUUID - -
    -
    -
    -
    -
    -
    -

    Decode UUIDs by deferring to their default decoding implementation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToUUID
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Decode UUIDs stored as the BSON Binary type (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONEncoder.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONEncoder.html deleted file mode 100644 index 15b56e974..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONEncoder.html +++ /dev/null @@ -1,954 +0,0 @@ - - - - BSONEncoder Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONEncoder

-
-
-
public class BSONEncoder
- -
-
-

BSONEncoder facilitates the encoding of Encodable values into BSON.

- -
-
-
-
    -
  • -
    - - - - DateEncodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various strategies for encoding Dates.

    - -

    As per the BSON specification, the default strategy is to encode Dates as BSON datetime objects.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum DateEncodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UUIDEncodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various strategies for encoding UUIDs.

    - -

    As per the BSON specification, the default strategy is to encode UUIDs as BSON binary types with the UUID - subtype.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum UUIDEncodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DataEncodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various strategies for encoding Datas.

    - -

    As per the BSON specification, the default strategy is to encode Datas as BSON binary types with the generic - binary subtype.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum DataEncodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dateEncodingStrategy - -
    -
    -
    -
    -
    -
    -

    The strategy to use for encoding Dates with this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dateEncodingStrategy: BSONEncoder.DateEncodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuidEncodingStrategy - -
    -
    -
    -
    -
    -
    -

    The strategy to use for encoding UUIDs with this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var uuidEncodingStrategy: BSONEncoder.UUIDEncodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dataEncodingStrategy - -
    -
    -
    -
    -
    -
    -

    The strategy to use for encoding Datas with this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dataEncodingStrategy: BSONEncoder.DataEncodingStrategy
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - userInfo - -
    -
    -
    -
    -
    -
    -

    Contextual user-provided information for use during encoding.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var userInfo: [CodingUserInfoKey : Any]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(options:) - -
    -
    -
    -
    -
    -
    -

    Initializes self.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(options: CodingStrategyProvider? = nil)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(_:) - -
    -
    -
    -
    -
    -
    -

    Encodes the given top-level value and returns its BSON representation.

    -
    -

    Throws

    - EncodingError if any value throws an error during encoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode<T>(_ value: T) throws -> Document where T : Encodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - value - - -
    -

    The value to encode.

    -
    -
    -
    -
    -

    Return Value

    -

    A new Document containing the encoded BSON data.

    -
    -
    -
    -
  • -
  • -
    - - - - encode(_:) - -
    -
    -
    -
    -
    -
    -

    Encodes the given top-level optional value and returns its BSON representation. Returns nil if the - value is nil or if it contains no data.

    -
    -

    Throws

    - EncodingError if any value throws an error during encoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode<T>(_ value: T?) throws -> Document? where T : Encodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - value - - -
    -

    The value to encode.

    -
    -
    -
    -
    -

    Return Value

    -

    A new Document containing the encoded BSON data, or nil if there is no data to encode.

    -
    -
    -
    -
  • -
  • -
    - - - - encode(_:) - -
    -
    -
    -
    -
    -
    -

    Encodes the given array of top-level values and returns an array of their BSON representations.

    -
    -

    Throws

    - EncodingError if any value throws an error during encoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode<T>(_ values: [T]) throws -> [Document] where T : Encodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - values - - -
    -

    The values to encode.

    -
    -
    -
    -
    -

    Return Value

    -

    A new [Document] containing the encoded BSON data.

    -
    -
    -
    -
  • -
  • -
    - - - - encode(_:) - -
    -
    -
    -
    -
    -
    -

    Encodes the given array of top-level optional values and returns an array of their BSON representations. - Any value that is nil or contains no data will be mapped to nil.

    -
    -

    Throws

    - EncodingError if any value throws an error during encoding. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode<T>(_ values: [T?]) throws -> [Document?] where T : Encodable
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - values - - -
    -

    The values to encode.

    -
    -
    -
    -
    -

    Return Value

    -

    A new [Document?] containing the encoded BSON data. Any value that is nil or - contains no data will be mapped to nil.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONEncoder/DataEncodingStrategy.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONEncoder/DataEncodingStrategy.html deleted file mode 100644 index 53072a85f..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONEncoder/DataEncodingStrategy.html +++ /dev/null @@ -1,610 +0,0 @@ - - - - DataEncodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DataEncodingStrategy

-
-
-
public enum DataEncodingStrategy
- -
-
-

Enum representing the various strategies for encoding Datas.

- -

As per the BSON specification, the default strategy is to encode Datas as BSON binary types with the generic - binary subtype.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - deferredToData - -
    -
    -
    -
    -
    -
    -

    Encode the Data by deferring to its default encoding implementation.

    - -

    Note: The default encoding implementation attempts to encode the Data as a [UInt8], but because BSON - does not support integer types besides Int32 or Int64, it actually gets encoded to BSON as an [Int32]. - This results in a space inefficient storage of the Data (using 4 bytes of BSON storage per byte of data).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToData
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Encode the Data as a BSON binary type (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - base64 - -
    -
    -
    -
    -
    -
    -

    Encode the Data as a base64 encoded string.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case base64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - custom(_:) - -
    -
    -
    -
    -
    -
    -

    Encode the Data by using the given closure. -If the closure does not encode a value, an empty document will be encoded in its place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case custom((Data, Encoder) throws -> Void)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONEncoder/DateEncodingStrategy.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONEncoder/DateEncodingStrategy.html deleted file mode 100644 index 8fef3ea16..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONEncoder/DateEncodingStrategy.html +++ /dev/null @@ -1,686 +0,0 @@ - - - - DateEncodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DateEncodingStrategy

-
-
-
public enum DateEncodingStrategy
- -
-
-

Enum representing the various strategies for encoding Dates.

- -

As per the BSON specification, the default strategy is to encode Dates as BSON datetime objects.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - deferredToDate - -
    -
    -
    -
    -
    -
    -

    Encode the Date by deferring to its default encoding implementation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToDate
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonDateTime - -
    -
    -
    -
    -
    -
    -

    Encode the Date as a BSON datetime object (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case bsonDateTime
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - millisecondsSince1970 - -
    -
    -
    -
    -
    -
    -

    Encode the Date as a 64-bit integer counting the number of milliseconds since January 1, 1970.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case millisecondsSince1970
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - secondsSince1970 - -
    -
    -
    -
    -
    -
    -

    Encode the Date as a BSON double counting the number of seconds since January 1, 1970.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case secondsSince1970
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - iso8601 - -
    -
    -
    -
    -
    -
    -

    Encode the Date as an ISO-8601-formatted string (in RFC 339 format).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case iso8601
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - formatted(_:) - -
    -
    -
    -
    -
    -
    -

    Encode the Date as a string formatted by the given formatter.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case formatted(DateFormatter)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - custom(_:) - -
    -
    -
    -
    -
    -
    -

    Encode the Date by using the given closure. -If the closure does not encode a value, an empty document will be encoded in its place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case custom((Date, Encoder) throws -> Void)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONEncoder/UUIDEncodingStrategy.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONEncoder/UUIDEncodingStrategy.html deleted file mode 100644 index 9cff0c205..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BSONEncoder/UUIDEncodingStrategy.html +++ /dev/null @@ -1,551 +0,0 @@ - - - - UUIDEncodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UUIDEncodingStrategy

-
-
-
public enum UUIDEncodingStrategy
- -
-
-

Enum representing the various strategies for encoding UUIDs.

- -

As per the BSON specification, the default strategy is to encode UUIDs as BSON binary types with the UUID - subtype.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - deferredToUUID - -
    -
    -
    -
    -
    -
    -

    Encode the UUID by deferring to its default encoding implementation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToUUID
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Encode the UUID as a BSON binary type (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BulkWriteOperation.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BulkWriteOperation.html deleted file mode 100644 index cf3c3122d..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/BulkWriteOperation.html +++ /dev/null @@ -1,509 +0,0 @@ - - - - BulkWriteOperation Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BulkWriteOperation

-
-
-
public class BulkWriteOperation
- -
-
-

A class encapsulating a mongoc_bulk_operation_t.

- -
-
-
-
    -
  • -
    - - - - deinit - -
    -
    -
    -
    -
    -
    -

    Cleans up internal state.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    deinit
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ChangeStream.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ChangeStream.html deleted file mode 100644 index 08cc214ef..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ChangeStream.html +++ /dev/null @@ -1,622 +0,0 @@ - - - - ChangeStream Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ChangeStream

-
-
-
public class ChangeStream<T> : Sequence, IteratorProtocol where T : Decodable, T : Encodable
- -
-
-

A MongoDB change stream.

- - -
-
-
-
    -
  • -
    - - - - resumeToken - -
    -
    -
    -
    -
    -
    -

    A ResumeToken associated with the most recent event seen by the change stream.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public internal(set) var resumeToken: ResumeToken?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - error - -
    -
    -
    -
    -
    -
    -

    The error that occurred while iterating the change stream, if one exists. This should be used to check -for errors after next() returns nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public private(set) var error: Error?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - next() - -
    -
    -
    -
    -
    -
    -

    Returns the next T in the change stream or nil if there is no next value. Will block for a maximum of -maxAwaitTimeMS milliseconds as specified in the ChangeStreamOptions, or for the server default timeout -if omitted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func next() -> T?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - nextOrError() - -
    -
    -
    -
    -
    -
    -

    Returns the next T in this change stream or nil, or throws an error if one occurs – compared to next(), -which returns nil and requires manually checking for an error afterward. Will block for a maximum of -maxAwaitTimeMS milliseconds as specified in the ChangeStreamOptions, or for the server default timeout if -omitted.

    -
    -

    Throws

    -
      -
    • ServerError.commandError if an error occurs on the server while iterating the change stream cursor.
    • -
    • UserError.logicError if this function is called and the session associated with this change stream is -inactive.
    • -
    • DecodingError if an error occurs while decoding the server’s response.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func nextOrError() throws -> T?
    - -
    -
    -
    -

    Return Value

    -

    the next T in this change stream, or nil if at the end of the change stream cursor.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ClientSession.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ClientSession.html deleted file mode 100644 index 3de7ec96a..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ClientSession.html +++ /dev/null @@ -1,759 +0,0 @@ - - - - ClientSession Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ClientSession

-
-
-
public final class ClientSession
- -
-
-

A MongoDB client session. - This class represents a logical session used for ordering sequential operations.

- -

To create a client session, use startSession or withSession on a MongoClient.

- -

If causalConsistency is not set to false when starting a session, read and write operations that use the session - will be provided causal consistency guarantees depending on the read and write concerns used. Using “majority” - read and write preferences will provide the full set of guarantees. See - https://docs.mongodb.com/manual/core/read-isolation-consistency-recency/#sessions for more details.

- -

e.g.

-
   let opts = CollectionOptions(readConcern: ReadConcern(.majority), writeConcern: try WriteConcern(w: .majority))
-   let collection = database.collection("mycoll", options: opts)
-   try client.withSession { session in
-       try collection.insertOne(["x": 1], session: session)
-       try collection.find(["x": 1], session: session)
-   }
-
- -

To disable causal consistency, set causalConsistency to false in the ClientSessionOptions passed in to either - withSession or startSession.

- - -
-
-
-
    -
  • -
    - - - - client - -
    -
    -
    -
    -
    -
    -

    The client used to start this session.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let client: MongoClient
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - id - -
    -
    -
    -
    -
    -
    -

    The session ID of this session.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let id: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - clusterTime - -
    -
    -
    -
    -
    -
    -

    The most recent cluster time seen by this session. This value will be nil if either of the following are true:

    - -
      -
    • No operations have been executed using this session and advanceClusterTime has not been called.
    • -
    • This session has been ended.
    • -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var clusterTime: Document? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - operationTime - -
    -
    -
    -
    -
    -
    -

    The operation time of the most recent operation performed using this session. This value will be nil if either -of the following are true:

    - -
      -
    • No operations have been performed using this session.
    • -
    • This session has been ended.
    • -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var operationTime: Timestamp? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - options - -
    -
    -
    -
    -
    -
    -

    The options used to start this session.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let options: ClientSessionOptions?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Advances the clusterTime for this session to the given time, if it is greater than the current clusterTime. If - the session has been ended, or if the provided clusterTime is less than the current clusterTime, this method has - no effect.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func advanceClusterTime(to clusterTime: Document)
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - clusterTime - - -
    -

    The session’s new cluster time, as a Document like ["cluster time": Timestamp(...)]

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Advances the operationTime for this session to the given time if it is greater than the current operationTime. - If the session has been ended, or if the provided operationTime is less than the current operationTime, this - method has no effect.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func advanceOperationTime(to operationTime: Timestamp)
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - operationTime - - -
    -

    The session’s new operationTime

    -
    -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/DocumentIterator.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/DocumentIterator.html deleted file mode 100644 index c5380406a..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/DocumentIterator.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - DocumentIterator Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DocumentIterator

-
-
-
public class DocumentIterator : IteratorProtocol
- -
-
-

An iterator over the values in a Document.

- -
-
-
-
    -
  • -
    - - - - next() - -
    -
    -
    -
    -
    -
    -

    Returns the next value in the sequence, or nil if the iterator is exhausted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func next() -> Document.KeyValuePair?
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/DocumentStorage.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/DocumentStorage.html deleted file mode 100644 index afad2e278..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/DocumentStorage.html +++ /dev/null @@ -1,509 +0,0 @@ - - - - DocumentStorage Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

Install in Dash

-
-
-
- -
-
- - -
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoClient.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoClient.html deleted file mode 100644 index 799030ac9..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoClient.html +++ /dev/null @@ -1,1435 +0,0 @@ - - - - MongoClient Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoClient

-
-
-
public class MongoClient
-
extension MongoClient: Equatable
- -
-
-

A MongoDB Client.

- -
-
-
-
    -
  • -
    - - - - encoder - -
    -
    -
    -
    -
    -
    -

    Encoder whose options are inherited by databases derived from this client.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let encoder: BSONEncoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decoder - -
    -
    -
    -
    -
    -
    -

    Decoder whose options are inherited by databases derived from this client.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let decoder: BSONDecoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    The read concern set on this client, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    The ReadPreference set on this client.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readPreference: ReadPreference
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    The write concern set on this client, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:options:) - -
    -
    -
    -
    -
    -
    -

    Create a new client connection to a MongoDB server. For options that included in both the connection string URI - and the ClientOptions struct, the final value is set in descending order of priority: the value specified in - ClientOptions (if non-nil), the value specified in the URI, or the default value if both are unset.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • A UserError.invalidArgumentError if the connection string passed in is improperly formatted.
    • -
    • A UserError.invalidArgumentError if the connection string specifies the use of TLS but libmongoc was not -built with TLS support.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ connectionString: String = "mongodb://localhost:27017", options: ClientOptions? = nil) throws
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - connectionString - - -
    -

    the connection string to connect to.

    -
    -
    - - options - - -
    -

    optional ClientOptions to use for this client

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a new ClientSession with the provided options.

    -
    -

    Throws

    -
      -
    • RuntimeError.compatibilityError if the deployment does not support sessions.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func startSession(options: ClientSessionOptions? = nil) throws -> ClientSession
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a new ClientSession with the provided options and passes it to the provided closure. - The session is only valid within the body of the closure and will be ended after the body completes.

    -
    -

    Throws

    -
      -
    • RuntimeError.compatibilityError if the deployment does not support sessions.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func withSession<T>(
    -    options: ClientSessionOptions? = nil,
    -    _ sessionBody: (ClientSession) throws -> T
    -) throws -> T
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Run the listDatabases command.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error is encountered while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listDatabases(
    -    _ filter: Document? = nil,
    -    session: ClientSession? = nil
    -) throws -> [DatabaseSpecification]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    Optional Document specifying a filter that the listed databases must pass. This filter can be based -on the “name”, “sizeOnDisk”, “empty”, or “shards” fields of the output.

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command.

    -
    -
    -
    -
    -

    Return Value

    -

    A [DatabaseSpecification] containing the databases matching provided criteria.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Get a list of MongoDatabases.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.logicError if the provided session is inactive.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listMongoDatabases(
    -    _ filter: Document? = nil,
    -    session: ClientSession? = nil
    -) throws -> [MongoDatabase]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    Optional Document specifying a filter on the names of the returned databases.

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    An Array of MongoDatabases that match the provided filter.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Get a list of names of databases.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.logicError if the provided session is inactive.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listDatabaseNames(_ filter: Document? = nil, session: ClientSession? = nil) throws -> [String]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    Optional Document specifying a filter on the names of the returned databases.

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A [String] containing names of databases that match the provided filter.

    -
    -
    -
    -
  • -
  • -
    - - - - db(_:options:) - -
    -
    -
    -
    -
    -
    -

    Gets a MongoDatabase instance for the given database name. If an option is not specified in the optional - DatabaseOptions param, the database will inherit the value from the parent client or the default if - the client’s option is not set. To override an option inherited from the client (e.g. a read concern) with the - default value, it must be explicitly specified in the options param (e.g. ReadConcern(), not nil).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func db(_ name: String, options: DatabaseOptions? = nil) -> MongoDatabase
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    the name of the database to retrieve

    -
    -
    - - options - - -
    -

    Optional DatabaseOptions to use for the retrieved database

    -
    -
    -
    -
    -

    Return Value

    -

    a MongoDatabase corresponding to the provided database name

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a MongoClient. Allows the client to observe all changes in a cluster - - excluding system collections and the “config”, “local”, and “admin” databases.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    -

    Note

    -

    Supported in MongoDB version 4.0+ only.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> ChangeStream<ChangeStreamEvent<Document>>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    -
    -
    -

    Return Value

    -

    a ChangeStream on all collections in all databases in a cluster.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a MongoClient. Allows the client to observe all changes in a cluster - - excluding system collections and the “config”, “local”, and “admin” databases. Associates the specified - Codable type T with the fullDocument field in the ChangeStreamEvents emitted by the returned - ChangeStream.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    -

    Note

    -

    Supported in MongoDB version 4.0+ only.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch<FullDocType: Codable>(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil,
    -    withFullDocumentType _: FullDocType.Type
    -)
    -    throws -> ChangeStream<ChangeStreamEvent<FullDocType>>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    - - withFullDocumentType - - -
    -

    The type that the fullDocument field of the emitted ChangeStreamEvents will be - decoded to.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on all collections in all databases in a cluster.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a MongoClient. Allows the client to observe all changes in a cluster - - excluding system collections and the “config”, “local”, and “admin” databases. Associates the specified - Codable type T with the returned ChangeStream.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    -

    Note

    -

    Supported in MongoDB version 4.0+ only.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch<EventType: Codable>(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil,
    -    withEventType _: EventType.Type
    -) throws -> ChangeStream<EventType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    - - withEventType - - -
    -

    The type that the entire change stream response will be decoded to and that will be returned - when iterating through the change stream.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on all collections in all databases in a cluster.

    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: MongoClient, rhs: MongoClient) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection.html deleted file mode 100644 index 22074321a..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection.html +++ /dev/null @@ -1,2734 +0,0 @@ - - - - MongoCollection Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoCollection

-
-
-
public class MongoCollection<T> where T : Decodable, T : Encodable
- -
-
-

A MongoDB collection.

- -
-
-
-
    -
  • -
    - - - - encoder - -
    -
    -
    -
    -
    -
    -

    Encoder used by this collection for BSON conversions. (e.g. converting CollectionTypes, indexes, and options -to documents).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let encoder: BSONEncoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decoder - -
    -
    -
    -
    -
    -
    -

    Decoder used by this collection for BSON conversions (e.g. converting documents to CollectionTypes).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let decoder: BSONDecoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CollectionType - -
    -
    -
    -
    -
    -
    -

    A Codable type associated with this MongoCollection instance. - This allows CollectionType values to be directly inserted into and retrieved from the collection, by - encoding/decoding them using the BSONEncoder and BSONDecoder. The strategies to be used by the encoder and - decoder for certain types can be configured by setting the coding strategies on the options used to create this - collection instance. The default strategies are inherited from those set on the database this collection derived - from.

    - -

    This type association only exists in the context of this particular MongoCollection instance. It is the - responsibility of the user to ensure that any data already stored in the collection was encoded - from this same type and according to the coding strategies set on this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias CollectionType = T
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    The name of this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var name: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    The ReadConcern set on this collection, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    The ReadPreference set on this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    The WriteConcern set on this collection, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - drop(session:) - -
    -
    -
    -
    -
    -
    -

    Drops this collection from its parent database.

    -
    -

    Throws

    -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func drop(session: ClientSession? = nil) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Execute multiple write operations.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if requests is empty.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.bulkWriteError if any error occurs while performing the writes.
    • -
    • ServerError.commandError if an error occurs that prevents the operation from being performed.
    • -
    • EncodingError if an error occurs while encoding the CollectionType or the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func bulkWrite(_ requests: [WriteModel],
    -                      options: BulkWriteOptions? = nil,
    -                      session: ClientSession? = nil) throws -> BulkWriteResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - requests - - -
    -

    a [WriteModel] containing the writes to perform.

    -
    -
    - - options - - -
    -

    optional BulkWriteOptions to use while executing the operation.

    -
    -
    -
    -
    -

    Return Value

    -

    a BulkWriteResult, or nil if the write concern is unacknowledged.

    -
    -
    -
    -
  • -
  • -
    - - - - DeleteOneModel - -
    -
    -
    -
    -
    -
    -

    A model for a deleteOne operation within a bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DeleteOneModel : WriteModel, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DeleteManyModel - -
    -
    -
    -
    -
    -
    -

    A model for a deleteMany operation within a bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DeleteManyModel : WriteModel, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - InsertOneModel - -
    -
    -
    -
    -
    -
    -

    A model for an insertOne operation within a bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct InsertOneModel : WriteModel, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ReplaceOneModel - -
    -
    -
    -
    -
    -
    -

    A model for a replaceOne operation within a bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ReplaceOneModel : WriteModel, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UpdateOneModel - -
    -
    -
    -
    -
    -
    -

    A model for an updateOne operation within a bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct UpdateOneModel : WriteModel, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UpdateManyModel - -
    -
    -
    -
    -
    -
    -

    A model for an updateMany operation within a bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct UpdateManyModel : WriteModel, Decodable
    - -
    -
    -
    -
    -
  • -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Finds a single document and deletes it, returning the original.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if any of the provided options are invalid.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • ServerError.writeError if an error occurs while executing the command.
    • -
    • DecodingError if the deleted document cannot be decoded to a CollectionType value.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func findOneAndDelete(_ filter: Document,
    -                             options: FindOneAndDeleteOptions? = nil,
    -                             session: ClientSession? = nil) throws -> CollectionType?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - options - - -
    -

    Optional FindOneAndDeleteOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The deleted document, represented as a CollectionType, or nil if no document was deleted.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds a single document and replaces it, returning either the original or the replaced document.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if any of the provided options are invalid.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • ServerError.writeError if an error occurs while executing the command.
    • -
    • DecodingError if the replaced document cannot be decoded to a CollectionType value.
    • -
    • EncodingError if replacement cannot be encoded to a Document.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func findOneAndReplace(filter: Document,
    -                              replacement: CollectionType,
    -                              options: FindOneAndReplaceOptions? = nil,
    -                              session: ClientSession? = nil) throws -> CollectionType?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - replacement - - -
    -

    a CollectionType to replace the found document

    -
    -
    - - options - - -
    -

    Optional FindOneAndReplaceOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    A CollectionType, representing either the original document or its replacement, - depending on selected options, or nil if there was no match.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds a single document and updates it, returning either the original or the updated document.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if any of the provided options are invalid.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • ServerError.writeError if an error occurs while executing the command.
    • -
    • DecodingError if the updated document cannot be decoded to a CollectionType value.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func findOneAndUpdate(filter: Document,
    -                             update: Document,
    -                             options: FindOneAndUpdateOptions? = nil,
    -                             session: ClientSession? = nil) throws -> CollectionType?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - update - - -
    -

    a Document containing updates to apply

    -
    -
    - - options - - -
    -

    Optional FindOneAndUpdateOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    A CollectionType representing either the original or updated document, - depending on selected options, or nil if there was no match.

    -
    -
    -
    -
  • -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Creates an index over the collection for the provided keys with the provided options.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the index specification or options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func createIndex(_ keys: Document,
    -                        options: IndexOptions? = nil,
    -                        commandOptions: CreateIndexOptions? = nil,
    -                        session: ClientSession? = nil) throws -> String
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - keys - - -
    -

    a Document specifing the keys for the index

    -
    -
    - - options - - -
    -

    Optional IndexOptions to use for the index

    -
    -
    - - commandOptions - - -
    -

    Optional CreateIndexOptions to use for the command

    -
    -
    -
    -
    -

    Return Value

    -

    The name of the created index.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates an index over the collection for the provided keys with the provided options.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the index specification or options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func createIndex(_ model: IndexModel,
    -                        options: CreateIndexOptions? = nil,
    -                        session: ClientSession? = nil) throws -> String
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - model - - -
    -

    An IndexModel representing the keys and options for the index

    -
    -
    - - options - - -
    -

    Optional CreateIndexOptions to use for the command

    -
    -
    -
    -
    -

    Return Value

    -

    The name of the created index.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates multiple indexes in the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the index specifications or options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func createIndexes(_ models: [IndexModel],
    -                          options: CreateIndexOptions? = nil,
    -                          session: ClientSession? = nil) throws -> [String]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - models - - -
    -

    An [IndexModel] specifying the indexes to create

    -
    -
    - - options - - -
    -

    Optional CreateIndexOptions to use for the command

    -
    -
    -
    -
    -

    Return Value

    -

    An [String] containing the names of all the indexes that were created.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Drops a single index from the collection by the index name.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndex(_ name: String,
    -                      options: DropIndexOptions? = nil,
    -                      session: ClientSession? = nil) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    The name of the index to drop

    -
    -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Attempts to drop a single index from the collection given the keys describing it.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndex(_ keys: Document,
    -                      commandOptions: DropIndexOptions? = nil,
    -                      session: ClientSession? = nil) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - keys - - -
    -

    a Document containing the keys for the index to drop

    -
    -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server’s response to the command.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Attempts to drop a single index from the collection given an IndexModel describing it.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndex(_ model: IndexModel,
    -                      options: DropIndexOptions? = nil,
    -                      session: ClientSession? = nil) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - model - - -
    -

    An IndexModel describing the index to drop

    -
    -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server’s response to the command.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Drops all indexes in the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndexes(options: DropIndexOptions? = nil, session: ClientSession? = nil) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server’s response to the command.

    -
    -
    -
    -
  • -
  • -
    - - - - listIndexes(session:) - -
    -
    -
    -
    -
    -
    -

    Retrieves a list of the indexes currently on this collection.

    -
    -

    Throws

    -

    UserError.logicError if the provided session is inactive.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listIndexes(session: ClientSession? = nil) throws -> MongoCursor<Document>
    - -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the index names.

    -
    -
    -
    -
  • -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Finds the documents in this collection which match the provided filter.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func find(_ filter: Document = [:],
    -                 options: FindOptions? = nil,
    -                 session: ClientSession? = nil) throws -> MongoCursor<CollectionType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    A Document that should match the query

    -
    -
    - - options - - -
    -

    Optional FindOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the resulting Documents

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Runs an aggregation framework pipeline against this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func aggregate(_ pipeline: [Document],
    -                      options: AggregateOptions? = nil,
    -                      session: ClientSession? = nil) throws -> MongoCursor<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - pipeline - - -
    -

    an [Document] containing the pipeline of aggregation operations to perform

    -
    -
    - - options - - -
    -

    Optional AggregateOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the resulting Documents

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Counts the number of documents in this collection matching the provided filter.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from performing the write.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func count(_ filter: Document = [:],
    -                  options: CountOptions? = nil,
    -                  session: ClientSession? = nil) throws -> Int
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    a Document, the filter that documents must match in order to be counted

    -
    -
    - - options - - -
    -

    Optional CountOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The count of the documents that matched the filter

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds the distinct values for a specified field across the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func distinct(fieldName: String,
    -                     filter: Document = [:],
    -                     options: DistinctOptions? = nil,
    -                     session: ClientSession? = nil) throws -> [BSONValue]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - fieldName - - -
    -

    The field for which the distinct values will be found

    -
    -
    - - filter - - -
    -

    a Document representing the filter documents must match in order to be considered for the operation

    -
    -
    - - options - - -
    -

    Optional DistinctOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    A [BSONValue] containing the distinct values for the specified criteria

    -
    -
    -
    -
  • -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Encodes the provided value to BSON and inserts it. If the value is missing an identifier, one will be - generated for it.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the CollectionType to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func insertOne(_ value: CollectionType,
    -                      options: InsertOneOptions? = nil,
    -                      session: ClientSession? = nil) throws -> InsertOneResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - value - - -
    -

    A CollectionType value to encode and insert

    -
    -
    - - options - - -
    -

    Optional InsertOneOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to perform the insert. If the WriteConcern - is unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Encodes the provided values to BSON and inserts them. If any values are - missing identifiers, the driver will generate them.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.bulkWriteError if an error occurs while performing any of the writes.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the CollectionType or options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func insertMany(_ values: [CollectionType],
    -                       options: InsertManyOptions? = nil,
    -                       session: ClientSession? = nil) throws -> InsertManyResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - values - - -
    -

    The CollectionType values to insert

    -
    -
    - - options - - -
    -

    optional InsertManyOptions to use while executing the operation

    -
    -
    -
    -
    -

    Return Value

    -

    an InsertManyResult, or nil if the write concern is unacknowledged.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Replaces a single document matching the provided filter in this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the CollectionType or options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func replaceOne(filter: Document,
    -                       replacement: CollectionType,
    -                       options: ReplaceOptions? = nil,
    -                       session: ClientSession? = nil) throws -> UpdateResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - replacement - - -
    -

    The replacement value, a CollectionType value to be encoded and inserted

    -
    -
    - - options - - -
    -

    Optional ReplaceOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to replace a document. If the WriteConcern - is unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Updates a single document matching the provided filter in this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func updateOne(filter: Document,
    -                      update: Document,
    -                      options: UpdateOptions? = nil,
    -                      session: ClientSession? = nil) throws -> UpdateResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - update - - -
    -

    A Document representing the update to be applied to a matching document

    -
    -
    - - options - - -
    -

    Optional UpdateOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to update a document. If the WriteConcern is - unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Updates multiple documents matching the provided filter in this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func updateMany(filter: Document,
    -                       update: Document,
    -                       options: UpdateOptions? = nil,
    -                       session: ClientSession? = nil) throws -> UpdateResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - update - - -
    -

    A Document representing the update to be applied to matching documents

    -
    -
    - - options - - -
    -

    Optional UpdateOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to update multiple documents. If the write - concern is unacknowledged, nil is returned

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Deletes a single matching document from the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func deleteOne(_ filter: Document,
    -                      options: DeleteOptions? = nil,
    -                      session: ClientSession? = nil) throws -> DeleteResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - options - - -
    -

    Optional DeleteOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of performing the deletion. If the WriteConcern is - unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Deletes multiple documents

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func deleteMany(_ filter: Document,
    -                       options: DeleteOptions? = nil,
    -                       session: ClientSession? = nil) throws -> DeleteResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - options - - -
    -

    Optional DeleteOptions to use when executing the command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of performing the deletion. If the WriteConcern is - unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/DeleteManyModel.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/DeleteManyModel.html deleted file mode 100644 index 8b7f9b84e..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/DeleteManyModel.html +++ /dev/null @@ -1,636 +0,0 @@ - - - - DeleteManyModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DeleteManyModel

-
-
-
public struct DeleteManyModel : WriteModel, Decodable
- -
-
-

A model for a deleteMany operation within a bulk write.

- -
-
-
-
    -
  • -
    - - - - filter - -
    -
    -
    -
    -
    -
    -

    A Document representing the match criteria.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let filter: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    The collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:collation:) - -
    -
    -
    -
    -
    -
    -

    Create a deleteMany operation for a bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ filter: Document, collation: Document? = nil)
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria.

    -
    -
    - - collation - - -
    -

    Specifies a collation to use.

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Adds the deleteMany operation to a bulk write.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/DeleteOneModel.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/DeleteOneModel.html deleted file mode 100644 index 3adfa1628..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/DeleteOneModel.html +++ /dev/null @@ -1,636 +0,0 @@ - - - - DeleteOneModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DeleteOneModel

-
-
-
public struct DeleteOneModel : WriteModel, Decodable
- -
-
-

A model for a deleteOne operation within a bulk write.

- -
-
-
-
    -
  • -
    - - - - filter - -
    -
    -
    -
    -
    -
    -

    A Document representing the match criteria.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let filter: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    The collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:collation:) - -
    -
    -
    -
    -
    -
    -

    Create a deleteOne operation for a bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ filter: Document, collation: Document? = nil)
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria.

    -
    -
    - - collation - - -
    -

    Specifies a collation to use.

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Adds the deleteOne operation to a bulk write.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/InsertOneModel.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/InsertOneModel.html deleted file mode 100644 index 3df0a9fca..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/InsertOneModel.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - InsertOneModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

InsertOneModel

-
-
-
public struct InsertOneModel : WriteModel, Decodable
- -
-
-

A model for an insertOne operation within a bulk write.

- -
-
-
-
    -
  • -
    - - - - document - -
    -
    -
    -
    -
    -
    -

    The CollectionType to insert.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let document: CollectionType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Create an insertOne operation for a bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ document: CollectionType)
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - document - - -
    -

    The CollectionType to insert.

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Adds the insertOne operation to a bulk write.

    -
    -

    Throws

    -
      -
    • EncodingError if an error occurs while encoding the CollectionType to BSON.
    • -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/ReplaceOneModel.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/ReplaceOneModel.html deleted file mode 100644 index b6d665d61..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/ReplaceOneModel.html +++ /dev/null @@ -1,714 +0,0 @@ - - - - ReplaceOneModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReplaceOneModel

-
-
-
public struct ReplaceOneModel : WriteModel, Decodable
- -
-
-

A model for a replaceOne operation within a bulk write.

- -
-
-
-
    -
  • -
    - - - - filter - -
    -
    -
    -
    -
    -
    -

    A Document representing the match criteria.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let filter: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - replacement - -
    -
    -
    -
    -
    -
    -

    The CollectionType to use as the replacement value.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let replacement: CollectionType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    The collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a replaceOne operation for a bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(filter: Document, replacement: CollectionType, collation: Document? = nil, upsert: Bool? = nil)
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria.

    -
    -
    - - replacement - - -
    -

    The CollectionType to use as the replacement value.

    -
    -
    - - collation - - -
    -

    Specifies a collation to use.

    -
    -
    - - upsert - - -
    -

    When true, creates a new document if no document matches the query.

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Adds the replaceOne operation to a bulk write.

    -
    -

    Throws

    -
      -
    • EncodingError if an error occurs while encoding the CollectionType or options to BSON.
    • -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/UpdateManyModel.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/UpdateManyModel.html deleted file mode 100644 index b1a57048b..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/UpdateManyModel.html +++ /dev/null @@ -1,757 +0,0 @@ - - - - UpdateManyModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UpdateManyModel

-
-
-
public struct UpdateManyModel : WriteModel, Decodable
- -
-
-

A model for an updateMany operation within a bulk write.

- -
-
-
-
    -
  • -
    - - - - filter - -
    -
    -
    -
    -
    -
    -

    A Document representing the match criteria.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let filter: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - update - -
    -
    -
    -
    -
    -
    -

    A Document containing update operators.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let update: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - arrayFilters - -
    -
    -
    -
    -
    -
    -

    A set of filters specifying to which array elements an update should apply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let arrayFilters: [Document]?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    A collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create a updateMany operation for a bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(filter: Document,
    -            update: Document,
    -            arrayFilters: [Document]? = nil,
    -            collation: Document? = nil,
    -            upsert: Bool? = nil)
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria.

    -
    -
    - - update - - -
    -

    A Document containing update operators.

    -
    -
    - - arrayFilters - - -
    -

    A set of filters specifying to which array elements an update should apply.

    -
    -
    - - collation - - -
    -

    Specifies a collation to use.

    -
    -
    - - upsert - - -
    -

    When true, creates a new document if no document matches the query.

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Adds the updateMany operation to a bulk write.

    -
    -

    Throws

    -
      -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/UpdateOneModel.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/UpdateOneModel.html deleted file mode 100644 index cc5122c99..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCollection/UpdateOneModel.html +++ /dev/null @@ -1,757 +0,0 @@ - - - - UpdateOneModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UpdateOneModel

-
-
-
public struct UpdateOneModel : WriteModel, Decodable
- -
-
-

A model for an updateOne operation within a bulk write.

- -
-
-
-
    -
  • -
    - - - - filter - -
    -
    -
    -
    -
    -
    -

    A Document representing the match criteria.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let filter: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - update - -
    -
    -
    -
    -
    -
    -

    A Document containing update operators.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let update: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - arrayFilters - -
    -
    -
    -
    -
    -
    -

    A set of filters specifying to which array elements an update should apply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let arrayFilters: [Document]?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    A collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Create an updateOne operation for a bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(filter: Document,
    -            update: Document,
    -            arrayFilters: [Document]? = nil,
    -            collation: Document? = nil,
    -            upsert: Bool? = nil)
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria.

    -
    -
    - - update - - -
    -

    A Document containing update operators.

    -
    -
    - - arrayFilters - - -
    -

    A set of filters specifying to which array elements an update should apply.

    -
    -
    - - collation - - -
    -

    Specifies a collation to use.

    -
    -
    - - upsert - - -
    -

    When true, creates a new document if no document matches the query.

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Adds the updateOne operation to a bulk write.

    -
    -

    Throws

    -
      -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCursor.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCursor.html deleted file mode 100644 index 432ccd905..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoCursor.html +++ /dev/null @@ -1,618 +0,0 @@ - - - - MongoCursor Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoCursor

-
-
-
public class MongoCursor<T> : Sequence, IteratorProtocol where T : Decodable, T : Encodable
- -
-
-

A MongoDB cursor.

- -
-
-
-
    -
  • -
    - - - - error - -
    -
    -
    -
    -
    -
    -

    The error that occurred while iterating this cursor, if one exists. This should be used to check for errors -after next() returns nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public private(set) var error: Error?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isAlive - -
    -
    -
    -
    -
    -
    -

    Indicates whether this cursor has the potential to return more data. This property is mainly useful for -tailable cursors, where the cursor may be empty but contain more results later on. For non-tailable cursors, -the cursor will always be dead as soon as next() returns nil, or as soon as nextOrError() returns nil or -throws an error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isAlive: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - nextOrError() - -
    -
    -
    -
    -
    -
    -

    Returns the next Document in this cursor or nil, or throws an error if one occurs – compared to next(), -which returns nil and requires manually checking for an error afterward.

    -
    -

    Throws

    -
      -
    • ServerError.commandError if an error occurs on the server while iterating the cursor.
    • -
    • UserError.logicError if this function is called after the cursor has died.
    • -
    • UserError.logicError if this function is called and the session associated with this cursor is inactive.
    • -
    • DecodingError if an error occurs decoding the server’s response.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func nextOrError() throws -> T?
    - -
    -
    -
    -

    Return Value

    -

    the next Document in this cursor, or nil if at the end of the cursor

    -
    -
    -
    -
  • -
  • -
    - - - - next() - -
    -
    -
    -
    -
    -
    -

    Returns the next Document in this cursor, or nil. After this function returns nil, the caller should use -the .error property to check for errors. For tailable cursors, users should also check isAlive after this -method returns nil, to determine if the cursor has the potential to return any more data in the future.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func next() -> T?
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoDatabase.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoDatabase.html deleted file mode 100644 index 6ea29cc37..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoDatabase.html +++ /dev/null @@ -1,1120 +0,0 @@ - - - - MongoDatabase Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoDatabase

-
-
-
public class MongoDatabase
- -
-
-

A MongoDB Database.

- -
-
-
-
    -
  • -
    - - - - encoder - -
    -
    -
    -
    -
    -
    -

    Encoder used by this database for BSON conversions. This encoder’s options are inherited by collections derived -from this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let encoder: BSONEncoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decoder - -
    -
    -
    -
    -
    -
    -

    Decoder whose options are inherited by collections derived from this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let decoder: BSONDecoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    The name of this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var name: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    The ReadConcern set on this database, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    The ReadPreference set on this database

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    The WriteConcern set on this database, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - drop(session:) - -
    -
    -
    -
    -
    -
    -

    Drops this database.

    -
    -

    Throws

    -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func drop(session: ClientSession? = nil) throws
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Access a collection within this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func collection(_ name: String, options: CollectionOptions? = nil) -> MongoCollection<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    the name of the collection to get

    -
    -
    - - options - - -
    -

    options to set on the returned collection

    -
    -
    -
    -
    -

    Return Value

    -

    the requested MongoCollection<Document>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Access a collection within this database, and associates the specified Codable type T with the - returned MongoCollection. This association only exists in the context of this particular - MongoCollection instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func collection<T: Codable>(_ name: String,
    -                                   withType: T.Type,
    -                                   options: CollectionOptions? = nil) -> MongoCollection<T>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    the name of the collection to get

    -
    -
    - - options - - -
    -

    options to set on the returned collection

    -
    -
    -
    -
    -

    Return Value

    -

    the requested MongoCollection<T>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates a collection in this database with the specified options.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func createCollection(_ name: String,
    -                             options: CreateCollectionOptions? = nil,
    -                             session: ClientSession? = nil) throws -> MongoCollection<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    a String, the name of the collection to create

    -
    -
    - - options - - -
    -

    Optional CreateCollectionOptions to use for the collection

    -
    -
    -
    -
    -

    Return Value

    -

    the newly created MongoCollection<Document>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates a collection in this database with the specified options, and associates the - specified Codable type T with the returned MongoCollection. This association only - exists in the context of this particular MongoCollection instance.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func createCollection<T: Codable>(_ name: String,
    -                                         withType type: T.Type,
    -                                         options: CreateCollectionOptions? = nil,
    -                                         session: ClientSession? = nil) throws -> MongoCollection<T>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    a String, the name of the collection to create

    -
    -
    - - options - - -
    -

    Optional CreateCollectionOptions to use for the collection

    -
    -
    -
    -
    -

    Return Value

    -

    the newly created MongoCollection<T>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Lists all the collections in this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • userError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listCollections(options: ListCollectionsOptions? = nil,
    -                            session: ClientSession? = nil) throws -> MongoCursor<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - filter - - -
    -

    a Document, optional criteria to filter results by

    -
    -
    - - options - - -
    -

    Optional ListCollectionsOptions to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a MongoCursor over an array of collections

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Issues a MongoDB command against this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if requests is empty.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.writeError if any error occurs while the command was performing a write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from being performed.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func runCommand(_ command: Document,
    -                       options: RunCommandOptions? = nil,
    -                       session: ClientSession? = nil) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - command - - -
    -

    a Document containing the command to issue against the database

    -
    -
    - - options - - -
    -

    Optional RunCommandOptions to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server response for the command

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoSwift.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoSwift.html deleted file mode 100644 index 8f59dafb7..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/MongoSwift.html +++ /dev/null @@ -1,569 +0,0 @@ - - - - MongoSwift Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoSwift

-
-
-
public final class MongoSwift
- -
-
-

A utility class for libmongoc initialization and cleanup.

- -
-
-
-
    -
  • -
    - - - - versionString - -
    -
    -
    -
    -
    -
    -

    The version of MongoSwift.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static let versionString: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - initialize() - -
    -
    -
    -
    -
    -
    -

    Initializes libmongoc.

    - -

    This function should be called once at the start of the application - before interacting with the driver.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func initialize()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - cleanup() - -
    -
    -
    -
    -
    -
    -

    Cleans up libmongoc.

    - -

    This function should be called once at the end of the application. Users - should not interact with the driver after calling this function.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func cleanup()
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ReadConcern.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ReadConcern.html deleted file mode 100644 index 082147453..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ReadConcern.html +++ /dev/null @@ -1,820 +0,0 @@ - - - - ReadConcern Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReadConcern

-
-
-
public class ReadConcern : Codable
- -
-
-

A class to represent a MongoDB read concern.

- -
-
-
-
    -
  • -
    - - - - Level - -
    -
    -
    -
    -
    -
    -

    An enumeration of possible ReadConcern levels.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum Level : String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - level - -
    -
    -
    -
    -
    -
    -

    The level of this ReadConcern, or nil if the level is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var level: String? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isDefault - -
    -
    -
    -
    -
    -
    -

    Indicates whether this ReadConcern is the server default.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isDefault: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new ReadConcern from a ReadConcern.Level.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public convenience init(_ level: Level)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new ReadConcern from a String corresponding to a read concern level.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ level: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initialize a new empty ReadConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new ReadConcern from a Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public convenience init(_ doc: Document)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new ReadConcern by copying an existing ReadConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from readConcern: ReadConcern)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public required convenience init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
    -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Returns the relaxed extended JSON representation of this ReadConcern. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
    -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: ReadConcern, rhs: ReadConcern) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ReadConcern/Level.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ReadConcern/Level.html deleted file mode 100644 index 771b2dd7d..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ReadConcern/Level.html +++ /dev/null @@ -1,624 +0,0 @@ - - - - Level Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Level

-
-
-
public enum Level : String
- -
-
-

An enumeration of possible ReadConcern levels.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ReadPreference.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ReadPreference.html deleted file mode 100644 index d76c75bc6..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ReadPreference.html +++ /dev/null @@ -1,818 +0,0 @@ - - - - ReadPreference Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReadPreference

-
-
-
public final class ReadPreference
-
extension ReadPreference: Equatable
- -
-
-

A class to represent a MongoDB read preference.

- - -
-
-
-
    -
  • -
    - - - - Mode - -
    -
    -
    -
    -
    -
    -

    An enumeration of possible ReadPreference modes.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum Mode : String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - mode - -
    -
    -
    -
    -
    -
    -

    The mode of this ReadPreference

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var mode: Mode { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - tagSets - -
    -
    -
    -
    -
    -
    -

    The tags of this ReadPreference

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var tagSets: [Document] { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxStalenessSeconds - -
    -
    -
    -
    -
    -
    -

    The maxStalenessSeconds of this ReadPreference

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxStalenessSeconds: Int64? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes a ReadPreference from a Mode.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ mode: Mode)
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - mode - - -
    -

    a Mode

    -
    -
    -
    -
    -

    Return Value

    -

    a new ReadPreference

    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new ReadPreference with the default mode (primary).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public convenience init()
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializes a ReadPreference.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • A UserError.invalidArgumentError if mode is .primary and tagSets is non-empty
    • -
    • A UserError.invalidArgumentError if maxStalenessSeconds non-nil and < 90
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ mode: Mode, tagSets: [Document]? = nil, maxStalenessSeconds: Int64? = nil) throws
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - mode - - -
    -

    a Mode

    -
    -
    - - tagSets - - -
    -

    an optional [Document]

    -
    -
    - - maxStalenessSeconds - - -
    -

    an optional Int64

    -
    -
    -
    -
    -

    Return Value

    -

    a new ReadPreference

    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new ReadPreference by copying an existing ReadPreference.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from readPreference: ReadPreference)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: ReadPreference, rhs: ReadPreference) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ReadPreference/Mode.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ReadPreference/Mode.html deleted file mode 100644 index a2dc2dd4d..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/ReadPreference/Mode.html +++ /dev/null @@ -1,627 +0,0 @@ - - - - Mode Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Mode

-
-
-
public enum Mode : String
- -
-
-

An enumeration of possible ReadPreference modes.

- -
-
-
-
    -
  • -
    - - - - primary - -
    -
    -
    -
    -
    -
    -

    Default mode. All operations read from the current replica set primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case primary
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - primaryPreferred - -
    -
    -
    -
    -
    -
    -

    In most situations, operations read from the primary but if it is -unavailable, operations read from secondary members.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case primaryPreferred
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - secondary - -
    -
    -
    -
    -
    -
    -

    All operations read from the secondary members of the replica set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case secondary
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - secondaryPreferred - -
    -
    -
    -
    -
    -
    -

    In most situations, operations read from secondary members but if no -secondary members are available, operations read from the primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case secondaryPreferred
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - nearest - -
    -
    -
    -
    -
    -
    -

    Operations read from member of the replica set with the least network -latency, irrespective of the member’s type.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case nearest
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/WriteConcern.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/WriteConcern.html deleted file mode 100644 index 0a35d6634..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/WriteConcern.html +++ /dev/null @@ -1,828 +0,0 @@ - - - - WriteConcern Class Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

WriteConcern

-
-
-
public class WriteConcern : Codable
- -
-
-

A class to represent a MongoDB write concern.

- -
-
-
-
    -
  • -
    - - - - W - -
    -
    -
    -
    -
    -
    -

    An option to request acknowledgement that the write operation has propagated to specified mongod instances.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum W : Codable, Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - w - -
    -
    -
    -
    -
    -
    -

    Indicates the W value for this WriteConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var w: W? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - journal - -
    -
    -
    -
    -
    -
    -

    Indicates whether to wait for the write operation to get committed to the journal.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var journal: Bool? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - wtimeoutMS - -
    -
    -
    -
    -
    -
    -

    If the write concern is not satisfied within this timeout (in milliseconds), -the operation will return an error. The value MUST be greater than or equal to 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var wtimeoutMS: Int64? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isAcknowledged - -
    -
    -
    -
    -
    -
    -

    Indicates whether this is an acknowledged write concern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isAcknowledged: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isDefault - -
    -
    -
    -
    -
    -
    -

    Indicates whether this is the default write concern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isDefault: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new, empty WriteConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializes a new WriteConcern.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(journal: Bool? = nil, w: W? = nil, wtimeoutMS: Int64? = nil) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public required convenience init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
    -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Returns the relaxed extended JSON representation of this WriteConcern. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
    -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: WriteConcern, rhs: WriteConcern) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/WriteConcern/W.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/WriteConcern/W.html deleted file mode 100644 index dcd24ad34..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Classes/WriteConcern/W.html +++ /dev/null @@ -1,622 +0,0 @@ - - - - W Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

W

-
-
-
public enum W : Codable, Equatable
- -
-
-

An option to request acknowledgement that the write operation has propagated to specified mongod instances.

- -
-
-
-
    -
  • -
    - - - - number(_:) - -
    -
    -
    -
    -
    -
    -

    Specifies the number of nodes that should acknowledge the write. MUST be greater than or equal to 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case number(Int32)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - tag(_:) - -
    -
    -
    -
    -
    -
    -

    Indicates a tag for nodes that should acknowledge the write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case tag(String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - majority - -
    -
    -
    -
    -
    -
    -

    Specifies that a majority of nodes should acknowledge the write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case majority
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums.html deleted file mode 100644 index 1be13a87c..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums.html +++ /dev/null @@ -1,952 +0,0 @@ - - - - Enumerations Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Enumerations

-

The following enumerations are available globally.

- -
-
-
-
    -
  • -
    - - - - BSON - -
    -
    -
    -
    -
    -
    -

    Enum representing a BSON value.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum BSON
    -
    extension BSON: ExpressibleByStringLiteral
    -
    extension BSON: ExpressibleByBooleanLiteral
    -
    extension BSON: ExpressibleByFloatLiteral
    -
    extension BSON: ExpressibleByIntegerLiteral
    -
    extension BSON: ExpressibleByDictionaryLiteral
    -
    extension BSON: ExpressibleByArrayLiteral
    -
    extension BSON: Equatable
    -
    extension BSON: Hashable
    -
    extension BSON: Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - BSONType - -
    -
    -
    -
    -
    -
    -

    The possible types of BSON values and their corresponding integer values.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum BSONType : UInt32
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DateCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various encoding/decoding strategy pairs for Dates. - Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when - converting Dates between their BSON representations and their representations in (non Document) Codable types.

    - -

    As per the BSON specification, the default strategy is to encode Dates as BSON datetime objects.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum DateCodingStrategy : RawRepresentable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UUIDCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various encoding/decoding strategy pairs for Dates. - Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when - converting UUIDs between their BSON representations and their representations in (non Document) Codable types.

    - -

    As per the BSON specification, the default strategy is to encode UUIDs as BSON binary types with the UUID - subtype.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum UUIDCodingStrategy : RawRepresentable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DataCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Enum representing the various encoding/decoding strategy pairs for Dates. - Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when - converting Datas between their BSON representations and their representations in (non Document) Codable types.

    - -

    As per the BSON specification, the default strategy is to encode Datas as BSON binary types with the generic - binary subtype.

    -
    -

    See also

    - bsonspec.org - -
    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum DataCodingStrategy : RawRepresentable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - OperationType - -
    -
    -
    -
    -
    -
    -

    An enum representing the type of operation for this change event.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum OperationType : String, Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - FullDocument - -
    -
    -
    -
    -
    -
    -

    Describes the modes for configuring the fullDocument field of a change stream document.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum FullDocument : RawRepresentable, Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - WriteModel - -
    -
    -
    -
    -
    -
    -

    Enum encompassing operations that can be run as part of a bulkWrite.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum WriteModel<CollectionType> where CollectionType : Decodable, CollectionType : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ReturnDocument - -
    -
    -
    -
    -
    -
    -

    Indicates which document to return in a find and modify operation.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum ReturnDocument : String, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Hint - -
    -
    -
    -
    -
    -
    -

    An index to “hint” or force MongoDB to use when performing a query.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum Hint : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CursorType - -
    -
    -
    -
    -
    -
    -

    The possible types of MongoCursor or MongoCursor an operation can return.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum CursorType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ServerError - -
    -
    -
    -
    -
    -
    -

    The possible errors corresponding to types of errors encountered in the MongoDB server. -These errors may contain labels providing additional information on their origin.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum ServerError : MongoError
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UserError - -
    -
    -
    -
    -
    -
    -

    The possible errors caused by improper use of the driver by the user.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum UserError : MongoError
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - RuntimeError - -
    -
    -
    -
    -
    -
    -

    The possible errors that can occur unexpectedly during runtime.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum RuntimeError : MongoError
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CollectionType - -
    -
    -
    -
    -
    -
    -

    Describes the type of data store returned when executing listCollections.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum CollectionType : RawRepresentable, Codable
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/BSON.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/BSON.html deleted file mode 100644 index e41f1f649..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/BSON.html +++ /dev/null @@ -1,1959 +0,0 @@ - - - - BSON Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSON

-
-
-
public enum BSON
-
extension BSON: ExpressibleByStringLiteral
-
extension BSON: ExpressibleByBooleanLiteral
-
extension BSON: ExpressibleByFloatLiteral
-
extension BSON: ExpressibleByIntegerLiteral
-
extension BSON: ExpressibleByDictionaryLiteral
-
extension BSON: ExpressibleByArrayLiteral
-
extension BSON: Equatable
-
extension BSON: Hashable
-
extension BSON: Codable
- -
-
-

Enum representing a BSON value.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - double(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON double.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case double(Double)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - string(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON string.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case string(String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - document(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case document(Document)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - array(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON array.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    indirect case array([BSON])
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON binary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary(Binary)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - undefined - -
    -
    -
    -
    -
    -
    -

    A BSON undefined.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case undefined
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - objectId(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON ObjectId.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case objectId(ObjectId)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bool(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON boolean.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case bool(Bool)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - datetime(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON UTC datetime.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case datetime(Date)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - null - -
    -
    -
    -
    -
    -
    -

    A BSON null.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case null
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - regex(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON regular expression.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case regex(RegularExpression)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dbPointer(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON dbPointer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case dbPointer(DBPointer)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - symbol(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON symbol.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case symbol(Symbol)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - code(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON JavaScript code.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case code(Code)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeWithScope(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON JavaScript code with scope.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case codeWithScope(CodeWithScope)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int32(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON int32.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case int32(Int32)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - timestamp(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON timestamp.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case timestamp(Timestamp)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int64(_:) - -
    -
    -
    -
    -
    -
    -

    A BSON int64.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case int64(Int64)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decimal128(_:) - -
    -
    -
    -
    -
    - -
    -

    Declaration

    -
    -

    Swift

    -
    case decimal128(Decimal128)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - minKey - -
    -
    -
    -
    -
    -
    -

    A BSON minKey.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case minKey
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxKey - -
    -
    -
    -
    -
    -
    -

    A BSON maxKey.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case maxKey
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a BSON from an integer. On 64-bit systems, this will result in an .int64. On 32-bit systems, -this will result in an .int32.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ int: Int)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - type - -
    -
    -
    -
    -
    -
    -

    Get the BSONType of this BSON.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var type: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int32Value - -
    -
    -
    -
    -
    -
    -

    If this BSON is an .int32, return it as an Int32. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var int32Value: Int32? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - regexValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .regex, return it as a RegularExpression. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var regexValue: RegularExpression? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeWithScopeValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .codeWithScope, return it as a CodeWithScope. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var codeWithScopeValue: CodeWithScope? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .code, return it as a Code. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var codeValue: Code? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int64Value - -
    -
    -
    -
    -
    -
    -

    If this BSON is an .int64, return it as an Int64. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var int64Value: Int64? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - objectIdValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is an .objectId, return it as an ObjectId. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var objectIdValue: ObjectId? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dateValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .date, return it as a Date. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dateValue: Date? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - arrayValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is an .array, return it as an [BSON]. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var arrayValue: [BSON]? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - stringValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .string, return it as a String. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var stringValue: String? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - documentValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .document, return it as a Document. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var documentValue: Document? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - boolValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .bool, return it as an Bool. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var boolValue: Bool? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binaryValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .binary, return it as a Binary. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var binaryValue: Binary? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - doubleValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .double, return it as a Double. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var doubleValue: Double? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decimal128Value - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .decimal128, return it as a Decimal128. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var decimal128Value: Decimal128? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - symbolValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .symbol, return it as a Symbol. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var symbolValue: Symbol? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dbPointerValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .dbPointer, return it as a DBPointer. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dbPointerValue: DBPointer? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - timestampValue - -
    -
    -
    -
    -
    -
    -

    If this BSON is a .timestamp, return it as a Timestamp. Otherwise, return nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var timestampValue: Timestamp? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - asInt() - -
    -
    -
    -
    -
    -
    -

    Return this BSON as an Int if possible. -This will coerce non-integer numeric cases (e.g. .double) into an Int if such coercion would be lossless.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func asInt() -> Int?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - asInt32() - -
    -
    -
    -
    -
    -
    -

    Return this BSON as an Int32 if possible. -This will coerce numeric cases (e.g. .double) into an Int32 if such coercion would be lossless.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func asInt32() -> Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - asInt64() - -
    -
    -
    -
    -
    -
    -

    Return this BSON as an Int64 if possible. -This will coerce numeric cases (e.g. .double) into an Int64 if such coercion would be lossless.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func asInt64() -> Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - asDouble() - -
    -
    -
    -
    -
    -
    -

    Return this BSON as a Double if possible. -This will coerce numeric cases (e.g. .decimal128) into a Double if such coercion would be lossless.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func asDouble() -> Double?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - asDecimal128() - -
    -
    -
    -
    -
    -
    -

    Return this BSON as a Decimal128 if possible. -This will coerce numeric cases (e.g. .double) into a Decimal128 if such coercion would be lossless.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func asDecimal128() -> Decimal128?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(stringLiteral:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(stringLiteral value: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(booleanLiteral:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(booleanLiteral value: Bool)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(floatLiteral:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(floatLiteral value: Double)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(integerLiteral:) - -
    -
    -
    -
    -
    -
    -

    Initialize a BSON from an integer. On 64-bit systems, this will result in an .int64. On 32-bit systems, -this will result in an .int32.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(integerLiteral value: Int)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(dictionaryLiteral elements: (String, BSON)...)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(arrayLiteral:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(arrayLiteral elements: BSON...)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/BSONType.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/BSONType.html deleted file mode 100644 index c29c3f3aa..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/BSONType.html +++ /dev/null @@ -1,1088 +0,0 @@ - - - - BSONType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONType

-
-
-
public enum BSONType : UInt32
- -
-
-

The possible types of BSON values and their corresponding integer values.

- -
-
-
-
    -
  • -
    - - - - invalid - -
    -
    -
    -
    -
    -
    -

    An invalid type

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case invalid = 0x00
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - double - -
    -
    -
    -
    -
    -
    -

    64-bit binary floating point

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case double = 0x01
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - string - -
    -
    -
    -
    -
    -
    -

    UTF-8 string

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case string = 0x02
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - document - -
    -
    -
    -
    -
    -
    -

    BSON document

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case document = 0x03
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - array - -
    -
    -
    -
    -
    -
    -

    Array

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case array = 0x04
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Binary data

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary = 0x05
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - undefined - -
    -
    -
    -
    -
    -
    -

    Undefined value - deprecated

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case undefined = 0x06
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - objectId - -
    -
    -
    -
    -
    -
    -

    A MongoDB ObjectId.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case objectId = 0x07
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bool - -
    -
    -
    -
    -
    -
    -

    A boolean

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case bool = 0x08
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - datetime - -
    -
    -
    -
    -
    -
    -

    UTC datetime, stored as UTC milliseconds since the Unix epoch

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case datetime = 0x09
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - null - -
    -
    -
    -
    -
    -
    -

    Null value

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case null = 0x0A
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - regex - -
    -
    -
    -
    -
    -
    -

    A regular expression

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case regex = 0x0B
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dbPointer - -
    -
    -
    -
    -
    -
    -

    A database pointer - deprecated

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case dbPointer = 0x0C
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - code - -
    -
    -
    -
    -
    -
    -

    Javascript code

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case code = 0x0D
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - symbol - -
    -
    -
    -
    -
    -
    -

    A symbol - deprecated

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case symbol = 0x0E
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeWithScope - -
    -
    -
    -
    -
    -
    -

    JavaScript code w/ scope

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case codeWithScope = 0x0F
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int32 - -
    -
    -
    -
    -
    -
    -

    32-bit integer

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case int32 = 0x10
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - timestamp - -
    -
    -
    -
    -
    -
    -

    Special internal type used by MongoDB replication and sharding

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case timestamp = 0x11
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int64 - -
    -
    -
    -
    -
    -
    -

    64-bit integer

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case int64 = 0x12
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decimal128 - -
    -
    -
    -
    -
    -
    -

    128-bit decimal floating point

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case decimal128 = 0x13
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - minKey - -
    -
    -
    -
    -
    -
    -

    Special type which compares lower than all other possible BSON element values

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case minKey = 0xFF
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxKey - -
    -
    -
    -
    -
    -
    -

    Special type which compares higher than all other possible BSON element values

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case maxKey = 0x7F
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/CollectionType.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/CollectionType.html deleted file mode 100644 index b3e7d9a11..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/CollectionType.html +++ /dev/null @@ -1,622 +0,0 @@ - - - - CollectionType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CollectionType

-
-
-
public enum CollectionType : RawRepresentable, Codable
- -
-
-

Describes the type of data store returned when executing listCollections.

- -
-
-
-
    -
  • -
    - - - - collection - -
    -
    -
    -
    -
    -
    -

    Specifies that the data store returned is a collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case collection
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - view - -
    -
    -
    -
    -
    -
    -

    Specifies that the data store returned is a view.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case view
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - other(_:) - -
    -
    -
    -
    -
    -
    -

    For an unknown value. For forwards compatibility, no error will be thrown when an unknown value is provided.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case other(String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var rawValue: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(rawValue:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(rawValue: String)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/CursorType.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/CursorType.html deleted file mode 100644 index 0960526b3..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/CursorType.html +++ /dev/null @@ -1,589 +0,0 @@ - - - - CursorType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CursorType

-
-
-
public enum CursorType
- -
-
-

The possible types of MongoCursor or MongoCursor an operation can return.

- -
-
-
-
    -
  • -
    - - - - nonTailable - -
    -
    -
    -
    -
    -
    -

    The default value. A vast majority of cursors will be of this type.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case nonTailable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - tailable - -
    -
    -
    -
    -
    -
    -

    Tailable means the cursor is not closed when the last data is retrieved. - Rather, the cursor marks the final object’s position. You can resume - using the cursor later, from where it was located, if more data were - received. Like any “latent cursor”, the cursor may become invalid at - some point (CursorNotFound) – for example if the final object it - references were deleted.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case tailable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - tailableAwait - -
    -
    -
    -
    -
    -
    -

    Combines the tailable option with awaitData, as defined below.

    - -

    Use with TailableCursor. If we are at the end of the data, block for a - while rather than returning no data. After a timeout period, we do return - as normal. The default is true.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case tailableAwait
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/DataCodingStrategy.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/DataCodingStrategy.html deleted file mode 100644 index b08f379f6..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/DataCodingStrategy.html +++ /dev/null @@ -1,690 +0,0 @@ - - - - DataCodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DataCodingStrategy

-
-
-
public enum DataCodingStrategy : RawRepresentable
- -
-
-

Enum representing the various encoding/decoding strategy pairs for Dates. - Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when - converting Datas between their BSON representations and their representations in (non Document) Codable types.

- -

As per the BSON specification, the default strategy is to encode Datas as BSON binary types with the generic - binary subtype.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - RawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias RawValue = (encoding: BSONEncoder.DataEncodingStrategy, decoding: BSONDecoder.DataDecodingStrategy)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - deferredToData - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Data by deferring to its default encoding implementations.

    - -

    Note: The default encoding implementation attempts to encode the Data as a [UInt8], but because BSON - does not support integer types besides Int32 or Int64, it actually gets encoded to BSON as an [Int32]. - This results in a space inefficient storage of the Data (using 4 bytes of BSON storage per byte of data).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToData
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Data to/from a BSON binary type (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - base64 - -
    -
    -
    -
    -
    -
    -

    Encode the Data to/from a base64 encoded string.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case base64
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Encode the Data by using the given encodeFunc. Decode the Data by using the given decodeFunc. -If encodeFunc does not encode a value, an empty document will be encoded in its place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case custom(encodeFunc: (Data, Encoder) throws -> Void, decodeFunc: (Decoder) throws -> Data)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(rawValue:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?(rawValue: RawValue)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var rawValue: RawValue { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/DateCodingStrategy.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/DateCodingStrategy.html deleted file mode 100644 index 7f871e7ea..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/DateCodingStrategy.html +++ /dev/null @@ -1,766 +0,0 @@ - - - - DateCodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DateCodingStrategy

-
-
-
public enum DateCodingStrategy : RawRepresentable
- -
-
-

Enum representing the various encoding/decoding strategy pairs for Dates. - Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when - converting Dates between their BSON representations and their representations in (non Document) Codable types.

- -

As per the BSON specification, the default strategy is to encode Dates as BSON datetime objects.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - RawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias RawValue = (encoding: BSONEncoder.DateEncodingStrategy, decoding: BSONDecoder.DateDecodingStrategy)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - deferredToDate - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Date by deferring to its default encoding/decoding implementations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToDate
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonDateTime - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Date to/from a BSON datetime object (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case bsonDateTime
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - millisecondsSince1970 - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Date to/from a 64-bit integer counting the number of milliseconds since January 1, 1970.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case millisecondsSince1970
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - secondsSince1970 - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Date to/from a BSON double counting the number of seconds since January 1, 1970.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case secondsSince1970
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - iso8601 - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Date to/from an ISO-8601-formatted string (in RFC 339 format).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case iso8601
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - formatted(_:) - -
    -
    -
    -
    -
    -
    -

    Encode/decode the Date to/from a string formatted by the given formatter.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case formatted(DateFormatter)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Encode the Date by using the given encodeFunc. Decode the Date by using the given decodeFunc. -If encodeFunc does not encode a value, an empty document will be encoded in its place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case custom(encodeFunc: (Date, Encoder) throws -> Void, decodeFunc: (Decoder) throws -> Date)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(rawValue:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?(rawValue: RawValue)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var rawValue: RawValue { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/FullDocument.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/FullDocument.html deleted file mode 100644 index dd04cc07e..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/FullDocument.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - FullDocument Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

FullDocument

-
-
-
public enum FullDocument : RawRepresentable, Codable
- -
-
-

Describes the modes for configuring the fullDocument field of a change stream document.

- -
-
-
-
    -
  • -
    - - - - updateLookup - -
    -
    -
    -
    -
    -
    -

    Specifies that the fullDocument field of an update event will contain a copy of the entire document that -was changed from some time after the change occurred. If the document was deleted since the updated happened, -it will be nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case updateLookup
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - other(_:) - -
    -
    -
    -
    -
    -
    -

    For an unknown value. For forwards compatibility, no error will be thrown when an unknown value is provided.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case other(String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var rawValue: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(rawValue:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?(rawValue: String)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/Hint.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/Hint.html deleted file mode 100644 index dfa616f86..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/Hint.html +++ /dev/null @@ -1,595 +0,0 @@ - - - - Hint Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Hint

-
-
-
public enum Hint : Codable
- -
-
-

An index to “hint” or force MongoDB to use when performing a query.

- -
-
-
-
    -
  • -
    - - - - indexName(_:) - -
    -
    -
    -
    -
    -
    -

    Specifies an index to use by its name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case indexName(String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - indexSpec(_:) - -
    -
    -
    -
    -
    -
    -

    Specifies an index to use by a specification Document containing the index key(s).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case indexSpec(Document)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/MongoEventType.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/MongoEventType.html deleted file mode 100644 index 141bdfcc7..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/MongoEventType.html +++ /dev/null @@ -1,545 +0,0 @@ - - - - MongoEventType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoEventType

-
-
-
public enum MongoEventType
- -
-
-

The two categories of events that can be monitored. One or both can be enabled for a MongoClient.

- -
-
-
-
    -
  • -
    - - - - commandMonitoring - -
    -
    -
    -
    -
    -
    -

    Encompasses events named .commandStarted, .commandSucceeded, .commandFailed

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case commandMonitoring
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - serverMonitoring - -
    -
    -
    -
    -
    -
    -

    Encompasses events named .serverChanged, .serverOpening, .serverClosed, -.topologyChangedEvent, .topologyOpening, .topologyClosed, -.serverHeartbeatStarted, .serverHeartbeatClosed, .serverHeartbeatFailed

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case serverMonitoring
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/OperationType.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/OperationType.html deleted file mode 100644 index 569b34e34..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/OperationType.html +++ /dev/null @@ -1,745 +0,0 @@ - - - - OperationType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

OperationType

-
-
-
public enum OperationType : String, Codable
- -
-
-

An enum representing the type of operation for this change event.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/ReturnDocument.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/ReturnDocument.html deleted file mode 100644 index 6332169ed..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/ReturnDocument.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - ReturnDocument Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReturnDocument

-
-
-
public enum ReturnDocument : String, Decodable
- -
-
-

Indicates which document to return in a find and modify operation.

- -
-
-
-
    -
  • -
    - - - - before - -
    -
    -
    -
    -
    -
    -

    Indicates to return the document before the update, replacement, or insert occurred.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case before = "Before"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - after - -
    -
    -
    -
    -
    -
    -

    Indicates to return the document after the update, replacement, or insert occurred.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case after = "After"
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/RuntimeError.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/RuntimeError.html deleted file mode 100644 index 81392ff58..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/RuntimeError.html +++ /dev/null @@ -1,625 +0,0 @@ - - - - RuntimeError Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

RuntimeError

-
-
-
public enum RuntimeError : MongoError
- -
-
-

The possible errors that can occur unexpectedly during runtime.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Thrown when the driver encounters a internal error not caused by the user. This is usually indicative of a bug -or system related failure (e.g. during memory allocation).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case internalError(message: String)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Thrown when encountering a connection or socket related error. -May contain labels providing additional information on the nature of the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case connectionError(message: String, errorLabels: [String]?)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Thrown when encountering an authentication related error (e.g. invalid credentials).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case authenticationError(message: String)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Thrown when trying to use a feature that the deployment does not support.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case compatibilityError(message: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - errorDescription - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var errorDescription: String? { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/ServerError.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/ServerError.html deleted file mode 100644 index bba3da61b..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/ServerError.html +++ /dev/null @@ -1,606 +0,0 @@ - - - - ServerError Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerError

-
-
-
public enum ServerError : MongoError
- -
-
-

The possible errors corresponding to types of errors encountered in the MongoDB server. -These errors may contain labels providing additional information on their origin.

- - -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Thrown when commands experience errors on the server that prevent execution.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case commandError(code: ServerErrorCode, codeName: String, message: String, errorLabels: [String]?)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Thrown when a single write command fails on the server. -Note: Only one of writeConcernError or writeError will be populated at a time.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case writeError(writeError: WriteError?, writeConcernError: WriteConcernError?, errorLabels: [String]?)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Thrown when the server returns errors as part of an executed bulk write. -Note: writeErrors may not be present if the error experienced was a Write Concern related error. -Note: otherError may be populated if a non-write error occurs as part of one of the operations (e.g. a -connection failure occurs after already successfully performing a few inserts).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case bulkWriteError(writeErrors: [BulkWriteError]?, writeConcernError: WriteConcernError?, otherError: Error?, result: BulkWriteResult?, errorLabels: [String]?)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - errorDescription - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var errorDescription: String? { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/UUIDCodingStrategy.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/UUIDCodingStrategy.html deleted file mode 100644 index 50e8d7299..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/UUIDCodingStrategy.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - UUIDCodingStrategy Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UUIDCodingStrategy

-
-
-
public enum UUIDCodingStrategy : RawRepresentable
- -
-
-

Enum representing the various encoding/decoding strategy pairs for Dates. - Set these on a MongoClient, MongoDatabase, or MongoCollection so that the strategies will be applied when - converting UUIDs between their BSON representations and their representations in (non Document) Codable types.

- -

As per the BSON specification, the default strategy is to encode UUIDs as BSON binary types with the UUID - subtype.

-
-

See also

- bsonspec.org - -
- -
-
-
-
    -
  • -
    - - - - RawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias RawValue = (encoding: BSONEncoder.UUIDEncodingStrategy, decoding: BSONDecoder.UUIDDecodingStrategy)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - deferredToUUID - -
    -
    -
    -
    -
    -
    -

    Encode/decode the UUID by deferring to its default encoding/decoding implementations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case deferredToUUID
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binary - -
    -
    -
    -
    -
    -
    -

    Encode/decode the UUID to/from a BSON binary type (default).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binary
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(rawValue:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?(rawValue: RawValue)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rawValue - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var rawValue: RawValue { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/UserError.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/UserError.html deleted file mode 100644 index 98500ac26..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/UserError.html +++ /dev/null @@ -1,569 +0,0 @@ - - - - UserError Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UserError

-
-
-
public enum UserError : MongoError
- -
-
-

The possible errors caused by improper use of the driver by the user.

- -
-
-
-
    -
  • -
    - - - - logicError(message:) - -
    -
    -
    -
    -
    -
    -

    Thrown when the driver is incorrectly used.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case logicError(message: String)
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Thrown when the user passes in invalid arguments to a driver method.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case invalidArgumentError(message: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - errorDescription - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var errorDescription: String? { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/WriteModel.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/WriteModel.html deleted file mode 100644 index 3b65b798f..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Enums/WriteModel.html +++ /dev/null @@ -1,689 +0,0 @@ - - - - WriteModel Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

WriteModel

-
-
-
public enum WriteModel<CollectionType> where CollectionType : Decodable, CollectionType : Encodable
- -
-
-

Enum encompassing operations that can be run as part of a bulkWrite.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions.html deleted file mode 100644 index 67f3e7cfb..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions.html +++ /dev/null @@ -1,586 +0,0 @@ - - - - Extensions Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Extensions

-

The following extensions are available globally.

- -
-
-
-
    -
  • -
    - - - - Notification - -
    -
    -
    -
    -
    -
    - - See more -
    -
    -
    -
  • -
  • -
    - - - - Date - -
    -
    -
    -
    -
    -
    -

    An extension of Date to represent the BSON Datetime type. Supports millisecond level precision.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    extension Date: BSONValue
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UUID - -
    -
    -
    -
    -
    -
    -

    Extension to allow a UUID to be initialized from a Binary BSONValue.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    extension UUID
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - NSRegularExpression - -
    -
    -
    -
    -
    -
    -

    An extension of NSRegularExpression to allow it to be initialized from a RegularExpression BSONValue.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    extension NSRegularExpression
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Array.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Array.html deleted file mode 100644 index 16b460a6d..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Array.html +++ /dev/null @@ -1,593 +0,0 @@ - - - - Array Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Array

-
-
-
struct Array<Element> : _DestructorSafeContainer
- -
-
-

An extension of Array to represent the BSON array type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> Array
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonEquals(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func bsonEquals(_ other: BSONValue?) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Bool.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Bool.html deleted file mode 100644 index 8d3d7de09..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Bool.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - Bool Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Bool

-
-
-
struct Bool
- -
-
-

An extension of Bool to represent the BSON Boolean type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Date.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Date.html deleted file mode 100644 index 311476220..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Date.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - Date Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Date

-
-
-
extension Date: BSONValue
- -
-
-

An extension of Date to represent the BSON Datetime type. Supports millisecond level precision.

- -
-
-
-
    -
  • -
    - - - - init(msSinceEpoch:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new Date representing the instance msSinceEpoch milliseconds -since the Unix epoch.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(msSinceEpoch: Int64)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - msSinceEpoch - -
    -
    -
    -
    -
    -
    -

    The number of milliseconds after the Unix epoch that this Date occurs.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var msSinceEpoch: Int64 { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Double.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Double.html deleted file mode 100644 index c0ecda431..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Double.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - Double Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Double

-
-
-
struct Double
- -
-
-

An extension of Double to represent the BSON Double type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> Double
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Int.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Int.html deleted file mode 100644 index 7f574480e..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Int.html +++ /dev/null @@ -1,594 +0,0 @@ - - - - Int Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Int

-
-
-
struct Int : FixedWidthInteger, SignedInteger
- -
-
-

An extension of Int to represent the BSON Int32 or Int64 type. -On 64-bit systems, Int corresponds to a BSON Int64. On 32-bit systems, it corresponds to a BSON Int32.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonEquals(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func bsonEquals(_ other: BSONValue?) -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> Int
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Int32.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Int32.html deleted file mode 100644 index f829a1c01..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Int32.html +++ /dev/null @@ -1,593 +0,0 @@ - - - - Int32 Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Int32

-
-
-
struct Int32 : FixedWidthInteger, SignedInteger
- -
-
-

An extension of Int32 to represent the BSON Int32 type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> Int32
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonEquals(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func bsonEquals(_ other: BSONValue?) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Int64.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Int64.html deleted file mode 100644 index 375042634..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Int64.html +++ /dev/null @@ -1,593 +0,0 @@ - - - - Int64 Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Int64

-
-
-
struct Int64 : FixedWidthInteger, SignedInteger
- -
-
-

An extension of Int64 to represent the BSON Int64 type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonEquals(_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func bsonEquals(_ other: BSONValue?) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/NSRegularExpression.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/NSRegularExpression.html deleted file mode 100644 index 3c35ce0e0..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/NSRegularExpression.html +++ /dev/null @@ -1,518 +0,0 @@ - - - - NSRegularExpression Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

NSRegularExpression

-
-
-
extension NSRegularExpression
- -
-
-

An extension of NSRegularExpression to allow it to be initialized from a RegularExpression BSONValue.

- -
-
-
-
    -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new NSRegularExpression with the pattern and options of the provided RegularExpression. -Note: NSRegularExpression does not support the l locale dependence option, so it will -be omitted if set on the provided RegularExpression.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public convenience init(from regex: RegularExpression) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Notification.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Notification.html deleted file mode 100644 index bd2ccefa3..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Notification.html +++ /dev/null @@ -1,511 +0,0 @@ - - - - Notification Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Notification

- -
-
-
-
    -
  • -
    - - - - Name - -
    -
    -
    -
    -
    -
    -

    Extend Notification.Name to have class properties corresponding to each type -of event. This allows creating notifications and observers using these names.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    extension Notification.Name
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Notification/Name.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Notification/Name.html deleted file mode 100644 index 8e6be573c..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/Notification/Name.html +++ /dev/null @@ -1,814 +0,0 @@ - - - - Name Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Name

-
-
-
extension Notification.Name
- -
-
-

Extend Notification.Name to have class properties corresponding to each type -of event. This allows creating notifications and observers using these names.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/String.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/String.html deleted file mode 100644 index 47a38a1d1..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/String.html +++ /dev/null @@ -1,567 +0,0 @@ - - - - String Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

String

-
-
-
struct String
- -
-
-

An extension of String to represent the BSON string type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> String
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/UUID.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/UUID.html deleted file mode 100644 index e9521cf21..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Extensions/UUID.html +++ /dev/null @@ -1,523 +0,0 @@ - - - - UUID Extension Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UUID

-
-
-
extension UUID
- -
-
-

Extension to allow a UUID to be initialized from a Binary BSONValue.

- -
-
-
-
    -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a UUID instance from a Binary BSONValue.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if a non-UUID subtype is set on the Binary.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from binary: Binary) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Functions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Functions.html deleted file mode 100644 index c343f2c27..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Functions.html +++ /dev/null @@ -1,513 +0,0 @@ - - - - Functions Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Functions

-

The following functions are available globally.

- -
-
-
-
    -
  • -
    - - - - cleanupMongoSwift() - -
    -
    -
    -
    -
    -
    -

    Release all internal memory and other resources allocated by MongoSwift.

    - -

    This function should be called once at the end of the application. Users - should not interact with the driver after calling this function.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func cleanupMongoSwift()
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Guides.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Guides.html deleted file mode 100644 index 067df95aa..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Guides.html +++ /dev/null @@ -1,528 +0,0 @@ - - - - Guides Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- - -
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols.html deleted file mode 100644 index 4e35fd3ac..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols.html +++ /dev/null @@ -1,594 +0,0 @@ - - - - Protocols Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Protocols

-

The following protocols are available globally.

- -
-
-
-
    -
  • -
    - - - - MongoEvent - -
    -
    -
    -
    -
    -
    -

    A protocol for monitoring events to implement, specifying their name.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public protocol MongoEvent
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoCommandEvent - -
    -
    -
    -
    -
    -
    -

    A protocol for command monitoring events to implement, specifying the command name and other shared fields.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public protocol MongoCommandEvent : MongoEvent
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Protocol indicating a set of options can be used to configure BSONEncoder and BSONDecoder.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public protocol CodingStrategyProvider
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoError - -
    -
    -
    -
    -
    -
    -

    An empty protocol for encapsulating all errors that this package can throw.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public protocol MongoError : LocalizedError
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/BSONNumber.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/BSONNumber.html deleted file mode 100644 index 39f0459c2..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/BSONNumber.html +++ /dev/null @@ -1,675 +0,0 @@ - - - - BSONNumber Protocol Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONNumber

-
-
-
public protocol BSONNumber : BSONValue
- -
-
-

A protocol that numeric BSONValues should conform to. It provides functionality for converting to BSON’s native -number types.

- -
-
-
-
    -
  • -
    - - - - intValue - - - Default implementation - -
    -
    -
    -
    -
    -
    -

    Create an Int from this BSONNumber. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -

    Default Implementation

    -
    -

    Create an Int from this BinaryFloatingPoint. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var intValue: Int? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int32Value - - - Default implementation - -
    -
    -
    -
    -
    -
    -

    Create an Int32 from this BSONNumber. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -

    Default Implementation

    -
    -

    Create an Int32 from this BinaryFloatingPoint. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var int32Value: Int32? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - int64Value - - - Default implementation - -
    -
    -
    -
    -
    -
    -

    Create an Int64 from this BSONNumber. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -

    Default Implementation

    -
    -

    Create an Int64 from this BinaryFloatingPoint. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var int64Value: Int64? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - doubleValue - - - Default implementation - -
    -
    -
    -
    -
    -
    -

    Create a Double from this BSONNumber. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -

    Default Implementation

    -
    -

    Create a Double from this BinaryFloatingPoint. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var doubleValue: Double? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decimal128Value - - - Default implementation - -
    -
    -
    -
    -
    -
    -

    Create a Decimal128 from this BSONNumber. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -

    Default Implementation

    -
    -

    Create a Decimal128 from this Numeric. -This will return nil if the conversion cannot result in an exact representation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var decimal128Value: Decimal128? { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/BSONValue.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/BSONValue.html deleted file mode 100644 index 342d5a01b..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/BSONValue.html +++ /dev/null @@ -1,662 +0,0 @@ - - - - BSONValue Protocol Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONValue

-
-
-
public protocol BSONValue
- -
-
-

A protocol all types representing BSONTypes must implement.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    -

    The BSONType of this value.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    -

    Given the DocumentStorage backing a Document, appends this BSONValue to the end.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • RuntimeError.internalError if the DocumentStorage would exceed the maximum size by encoding this -key-value pair.
    • -
    • UserError.logicError if the value is an Array and it contains a non-BSONValue element.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - storage - - -
    -

    A DocumentStorage to write to.

    -
    -
    - - key - - -
    -

    A String, the key under which to store the value.

    -
    -
    -
    -
    -
    -
  • -
  • -
    - - - - bsonEquals(_:) - - - Default implementation - -
    -
    -
    -
    -
    -
    -

    Function to test equality with another BSONValue. This function tests for exact BSON equality. - This means that differing types with equivalent value are not equivalent.

    - -

    e.g. - 4.0 (Double) != 4 (Int)

    - -
    -

    Default Implementation

    -
    -

    Default implementation of bsonEquals for BSONValues that conform to Equatable.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    func bsonEquals(_ other: BSONValue?) -> Bool
    - -
    -
    -
    -

    Return Value

    -

    true if self is equal to rhs, false otherwise.

    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    -

    Given a DocumentIterator known to have a next value of this type, - initializes the value.

    -
    -

    Throws

    - UserError.logicError if the current type of the DocumentIterator does not correspond to the - associated type of this BSONValue. - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    static func from(iterator iter: DocumentIterator) throws -> Self
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/CodingStrategyProvider.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/CodingStrategyProvider.html deleted file mode 100644 index 70af6da38..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/CodingStrategyProvider.html +++ /dev/null @@ -1,573 +0,0 @@ - - - - CodingStrategyProvider Protocol Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CodingStrategyProvider

-
-
-
public protocol CodingStrategyProvider
- -
-
-

Protocol indicating a set of options can be used to configure BSONEncoder and BSONDecoder.

- -
-
-
-
    -
  • -
    - - - - dateCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the strategy to use when converting Dates between their BSON representations and their -representations in (non Document) Codable types.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var dateCodingStrategy: DateCodingStrategy? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuidCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the strategy to use when converting UUIDs between their BSON representations and their -representations in (non Document) Codable types.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var uuidCodingStrategy: UUIDCodingStrategy? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dataCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the strategy to use when converting Datas between their BSON representations and their -representations in (non Document) Codable types.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var dataCodingStrategy: DataCodingStrategy? { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/MongoCommandEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/MongoCommandEvent.html deleted file mode 100644 index 6d0770ee2..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/MongoCommandEvent.html +++ /dev/null @@ -1,598 +0,0 @@ - - - - MongoCommandEvent Protocol Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoCommandEvent

-
-
-
public protocol MongoCommandEvent : MongoEvent
- -
-
-

A protocol for command monitoring events to implement, specifying the command name and other shared fields.

- -
-
-
-
    -
  • -
    - - - - commandName - -
    -
    -
    -
    -
    -
    -

    The command name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var commandName: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - requestId - -
    -
    -
    -
    -
    -
    -

    The driver generated request id.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var requestId: Int64 { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - operationId - -
    -
    -
    -
    -
    -
    -

    The driver generated operation id. This is used to link events together such -as bulk write operations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var operationId: Int64 { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection id for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    var connectionId: ConnectionId { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/MongoEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/MongoEvent.html deleted file mode 100644 index b647ebb64..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/MongoEvent.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - MongoEvent Protocol Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoEvent

-
-
-
public protocol MongoEvent
- -
-
-

A protocol for monitoring events to implement, specifying their name.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/WriteModel.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/WriteModel.html deleted file mode 100644 index 4c117ba7a..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Protocols/WriteModel.html +++ /dev/null @@ -1,551 +0,0 @@ - - - - WriteModel Protocol Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

WriteModel

-
-
-
public protocol WriteModel
- -
-
-

A protocol indicating write operations that can be batched together using MongoCollection.bulkWrite.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    Adds the operation to a bulk write.

    - -

    The index argument denotes the operation’s order within the bulk write - and should match its index within the requests array parameter for - MongoCollection.bulkWrite.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - bulk - - - -
    - - index - - -
    -

    Index of the operation within the MongoCollection.bulkWrite requests array.

    -
    -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs.html deleted file mode 100644 index e529dc43b..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs.html +++ /dev/null @@ -1,2656 +0,0 @@ - - - - Structures Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Structures

-

The following structures are available globally.

- -
-
-
-
    -
  • -
    - - - - CommandStartedEvent - -
    -
    -
    -
    -
    -
    -

    An event published when a command starts. The event is stored under the key event -in the userInfo property of Notifications posted under the name .commandStarted.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CommandStartedEvent : MongoCommandEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CommandSucceededEvent - -
    -
    -
    -
    -
    -
    -

    An event published when a command succeeds. The event is stored under the key event -in the userInfo property of Notifications posted under the name .commandSucceeded.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CommandSucceededEvent : MongoCommandEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CommandFailedEvent - -
    -
    -
    -
    -
    -
    -

    An event published when a command fails. The event is stored under the key event -in the userInfo property of Notifications posted under the name .commandFailed.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CommandFailedEvent : MongoCommandEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Published when a server description changes. This does NOT include changes to the server’s roundTripTime property.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerDescriptionChangedEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ServerOpeningEvent - -
    -
    -
    -
    -
    -
    -

    Published when a server is initialized.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerOpeningEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ServerClosedEvent - -
    -
    -
    -
    -
    -
    -

    Published when a server is closed.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerClosedEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Published when a topology description changes.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct TopologyDescriptionChangedEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - TopologyOpeningEvent - -
    -
    -
    -
    -
    -
    -

    Published when a topology is initialized.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct TopologyOpeningEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - TopologyClosedEvent - -
    -
    -
    -
    -
    -
    -

    Published when a topology is closed.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct TopologyClosedEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Published when the server monitor’s ismaster command is started - immediately before -the ismaster command is serialized into raw BSON and written to the socket.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerHeartbeatStartedEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Published when the server monitor’s ismaster succeeds.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerHeartbeatSucceededEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Published when the server monitor’s ismaster fails, either with an “ok: 0” or a socket exception.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerHeartbeatFailedEvent : MongoEvent, InitializableFromOpaquePointer
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Binary - -
    -
    -
    -
    -
    -
    -

    A struct to represent the BSON Binary type.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Binary : BSONValue, Equatable, Codable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DBPointer - -
    -
    -
    -
    -
    -
    -

    A struct to represent the deprecated DBPointer type. -DBPointers cannot be instantiated, but they can be read from existing documents that contain them.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DBPointer : BSONValue, Codable, Equatable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Decimal128 - -
    -
    -
    -
    -
    -
    -

    A struct to represent the BSON Decimal128 type.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Decimal128 : BSONValue, Equatable, Codable, CustomStringConvertible
    -
    extension Decimal128: Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CodeWithScope - -
    -
    -
    -
    -
    -
    -

    A struct to represent BSON CodeWithScope.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CodeWithScope : BSONValue, Equatable, Codable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Code - -
    -
    -
    -
    -
    -
    -

    A struct to represent the BSON Code type.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Code : BSONValue, Equatable, Codable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ObjectId - -
    -
    -
    -
    -
    -
    -

    A struct to represent the BSON ObjectId type.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ObjectId : BSONValue, Equatable, CustomStringConvertible, Codable
    -
    extension ObjectId: Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - RegularExpression - -
    -
    -
    -
    -
    -
    -

    A struct to represent a BSON regular expression.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct RegularExpression : BSONValue, Equatable, Codable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Symbol - -
    -
    -
    -
    -
    -
    -

    A struct to represent the deprecated Symbol type. -Symbols cannot be instantiated, but they can be read from existing documents that contain them.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Symbol : BSONValue, CustomStringConvertible, Codable, Equatable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Timestamp - -
    -
    -
    -
    -
    -
    -

    A struct to represent the BSON Timestamp type.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct Timestamp : BSONValue, Equatable, Codable, Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - BSONCoderOptions - -
    -
    -
    -
    -
    -
    -

    Options struct used for configuring the coding strategies on BSONEncoder and BSONDecoder.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct BSONCoderOptions : CodingStrategyProvider
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Document - -
    -
    -
    -
    -
    -
    -

    A struct representing the BSON document type.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @dynamicMemberLookup
    -public struct Document
    -
    extension Document: Codable
    -
    extension Document: Collection
    -
    extension Document: Sequence
    -
    extension Document: Equatable
    -
    extension Document: CustomStringConvertible
    -
    extension Document: ExpressibleByDictionaryLiteral
    -
    extension Document: Hashable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ResumeToken - -
    -
    -
    -
    -
    -
    -

    A token used for manually resuming a change stream. Pass this to the resumeAfter field of -ChangeStreamOptions to resume or start a change stream where a previous one left off.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ResumeToken : Codable, Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UpdateDescription - -
    -
    -
    -
    -
    -
    -

    An UpdateDescription containing fields that will be present in the change stream document for -operations of type update.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct UpdateDescription : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ChangeStreamEvent - -
    -
    -
    -
    -
    -
    -

    The response document type from a ChangeStream.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ChangeStreamEvent<T> : Codable where T : Decodable, T : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ChangeStreamOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when creating a ChangeStream.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ChangeStreamOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ClientSessionOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when creating a ClientSession.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ClientSessionOptions
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ClientOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when creating a MongoClient.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ClientOptions : CodingStrategyProvider, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DatabaseOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when retrieving a MongoDatabase from a MongoClient.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DatabaseOptions : CodingStrategyProvider
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - TLSOptions - -
    -
    -
    -
    -
    -
    -

    Options used to configure TLS/SSL connections to the database.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct TLSOptions
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoCollection - -
    -
    -
    -
    -
    -
    -

    A MongoDB collection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct MongoCollection<T> where T : Decodable, T : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DeleteModelOptions - -
    -
    -
    -
    -
    -
    -

    Options to use with a WriteModel.deleteOne or WriteModel.deleteMany.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DeleteModelOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use with a WriteModel.replaceOne.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ReplaceOneModelOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UpdateModelOptions - -
    -
    -
    -
    -
    -
    -

    Options to use with a WriteModel.updateOne or WriteModel.updateMany.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct UpdateModelOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - BulkWriteOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when performing a bulk write operation on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct BulkWriteOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - BulkWriteResult - -
    -
    -
    -
    -
    -
    -

    The result of a bulk write operation on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct BulkWriteResult : Decodable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use when executing a findOneAndDelete command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct FindOneAndDeleteOptions : FindAndModifyOptionsConvertible, Decodable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use when executing a findOneAndReplace command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct FindOneAndReplaceOptions : FindAndModifyOptionsConvertible, Decodable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use when executing a findOneAndUpdate command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct FindOneAndUpdateOptions : FindAndModifyOptionsConvertible, Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - IndexModel - -
    -
    -
    -
    -
    -
    -

    A struct representing an index on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct IndexModel : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - IndexOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when creating an index for a collection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct IndexOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - AggregateOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing an aggregate command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct AggregateOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - FindOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing a find command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct FindOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - InsertOneOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing an insertOne command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct InsertOneOptions : Codable, BulkWriteOptionsConvertible
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UpdateOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing an update command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct UpdateOptions : Codable, BulkWriteOptionsConvertible
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ReplaceOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing a replace command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ReplaceOptions : Codable, BulkWriteOptionsConvertible
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DeleteOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing a delete command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DeleteOptions : Codable, BulkWriteOptionsConvertible
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - InsertOneResult - -
    -
    -
    -
    -
    -
    -

    The result of an insertOne command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct InsertOneResult : Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - InsertManyResult - -
    -
    -
    -
    -
    -
    -

    The result of a multi-document insert operation on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct InsertManyResult
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DeleteResult - -
    -
    -
    -
    -
    -
    -

    The result of a delete command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DeleteResult : Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - UpdateResult - -
    -
    -
    -
    -
    -
    -

    The result of an update operation on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct UpdateResult : Decodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DropCollectionOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when dropping a collection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DropCollectionOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CollectionOptions - -
    -
    -
    -
    -
    -
    -

    Options to set on a retrieved MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CollectionOptions : CodingStrategyProvider
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DropDatabaseOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing a dropDatabase command.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DropDatabaseOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoDatabase - -
    -
    -
    -
    -
    -
    -

    A MongoDB Database.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct MongoDatabase
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - WriteError - -
    -
    -
    -
    -
    -
    -

    A struct to represent a single write error not resulting from an executed bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct WriteError : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - WriteConcernError - -
    -
    -
    -
    -
    -
    -

    A struct to represent a write concern error resulting from an executed bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct WriteConcernError : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - BulkWriteError - -
    -
    -
    -
    -
    -
    -

    A struct to represent a write error resulting from an executed bulk write.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct BulkWriteError : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - MongoNamespace - -
    -
    -
    -
    -
    -
    -

    Represents a MongoDB namespace for a database or collection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct MongoNamespace : Codable, Equatable
    -
    extension MongoNamespace: CustomStringConvertible
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CountDocumentsOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing a countDocuments command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CountDocumentsOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use when executing a createCollection command on a MongoDatabase.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CreateCollectionOptions : Codable, CodingStrategyProvider
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CreateIndexOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when creating a new index on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CreateIndexOptions : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DistinctOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when executing a distinct command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DistinctOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DropIndexOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when dropping an index from a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DropIndexOptions : Encodable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use when executing an estimatedDocumentCount command on a MongoCollection.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct EstimatedDocumentCountOptions : Codable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Info about the collection that is returned with a listCollections call.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CollectionSpecificationInfo : Codable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Specifications of a collection returned when executing listCollections.

    - - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct CollectionSpecification : Codable
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Options to use when executing a listCollections command on a MongoDatabase.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ListCollectionsOptions : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - DatabaseSpecification - -
    -
    -
    -
    -
    -
    -

    A struct modeling the information returned from the listDatabases command about a single database.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct DatabaseSpecification : Codable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - RunCommandOptions - -
    -
    -
    -
    -
    -
    -

    Options to use when running a command against a MongoDatabase.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct RunCommandOptions : Encodable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ReadConcern - -
    -
    -
    -
    -
    -
    -

    A struct to represent a MongoDB read concern.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ReadConcern : Codable
    -
    extension ReadConcern: CustomStringConvertible
    -
    extension ReadConcern: Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ConnectionId - -
    -
    -
    -
    -
    -
    -

    A struct representing a server connection, consisting of a host and port.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ConnectionId : Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ServerDescription - -
    -
    -
    -
    -
    -
    -

    A struct describing a mongod or mongos process.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct ServerDescription
    -
    extension ServerDescription: Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - TopologyDescription - -
    -
    -
    -
    -
    -
    -

    A struct describing the state of a MongoDB deployment: its type (standalone, replica set, or sharded), -which servers are up, what type of servers they are, which is primary, and so on.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct TopologyDescription
    -
    extension TopologyDescription: Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - WriteConcern - -
    -
    -
    -
    -
    -
    -

    A class to represent a MongoDB write concern.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public struct WriteConcern : Codable
    -
    extension WriteConcern: CustomStringConvertible
    -
    extension WriteConcern: Equatable
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/AggregateOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/AggregateOptions.html deleted file mode 100644 index ea00f9a26..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/AggregateOptions.html +++ /dev/null @@ -1,800 +0,0 @@ - - - - AggregateOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

AggregateOptions

-
-
-
public struct AggregateOptions : Codable
- -
-
-

Options to use when executing an aggregate command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - allowDiskUse - -
    -
    -
    -
    -
    -
    -

    Enables writing to temporary files. When set to true, aggregation stages -can write data to the _tmp subdirectory in the dbPath directory.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var allowDiskUse: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - batchSize - -
    -
    -
    -
    -
    -
    -

    The number of Documents to return per batch.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var batchSize: Int32?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation. This only applies -when the $out stage is specified.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - comment - -
    -
    -
    -
    -
    -
    -

    Enables users to specify an arbitrary string to help trace the operation through -the database profiler, currentOp and logs. The default is to not send a value.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var comment: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hint - -
    -
    -
    -
    -
    -
    -

    The index hint to use for the aggregation. The hint does not apply to $lookup and $graphLookup stages.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hint: Hint?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A ReadConcern to use in read stages of this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A ReadPreference to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    A WriteConcern to use in $out stages of this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    allowDiskUse: Bool? = nil,
    -    batchSize: Int32? = nil,
    -    bypassDocumentValidation: Bool? = nil,
    -    collation: Document? = nil,
    -    comment: String? = nil,
    -    hint: Hint? = nil,
    -    maxTimeMS: Int64? = nil,
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/AnyBSONValue.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/AnyBSONValue.html deleted file mode 100644 index db860f500..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/AnyBSONValue.html +++ /dev/null @@ -1,670 +0,0 @@ - - - - AnyBSONValue Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

AnyBSONValue

-
-
-
public struct AnyBSONValue : Codable, Equatable, Hashable
- -
-
-

A struct wrapping a BSONValue type that allows for encoding/ -decoding BSONValues of unknown type.

- -
-
-
-
    -
  • -
    - - - - hash(into:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hash(into hasher: inout Hasher)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - value - -
    -
    -
    -
    -
    -
    -

    The BSONValue wrapped by this struct.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let value: BSONValue
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new AnyBSONValue wrapping the provided BSONValue.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ value: BSONValue)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: AnyBSONValue, rhs: AnyBSONValue) -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new AnyBSONValue from a Decoder.

    - -

    Caveats for usage with Decoders other than MongoSwift’s BSONDecoder - - 1) This method does not support initializing an AnyBSONValue wrapping - a Date. This is because, in non-BSON formats, Dates are encoded - as other types such as Double or String. We have no way of knowing - which type is the intended one when decoding to a Document, as Documents - can contain any BSONValue type, so for simplicity we always go with a - Double or a String over a Date. - 2) Numeric values will be attempted to be decoded in the following - order of types: Int, Int32, Int64, Double. The first one - that can successfully represent the value with no loss of precision will - be used.

    -
    -

    Throws

    -
      -
    • DecodingError if a BSONValue could not be decoded from the given decoder (which is not a BSONDecoder).
    • -
    • DecodingError if a BSON datetime is encountered but a non-default date decoding strategy was set on the -decoder (which is a BSONDecoder).
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BSONCoderOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BSONCoderOptions.html deleted file mode 100644 index 81bf77b94..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BSONCoderOptions.html +++ /dev/null @@ -1,598 +0,0 @@ - - - - BSONCoderOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONCoderOptions

-
-
-
public struct BSONCoderOptions : CodingStrategyProvider
- -
-
-

Options struct used for configuring the coding strategies on BSONEncoder and BSONDecoder.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BSONNull.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BSONNull.html deleted file mode 100644 index 713ccd79f..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BSONNull.html +++ /dev/null @@ -1,646 +0,0 @@ - - - - BSONNull Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONNull

-
-
-
public struct BSONNull : BSONValue, Codable, Equatable
- -
-
-

A struct to represent the BSON null type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> BSONNull
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new BSONNull instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BSONUndefined.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BSONUndefined.html deleted file mode 100644 index 198c7b63b..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BSONUndefined.html +++ /dev/null @@ -1,620 +0,0 @@ - - - - BSONUndefined Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BSONUndefined

-
-
-
public struct BSONUndefined : BSONValue, Equatable, Codable
- -
-
-

A struct to represent the deprecated Undefined type. -Undefined instances cannot be created, but they can be read from existing documents that contain them.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> BSONUndefined
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Binary.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Binary.html deleted file mode 100644 index 64cf6ba4a..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Binary.html +++ /dev/null @@ -1,795 +0,0 @@ - - - - Binary Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Binary

-
-
-
public struct Binary : BSONValue, Equatable, Codable, Hashable
- -
-
-

A struct to represent the BSON Binary type.

- -
-
-
-
    -
  • -
    - - - - data - -
    -
    -
    -
    -
    -
    -

    The binary data.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let data: Data
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - subtype - -
    -
    -
    -
    -
    -
    -

    The binary subtype for this data.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let subtype: UInt8
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Subtype - -
    -
    -
    -
    -
    -
    -

    Subtypes for BSON Binary values.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum Subtype : UInt8
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a Binary instance from a UUID.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if a Binary cannot be constructed from this UUID.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from uuid: UUID) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(data:subtype:) - -
    -
    -
    -
    -
    -
    -

    Initializes a Binary instance from a Data object and a UInt8 subtype.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the provided data is incompatible with the specified subtype.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(data: Data, subtype: UInt8) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(data:subtype:) - -
    -
    -
    -
    -
    -
    -

    Initializes a Binary instance from a Data object and a Subtype.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the provided data is incompatible with the specified subtype.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(data: Data, subtype: Subtype) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(base64:subtype:) - -
    -
    -
    -
    -
    -
    -

    Initializes a Binary instance from a base64 String and a UInt8 subtype.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the base64 String is invalid or if the provided data is -incompatible with the specified subtype.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(base64: String, subtype: UInt8) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(base64:subtype:) - -
    -
    -
    -
    -
    -
    -

    Initializes a Binary instance from a base64 String and a Subtype.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the base64 String is invalid or if the provided data is -incompatible with the specified subtype.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(base64: String, subtype: Subtype) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Binary/Subtype.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Binary/Subtype.html deleted file mode 100644 index 99a9a3cf6..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Binary/Subtype.html +++ /dev/null @@ -1,678 +0,0 @@ - - - - Subtype Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Subtype

-
-
-
public enum Subtype : UInt8
- -
-
-

Subtypes for BSON Binary values.

- -
-
-
-
    -
  • -
    - - - - generic - -
    -
    -
    -
    -
    -
    -

    Generic binary subtype

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case generic
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - function - -
    -
    -
    -
    -
    -
    -

    A function

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case function
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - binaryDeprecated - -
    -
    -
    -
    -
    -
    -

    Binary (old)

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case binaryDeprecated
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuidDeprecated - -
    -
    -
    -
    -
    -
    -

    UUID (old)

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case uuidDeprecated
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuid - -
    -
    -
    -
    -
    -
    -

    UUID (RFC 4122)

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case uuid
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - md5 - -
    -
    -
    -
    -
    -
    -

    MD5

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case md5
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - userDefined - -
    -
    -
    -
    -
    -
    -

    User defined

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case userDefined = 0x80
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BulkWriteError.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BulkWriteError.html deleted file mode 100644 index 61799be0f..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BulkWriteError.html +++ /dev/null @@ -1,623 +0,0 @@ - - - - BulkWriteError Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BulkWriteError

-
-
-
public struct BulkWriteError : Codable
- -
-
-

A struct to represent a write error resulting from an executed bulk write.

- -
-
-
-
    -
  • -
    - - - - code - -
    -
    -
    -
    -
    -
    -

    An integer value identifying the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let code: ServerErrorCode
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeName - -
    -
    -
    -
    -
    -
    -

    A human-readable string identifying the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let codeName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - message - -
    -
    -
    -
    -
    -
    -

    A description of the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let message: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - index - -
    -
    -
    -
    -
    -
    -

    The index of the request that errored.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let index: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BulkWriteOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BulkWriteOptions.html deleted file mode 100644 index 995e5aaf1..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BulkWriteOptions.html +++ /dev/null @@ -1,601 +0,0 @@ - - - - BulkWriteOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BulkWriteOptions

-
-
-
public struct BulkWriteOptions : Codable
- -
-
-

Options to use when performing a bulk write operation on a MongoCollection.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ordered - -
    -
    -
    -
    -
    -
    -

    If true (the default), operations will be executed serially in order -and a write error will abort execution of the entire bulk write. If -false, operations may execute in an arbitrary order and execution will -not stop after encountering a write error (i.e. multiple errors may be -reported after all operations have been attempted).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var ordered: Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the bulk write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(bypassDocumentValidation: Bool? = nil, ordered: Bool? = nil, writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BulkWriteResult.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BulkWriteResult.html deleted file mode 100644 index 2e517aa0a..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/BulkWriteResult.html +++ /dev/null @@ -1,704 +0,0 @@ - - - - BulkWriteResult Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

BulkWriteResult

-
-
-
public struct BulkWriteResult : Decodable
- -
-
-

The result of a bulk write operation on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - deletedCount - -
    -
    -
    -
    -
    -
    -

    Number of documents deleted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let deletedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - insertedCount - -
    -
    -
    -
    -
    -
    -

    Number of documents inserted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let insertedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - insertedIds - -
    -
    -
    -
    -
    -
    -

    Map of the index of the operation to the id of the inserted document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let insertedIds: [Int : BSON]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - matchedCount - -
    -
    -
    -
    -
    -
    -

    Number of documents matched for update.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let matchedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - modifiedCount - -
    -
    -
    -
    -
    -
    -

    Number of documents modified.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let modifiedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsertedCount - -
    -
    -
    -
    -
    -
    -

    Number of documents upserted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsertedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsertedIds - -
    -
    -
    -
    -
    -
    -

    Map of the index of the operation to the id of the upserted document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsertedIds: [Int : BSON]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ChangeStreamEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ChangeStreamEvent.html deleted file mode 100644 index 8ea206317..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ChangeStreamEvent.html +++ /dev/null @@ -1,668 +0,0 @@ - - - - ChangeStreamEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ChangeStreamEvent

-
-
-
public struct ChangeStreamEvent<T> : Codable where T : Decodable, T : Encodable
- -
-
-

The response document type from a ChangeStream.

- -
-
-
-
    -
  • -
    - - - - operationType - -
    -
    -
    -
    -
    -
    -

    Describes the type of operation for this change.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let operationType: OperationType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - _id - -
    -
    -
    -
    -
    -
    -

    An opaque token for use when resuming an interrupted change stream.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let _id: ResumeToken
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ns - -
    -
    -
    -
    -
    -
    -

    A document containing the database and collection names in which this change happened.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let ns: MongoNamespace
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - documentKey - -
    -
    -
    -
    -
    -
    -

    Only present for options of type insert, update, replace and delete. For unsharded collections this -contains a single field, _id, with the value of the _id of the document updated. For sharded collections, this -will contain all the components of the shard key in order, followed by the _id if the _id isn’t part of the -shard key.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let documentKey: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - updateDescription - -
    -
    -
    -
    -
    -
    -

    An UpdateDescription containing updated and removed fields in this operation. Only present for operations of -typeupdate.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let updateDescription: UpdateDescription?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - fullDocument - -
    -
    -
    -
    -
    -
    -

    Always present for operations of type insert and replace. Also present for operations of type update if - the user has specified .updateLookup for the fullDocument option in the ChangeStreamOptions used to create - the change stream that emitted this document.

    - -

    For operations of type insert’ andreplace’, this key will contain the document being inserted, or the new - version of the document that is replacing the existing document, respectively.

    - -

    For operations of type `update’, this key will contain a copy of the full version of the document from some - point after the update occurred. If the document was deleted since the updated happened, it will be nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let fullDocument: T?
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ChangeStreamOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ChangeStreamOptions.html deleted file mode 100644 index 21cd02e68..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ChangeStreamOptions.html +++ /dev/null @@ -1,716 +0,0 @@ - - - - ChangeStreamOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ChangeStreamOptions

-
-
-
public struct ChangeStreamOptions : Codable
- -
-
-

Options to use when creating a ChangeStream.

- -
-
-
-
    -
  • -
    - - - - batchSize - -
    -
    -
    -
    -
    -
    -

    The number of documents to return per batch. If omitted, the server will use its default batch size.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var batchSize: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - fullDocument - -
    -
    -
    -
    -
    -
    -

    Indicates how the fullDocument field of a change stream document should be filled out by the server. -By default (indicated by a nil value for this option), the fullDocument field in the change stream document -will always be present in the case of ‘insert’ and ‘replace’ operations (containing the document being inserted) -and will be nil for all other operations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var fullDocument: FullDocument?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxAwaitTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time in milliseconds for the server to wait on new documents to satisfy a -change stream query. If omitted, the server will use its default timeout.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxAwaitTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - resumeAfter - -
    -
    -
    -
    -
    -
    -

    A ResumeToken that manually specifies the logical starting point for the new change stream. -The change stream will attempt to resume notifications starting after the operation associated with -the provided token.

    -
    -

    Note

    - A change stream cannot be resumed after an invalidate event (e.g. a collection drop or rename). - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var resumeAfter: ResumeToken?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - startAtOperationTime - -
    -
    -
    -
    -
    -
    -

    The change stream will only provide changes that occurred at or after the specified timestamp. -Any command run against the server will return an operation time that can be used here.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var startAtOperationTime: Timestamp?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializes a ChangeStreamOptions.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    batchSize: Int32? = nil,
    -    collation: Document? = nil,
    -    fullDocument: FullDocument? = nil,
    -    maxAwaitTimeMS: Int64? = nil,
    -    resumeAfter: ResumeToken? = nil,
    -    startAtOperationTime: Timestamp? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ClientOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ClientOptions.html deleted file mode 100644 index b70c4c73e..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ClientOptions.html +++ /dev/null @@ -1,877 +0,0 @@ - - - - ClientOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ClientOptions

-
-
-
public struct ClientOptions : CodingStrategyProvider, Decodable
- -
-
-

Options to use when creating a MongoClient.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ClientSessionOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ClientSessionOptions.html deleted file mode 100644 index 0a2e789e5..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ClientSessionOptions.html +++ /dev/null @@ -1,548 +0,0 @@ - - - - ClientSessionOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ClientSessionOptions

-
-
-
public struct ClientSessionOptions
- -
-
-

Options to use when creating a ClientSession.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Code.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Code.html deleted file mode 100644 index af08503d3..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Code.html +++ /dev/null @@ -1,595 +0,0 @@ - - - - Code Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Code

-
-
-
public struct Code : BSONValue, Equatable, Codable, Hashable
- -
-
-

A struct to represent the BSON Code type.

- -
-
-
-
    -
  • -
    - - - - code - -
    -
    -
    -
    -
    -
    -

    A string containing Javascript code.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let code: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(code:) - -
    -
    -
    -
    -
    -
    -

    Initializes a CodeWithScope with an optional scope value.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(code: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CodeWithScope.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CodeWithScope.html deleted file mode 100644 index c3427e40f..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CodeWithScope.html +++ /dev/null @@ -1,623 +0,0 @@ - - - - CodeWithScope Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CodeWithScope

-
-
-
public struct CodeWithScope : BSONValue, Equatable, Codable, Hashable
- -
-
-

A struct to represent BSON CodeWithScope.

- -
-
-
-
    -
  • -
    - - - - code - -
    -
    -
    -
    -
    -
    -

    A string containing Javascript code.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let code: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - scope - -
    -
    -
    -
    -
    -
    -

    An optional scope Document containing a mapping of identifiers to values, -representing the context in which code should be evaluated.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let scope: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(code:scope:) - -
    -
    -
    -
    -
    -
    -

    Initializes a CodeWithScope with an optional scope value.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(code: String, scope: Document)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CollectionOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CollectionOptions.html deleted file mode 100644 index ef323db00..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CollectionOptions.html +++ /dev/null @@ -1,691 +0,0 @@ - - - - CollectionOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CollectionOptions

-
-
-
public struct CollectionOptions : CodingStrategyProvider
- -
-
-

Options to set on a retrieved MongoCollection.

- -
-
-
-
    -
  • -
    - - - - dataCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the DataCodingStrategy to use for BSON encoding/decoding operations performed by this collection. -It is the responsibility of the user to ensure that any Datas already stored in this collection can be -decoded using this strategy.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dataCodingStrategy: DataCodingStrategy?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dateCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this collection. -It is the responsibility of the user to ensure that any Dates already stored in this collection can be -decoded using this strategy.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dateCodingStrategy: DateCodingStrategy?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A read concern to set on the returned collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A read preference to set on the returned collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuidCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the UUIDCodingStrategy to use for BSON encoding/decoding operations performed by this collection. -It is the responsibility of the user to ensure that any UUIDs already stored in this collection can be -decoded using this strategy.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var uuidCodingStrategy: UUIDCodingStrategy?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    A write concern to set on the returned collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all arguments to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    dataCodingStrategy: DataCodingStrategy? = nil,
    -    dateCodingStrategy: DateCodingStrategy? = nil,
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil,
    -    uuidCodingStrategy: UUIDCodingStrategy? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CollectionSpecification.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CollectionSpecification.html deleted file mode 100644 index 148c2339c..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CollectionSpecification.html +++ /dev/null @@ -1,631 +0,0 @@ - - - - CollectionSpecification Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CollectionSpecification

-
-
-
public struct CollectionSpecification : Codable
- -
-
-

Specifications of a collection returned when executing listCollections.

- - -
-
-
-
    -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    The name of the collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let name: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - type - -
    -
    -
    -
    -
    -
    -

    The type of data store returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let type: CollectionType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - options - -
    -
    -
    -
    -
    -
    -

    Options that were used when creating this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let options: CreateCollectionOptions?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - info - -
    -
    -
    -
    -
    -
    -

    Contains info pertaining to the collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let info: CollectionSpecificationInfo
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - idIndex - -
    -
    -
    -
    -
    -
    -

    Provides info on the _id index of the collection. nil when this data store is of type view.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let idIndex: IndexModel?
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CollectionSpecificationInfo.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CollectionSpecificationInfo.html deleted file mode 100644 index 91f510971..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CollectionSpecificationInfo.html +++ /dev/null @@ -1,551 +0,0 @@ - - - - CollectionSpecificationInfo Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CollectionSpecificationInfo

-
-
-
public struct CollectionSpecificationInfo : Codable
- -
-
-

Info about the collection that is returned with a listCollections call.

- - -
-
-
-
    -
  • -
    - - - - readOnly - -
    -
    -
    -
    -
    -
    -

    Indicates whether or not the data store is read-only.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readOnly: Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuid - -
    -
    -
    -
    -
    -
    -

    The collection’s UUID - once established, this does not change and remains the same across replica -set members and shards in a sharded cluster. If the data store is a view, this field is nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let uuid: UUID?
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CommandFailedEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CommandFailedEvent.html deleted file mode 100644 index 3c33addbc..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CommandFailedEvent.html +++ /dev/null @@ -1,680 +0,0 @@ - - - - CommandFailedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CommandFailedEvent

-
-
-
public struct CommandFailedEvent : MongoCommandEvent, InitializableFromOpaquePointer
- -
-
-

An event published when a command fails. The event is stored under the key event -in the userInfo property of Notifications posted under the name .commandFailed.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - duration - -
    -
    -
    -
    -
    -
    -

    The execution time of the event, in microseconds.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let duration: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - commandName - -
    -
    -
    -
    -
    -
    -

    The command name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let commandName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - failure - -
    -
    -
    -
    -
    -
    -

    The failure, represented as a MongoError.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let failure: MongoError
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - requestId - -
    -
    -
    -
    -
    -
    -

    The client generated request id.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let requestId: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - operationId - -
    -
    -
    -
    -
    -
    -

    The driver generated operation id. This is used to link events together such -as bulk write operations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let operationId: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection id for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CommandStartedEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CommandStartedEvent.html deleted file mode 100644 index 91d823e10..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CommandStartedEvent.html +++ /dev/null @@ -1,680 +0,0 @@ - - - - CommandStartedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CommandStartedEvent

-
-
-
public struct CommandStartedEvent : MongoCommandEvent, InitializableFromOpaquePointer
- -
-
-

An event published when a command starts. The event is stored under the key event -in the userInfo property of Notifications posted under the name .commandStarted.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - command - -
    -
    -
    -
    -
    -
    -

    The command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let command: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - databaseName - -
    -
    -
    -
    -
    -
    -

    The database name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let databaseName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - commandName - -
    -
    -
    -
    -
    -
    -

    The command name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let commandName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - requestId - -
    -
    -
    -
    -
    -
    -

    The driver generated request id.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let requestId: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - operationId - -
    -
    -
    -
    -
    -
    -

    The driver generated operation id. This is used to link events together such -as bulk write operations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let operationId: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection id for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CommandSucceededEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CommandSucceededEvent.html deleted file mode 100644 index 70842d609..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CommandSucceededEvent.html +++ /dev/null @@ -1,680 +0,0 @@ - - - - CommandSucceededEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CommandSucceededEvent

-
-
-
public struct CommandSucceededEvent : MongoCommandEvent, InitializableFromOpaquePointer
- -
-
-

An event published when a command succeeds. The event is stored under the key event -in the userInfo property of Notifications posted under the name .commandSucceeded.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - duration - -
    -
    -
    -
    -
    -
    -

    The execution time of the event, in microseconds.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let duration: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - reply - -
    -
    -
    -
    -
    -
    -

    The command reply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let reply: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - commandName - -
    -
    -
    -
    -
    -
    -

    The command name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let commandName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - requestId - -
    -
    -
    -
    -
    -
    -

    The driver generated request id.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let requestId: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - operationId - -
    -
    -
    -
    -
    -
    -

    The driver generated operation id. This is used to link events together such -as bulk write operations.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let operationId: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection id for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ConnectionId.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ConnectionId.html deleted file mode 100644 index beabbad21..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ConnectionId.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - ConnectionId Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ConnectionId

-
-
-
public struct ConnectionId : Equatable
- -
-
-

A struct representing a server connection, consisting of a host and port.

- -
-
-
-
    -
  • -
    - - - - host - -
    -
    -
    -
    -
    -
    -

    A string representing the host for this connection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let host: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - port - -
    -
    -
    -
    -
    -
    -

    The port number for this connection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let port: UInt16
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CountDocumentsOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CountDocumentsOptions.html deleted file mode 100644 index e58ec27ee..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CountDocumentsOptions.html +++ /dev/null @@ -1,713 +0,0 @@ - - - - CountDocumentsOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CountDocumentsOptions

-
-
-
public struct CountDocumentsOptions : Codable
- -
-
-

Options to use when executing a countDocuments command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hint - -
    -
    -
    -
    -
    -
    -

    A hint for the index to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hint: Hint?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - limit - -
    -
    -
    -
    -
    -
    -

    The maximum number of documents to count.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var limit: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A ReadConcern to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A ReadPreference to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - skip - -
    -
    -
    -
    -
    -
    -

    The number of documents to skip before counting.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var skip: Int64?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    collation: Document? = nil,
    -    hint: Hint? = nil,
    -    limit: Int64? = nil,
    -    maxTimeMS: Int64? = nil,
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil,
    -    skip: Int64? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CountOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CountOptions.html deleted file mode 100644 index 789c63798..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CountOptions.html +++ /dev/null @@ -1,711 +0,0 @@ - - - - CountOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CountOptions

-
-
-
public struct CountOptions : Codable
- -
-
-

Options to use when executing a count command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hint - -
    -
    -
    -
    -
    -
    -

    A hint for the index to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hint: Hint?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - limit - -
    -
    -
    -
    -
    -
    -

    The maximum number of documents to count.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var limit: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - skip - -
    -
    -
    -
    -
    -
    -

    The number of documents to skip before counting.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var skip: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A ReadConcern to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A ReadPreference to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(collation: Document? = nil,
    -            hint: Hint? = nil,
    -            limit: Int64? = nil,
    -            maxTimeMS: Int64? = nil,
    -            readConcern: ReadConcern? = nil,
    -            readPreference: ReadPreference? = nil,
    -            skip: Int64? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CreateCollectionOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CreateCollectionOptions.html deleted file mode 100644 index 2bb52b0f8..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CreateCollectionOptions.html +++ /dev/null @@ -1,974 +0,0 @@ - - - - CreateCollectionOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CreateCollectionOptions

-
-
-
public struct CreateCollectionOptions : Codable, CodingStrategyProvider
- -
-
-

Options to use when executing a createCollection command on a MongoDatabase.

- -
-
-
-
    -
  • -
    - - - - autoIndexId - -
    -
    -
    -
    -
    -
    -

    Whether or not this collection will automatically generate an index on _id.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var autoIndexId: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - capped - -
    -
    -
    -
    -
    -
    -

    Indicates whether this will be a capped collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var capped: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies the default collation for the collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dataCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the DataCodingStrategy to use for BSON encoding/decoding operations performed by this collection. -It is the responsibility of the user to ensure that any Datas already stored in this collection can be -decoded using this strategy.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dataCodingStrategy: DataCodingStrategy?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - dateCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this collection. -It is the responsibility of the user to ensure that any Dates already stored in this collection can be -decoded using this strategy.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var dateCodingStrategy: DateCodingStrategy?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - indexOptionDefaults - -
    -
    -
    -
    -
    -
    -

    Specify a default configuration for indexes created on this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var indexOptionDefaults: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - max - -
    -
    -
    -
    -
    -
    -

    Maximum number of documents allowed in the collection (if capped).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var max: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - pipeline - -
    -
    -
    -
    -
    -
    -

    An array consisting of aggregation pipeline stages. When used with viewOn, will create the view by applying -this pipeline to the source collection or view.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var pipeline: [Document]?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - size - -
    -
    -
    -
    -
    -
    -

    Maximum size, in bytes, of this collection (if capped).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var size: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - storageEngine - -
    -
    -
    -
    -
    -
    -

    Specifies storage engine configuration for this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var storageEngine: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - uuidCodingStrategy - -
    -
    -
    -
    -
    -
    -

    Specifies the UUIDCodingStrategy to use for BSON encoding/decoding operations performed by this collection. -It is the responsibility of the user to ensure that any UUIDs already stored in this collection can be -decoded using this strategy.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var uuidCodingStrategy: UUIDCodingStrategy?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - validationAction - -
    -
    -
    -
    -
    -
    -

    Determines whether to error on invalid documents or just warn about the violations but allow invalid documents -to be inserted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var validationAction: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - validationLevel - -
    -
    -
    -
    -
    -
    -

    Determines how strictly MongoDB applies the validation rules to existing documents during an update.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var validationLevel: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - validator - -
    -
    -
    -
    -
    -
    -

    What validator should be used for the collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var validator: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - viewOn - -
    -
    -
    -
    -
    -
    -

    The name of the source collection or view from which to create the view.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var viewOn: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    A write concern to use when executing this command. To set a read or write concern for the collection itself, -retrieve the collection using MongoDatabase.collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    autoIndexId: Bool? = nil,
    -    capped: Bool? = nil,
    -    collation: Document? = nil,
    -    dataCodingStrategy: DataCodingStrategy? = nil,
    -    dateCodingStrategy: DateCodingStrategy? = nil,
    -    indexOptionDefaults: Document? = nil,
    -    max: Int64? = nil,
    -    pipeline: [Document]? = nil,
    -    size: Int64? = nil,
    -    storageEngine: Document? = nil,
    -    uuidCodingStrategy: UUIDCodingStrategy? = nil,
    -    validationAction: String? = nil,
    -    validationLevel: String? = nil,
    -    validator: Document? = nil,
    -    viewOn: String? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CreateIndexOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CreateIndexOptions.html deleted file mode 100644 index 36fbad6d8..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/CreateIndexOptions.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - CreateIndexOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

CreateIndexOptions

-
-
-
public struct CreateIndexOptions : Encodable
- -
-
-

Options to use when creating a new index on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run - enforced server-side.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializer allowing any/all parameters to be omitted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(maxTimeMS: Int64? = nil, writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DBPointer.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DBPointer.html deleted file mode 100644 index b87eda24f..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DBPointer.html +++ /dev/null @@ -1,596 +0,0 @@ - - - - DBPointer Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DBPointer

-
-
-
public struct DBPointer : BSONValue, Codable, Equatable, Hashable
- -
-
-

A struct to represent the deprecated DBPointer type. -DBPointers cannot be instantiated, but they can be read from existing documents that contain them.

- -
-
-
-
    -
  • -
    - - - - ref - -
    -
    -
    -
    -
    -
    -

    Destination namespace of the pointer.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let ref: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - id - -
    -
    -
    -
    -
    -
    -

    Destination _id (assumed to be an ObjectId) of the pointed-to document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let id: ObjectId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DatabaseOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DatabaseOptions.html deleted file mode 100644 index aff6ddf2c..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DatabaseOptions.html +++ /dev/null @@ -1,688 +0,0 @@ - - - - DatabaseOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DatabaseOptions

-
-
-
public struct DatabaseOptions : CodingStrategyProvider
- -
-
-

Options to use when retrieving a MongoDatabase from a MongoClient.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DatabaseSpecification.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DatabaseSpecification.html deleted file mode 100644 index f97f5346d..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DatabaseSpecification.html +++ /dev/null @@ -1,598 +0,0 @@ - - - - DatabaseSpecification Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DatabaseSpecification

-
-
-
public struct DatabaseSpecification : Codable
- -
-
-

A struct modeling the information returned from the listDatabases command about a single database.

- -
-
-
-
    -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    The name of the database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let name: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sizeOnDisk - -
    -
    -
    -
    -
    -
    -

    The amount of disk space consumed by this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let sizeOnDisk: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - empty - -
    -
    -
    -
    -
    -
    -

    Whether or not this database is empty.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let empty: Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - shards - -
    -
    -
    -
    -
    -
    -

    For sharded clusters, this field includes a document which maps each shard to the size in bytes of the database -on disk on that shard. For non sharded environments, this field is nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let shards: Document?
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Decimal128.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Decimal128.html deleted file mode 100644 index 2ad8cd4ac..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Decimal128.html +++ /dev/null @@ -1,653 +0,0 @@ - - - - Decimal128 Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Decimal128

-
-
-
public struct Decimal128 : BSONValue, Equatable, Codable, CustomStringConvertible
-
extension Decimal128: Hashable
- -
-
-

A struct to represent the BSON Decimal128 type.

- -
-
-
-
    -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes a Decimal128 value from the provided String. Returns nil if the input is not a valid -Decimal128 string.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?(_ data: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: Decimal128, rhs: Decimal128) -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hash(into:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hash(into hasher: inout Hasher)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DeleteModelOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DeleteModelOptions.html deleted file mode 100644 index 286c0631a..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DeleteModelOptions.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - DeleteModelOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DeleteModelOptions

-
-
-
public struct DeleteModelOptions : Codable
- -
-
-

Options to use with a WriteModel.deleteOne or WriteModel.deleteMany.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    The collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(collation:) - -
    -
    -
    -
    -
    -
    -

    Initializer allowing any/all options to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(collation: Document? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DeleteOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DeleteOptions.html deleted file mode 100644 index 223437176..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DeleteOptions.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - DeleteOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DeleteOptions

-
-
-
public struct DeleteOptions : Codable, BulkWriteOptionsConvertible
- -
-
-

Options to use when executing a delete command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing collation to be omitted or optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(collation: Document? = nil, writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DeleteResult.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DeleteResult.html deleted file mode 100644 index b3ddc3c02..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DeleteResult.html +++ /dev/null @@ -1,516 +0,0 @@ - - - - DeleteResult Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- - -
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DistinctOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DistinctOptions.html deleted file mode 100644 index 5178ba357..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DistinctOptions.html +++ /dev/null @@ -1,629 +0,0 @@ - - - - DistinctOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DistinctOptions

-
-
-
public struct DistinctOptions : Codable
- -
-
-

Options to use when executing a distinct command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A ReadConcern to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A ReadPreference to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    collation: Document? = nil,
    -    maxTimeMS: Int64? = nil,
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Document.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Document.html deleted file mode 100644 index 1f619fa23..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Document.html +++ /dev/null @@ -1,1926 +0,0 @@ - - - - Document Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Document

-
-
-
@dynamicMemberLookup
-public struct Document
-
extension Document: Codable
-
extension Document: Collection
-
extension Document: Sequence
-
extension Document: Equatable
-
extension Document: CustomStringConvertible
-
extension Document: ExpressibleByDictionaryLiteral
-
extension Document: Hashable
- -
-
-

A struct representing the BSON document type.

- -
-
-
-
    -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    This method will work with any Decoder, but for non-BSON -decoders, we do not support decoding Dates, because of limitations -of decoding to AnyBSONValues. See AnyBSONValue.init(from:) for -more information.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - Index - -
    -
    -
    -
    -
    -
    -

    The index type of a document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias Index = Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - startIndex - -
    -
    -
    -
    -
    -
    -

    Returns the start index of the Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var startIndex: Index { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - endIndex - -
    -
    -
    -
    -
    -
    -

    Returns the end index of the Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var endIndex: Index { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - index(after:) - -
    -
    -
    -
    -
    -
    -

    Returns the index after the given index for this Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func index(after i: Index) -> Index
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - subscript(_:) - -
    -
    -
    -
    -
    -
    -

    Allows access to a KeyValuePair from the Document, given the position of the desired KeyValuePair held -within. This method does not guarantee constant-time (O(1)) access.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(position: Index) -> KeyValuePair { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - subscript(_:) - -
    -
    -
    -
    -
    -
    -

    Allows access to a KeyValuePair from the Document, given a range of indices of the desired KeyValuePair‘s -held within. This method does not guarantee constant-time (O(1)) access.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(bounds: Range<Index>) -> Document { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - KeyValuePair - -
    -
    -
    -
    -
    -
    -

    The element type of a document: a tuple containing an individual key-value pair.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias KeyValuePair = (key: String, value: BSON)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - SubSequence - -
    -
    -
    -
    -
    -
    -

    The type that is returned from methods such as dropFirst() and split().

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias SubSequence = Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isEmpty - -
    -
    -
    -
    -
    -
    -

    Returns a Bool indicating whether the document is empty.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isEmpty: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - makeIterator() - -
    -
    -
    -
    -
    -
    -

    Returns a DocumentIterator over the values in this Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func makeIterator() -> DocumentIterator
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - mapValues(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a new document containing the keys of this document with the values transformed by the given closure.

    -
    -

    Throws

    -

    An error if transform throws an error.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func mapValues(_ transform: (BSON) throws -> BSON) rethrows -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - transform - - -
    -

    A closure that transforms a BSONValue. transform accepts each value of the document as its - parameter and returns a transformed BSONValue of the same or of a different type.

    -
    -
    -
    -
    -

    Return Value

    -

    A document containing the keys and transformed values of this document.

    -
    -
    -
    -
  • -
  • -
    - - - - dropFirst(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a document containing all but the given number of initial key-value pairs.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func dropFirst(_ n: Int) -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - k - - -
    -

    The number of key-value pairs to drop from the beginning of the document. k must be > 0.

    -
    -
    -
    -
    -

    Return Value

    -

    A document starting after the specified number of key-value pairs.

    -
    -
    -
    -
  • -
  • -
    - - - - dropLast(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a document containing all but the given number of final key-value pairs.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func dropLast(_ n: Int) -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - k - - -
    -

    The number of key-value pairs to drop from the end of the document. Must be greater than or equal to zero.

    -
    -
    -
    -
    -

    Return Value

    -

    A document leaving off the specified number of final key-value pairs.

    -
    -
    -
    -
  • -
  • -
    - - - - drop(while:) - -
    -
    -
    -
    -
    -
    -

    Returns a document by skipping the initial, consecutive key-value pairs that satisfy the given predicate.

    -
    -

    Throws

    -

    An error if predicate throws an error.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func drop(while predicate: (KeyValuePair) throws -> Bool) rethrows -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - predicate - - -
    -

    A closure that takes a key-value pair as its argument and returns a boolean indicating whether - the key-value pair should be included in the result.

    -
    -
    -
    -
    -

    Return Value

    -

    A document starting after the initial, consecutive key-value pairs that satisfy predicate.

    -
    -
    -
    -
  • -
  • -
    - - - - prefix(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a document, up to the specified maximum length, containing the initial key-value pairs of the document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func prefix(_ maxLength: Int) -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - maxLength - - -
    -

    The maximum length for the returned document. Must be greater than or equal to zero.

    -
    -
    -
    -
    -

    Return Value

    -

    A document starting at the beginning of this document with at most maxLength key-value pairs.

    -
    -
    -
    -
  • -
  • -
    - - - - prefix(while:) - -
    -
    -
    -
    -
    -
    -

    Returns a document containing the initial, consecutive key-value pairs that satisfy the given predicate.

    -
    -

    Throws

    -

    An error if predicate throws an error.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func prefix(while predicate: (KeyValuePair) throws -> Bool) rethrows -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - predicate - - -
    -

    A closure that takes a key-value pair as its argument and returns a boolean indicating whether - the key-value pair should be included in the result.

    -
    -
    -
    -
    -

    Return Value

    -

    A document containing the initial, consecutive key-value pairs that satisfy predicate.

    -
    -
    -
    -
  • -
  • -
    - - - - suffix(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a document, up to the specified maximum length, containing the final key-value pairs of the document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func suffix(_ maxLength: Int) -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - maxLength - - -
    -

    The maximum length for the returned document. Must be greater than or equal to zero.

    -
    -
    -
    -
    -

    Return Value

    -

    A document ending at the end of this document with at most maxLength key-value pairs.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Returns the longest possible subsequences of the document, in order, that don’t contain key-value pairs - satisfying the given predicate. Key-value pairs that are used to split the document are not returned as part of - any subsequence.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func split(
    -    maxSplits: Int = Int.max,
    -    omittingEmptySubsequences: Bool = true,
    -    whereSeparator isSeparator: (KeyValuePair) throws -> Bool
    -) rethrows -> [Document]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - maxSplits - - -
    -

    The maximum number of times to split the document, or one less than the number of subsequences to - return. If maxSplits + 1 subsequences are returned, the last one is a suffix of the original - document containing the remaining key-value pairs. maxSplits must be greater than or equal to - zero. The default value is Int.max.

    -
    -
    - - omittingEmptySubsequences - - -
    -

    If false, an empty document is returned in the result for each pair of - consecutive key-value pairs satisfying the isSeparator predicate and for each - key-value pair at the start or end of the document satisfying the isSeparator - predicate. If true, only nonempty documents are returned. The default value is - true.

    -
    -
    - - isSeparator - - -
    -

    A closure that returns true if its argument should be used to split the document and otherwise - returns false.

    -
    -
    -
    -
    -

    Return Value

    -

    An array of documents, split from this document’s key-value pairs.

    -
    -
    -
    -
  • -
  • -
    - - - - filter(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a new document containing the elements of the document that satisfy the given predicate.

    -
    -

    Throws

    -

    An error if isIncluded throws an error.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func filter(_ isIncluded: (KeyValuePair) throws -> Bool) rethrows -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - isIncluded - - -
    -

    A closure that takes a key-value pair as its argument and returns a Bool indicating whether - the pair should be included in the returned document.

    -
    -
    -
    -
    -

    Return Value

    -

    A document containing the key-value pairs that isIncluded allows.

    -
    -
    -
    -
  • -
  • -
    - - - - keys - -
    -
    -
    -
    -
    -
    -

    Returns a [String] containing the keys in this Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var keys: [String] { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - values - -
    -
    -
    -
    -
    -
    -

    Returns a [BSONValue] containing the values stored in this Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var values: [BSON] { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - count - -
    -
    -
    -
    -
    -
    -

    Returns the number of (key, value) pairs stored at the top level of this Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var count: Int { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - extendedJSON - -
    -
    -
    -
    -
    -
    -

    Returns the relaxed extended JSON representation of this Document. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var extendedJSON: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - canonicalExtendedJSON - -
    -
    -
    -
    -
    -
    -

    Returns the canonical extended JSON representation of this Document. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var canonicalExtendedJSON: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rawBSON - -
    -
    -
    -
    -
    -
    -

    Returns a copy of the raw BSON data for this Document, represented as Data.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var rawBSON: Data { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new, empty Document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(fromJSON:) - -
    -
    -
    -
    -
    -
    -

    Constructs a new Document from the provided JSON text.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • A UserError.invalidArgumentError if the data passed in is invalid JSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(fromJSON: Data) throws
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - fromJSON - - -
    -

    a JSON document as Data to parse into a Document

    -
    -
    -
    -
    -

    Return Value

    -

    the parsed Document

    -
    -
    -
    -
  • -
  • -
    - - - - init(fromJSON:) - -
    -
    -
    -
    -
    -
    -

    Convenience initializer for constructing a Document from a String.

    -
    -

    Throws

    -
      -
    • A UserError.invalidArgumentError if the string passed in is invalid JSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(fromJSON json: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(fromBSON:) - -
    -
    -
    -
    -
    -
    -

    Constructs a Document from raw BSON Data.

    -
    -

    Throws

    -
      -
    • A UserError.invalidArgumentError if bson is too short or too long to be valid BSON.
    • -
    • A UserError.invalidArgumentError if the first four bytes of bson do not contain bson.count.
    • -
    • A UserError.invalidArgumentError if the final byte of bson is not a null byte.
    • -
    - -
    -

    See also

    - http://bsonspec.org/ - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(fromBSON bson: Data) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hasKey(_:) - -
    -
    -
    -
    -
    -
    -

    Returns a Boolean indicating whether this Document contains the provided key.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hasKey(_ key: String) -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - subscript(_:) - -
    -
    -
    -
    -
    -
    -

    Allows setting values and retrieving values using subscript syntax. -For example:

    -
     let d = Document()
    - d["a"] = 1
    - print(d["a"]) // prints 1
    -
    - -

    A nil return suggests that the subscripted key does not exist in the Document. A true BSON null is returned as -a BSONNull.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(key: String) -> BSON? { get set }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - subscript(_:default:) - -
    -
    -
    -
    -
    -
    -

    An implementation identical to subscript(key: String), but offers the ability to choose a default value if the -key is missing. -For example:

    -
     let d: Document = ["hello": "world"]
    - print(d["hello", default: "foo"]) // prints "world"
    - print(d["a", default: "foo"]) // prints "foo"
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public subscript(key: String, default defaultValue: @autoclosure () -> BSON) -> BSON
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Allows setting values and retrieving values using dot-notation syntax. - For example:

    -
      let d = Document()
    -  d.a = 1
    -  print(d.a) // prints 1
    -
    - -

    A nil return suggests that the key does not exist in the Document. A true BSON null is returned as - a BSONNull.

    - -

    Only available in Swift 4.2+.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @available(swift 4.2)
    -public subscript(dynamicMember member: String) -> BSON? { get set }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: Document, rhs: Document) -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Returns the relaxed extended JSON representation of this Document. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializes a Document using a dictionary literal where the - keys are Strings and the values are BSONValues. For example: - d: Document = ["a" : 1 ]

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(dictionaryLiteral keyValuePairs: (String, BSON)...)
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - dictionaryLiteral - - -
    -

    a [String: BSONValue]

    -
    -
    -
    -
    -

    Return Value

    -

    a new Document

    -
    -
    -
    -
  • -
  • -
    - - - - hash(into:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hash(into hasher: inout Hasher)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DropCollectionOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DropCollectionOptions.html deleted file mode 100644 index 78620c6a9..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DropCollectionOptions.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - DropCollectionOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DropCollectionOptions

-
-
-
public struct DropCollectionOptions : Codable
- -
-
-

Options to use when dropping a collection.

- -
-
-
-
    -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(writeConcern:) - -
    -
    -
    -
    -
    -
    -

    Initializer allowing any/all parameters to be omitted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DropDatabaseOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DropDatabaseOptions.html deleted file mode 100644 index 2923eab4c..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DropDatabaseOptions.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - DropDatabaseOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DropDatabaseOptions

-
-
-
public struct DropDatabaseOptions : Codable
- -
-
-

Options to use when executing a dropDatabase command.

- -
-
-
-
    -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(writeConcern:) - -
    -
    -
    -
    -
    -
    -

    Initializer allowing any/all parameters to be omitted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DropIndexOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DropIndexOptions.html deleted file mode 100644 index 6bc801c93..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/DropIndexOptions.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - DropIndexOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

DropIndexOptions

-
-
-
public struct DropIndexOptions : Encodable
- -
-
-

Options to use when dropping an index from a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run - enforced server-side.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializer allowing any/all parameters to be omitted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(maxTimeMS: Int64? = nil, writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/EstimatedDocumentCountOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/EstimatedDocumentCountOptions.html deleted file mode 100644 index 773b81efc..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/EstimatedDocumentCountOptions.html +++ /dev/null @@ -1,601 +0,0 @@ - - - - EstimatedDocumentCountOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

EstimatedDocumentCountOptions

-
-
-
public struct EstimatedDocumentCountOptions : Codable
- -
-
-

Options to use when executing an estimatedDocumentCount command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A ReadConcern to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A ReadPreference to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    maxTimeMS: Int64? = nil,
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/FindOneAndDeleteOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/FindOneAndDeleteOptions.html deleted file mode 100644 index 2ac6b1f39..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/FindOneAndDeleteOptions.html +++ /dev/null @@ -1,657 +0,0 @@ - - - - FindOneAndDeleteOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

FindOneAndDeleteOptions

-
-
-
public struct FindOneAndDeleteOptions : FindAndModifyOptionsConvertible, Decodable
- -
-
-

Options to use when executing a findOneAndDelete command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - projection - -
    -
    -
    -
    -
    -
    -

    Limits the fields to return for the matching document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var projection: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sort - -
    -
    -
    -
    -
    -
    -

    Determines which document the operation modifies if the query selects multiple documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sort: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted/optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    collation: Document? = nil,
    -    maxTimeMS: Int64? = nil,
    -    projection: Document? = nil,
    -    sort: Document? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/FindOneAndReplaceOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/FindOneAndReplaceOptions.html deleted file mode 100644 index 62bef69ea..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/FindOneAndReplaceOptions.html +++ /dev/null @@ -1,741 +0,0 @@ - - - - FindOneAndReplaceOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

FindOneAndReplaceOptions

-
-
-
public struct FindOneAndReplaceOptions : FindAndModifyOptionsConvertible, Decodable
- -
-
-

Options to use when executing a findOneAndReplace command on a MongoCollection.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - projection - -
    -
    -
    -
    -
    -
    -

    Limits the fields to return for the matching document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var projection: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - returnDocument - -
    -
    -
    -
    -
    -
    -

    When ReturnDocument.After, returns the replaced or inserted document rather than the original.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var returnDocument: ReturnDocument?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sort - -
    -
    -
    -
    -
    -
    -

    Determines which document the operation modifies if the query selects multiple documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sort: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted/optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    bypassDocumentValidation: Bool? = nil,
    -    collation: Document? = nil,
    -    maxTimeMS: Int64? = nil,
    -    projection: Document? = nil,
    -    returnDocument: ReturnDocument? = nil,
    -    sort: Document? = nil,
    -    upsert: Bool? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/FindOneAndUpdateOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/FindOneAndUpdateOptions.html deleted file mode 100644 index c741dcef5..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/FindOneAndUpdateOptions.html +++ /dev/null @@ -1,769 +0,0 @@ - - - - FindOneAndUpdateOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

FindOneAndUpdateOptions

-
-
-
public struct FindOneAndUpdateOptions : FindAndModifyOptionsConvertible, Decodable
- -
-
-

Options to use when executing a findOneAndUpdate command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - arrayFilters - -
    -
    -
    -
    -
    -
    -

    A set of filters specifying to which array elements an update should apply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var arrayFilters: [Document]?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - projection - -
    -
    -
    -
    -
    -
    -

    Limits the fields to return for the matching document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var projection: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - returnDocument - -
    -
    -
    -
    -
    -
    -

    WhenReturnDocument.After, returns the updated or inserted document rather than the original.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var returnDocument: ReturnDocument?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sort - -
    -
    -
    -
    -
    -
    -

    Determines which document the operation modifies if the query selects multiple documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sort: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted/optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    arrayFilters: [Document]? = nil,
    -    bypassDocumentValidation: Bool? = nil,
    -    collation: Document? = nil,
    -    maxTimeMS: Int64? = nil,
    -    projection: Document? = nil,
    -    returnDocument: ReturnDocument? = nil,
    -    sort: Document? = nil,
    -    upsert: Bool? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/FindOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/FindOptions.html deleted file mode 100644 index e0fb93d9d..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/FindOptions.html +++ /dev/null @@ -1,1080 +0,0 @@ - - - - FindOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

FindOptions

-
-
-
public struct FindOptions : Codable
- -
-
-

Options to use when executing a find command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - allowPartialResults - -
    -
    -
    -
    -
    -
    -

    Get partial results from a mongos if some shards are down (instead of throwing an error).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var allowPartialResults: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - batchSize - -
    -
    -
    -
    -
    -
    -

    The number of documents to return per batch.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var batchSize: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - comment - -
    -
    -
    -
    -
    -
    -

    Attaches a comment to the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var comment: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - cursorType - -
    -
    -
    -
    -
    -
    -

    Indicates the type of cursor to use. This value includes both the tailable and awaitData options.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var cursorType: CursorType? { get set }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hint - -
    -
    -
    -
    -
    -
    -

    A hint for the index to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hint: Hint?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - limit - -
    -
    -
    -
    -
    -
    -

    The maximum number of documents to return.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var limit: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - max - -
    -
    -
    -
    -
    -
    -

    The exclusive upper bound for a specific index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var max: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxAwaitTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor -query. This only applies when used with CursorType.tailableAwait. Otherwise, this option is ignored.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxAwaitTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxScan - -
    -
    -
    -
    -
    -
    -

    Maximum number of documents or index keys to scan when executing the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxScan: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxTimeMS - -
    -
    -
    -
    -
    -
    -

    The maximum amount of time to allow the query to run.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxTimeMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - min - -
    -
    -
    -
    -
    -
    -

    The inclusive lower bound for a specific index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var min: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - noCursorTimeout - -
    -
    -
    -
    -
    -
    -

    The server normally times out idle cursors after an inactivity period (10 minutes) -to prevent excess memory use. Set this option to prevent that.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var noCursorTimeout: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - projection - -
    -
    -
    -
    -
    -
    -

    Limits the fields to return for all matching documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var projection: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    A ReadConcern to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    A ReadPreference to use for this operation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - returnKey - -
    -
    -
    -
    -
    -
    -

    If true, returns only the index keys in the resulting documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var returnKey: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - showRecordId - -
    -
    -
    -
    -
    -
    -

    Determines whether to return the record identifier for each document. If true, adds a field $recordId -to the returned documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var showRecordId: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - skip - -
    -
    -
    -
    -
    -
    -

    The number of documents to skip before returning.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var skip: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sort - -
    -
    -
    -
    -
    -
    -

    The order in which to return matching documents.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sort: Document?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    allowPartialResults: Bool? = nil,
    -    batchSize: Int32? = nil,
    -    collation: Document? = nil,
    -    comment: String? = nil,
    -    cursorType: CursorType? = nil,
    -    hint: Hint? = nil,
    -    limit: Int64? = nil,
    -    max: Document? = nil,
    -    maxAwaitTimeMS: Int64? = nil,
    -    maxScan: Int64? = nil,
    -    maxTimeMS: Int64? = nil,
    -    min: Document? = nil,
    -    noCursorTimeout: Bool? = nil,
    -    projection: Document? = nil,
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil,
    -    returnKey: Bool? = nil,
    -    showRecordId: Bool? = nil,
    -    skip: Int64? = nil,
    -    sort: Document? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/IndexModel.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/IndexModel.html deleted file mode 100644 index f4d9b10a3..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/IndexModel.html +++ /dev/null @@ -1,622 +0,0 @@ - - - - IndexModel Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

IndexModel

-
-
-
public struct IndexModel : Codable
- -
-
-

A struct representing an index on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - keys - -
    -
    -
    -
    -
    -
    -

    Contains the required keys for the index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let keys: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - options - -
    -
    -
    -
    -
    -
    -

    Contains the options for the index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let options: IndexOptions?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(keys:options:) - -
    -
    -
    -
    -
    -
    -

    Convenience initializer providing a default options value

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(keys: Document, options: IndexOptions? = nil)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/IndexOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/IndexOptions.html deleted file mode 100644 index 272bbb352..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/IndexOptions.html +++ /dev/null @@ -1,1034 +0,0 @@ - - - - IndexOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

IndexOptions

-
-
-
public struct IndexOptions : Codable
- -
-
-

Options to use when creating an index for a collection.

- -
-
-
-
    -
  • -
    - - - - background - -
    -
    -
    -
    -
    -
    -

    Optionally tells the server to build the index in the background and not block other tasks.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var background: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bits - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the precision of the stored geo hash in the 2d index, from 1 to 32.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bits: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - bucketSize - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the number of units within which to group the location values in a geo haystack index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bucketSize: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Optionally specifies a collation to use for the index in MongoDB 3.4 and higher. If not specified, no collation -is sent and the default collation of the collection server-side is used.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - defaultLanguage - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the default language for text indexes. Is ‘english’ if none is provided.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var defaultLanguage: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - expireAfterSeconds - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the length in time, in seconds, for documents to remain in a collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var expireAfterSeconds: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - languageOverride - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the field in the document to override the language.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var languageOverride: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - max - -
    -
    -
    -
    -
    -
    -

    Optionally sets the maximum boundary for latitude and longitude in the 2d index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var max: Double?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - min - -
    -
    -
    -
    -
    -
    -

    Optionally sets the minimum boundary for latitude and longitude in the index in a 2d index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var min: Double?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    Optionally specify a specific name for the index outside of the default generated name. If none is provided then - the name is generated in the format “[field]_[direction]”.

    - -

    Note that if an index is created for the same key pattern with different collations, a name must be provided by - the user to avoid ambiguity.

    - -
      -
    • Example: For an index of name: 1, age: -1, the generated name would be “name_1_age_-1”.
    • -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var name: String?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Optionally specifies a filter for use in a partial index. Only documents that match the filter expression are -included in the index. New in MongoDB 3.2.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var partialFilterExpression: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sparse - -
    -
    -
    -
    -
    -
    -

    Optionally tells the index to only reference documents with the specified field in the index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sparse: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sphereIndexVersion - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the 2dsphere index version number. MongoDB 2.4 can only support version 1. MongoDB 2.6 and -higher may support version 1 or 2.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var sphereIndexVersion: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - storageEngine - -
    -
    -
    -
    -
    -
    -

    Optionally used only in MongoDB 3.0.0 and higher. Allows users to configure the storage engine on a per-index -basis when creating an index.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var storageEngine: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - textIndexVersion - -
    -
    -
    -
    -
    -
    -

    Optionally provides the text index version number. MongoDB 2.4 can only support version 1. MongoDB 2.6 and -higher may support version 1 or 2.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var textIndexVersion: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - unique - -
    -
    -
    -
    -
    -
    -

    Optionally forces the index to be unique.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var unique: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - version - -
    -
    -
    -
    -
    -
    -

    Optionally specifies the index version number, either 0 or 1.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var version: Int32?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - weights - -
    -
    -
    -
    -
    -
    -

    Optionally specifies fields in the index and their corresponding weight values.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var weights: Document?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    background: Bool? = nil,
    -    bits: Int32? = nil,
    -    bucketSize: Int32? = nil,
    -    collation: Document? = nil,
    -    defaultLanguage: String? = nil,
    -    expireAfterSeconds: Int32? = nil,
    -    languageOverride: String? = nil,
    -    max: Double? = nil,
    -    min: Double? = nil,
    -    name: String? = nil,
    -    partialFilterExpression: Document? = nil,
    -    sparse: Bool? = nil,
    -    sphereIndexVersion: Int32? = nil,
    -    storageEngine: Document? = nil,
    -    textIndexVersion: Int32? = nil,
    -    unique: Bool? = nil,
    -    version: Int32? = nil,
    -    weights: Document? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/InsertManyOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/InsertManyOptions.html deleted file mode 100644 index 35f90e25c..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/InsertManyOptions.html +++ /dev/null @@ -1,592 +0,0 @@ - - - - InsertManyOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

InsertManyOptions

-
-
-
public struct InsertManyOptions : Encodable
- -
-
-

Options to use when executing a multi-document insert operation on a MongoCollection.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ordered - -
    -
    -
    -
    -
    -
    -

    If true, when an insert fails, return without performing the remaining -writes. If false, when a write fails, continue with the remaining writes, -if any. Defaults to true.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let ordered: Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(bypassDocumentValidation: Bool? = nil, ordered: Bool? = nil, writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/InsertManyResult.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/InsertManyResult.html deleted file mode 100644 index 64927ae40..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/InsertManyResult.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - InsertManyResult Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

InsertManyResult

-
-
-
public struct InsertManyResult
- -
-
-

The result of a multi-document insert operation on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - insertedCount - -
    -
    -
    -
    -
    -
    -

    Number of documents inserted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let insertedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - insertedIds - -
    -
    -
    -
    -
    -
    -

    Map of the index of the document in values to the value of its ID

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let insertedIds: [Int : BSON]
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/InsertOneOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/InsertOneOptions.html deleted file mode 100644 index d9717564e..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/InsertOneOptions.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - InsertOneOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

InsertOneOptions

-
-
-
public struct InsertOneOptions : Codable, BulkWriteOptionsConvertible
- -
-
-

Options to use when executing an insertOne command on a MongoCollection.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing bypassDocumentValidation to be omitted or optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(bypassDocumentValidation: Bool? = nil, writeConcern: WriteConcern? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/InsertOneResult.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/InsertOneResult.html deleted file mode 100644 index 661bf2a66..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/InsertOneResult.html +++ /dev/null @@ -1,517 +0,0 @@ - - - - InsertOneResult Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

InsertOneResult

-
-
-
public struct InsertOneResult : Decodable
- -
-
-

The result of an insertOne command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - insertedId - -
    -
    -
    -
    -
    -
    -

    The identifier that was inserted. If the document doesn’t have an identifier, this value -will be generated and added to the document before insertion.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let insertedId: BSON
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ListCollectionsOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ListCollectionsOptions.html deleted file mode 100644 index 13806a448..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ListCollectionsOptions.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - ListCollectionsOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ListCollectionsOptions

-
-
-
public struct ListCollectionsOptions : Encodable
- -
-
-

Options to use when executing a listCollections command on a MongoDatabase.

- -
-
-
-
    -
  • -
    - - - - batchSize - -
    -
    -
    -
    -
    -
    -

    The batchSize for the returned cursor.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var batchSize: Int?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(batchSize:) - -
    -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(batchSize: Int? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ListDatabasesOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ListDatabasesOptions.html deleted file mode 100644 index 0a3e14638..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ListDatabasesOptions.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - ListDatabasesOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ListDatabasesOptions

-
-
-
public struct ListDatabasesOptions : Encodable
- -
-
-

Options to use when listing available databases.

- -
-
-
-
    -
  • -
    - - - - filter - -
    -
    -
    -
    -
    -
    -

    An optional filter for the returned databases.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var filter: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - nameOnly - -
    -
    -
    -
    -
    -
    -

    Optionally indicate whether only names should be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var nameOnly: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience constructor for basic construction

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(filter: Document? = nil, nameOnly: Bool? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MaxKey.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MaxKey.html deleted file mode 100644 index 852c7ea00..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MaxKey.html +++ /dev/null @@ -1,646 +0,0 @@ - - - - MaxKey Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MaxKey

-
-
-
public struct MaxKey : BSONValue, Equatable, Codable
- -
-
-

A struct to represent the BSON MaxKey type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new MaxKey instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> MaxKey
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MinKey.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MinKey.html deleted file mode 100644 index f598d15bb..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MinKey.html +++ /dev/null @@ -1,646 +0,0 @@ - - - - MinKey Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MinKey

-
-
-
public struct MinKey : BSONValue, Equatable, Codable
- -
-
-

A struct to represent the BSON MinKey type.

- -
-
-
-
    -
  • -
    - - - - bsonType - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bsonType: BSONType { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:forKey:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to storage: DocumentStorage, forKey key: String) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new MinKey instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - from(iterator:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func from(iterator iter: DocumentIterator) throws -> MinKey
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MongoCollection.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MongoCollection.html deleted file mode 100644 index 12f2b0fc9..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MongoCollection.html +++ /dev/null @@ -1,3318 +0,0 @@ - - - - MongoCollection Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoCollection

-
-
-
public struct MongoCollection<T> where T : Decodable, T : Encodable
- -
-
-

A MongoDB collection.

- -
-
-
-
    -
  • -
    - - - - encoder - -
    -
    -
    -
    -
    -
    -

    Encoder used by this collection for BSON conversions. (e.g. converting CollectionTypes, indexes, and options -to documents).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let encoder: BSONEncoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decoder - -
    -
    -
    -
    -
    -
    -

    Decoder used by this collection for BSON conversions (e.g. converting documents to CollectionTypes).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let decoder: BSONDecoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - CollectionType - -
    -
    -
    -
    -
    -
    -

    A Codable type associated with this MongoCollection instance. - This allows CollectionType values to be directly inserted into and retrieved from the collection, by - encoding/decoding them using the BSONEncoder and BSONDecoder. The strategies to be used by the encoder and - decoder for certain types can be configured by setting the coding strategies on the options used to create this - collection instance. The default strategies are inherited from those set on the database this collection derived - from.

    - -

    This type association only exists in the context of this particular MongoCollection instance. It is the - responsibility of the user to ensure that any data already stored in the collection was encoded - from this same type and according to the coding strategies set on this instance.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public typealias CollectionType = T
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    The name of this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var name: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    The ReadConcern set on this collection, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    The ReadPreference set on this collection.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readPreference: ReadPreference
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    The WriteConcern set on this collection, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Drops this collection from its parent database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func drop(options: DropCollectionOptions? = nil, session: ClientSession? = nil) throws
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Execute multiple write operations.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if requests is empty.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.bulkWriteError if any error occurs while performing the writes. This includes errors that would -typically be thrown as RuntimeErrors or ServerError.commandErrors elsewhere.
    • -
    • EncodingError if an error occurs while encoding the CollectionType or the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func bulkWrite(
    -    _ requests: [WriteModel<T>],
    -    options: BulkWriteOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> BulkWriteResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - requests - - -
    -

    a [WriteModel] containing the writes to perform.

    -
    -
    - - options - - -
    -

    optional BulkWriteOptions to use while executing the operation.

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a BulkWriteResult, or nil if the write concern is unacknowledged.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a collection. The CollectionType will be associated with the fullDocument - field in ChangeStreamEvents emitted by the returned ChangeStream. The server will return an error if - this method is called on a system collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> ChangeStream<ChangeStreamEvent<CollectionType>>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on a specific collection.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a collection. Associates the specified Codable type T with the fullDocument - field in the ChangeStreamEvents emitted by the returned ChangeStream. The server will return an error - if this method is called on a system collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch<FullDocType: Codable>(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil,
    -    withFullDocumentType _: FullDocType.Type
    -)
    -    throws -> ChangeStream<ChangeStreamEvent<FullDocType>>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    - - withFullDocumentType - - -
    -

    The type that the fullDocument field of the emitted ChangeStreamEvents will be - decoded to.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on a specific collection.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a collection. Associates the specified Codable type T with the returned - ChangeStream. The server will return an error if this method is called on a system collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch<EventType: Codable>(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil,
    -    withEventType _: EventType.Type
    -) throws -> ChangeStream<EventType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    - - withEventType - - -
    -

    The type that the entire change stream response will be decoded to and that will be returned - when iterating through the change stream.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on a specific collection.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds a single document and deletes it, returning the original.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if any of the provided options are invalid.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • ServerError.writeError if an error occurs while executing the command.
    • -
    • DecodingError if the deleted document cannot be decoded to a CollectionType value.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func findOneAndDelete(
    -    _ filter: Document,
    -    options: FindOneAndDeleteOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> CollectionType?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - options - - -
    -

    Optional FindOneAndDeleteOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The deleted document, represented as a CollectionType, or nil if no document was deleted.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds a single document and replaces it, returning either the original or the replaced document.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if any of the provided options are invalid.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • ServerError.writeError if an error occurs while executing the command.
    • -
    • DecodingError if the replaced document cannot be decoded to a CollectionType value.
    • -
    • EncodingError if replacement cannot be encoded to a Document.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func findOneAndReplace(
    -    filter: Document,
    -    replacement: CollectionType,
    -    options: FindOneAndReplaceOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> CollectionType?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - replacement - - -
    -

    a CollectionType to replace the found document

    -
    -
    - - options - - -
    -

    Optional FindOneAndReplaceOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A CollectionType, representing either the original document or its replacement, - depending on selected options, or nil if there was no match.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds a single document and updates it, returning either the original or the updated document.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if any of the provided options are invalid.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • ServerError.writeError if an error occurs while executing the command.
    • -
    • DecodingError if the updated document cannot be decoded to a CollectionType value.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func findOneAndUpdate(
    -    filter: Document,
    -    update: Document,
    -    options: FindOneAndUpdateOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> CollectionType?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - update - - -
    -

    a Document containing updates to apply

    -
    -
    - - options - - -
    -

    Optional FindOneAndUpdateOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A CollectionType representing either the original or updated document, - depending on selected options, or nil if there was no match.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates an index over the collection for the provided keys with the provided options.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the index specification or options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func createIndex(
    -    _ keys: Document,
    -    indexOptions: IndexOptions? = nil,
    -    options: CreateIndexOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> String
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - keys - - -
    -

    a Document specifing the keys for the index

    -
    -
    - - indexOptions - - -
    -

    Optional IndexOptions to use for the index

    -
    -
    - - options - - -
    -

    Optional CreateIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The name of the created index.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates an index over the collection for the provided keys with the provided options.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the index specification or options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func createIndex(
    -    _ model: IndexModel,
    -    options: CreateIndexOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> String
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - model - - -
    -

    An IndexModel representing the keys and options for the index

    -
    -
    - - options - - -
    -

    Optional CreateIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The name of the created index.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates multiple indexes in the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the index specifications or options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func createIndexes(
    -    _ models: [IndexModel],
    -    options: CreateIndexOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> [String]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - models - - -
    -

    An [IndexModel] specifying the indexes to create

    -
    -
    - - options - - -
    -

    Optional CreateIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    An [String] containing the names of all the indexes that were created.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Drops a single index from the collection by the index name.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndex(
    -    _ name: String,
    -    options: DropIndexOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - name - - -
    -

    The name of the index to drop

    -
    -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Attempts to drop a single index from the collection given the keys describing it.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndex(
    -    _ keys: Document,
    -    options: DropIndexOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - keys - - -
    -

    a Document containing the keys for the index to drop

    -
    -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server’s response to the command.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Attempts to drop a single index from the collection given an IndexModel describing it.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndex(
    -    _ model: IndexModel,
    -    options: DropIndexOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - model - - -
    -

    An IndexModel describing the index to drop

    -
    -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server’s response to the command.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Drops all indexes in the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func dropIndexes(options: DropIndexOptions? = nil, session: ClientSession? = nil) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - options - - -
    -

    Optional DropIndexOptions to use for the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server’s response to the command.

    -
    -
    -
    -
  • -
  • -
    - - - - listIndexes(session:) - -
    -
    -
    -
    -
    -
    -

    Retrieves a list of the indexes currently on this collection.

    -
    -

    Throws

    -

    UserError.logicError if the provided session is inactive.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listIndexes(session: ClientSession? = nil) throws -> MongoCursor<IndexModel>
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the IndexModels.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Retrieves a list of names of the indexes currently on this collection.

    -
    -

    Throws

    -

    UserError.logicError if the provided session is inactive.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listIndexNames(session: ClientSession? = nil) throws -> [String]
    - -
    -
    -
    -

    Parameters

    - - - - - - - -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the index names.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds the documents in this collection which match the provided filter.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func find(
    -    _ filter: Document = [:],
    -    options: FindOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> MongoCursor<CollectionType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document that should match the query

    -
    -
    - - options - - -
    -

    Optional FindOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the resulting Documents

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Runs an aggregation framework pipeline against this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func aggregate(
    -    _ pipeline: [Document],
    -    options: AggregateOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> MongoCursor<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    an [Document] containing the pipeline of aggregation operations to perform

    -
    -
    - - options - - -
    -

    Optional AggregateOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A MongoCursor over the resulting Documents

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Counts the number of documents in this collection matching the provided filter. Note that an empty filter will - force a scan of the entire collection. For a fast count of the total documents in a collection see - estimatedDocumentCount.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func countDocuments(
    -    _ filter: Document = [:],
    -    options: CountDocumentsOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> Int
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    a Document, the filter that documents must match in order to be counted

    -
    -
    - - options - - -
    -

    Optional CountDocumentsOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The count of the documents that matched the filter

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Gets an estimate of the count of documents in this collection using collection metadata.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func estimatedDocumentCount(
    -    options: EstimatedDocumentCountOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> Int
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - options - - -
    -

    Optional EstimatedDocumentCountOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    an estimate of the count of documents in this collection

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Finds the distinct values for a specified field across the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func distinct(
    -    fieldName: String,
    -    filter: Document = [:],
    -    options: DistinctOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> [BSON]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - fieldName - - -
    -

    The field for which the distinct values will be found

    -
    -
    - - filter - - -
    -

    a Document representing the filter documents must match in order to be considered for the operation

    -
    -
    - - options - - -
    -

    Optional DistinctOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A [BSONValue] containing the distinct values for the specified criteria

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Encodes the provided value to BSON and inserts it. If the value is missing an identifier, one will be - generated for it.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the CollectionType to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func insertOne(
    -    _ value: CollectionType,
    -    options: InsertOneOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> InsertOneResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - value - - -
    -

    A CollectionType value to encode and insert

    -
    -
    - - options - - -
    -

    Optional InsertOneOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to perform the insert. If the WriteConcern - is unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Encodes the provided values to BSON and inserts them. If any values are - missing identifiers, the driver will generate them.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.bulkWriteError if an error occurs while performing any of the writes.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the CollectionType or options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func insertMany(
    -    _ values: [CollectionType],
    -    options: InsertManyOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> InsertManyResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - values - - -
    -

    The CollectionType values to insert

    -
    -
    - - options - - -
    -

    optional InsertManyOptions to use while executing the operation

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    an InsertManyResult, or nil if the write concern is unacknowledged.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Replaces a single document matching the provided filter in this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the CollectionType or options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func replaceOne(
    -    filter: Document,
    -    replacement: CollectionType,
    -    options: ReplaceOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> UpdateResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - replacement - - -
    -

    The replacement value, a CollectionType value to be encoded and inserted

    -
    -
    - - options - - -
    -

    Optional ReplaceOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to replace a document. If the WriteConcern - is unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Updates a single document matching the provided filter in this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func updateOne(
    -    filter: Document,
    -    update: Document,
    -    options: UpdateOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> UpdateResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - update - - -
    -

    A Document representing the update to be applied to a matching document

    -
    -
    - - options - - -
    -

    Optional UpdateOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to update a document. If the WriteConcern is - unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Updates multiple documents matching the provided filter in this collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func updateMany(
    -    filter: Document,
    -    update: Document,
    -    options: UpdateOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> UpdateResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - update - - -
    -

    A Document representing the update to be applied to matching documents

    -
    -
    - - options - - -
    -

    Optional UpdateOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of attempting to update multiple documents. If the write - concern is unacknowledged, nil is returned

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Deletes a single matching document from the collection.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func deleteOne(
    -    _ filter: Document,
    -    options: DeleteOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> DeleteResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    A Document representing the match criteria

    -
    -
    - - options - - -
    -

    Optional DeleteOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of performing the deletion. If the WriteConcern is - unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Deletes multiple documents

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.writeError if an error occurs while performing the command.
    • -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func deleteMany(
    -    _ filter: Document,
    -    options: DeleteOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> DeleteResult?
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    Document representing the match criteria

    -
    -
    - - options - - -
    -

    Optional DeleteOptions to use when executing the command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    The optional result of performing the deletion. If the WriteConcern is - unacknowledged, nil is returned.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MongoDatabase.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MongoDatabase.html deleted file mode 100644 index 018ee03ca..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MongoDatabase.html +++ /dev/null @@ -1,1707 +0,0 @@ - - - - MongoDatabase Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoDatabase

-
-
-
public struct MongoDatabase
- -
-
-

A MongoDB Database.

- -
-
-
-
    -
  • -
    - - - - encoder - -
    -
    -
    -
    -
    -
    -

    Encoder used by this database for BSON conversions. This encoder’s options are inherited by collections derived -from this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let encoder: BSONEncoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - decoder - -
    -
    -
    -
    -
    -
    -

    Decoder whose options are inherited by collections derived from this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let decoder: BSONDecoder
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - name - -
    -
    -
    -
    -
    -
    -

    The name of this database.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var name: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    The ReadConcern set on this database, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    The ReadPreference set on this database

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let readPreference: ReadPreference
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    The WriteConcern set on this database, or nil if one is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Drops this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func drop(options: DropDatabaseOptions? = nil, session: ClientSession? = nil) throws
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Access a collection within this database. If an option is not specified in the CollectionOptions param, the - collection will inherit the value from the parent database or the default if the db’s option is not set. - To override an option inherited from the db (e.g. a read concern) with the default value, it must be explicitly - specified in the options param (e.g. ReadConcern(), not nil).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func collection(_ name: String, options: CollectionOptions? = nil) -> MongoCollection<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    the name of the collection to get

    -
    -
    - - options - - -
    -

    options to set on the returned collection

    -
    -
    -
    -
    -

    Return Value

    -

    the requested MongoCollection<Document>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Access a collection within this database, and associates the specified Codable type T with the - returned MongoCollection. This association only exists in the context of this particular - MongoCollection instance. If an option is not specified in the CollectionOptions param, the - collection will inherit the value from the parent database or the default if the db’s option is not set. - To override an option inherited from the db (e.g. a read concern) with the default value, it must be explicitly - specified in the options param (e.g. ReadConcern(), not nil).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func collection<T: Codable>(
    -    _ name: String,
    -    withType _: T.Type,
    -    options: CollectionOptions? = nil
    -) -> MongoCollection<T>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - -
    - - name - - -
    -

    the name of the collection to get

    -
    -
    - - options - - -
    -

    options to set on the returned collection

    -
    -
    -
    -
    -

    Return Value

    -

    the requested MongoCollection<T>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates a collection in this database with the specified options.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func createCollection(
    -    _ name: String,
    -    options: CreateCollectionOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> MongoCollection<Document>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - name - - -
    -

    a String, the name of the collection to create

    -
    -
    - - options - - -
    -

    Optional CreateCollectionOptions to use for the collection

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    the newly created MongoCollection<Document>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Creates a collection in this database with the specified options, and associates the - specified Codable type T with the returned MongoCollection. This association only - exists in the context of this particular MongoCollection instance.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs that prevents the command from executing.
    • -
    • UserError.invalidArgumentError if the options passed in form an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func createCollection<T: Codable>(
    -    _ name: String,
    -    withType type: T.Type,
    -    options: CreateCollectionOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> MongoCollection<T>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - name - - -
    -

    a String, the name of the collection to create

    -
    -
    - - options - - -
    -

    Optional CreateCollectionOptions to use for the collection

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    the newly created MongoCollection<T>

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Lists all the collections in this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • userError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listCollections(
    -    _ filter: Document? = nil,
    -    options: ListCollectionsOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> MongoCursor<CollectionSpecification>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    a Document, optional criteria to filter results by

    -
    -
    - - options - - -
    -

    Optional ListCollectionsOptions to use when executing this command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a MongoCursor over an array of CollectionSpecifications

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Gets a list of MongoCollections in this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • userError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listMongoCollections(
    -    _ filter: Document? = nil,
    -    options: ListCollectionsOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> [MongoCollection<Document>]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    a Document, optional criteria to filter results by

    -
    -
    - - options - - -
    -

    Optional ListCollectionsOptions to use when executing this command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    An array of MongoCollections that match the provided filter.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Gets a list of names of collections in this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • userError.invalidArgumentError if the options passed are an invalid combination.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func listCollectionNames(
    -    _ filter: Document? = nil,
    -    options: ListCollectionsOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> [String]
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - filter - - -
    -

    a Document, optional criteria to filter results by

    -
    -
    - - options - - -
    -

    Optional ListCollectionsOptions to use when executing this command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    A [String] containing names of collections that match the provided filter.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Issues a MongoDB command against this database.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • UserError.invalidArgumentError if requests is empty.
    • -
    • UserError.logicError if the provided session is inactive.
    • -
    • ServerError.writeError if any error occurs while the command was performing a write.
    • -
    • ServerError.commandError if an error occurs that prevents the command from being performed.
    • -
    • EncodingError if an error occurs while encoding the options to BSON.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    @discardableResult
    -public func runCommand(
    -    _ command: Document,
    -    options: RunCommandOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> Document
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - command - - -
    -

    a Document containing the command to issue against the database

    -
    -
    - - options - - -
    -

    Optional RunCommandOptions to use when executing this command

    -
    -
    - - session - - -
    -

    Optional ClientSession to use when executing this command

    -
    -
    -
    -
    -

    Return Value

    -

    a Document containing the server response for the command

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a database. Excludes system collections.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    -

    Note

    -

    Supported in MongoDB version 4.0+ only.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil
    -) throws -> ChangeStream<ChangeStreamEvent<Document>>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on all collections in a database.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a database. Excludes system collections. - Associates the specified Codable type T with the fullDocument field in the ChangeStreamEvents emitted - by the returned ChangeStream.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    -

    Note

    -

    Supported in MongoDB version 4.0+ only.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch<FullDocType: Codable>(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil,
    -    withFullDocumentType _: FullDocType.Type
    -)
    -    throws -> ChangeStream<ChangeStreamEvent<FullDocType>>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the change stream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    - - withFullDocumentType - - -
    -

    The type that the fullDocument field of the emitted ChangeStreamEvents will be - decoded to.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on all collections in a database.

    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Starts a ChangeStream on a database. Excludes system collections. - Associates the specified Codable type T with the returned ChangeStream.

    -
    -

    Throws

    -

    Throws:

    - -
      -
    • ServerError.commandError if an error occurs on the server while creating the change stream.
    • -
    • UserError.invalidArgumentError if the options passed formed an invalid combination.
    • -
    • UserError.invalidArgumentError if the _id field is projected out of the change stream documents by the -pipeline.
    • -
    - -
    -

    Note

    -

    Supported in MongoDB version 4.0+ only.

    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func watch<EventType: Codable>(
    -    _ pipeline: [Document] = [],
    -    options: ChangeStreamOptions? = nil,
    -    session: ClientSession? = nil,
    -    withEventType _: EventType.Type
    -) throws -> ChangeStream<EventType>
    - -
    -
    -
    -

    Parameters

    - - - - - - - - - - - - - - - - - - - -
    - - pipeline - - -
    -

    An array of aggregation pipeline stages to apply to the events returned by the change stream.

    -
    -
    - - options - - -
    -

    An optional ChangeStreamOptions to use when constructing the ChangeStream.

    -
    -
    - - session - - -
    -

    An optional ClientSession to use with this change stream.

    -
    -
    - - withEventType - - -
    -

    The type that the entire change stream response will be decoded to and that will be returned - when iterating through the change stream.

    -
    -
    -
    -
    -

    Return Value

    -

    A ChangeStream on all collections in a database.

    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MongoNamespace.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MongoNamespace.html deleted file mode 100644 index 8fba10a45..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/MongoNamespace.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - MongoNamespace Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

MongoNamespace

-
-
-
public struct MongoNamespace : Codable, Equatable
-
extension MongoNamespace: CustomStringConvertible
- -
-
-

Represents a MongoDB namespace for a database or collection.

- -
-
-
-
    -
  • -
    - - - - db - -
    -
    -
    -
    -
    -
    -

    The database name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let db: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collection - -
    -
    -
    -
    -
    -
    -

    The collection name if this is a collection’s namespace, or nil otherwise.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let collection: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ObjectId.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ObjectId.html deleted file mode 100644 index 583936dbb..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ObjectId.html +++ /dev/null @@ -1,733 +0,0 @@ - - - - ObjectId Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ObjectId

-
-
-
public struct ObjectId : BSONValue, Equatable, CustomStringConvertible, Codable
-
extension ObjectId: Hashable
- -
-
-

A struct to represent the BSON ObjectId type.

- -
-
-
-
    -
  • -
    - - - - hex - -
    -
    -
    -
    -
    -
    -

    This ObjectId‘s data represented as a String.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hex: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - timestamp - -
    -
    -
    -
    -
    -
    -

    The timestamp used to create this ObjectId

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var timestamp: UInt32 { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new ObjectId.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initializes an ObjectId from the provided hex String. Returns nil if the string is not a valid ObjectId.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init?(_ hex: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: ObjectId, rhs: ObjectId) -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hash(into:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hash(into hasher: inout Hasher)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ReadConcern.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ReadConcern.html deleted file mode 100644 index bf53c6c57..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ReadConcern.html +++ /dev/null @@ -1,708 +0,0 @@ - - - - ReadConcern Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReadConcern

-
-
-
public struct ReadConcern : Codable
-
extension ReadConcern: CustomStringConvertible
-
extension ReadConcern: Equatable
- -
-
-

A struct to represent a MongoDB read concern.

- -
-
-
-
    -
  • -
    - - - - Level - -
    -
    -
    -
    -
    -
    -

    An enumeration of possible ReadConcern levels.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum Level : RawRepresentable, Codable, Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - level - -
    -
    -
    -
    -
    -
    -

    The level of this ReadConcern, or nil if the level is not set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var level: ReadConcern.Level?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isDefault - -
    -
    -
    -
    -
    -
    -

    Indicates whether this ReadConcern is the server default.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isDefault: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new ReadConcern with a Level.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ level: Level)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(_:) - -
    -
    -
    -
    -
    -
    -

    Initialize a new ReadConcern from a String corresponding to a read concern level.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(_ level: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initialize a new empty ReadConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Returns the relaxed extended JSON representation of this ReadConcern. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: ReadConcern, rhs: ReadConcern) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ReadConcern/Level.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ReadConcern/Level.html deleted file mode 100644 index 06d1bc902..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ReadConcern/Level.html +++ /dev/null @@ -1,705 +0,0 @@ - - - - Level Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Level

-
-
-
public enum Level : RawRepresentable, Codable, Equatable
- -
-
-

An enumeration of possible ReadConcern levels.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/RegularExpression.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/RegularExpression.html deleted file mode 100644 index 5bbcaff2d..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/RegularExpression.html +++ /dev/null @@ -1,654 +0,0 @@ - - - - RegularExpression Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

RegularExpression

-
-
-
public struct RegularExpression : BSONValue, Equatable, Codable, Hashable
- -
-
-

A struct to represent a BSON regular expression.

- -
-
-
-
    -
  • -
    - - - - pattern - -
    -
    -
    -
    -
    -
    -

    The pattern for this regular expression.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let pattern: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - options - -
    -
    -
    -
    -
    -
    -

    A string containing options for this regular expression.

    - - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let options: String
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializes a new RegularExpression with the provided pattern and options.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(pattern: String, options: String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new RegularExpression with the pattern and options of the provided NSRegularExpression.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from regex: NSRegularExpression)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ReplaceOneModelOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ReplaceOneModelOptions.html deleted file mode 100644 index 18cfea564..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ReplaceOneModelOptions.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - ReplaceOneModelOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReplaceOneModelOptions

-
-
-
public struct ReplaceOneModelOptions : Codable
- -
-
-

Options to use with a WriteModel.replaceOne.

- -
-
-
-
    -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    The collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializer allowing any/all options to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(collation: Document? = nil, upsert: Bool? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ReplaceOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ReplaceOptions.html deleted file mode 100644 index b0363c9eb..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ReplaceOptions.html +++ /dev/null @@ -1,629 +0,0 @@ - - - - ReplaceOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ReplaceOptions

-
-
-
public struct ReplaceOptions : Codable, BulkWriteOptionsConvertible
- -
-
-

Options to use when executing a replace command on a MongoCollection.

- -
-
-
-
    -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    bypassDocumentValidation: Bool? = nil,
    -    collation: Document? = nil,
    -    upsert: Bool? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ResumeToken.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ResumeToken.html deleted file mode 100644 index e519e3a5f..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ResumeToken.html +++ /dev/null @@ -1,547 +0,0 @@ - - - - ResumeToken Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ResumeToken

-
-
-
public struct ResumeToken : Codable, Equatable
- -
-
-

A token used for manually resuming a change stream. Pass this to the resumeAfter field of -ChangeStreamOptions to resume or start a change stream where a previous one left off.

- - -
-
-
-
    -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/RunCommandOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/RunCommandOptions.html deleted file mode 100644 index 61aa479e9..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/RunCommandOptions.html +++ /dev/null @@ -1,604 +0,0 @@ - - - - RunCommandOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

RunCommandOptions

-
-
-
public struct RunCommandOptions : Encodable
- -
-
-

Options to use when running a command against a MongoDatabase.

- -
-
-
-
    -
  • -
    - - - - readConcern - -
    -
    -
    -
    -
    -
    -

    An optional ReadConcern to use for this operation. This option should only be used when executing a command -that reads.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readConcern: ReadConcern?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - readPreference - -
    -
    -
    -
    -
    -
    -

    An optional ReadPreference to use for this operation. This option should only be used when executing a -command that reads.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var readPreference: ReadPreference?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for this operation. This option should only be used when executing a command -that writes.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    readConcern: ReadConcern? = nil,
    -    readPreference: ReadPreference? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerClosedEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerClosedEvent.html deleted file mode 100644 index c42ece11e..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerClosedEvent.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - ServerClosedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerClosedEvent

-
-
-
public struct ServerClosedEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when a server is closed.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection ID (host/port pair) of the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - topologyId - -
    -
    -
    -
    -
    -
    -

    A unique identifier for the topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let topologyId: ObjectId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerDescription.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerDescription.html deleted file mode 100644 index 796ab7c60..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerDescription.html +++ /dev/null @@ -1,1061 +0,0 @@ - - - - ServerDescription Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerDescription

-
-
-
public struct ServerDescription
-
extension ServerDescription: Equatable
- -
-
-

A struct describing a mongod or mongos process.

- -
-
-
-
    -
  • -
    - - - - ServerType - -
    -
    -
    -
    -
    -
    -

    The possible types for a server.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum ServerType : String, Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The hostname or IP and the port number that the client connects to. Note that this is not the -server’s ismaster.me field, in the case that the server reports an address different from the -address the client uses.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - error - -
    -
    -
    -
    -
    -
    -

    The last error related to this server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let error: MongoError?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - roundTripTime - -
    -
    -
    -
    -
    -
    -

    The duration of the server’s last ismaster call.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var roundTripTime: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - lastWriteDate - -
    -
    -
    -
    -
    -
    -

    The “lastWriteDate” from the server’s most recent ismaster response.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var lastWriteDate: Date?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - opTime - -
    -
    -
    -
    -
    -
    -

    The last opTime reported by the server. Only mongos and shard servers -record this field when monitoring config servers as replica sets.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var opTime: ObjectId?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - type - -
    -
    -
    -
    -
    -
    -

    The type of this server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var type: ServerDescription.ServerType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - minWireVersion - -
    -
    -
    -
    -
    -
    -

    The minimum wire protocol version supported by the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var minWireVersion: Int32
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxWireVersion - -
    -
    -
    -
    -
    -
    -

    The maximum wire protocol version supported by the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxWireVersion: Int32
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - me - -
    -
    -
    -
    -
    -
    -

    The hostname or IP and the port number that this server was configured with in the replica set.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var me: ConnectionId?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hosts - -
    -
    -
    -
    -
    -
    -

    This server’s opinion of the replica set’s hosts, if any.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var hosts: [ConnectionId]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - arbiters - -
    -
    -
    -
    -
    -
    -

    This server’s opinion of the replica set’s arbiters, if any.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var arbiters: [ConnectionId]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - passives - -
    -
    -
    -
    -
    -
    -

    “Passives” are priority-zero replica set members that cannot become primary. -The client treats them precisely the same as other members.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var passives: [ConnectionId]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - tags - -
    -
    -
    -
    -
    -
    -

    Tags for this server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var tags: [String : String]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - setName - -
    -
    -
    -
    -
    -
    -

    The replica set name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var setName: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - setVersion - -
    -
    -
    -
    -
    -
    -

    The replica set version.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var setVersion: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - electionId - -
    -
    -
    -
    -
    -
    -

    The election ID where this server was elected, if this is a replica set member that believes it is primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var electionId: ObjectId?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - primary - -
    -
    -
    -
    -
    -
    -

    This server’s opinion of who the primary is.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var primary: ConnectionId?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - lastUpdateTime - -
    -
    -
    -
    -
    -
    -

    When this server was last checked.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let lastUpdateTime: Date?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    The logicalSessionTimeoutMinutes value for this server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var logicalSessionTimeoutMinutes: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: ServerDescription, rhs: ServerDescription) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerDescription/ServerType.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerDescription/ServerType.html deleted file mode 100644 index a123da43e..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerDescription/ServerType.html +++ /dev/null @@ -1,732 +0,0 @@ - - - - ServerType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerType

-
-
-
public enum ServerType : String, Equatable
- -
-
-

The possible types for a server.

- -
-
-
-
    -
  • -
    - - - - standalone - -
    -
    -
    -
    -
    -
    -

    A standalone mongod server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case standalone = "Standalone"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - mongos - -
    -
    -
    -
    -
    -
    -

    A router to a sharded cluster, i.e. a mongos server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case mongos = "Mongos"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - possiblePrimary - -
    -
    -
    -
    -
    -
    -

    A replica set member which is not yet checked, but another member thinks it is the primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case possiblePrimary = "PossiblePrimary"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rsPrimary - -
    -
    -
    -
    -
    -
    -

    A replica set primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case rsPrimary = "RSPrimary"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rsSecondary - -
    -
    -
    -
    -
    -
    -

    A replica set secondary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case rsSecondary = "RSSecondary"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rsArbiter - -
    -
    -
    -
    -
    -
    -

    A replica set arbiter.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case rsArbiter = "RSArbiter"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rsOther - -
    -
    -
    -
    -
    -
    -

    A replica set member that is none of the other types (a passive, for example).

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case rsOther = "RSOther"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - rsGhost - -
    -
    -
    -
    -
    -
    -

    A replica set member that does not report a set name or a hosts list.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case rsGhost = "RSGhost"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - unknown - -
    -
    -
    -
    -
    -
    -

    A server type that is not yet known.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case unknown = "Unknown"
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerDescriptionChangedEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerDescriptionChangedEvent.html deleted file mode 100644 index 955d12f52..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerDescriptionChangedEvent.html +++ /dev/null @@ -1,624 +0,0 @@ - - - - ServerDescriptionChangedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerDescriptionChangedEvent

-
-
-
public struct ServerDescriptionChangedEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when a server description changes. This does NOT include changes to the server’s roundTripTime property.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection ID (host/port pair) of the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - topologyId - -
    -
    -
    -
    -
    -
    -

    A unique identifier for the topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let topologyId: ObjectId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - previousDescription - -
    -
    -
    -
    -
    -
    -

    The previous server description.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let previousDescription: ServerDescription
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - newDescription - -
    -
    -
    -
    -
    -
    -

    The new server description.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let newDescription: ServerDescription
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerHeartbeatFailedEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerHeartbeatFailedEvent.html deleted file mode 100644 index 999747751..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerHeartbeatFailedEvent.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - ServerHeartbeatFailedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerHeartbeatFailedEvent

-
-
-
public struct ServerHeartbeatFailedEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when the server monitor’s ismaster fails, either with an “ok: 0” or a socket exception.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - duration - -
    -
    -
    -
    -
    -
    -

    The execution time of the event, in microseconds.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let duration: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - failure - -
    -
    -
    -
    -
    -
    -

    The failure.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let failure: MongoError
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection ID (host/port pair) of the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerHeartbeatStartedEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerHeartbeatStartedEvent.html deleted file mode 100644 index 80a0b1dd2..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerHeartbeatStartedEvent.html +++ /dev/null @@ -1,544 +0,0 @@ - - - - ServerHeartbeatStartedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerHeartbeatStartedEvent

-
-
-
public struct ServerHeartbeatStartedEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when the server monitor’s ismaster command is started - immediately before -the ismaster command is serialized into raw BSON and written to the socket.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection ID (host/port pair) of the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerHeartbeatSucceededEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerHeartbeatSucceededEvent.html deleted file mode 100644 index 2c69d57f5..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerHeartbeatSucceededEvent.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - ServerHeartbeatSucceededEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerHeartbeatSucceededEvent

-
-
-
public struct ServerHeartbeatSucceededEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when the server monitor’s ismaster succeeds.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - duration - -
    -
    -
    -
    -
    -
    -

    The execution time of the event, in microseconds.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let duration: Int64
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - reply - -
    -
    -
    -
    -
    -
    -

    The command reply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let reply: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection ID (host/port pair) of the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerOpeningEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerOpeningEvent.html deleted file mode 100644 index 898687ef8..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/ServerOpeningEvent.html +++ /dev/null @@ -1,570 +0,0 @@ - - - - ServerOpeningEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

ServerOpeningEvent

-
-
-
public struct ServerOpeningEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when a server is initialized.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - connectionId - -
    -
    -
    -
    -
    -
    -

    The connection ID (host/port pair) of the server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let connectionId: ConnectionId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - topologyId - -
    -
    -
    -
    -
    -
    -

    A unique identifier for the topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let topologyId: ObjectId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Symbol.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Symbol.html deleted file mode 100644 index 13020bbfb..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Symbol.html +++ /dev/null @@ -1,595 +0,0 @@ - - - - Symbol Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Symbol

-
-
-
public struct Symbol : BSONValue, CustomStringConvertible, Codable, Equatable, Hashable
- -
-
-

A struct to represent the deprecated Symbol type. -Symbols cannot be instantiated, but they can be read from existing documents that contain them.

- -
-
-
-
    -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - stringValue - -
    -
    -
    -
    -
    -
    -

    String representation of this Symbol.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let stringValue: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TLSOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TLSOptions.html deleted file mode 100644 index 72030fc51..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TLSOptions.html +++ /dev/null @@ -1,657 +0,0 @@ - - - - TLSOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

TLSOptions

-
-
-
public struct TLSOptions
- -
-
-

Options used to configure TLS/SSL connections to the database.

- -
-
-
-
    -
  • -
    - - - - allowInvalidHostnames - -
    -
    -
    -
    -
    -
    -

    Indicates whether invalid hostnames are allowed. By default this is set to false.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var allowInvalidHostnames: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - caFile - -
    -
    -
    -
    -
    -
    -

    Specifies the path to the certificate authority file.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var caFile: URL?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - pemFile - -
    -
    -
    -
    -
    -
    -

    Specifies the path to the client certificate key file.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var pemFile: URL?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - pemPassword - -
    -
    -
    -
    -
    -
    -

    Specifies the client certificate key password.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var pemPassword: String?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - weakCertValidation - -
    -
    -
    -
    -
    -
    -

    Indicates whether invalid certificates are allowed. By default this is set to false.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var weakCertValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all arguments to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    allowInvalidHostnames: Bool? = nil,
    -    caFile: URL? = nil,
    -    pemFile: URL? = nil,
    -    pemPassword: String? = nil,
    -    weakCertValidation: Bool? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Timestamp.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Timestamp.html deleted file mode 100644 index 6d792807a..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/Timestamp.html +++ /dev/null @@ -1,650 +0,0 @@ - - - - Timestamp Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Timestamp

-
-
-
public struct Timestamp : BSONValue, Equatable, Codable, Hashable
- -
-
-

A struct to represent the BSON Timestamp type.

- -
-
-
-
    -
  • -
    - - - - timestamp - -
    -
    -
    -
    -
    -
    -

    A timestamp representing seconds since the Unix epoch.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let timestamp: UInt32
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - increment - -
    -
    -
    -
    -
    -
    -

    An incrementing ordinal for operations within a given second.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let increment: UInt32
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(timestamp:inc:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new Timestamp with the provided timestamp and increment values.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(timestamp: UInt32, inc: UInt32)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(timestamp:inc:) - -
    -
    -
    -
    -
    -
    -

    Initializes a new Timestamp with the provided timestamp and increment values. Assumes -the values can successfully be converted to UInt32s without loss of precision.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(timestamp: Int, inc: Int)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyClosedEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyClosedEvent.html deleted file mode 100644 index 6305a9d7d..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyClosedEvent.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - TopologyClosedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

TopologyClosedEvent

-
-
-
public struct TopologyClosedEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when a topology is closed.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - topologyId - -
    -
    -
    -
    -
    -
    -

    A unique identifier for the topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let topologyId: ObjectId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyDescription.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyDescription.html deleted file mode 100644 index da1629861..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyDescription.html +++ /dev/null @@ -1,817 +0,0 @@ - - - - TopologyDescription Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

TopologyDescription

-
-
-
public struct TopologyDescription
-
extension TopologyDescription: Equatable
- -
-
-

A struct describing the state of a MongoDB deployment: its type (standalone, replica set, or sharded), -which servers are up, what type of servers they are, which is primary, and so on.

- -
-
-
-
    -
  • -
    - - - - TopologyType - -
    -
    -
    -
    -
    -
    -

    The possible types for a topology.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum TopologyType : String, Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - type - -
    -
    -
    -
    -
    -
    -

    The type of this topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let type: TopologyType
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - setName - -
    -
    -
    -
    -
    -
    -

    The replica set name.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var setName: String? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxSetVersion - -
    -
    -
    -
    -
    -
    -

    The largest setVersion ever reported by a primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxSetVersion: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - maxElectionId - -
    -
    -
    -
    -
    -
    -

    The largest electionId ever reported by a primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var maxElectionId: ObjectId?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - servers - -
    -
    -
    -
    -
    -
    -

    The servers comprising this topology. By default, no servers.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var servers: [ServerDescription]
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - stale - -
    -
    -
    -
    -
    -
    -

    For single-threaded clients, indicates whether the topology must be re-scanned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let stale: Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - compatibilityError - -
    -
    -
    -
    -
    -
    -

    Exists if any server’s wire protocol version range is incompatible with the client’s.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let compatibilityError: MongoError?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    The logicalSessionTimeoutMinutes value for this topology. This value is the minimum -of the logicalSessionTimeoutMinutes values across all the servers in servers, -or nil if any of them are nil.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var logicalSessionTimeoutMinutes: Int64? { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hasReadableServer() - -
    -
    -
    -
    -
    -
    -

    Returns true if the topology has a readable server available, and false otherwise.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hasReadableServer() -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - hasWritableServer() - -
    -
    -
    -
    -
    -
    -

    Returns true if the topology has a writable server available, and false otherwise.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func hasWritableServer() -> Bool
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: TopologyDescription, rhs: TopologyDescription) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyDescription/TopologyType.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyDescription/TopologyType.html deleted file mode 100644 index 6c27eb976..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyDescription/TopologyType.html +++ /dev/null @@ -1,624 +0,0 @@ - - - - TopologyType Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

TopologyType

-
-
-
public enum TopologyType : String, Equatable
- -
-
-

The possible types for a topology.

- -
-
-
-
    -
  • -
    - - - - single - -
    -
    -
    -
    -
    -
    -

    A single mongod server.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case single = "Single"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - replicaSetNoPrimary - -
    -
    -
    -
    -
    -
    -

    A replica set with no primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case replicaSetNoPrimary = "ReplicaSetNoPrimary"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - replicaSetWithPrimary - -
    -
    -
    -
    -
    -
    -

    A replica set with a primary.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case replicaSetWithPrimary = "ReplicaSetWithPrimary"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - sharded - -
    -
    -
    -
    -
    -
    -

    Sharded topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case sharded = "Sharded"
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - unknown - -
    -
    -
    -
    -
    -
    -

    A topology whose type is not yet known.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case unknown = "Unknown"
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyDescriptionChangedEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyDescriptionChangedEvent.html deleted file mode 100644 index 264a6ed43..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyDescriptionChangedEvent.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - TopologyDescriptionChangedEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

TopologyDescriptionChangedEvent

-
-
-
public struct TopologyDescriptionChangedEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when a topology description changes.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - topologyId - -
    -
    -
    -
    -
    -
    -

    A unique identifier for the topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let topologyId: ObjectId
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - previousDescription - -
    -
    -
    -
    -
    -
    -

    The old topology description.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let previousDescription: TopologyDescription
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - newDescription - -
    -
    -
    -
    -
    -
    -

    The new topology description.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let newDescription: TopologyDescription
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyOpeningEvent.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyOpeningEvent.html deleted file mode 100644 index 9c6a0df61..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/TopologyOpeningEvent.html +++ /dev/null @@ -1,543 +0,0 @@ - - - - TopologyOpeningEvent Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

TopologyOpeningEvent

-
-
-
public struct TopologyOpeningEvent : MongoEvent, InitializableFromOpaquePointer
- -
-
-

Published when a topology is initialized.

- -
-
-
-
    -
  • -
    - - - - eventName - -
    -
    -
    -
    -
    -
    -

    The name this event will be posted under.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static var eventName: Notification.Name { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - topologyId - -
    -
    -
    -
    -
    -
    -

    A unique identifier for the topology.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let topologyId: ObjectId
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/UpdateDescription.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/UpdateDescription.html deleted file mode 100644 index b5cebd61e..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/UpdateDescription.html +++ /dev/null @@ -1,545 +0,0 @@ - - - - UpdateDescription Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UpdateDescription

-
-
-
public struct UpdateDescription : Codable
- -
-
-

An UpdateDescription containing fields that will be present in the change stream document for -operations of type update.

- -
-
-
-
    -
  • -
    - - - - updatedFields - -
    -
    -
    -
    -
    -
    -

    A document containing key:value pairs of names of the fields that were changed, and the new -value for those fields.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let updatedFields: Document
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - removedFields - -
    -
    -
    -
    -
    -
    -

    An array of field names that were removed from the document.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let removedFields: [String]
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/UpdateModelOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/UpdateModelOptions.html deleted file mode 100644 index d36e9fb6d..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/UpdateModelOptions.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - UpdateModelOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UpdateModelOptions

-
-
-
public struct UpdateModelOptions : Codable
- -
-
-

Options to use with a WriteModel.updateOne or WriteModel.updateMany.

- -
-
-
-
    -
  • -
    - - - - arrayFilters - -
    -
    -
    -
    -
    -
    -

    A set of filters specifying to which array elements an update should apply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var arrayFilters: [Document]?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    The collation to use.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializer allowing any/all options to be omitted or optional.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(arrayFilters: [Document]? = nil, collation: Document? = nil, upsert: Bool? = nil)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/UpdateOptions.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/UpdateOptions.html deleted file mode 100644 index c1cc2167e..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/UpdateOptions.html +++ /dev/null @@ -1,657 +0,0 @@ - - - - UpdateOptions Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UpdateOptions

-
-
-
public struct UpdateOptions : Codable, BulkWriteOptionsConvertible
- -
-
-

Options to use when executing an update command on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - arrayFilters - -
    -
    -
    -
    -
    -
    -

    A set of filters specifying to which array elements an update should apply.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var arrayFilters: [Document]?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    If true, allows the write to opt-out of document level validation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var bypassDocumentValidation: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - collation - -
    -
    -
    -
    -
    -
    -

    Specifies a collation.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var collation: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsert - -
    -
    -
    -
    -
    -
    -

    When true, creates a new document if no document matches the query.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var upsert: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - writeConcern - -
    -
    -
    -
    -
    -
    -

    An optional WriteConcern to use for the command.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var writeConcern: WriteConcern?
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Convenience initializer allowing any/all parameters to be optional

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(
    -    arrayFilters: [Document]? = nil,
    -    bypassDocumentValidation: Bool? = nil,
    -    collation: Document? = nil,
    -    upsert: Bool? = nil,
    -    writeConcern: WriteConcern? = nil
    -)
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/UpdateResult.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/UpdateResult.html deleted file mode 100644 index 448218886..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/UpdateResult.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - UpdateResult Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

UpdateResult

-
-
-
public struct UpdateResult : Decodable
- -
-
-

The result of an update operation on a MongoCollection.

- -
-
-
-
    -
  • -
    - - - - matchedCount - -
    -
    -
    -
    -
    -
    -

    The number of documents that matched the filter.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let matchedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - modifiedCount - -
    -
    -
    -
    -
    -
    -

    The number of documents that were modified.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let modifiedCount: Int
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsertedId - -
    -
    -
    -
    -
    -
    -

    The identifier of the inserted document if an upsert took place.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsertedId: BSON?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - upsertedCount - -
    -
    -
    -
    -
    -
    -

    The number of documents that were upserted.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let upsertedCount: Int
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/WriteConcern.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/WriteConcern.html deleted file mode 100644 index 93645a70f..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/WriteConcern.html +++ /dev/null @@ -1,770 +0,0 @@ - - - - WriteConcern Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

WriteConcern

-
-
-
public struct WriteConcern : Codable
-
extension WriteConcern: CustomStringConvertible
-
extension WriteConcern: Equatable
- -
-
-

A class to represent a MongoDB write concern.

- -
-
-
-
    -
  • -
    - - - - W - -
    -
    -
    -
    -
    -
    -

    An option to request acknowledgement that the write operation has propagated to specified mongod instances.

    - - See more -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public enum W : Codable, Equatable
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - w - -
    -
    -
    -
    -
    -
    -

    Indicates the W value for this WriteConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let w: W?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - journal - -
    -
    -
    -
    -
    -
    -

    Indicates whether to wait for the write operation to get committed to the journal.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let journal: Bool?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - wtimeoutMS - -
    -
    -
    -
    -
    -
    -

    If the write concern is not satisfied within this timeout (in milliseconds), -the operation will return an error. The value MUST be greater than or equal to 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let wtimeoutMS: Int64?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isAcknowledged - -
    -
    -
    -
    -
    -
    -

    Indicates whether this is an acknowledged write concern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isAcknowledged: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - isDefault - -
    -
    -
    -
    -
    -
    -

    Indicates whether this is the default write concern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var isDefault: Bool { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init() - -
    -
    -
    -
    -
    -
    -

    Initializes a new, empty WriteConcern.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init()
    - -
    -
    -
    -
    -
  • -
  • - -
    -
    -
    -
    -
    -

    Initializes a new WriteConcern.

    -
    -

    Throws

    -
      -
    • UserError.invalidArgumentError if the options form an invalid combination.
    • -
    - -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(journal: Bool? = nil, w: W? = nil, wtimeoutMS: Int64? = nil) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - description - -
    -
    -
    -
    -
    -
    -

    Returns the relaxed extended JSON representation of this WriteConcern. -On error, an empty string will be returned.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public var description: String { get }
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - ==(_:_:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public static func == (lhs: WriteConcern, rhs: WriteConcern) -> Bool
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/WriteConcern/W.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/WriteConcern/W.html deleted file mode 100644 index 4fd4dd81c..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/WriteConcern/W.html +++ /dev/null @@ -1,622 +0,0 @@ - - - - W Enumeration Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

W

-
-
-
public enum W : Codable, Equatable
- -
-
-

An option to request acknowledgement that the write operation has propagated to specified mongod instances.

- -
-
-
-
    -
  • -
    - - - - number(_:) - -
    -
    -
    -
    -
    -
    -

    Specifies the number of nodes that should acknowledge the write. MUST be greater than or equal to 0.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case number(Int32)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - tag(_:) - -
    -
    -
    -
    -
    -
    -

    Indicates a tag for nodes that should acknowledge the write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case tag(String)
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - majority - -
    -
    -
    -
    -
    -
    -

    Specifies that a majority of nodes should acknowledge the write.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    case majority
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - encode(to:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public func encode(to encoder: Encoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/WriteConcernError.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/WriteConcernError.html deleted file mode 100644 index a94373c64..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/WriteConcernError.html +++ /dev/null @@ -1,597 +0,0 @@ - - - - WriteConcernError Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

WriteConcernError

-
-
-
public struct WriteConcernError : Codable
- -
-
-

A struct to represent a write concern error resulting from an executed bulk write.

- -
-
-
-
    -
  • -
    - - - - code - -
    -
    -
    -
    -
    -
    -

    An integer value identifying the write concern error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let code: ServerErrorCode
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeName - -
    -
    -
    -
    -
    -
    -

    A human-readable string identifying write concern error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let codeName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - details - -
    -
    -
    -
    -
    -
    -

    A document identifying the write concern setting related to the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let details: Document?
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - message - -
    -
    -
    -
    -
    -
    -

    A description of the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let message: String
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/WriteError.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/WriteError.html deleted file mode 100644 index 3f1667aa2..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Structs/WriteError.html +++ /dev/null @@ -1,596 +0,0 @@ - - - - WriteError Structure Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

WriteError

-
-
-
public struct WriteError : Codable
- -
-
-

A struct to represent a single write error not resulting from an executed bulk write.

- -
-
-
-
    -
  • -
    - - - - code - -
    -
    -
    -
    -
    -
    -

    An integer value identifying the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let code: ServerErrorCode
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - codeName - -
    -
    -
    -
    -
    -
    -

    A human-readable string identifying the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let codeName: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - message - -
    -
    -
    -
    -
    -
    -

    A description of the error.

    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public let message: String
    - -
    -
    -
    -
    -
  • -
  • -
    - - - - init(from:) - -
    -
    -
    -
    -
    -
    - -
    -
    -

    Declaration

    -
    -

    Swift

    -
    public init(from decoder: Decoder) throws
    - -
    -
    -
    -
    -
  • -
-
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Typealiases.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Typealiases.html deleted file mode 100644 index 9806fb944..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/Typealiases.html +++ /dev/null @@ -1,542 +0,0 @@ - - - - Type Aliases Reference - - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
-

Type Aliases

-

The following type aliases are available globally.

- -
-
-
- -
-
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/badge.svg b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/badge.svg deleted file mode 100644 index a096feca8..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/badge.svg +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - - - - - - documentation - - - documentation - - - 100% - - - 100% - - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/bson.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/bson.html deleted file mode 100644 index 438eb9611..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/bson.html +++ /dev/null @@ -1,904 +0,0 @@ - - - - BSON Reference - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
- -

MongoSwift BSON Library

- -

MongoDB stores and transmits data in the form of BSON documents, and MongoSwift provides a libary that can be used to work with such documents. The following is an example of some of the functionality provided as part of that:

-
// Document construction.
-let doc: Document = [
-    "name": "Bob",
-    "occupation": "Software Engineer",
-    "projects": [
-        ["id": 76, "title": "Documentation"]
-    ]
-]
-// Reading from documents.
-print(doc["name"]) // .string(Bob)
-print(doc["projects"]) // .array([.document({ "id": 76, "title": "Documentation" })])
-
-// Document serialization and deserialization.
-struct Person: Codable {
-    let name: String
-    let occupation: String
-}
-print(try BSONDecoder().decode(Person.self, from: doc)) // Person(name: "Bob", occupation: "Software Engineer")
-print(try BSONEncoder().encode(Person(name: "Ted", occupation: "Janitor")) // { "name": "Ted", "occupation": "Janitor" }
-
- -

This guide will serve as an overview of various parts of the BSON library. To learn more specifics and cover the entirety of the API surface, please refer to the driver’s API reference.

-

BSON values

- -

BSON values have many possible types, ranging from simple 32-bit integers to documents which store more BSON values themselves. To accurately model this, the driver defines the BSON enum, which has a distinct case for each BSON type. For the more simple cases such as BSON null, the case has no associated value. For the more complex ones, such as documents, a separate type is defined that the case wraps. Where possible, the enum case will wrap the standard library/Foundation equivalent (e.g. Double, String, Date)

-
public enum BSON {
-    case .null,
-    case .document(Document)
-    case .double(Double)
-    case .datetime(Date)
-    case .string(String)
-    // ...rest of the cases...
-}
-
-

Initializing a BSON

- -

This enum can be instantiated directly like any other enum in the Swift language, but it also conforms to a number of ExpressibleByXLiteral protocols, meaning it can be instantiated directly from numeric, string, boolean, dictionary, and array literals.

-
let int: BSON = 5 // .int64(5) on 64-bit systems
-let double: BSON = 5.5 // .double(5.5)
-let string: BSON = "hello world" // .string("hello world")
-let bool: BSON = false // .bool(false)
-let document: BSON = ["x": 5, "y": true, "z": ["x": 1]] // .document({ "x": 5, "y": true, "z": { "x": 1 } })
-let array: BSON = ["1", true, 5.5] // .array([.string("1"), .bool(true), .double(5.5)])
-
- -

All other cases must be initialized directly:

-
let date = BSON.datetime(Date())
-let objectId = BSON.objectId(ObjectId())
-// ...rest of cases...
-
-

Unwrapping a BSON

- -

To get a BSON value as a specific type, you can use switch or if/guard case let like any other enum in Swift:

-
func foo(x: BSON, y: BSON) throws {
-    switch x {
-    case let .int32(int32):
-        print("got an Int32: \(int32)")
-    case let .objectId(oid):
-        print("got an objectId: \(oid.hex)")
-    default:
-        print("got something else")
-    }
-    guard case let .double(d) = y else {
-        throw UserError.invalidArgumentError(message: "y must be a double")
-    }
-    print(d * d)
-}
-
- -

While these methods are good for branching, sometimes it is useful to get just the value (e.g. for optional chaining, passing as a parameter, or returning from a function). For those cases, BSON has computed properties for each case that wraps a type. These properties will return nil unless the underlying BSON value is an exact match to the return type of the property.

-
func foo(x: BSON) -> [Document] {
-    guard let documents = x.arrayValue?.compactMap { $0.documentValue } else {
-        print("x is not an array")
-        return
-    }
-    return documents
-}
-print(.int64(5).int32Value) // nil
-print(.int32(5).int32Value) // Int32(5)
-print(.double(5).int64Value) // nil
-print(.double(5).doubleValue) // Double(5.0)
-
-

Converting a BSON

- -

In some cases, especially when dealing with numbers, it may make sense to coerce a BSON‘s wrapped value into a similar one. For those situations, there are several conversion methods defined on BSON that will unwrap the underlying value and attempt to convert it to the desired type. If that conversion would be lossless, a non-nil value is returned.

-
func foo(x: BSON, y: BSON) throws -> Int {
-    guard let x = x.asInt(), let y = y.asInt() else {
-        throw UserError.invalidArugmentError(message: "provide two integer types")
-    }
-    return x + y
-}
-try foo(x: 5, y: 5.0) // 10
-try foo(x: 5, y: 5) // 10
-try foo(x: 5.0, y: 5.0) // 10
-try foo(x: .int32(5), y: .int64(5)) // 10
-try foo(x: 5.01, y: 5) // error
-try foo(x: "5", y: 5) // error
-
- -

There are similar conversion methods for the other types, namely asInt32(), asDouble(), asInt64(), and asDecimal128().

-

Using a BSON value

- -

BSON conforms to a number of useful Foundation protocols, namely Codable, Equatable, and Hashable. This allows them to be compared, encoded/decoded, and used as keys in maps:

-
// Codable conformance synthesized by compiler.
-struct X: Codable {
-    let _id: BSON
-}
-// Equatable
-let x: BSON = "5"
-let y: BSON = 5
-let z: BSON = .string("5")
-print(x == y) // false
-print(x == z) // true
-// Hashable
-let map: [BSON: String] = [
-    "x": "string",
-    false: "bool",
-    [1, 2, 3]: "array",
-    .objectId(ObjectId()): "oid",
-    .null: "null",
-    .maxKey: "maxKey"
-]
-
-

Documents

- -

BSON documents are the top-level structures that contain the aforementioned BSON values, and they are also BSON values themselves. The driver defines the Document struct to model this specific BSON type.

-

Initializing documents

- -

Like BSON, Document can also be initialized by a dictionary literal. The elements within the literal must be BSONs, so further literals can be embedded within the top level literal definition:

-
let x: Document = [
-    "x": 5,
-    "y": 5.5
-    "z": [
-        "a": [1, true, .datetime(Date())]
-    ]
-]
-
- -

Documents can also be initialized directly by passing in a Data containing raw BSON bytes. If the bytes do not constitute valid BSON, an error is thrown.

-
try Document(fromBSON: Data(hexString: "0F00000010246B6579002A00000000")) // { "$key": 42 }
-try Document(fromBSON: Data(hexString: "1200000002666F6F0004000000626172")) // error 
-
- -

Documents may be initialized from an extended JSON string as well:

-
try Document(fromJSON: "{ \"x\": true }") // { "x": true }
-try Document(fromJSON: "{ x: false }}}") // error
-
-

Using documents

- -

Documents define the interface in which an application communicates with a MongoDB deployment. For that reason, Document has been fitted with functionality to make it both powerful and ergonomic to use for developers.

-

Reading / writing to Document

- -

Document conforms to Collection, which allows for easy reading and writing of elements via the subscript operator. On Document, this operator returns and accepts a BSON?:

-
var doc: Document = ["x": 1]
-print(doc["x"]) // .int64(1)
-doc["x"] = ["y": .null]
-print(doc["x"]) // .document({ "y": null })
-doc["x"] = nil
-print(doc["x"]) // nil
-print(doc) // { }
-
- -

Document also has the @dynamicMemberLookup attribute, meaning it’s values can be accessed directly as if they were properties on Document:

-
var doc: Document = ["x": 1]
-print(doc.x) // .int64(1)
-doc.x = ["y": .null]
-print(doc.x) // .document({ "y": null })
-doc.x = nil
-print(doc.x) // nil
-print(doc) // { }
-
- -

Document also conforms to Sequence, which allows it to be iterated over:

-
for (k, v) in Document { 
-    print("\(k) = \(v)")
-}
-
- -

Conforming to Sequence also gives a number of useful methods from the functional programming world, such as map or allSatisfy:

-
let allEvens = doc.allSatisfy { _, v in v.asInt() ?? 1 % 2 == 0 }
-let squares = doc.map { k, v in v.asInt()! * v.asInt()! }
-
- -

See the documentation for Sequence for a full list of methods that Document implements as part of this.

- -

In addition to those protocol conformances, there are a few one-off helpers implemented on Document such as filter (that returns a Document) and mapValues (also returns a Document):

-
let doc = ["_id": .objectId(ObjectId()), "numCats": 2, "numDollars": 1.56, "numPhones": 1]
-doc.filter { k, v in k.contains("num") && v.asInt() != nil }.mapValues { v in .int64(v.asInt64()! + 5) } // { "numCats": 7, "numPhones": 6 }
-
- -

See the driver’s documentation for a full listing of Document’s public API.

-

Codable and Document

- -

Codable is a protocol defined in Foundation that allows for ergonomic conversion between various serialization schemes and Swift data types. As part of the BSON library, MongoSwift defines both BSONEncoder and BSONDecoder to facilitate this serialization and deserialization to and from BSON via Codable. This allows applications to work with BSON documents in a type-safe way, and it removes much of the runtime key presence and type checking required when working with raw documents. It is reccommended that users leverage Codable wherever possible in their applications that use the driver instead of accessing documents directly.

- -

For example, here is an function written using raw documents:

-
let person = [
-    "name": "Bob",
-    "occupation": "Software Engineer"
-    "projects": [
-        ["id": 1, title: "Server Side Swift Application"],
-        ["id": 76, title: "Write documentation"],
-    ]
-]
-
-func prettyPrint(doc: Document) throws {
-    guard let name = doc["name"]?.stringValue else {
-        throw argumentError(message: "missing name")
-    }
-    print("Name: \(name)")
-    guard let occupation = doc["occupation"]?.stringValue else {
-        throw argumentError(message: "missing occupation")
-    }
-    print("Occupation: \(occupation)")
-    guard let projects = doc["projects"]?.arrayValue.compactMap { $0.documentValue } else {
-        throw argumentError(message: "missing projects")
-    }
-    print("Projects:")
-    for project in projects {
-        guard let title = project["title"] else {
-            throw argumentError(message: "missing title")
-        }
-        print(title)
-    }
-}
-
- -

Due to the flexible nature of Document, a number of checks have to be put into the body of the function. This clutters the actual function’s logic and requires a lot of boilerplate code. Now, consider the following function which does the same thing but is written leveraging Codable:

-
struct Project: Codable {
-    let id: BSON
-    let title: String
-}
-
-struct Person: Codable {
-    let name: String
-    let occupation: String
-    let projects: [Project]
-}
-
-func prettyPrint(doc: Document) throws {
-    let person = try BSONDecoder().decode(Person.self, from: doc)
-    print("Name: \(person.name)")
-    print("Occupation: \(person.occupation)")
-    print("Projects:")
-    for project in person.projects {
-        print(project.title)
-    }
-}
-
- -

In this version, the definition of the data type and the logic of the function are defined completely separately, and it leads to far more readable and concise versions of both.

-

Codable in MongoSwift

- -

There are a number of ways for users to leverage Codable via driver’s API. One such example is through MongoCollection<T>. By default, MongoDatabase.collection returns a MongoCollection<Document>. Any find or aggregate method invocation on that returned collection would then return a MongoCursor<Document>, which when iterated returns a Document?:

-
let collection = db.collection("person", withType: Person.self)
-for person in try collection.find(["occupation": "Software Engineer"]) {
-    print(person["name"] ?? "nil")
-}
-try collection.insert(["name": "New Hire", "occupation": "Doctor", "projects": [])
-
- -

However, if the schema of the collection is known, Codable structs can be used to work with the data in a more type safe way. To facilitate this, the alternate collection(name:asType) method on MongoDatabase, which accepts a Codable generic type, can be used. The provided type defines the model for all the documents in that collection, and any cursor returned from find or aggregate on that collection will be generic over that type instead of Document. Iterating such cursors will automatically decode the result documents to the generic type specified. Similarly, insert on that collection will accept an instance of that type.

-
let collection = db.collection("person", withType: Person.self)
-for person in try collection.find(["occupation": "Software Engineer"]) {
-    print(person.name)
-}
-try collection.insert(Person(name: "New Hire", occupation: "Doctor", projects: [])
-
- -

This allows applications that interact with the database to use well-defined Swift types, resulting in clearer and less error-prone code. Similar things can be done with ChangeStream<T> and ChangeStreamEvent<T>.

-

Migrating from the old BSON API

- -

In version 1.0 of MongoSwift, the public API for using BSON values was changed dramatically. This section will describe the process for migrating from the old API (BSON API v1) to this new one (BSON API v2).

-

Overview of BSON API v1

- -

The previous API was based around the BSONValue protocol. Types that conformed to this protocol could be inserted to or read out of Document and could aslo be used in Document literals. The protocol was also used in various places around the driver as an existential type or conformance requirement. A related protocol, BSONNumber, inherited from BSONValue and provided some numeric conversion helpers for the various BSON number types (e.g. Double, Int32, Int).

-
var doc: Document = [
-    "a": 5
-    "b": ObjectId()
-]
-let value: BSONValue? = doc["a"] // 5
-let intValue = (value as? BSONNumber)?.int32Value // Int32(5)
-doc["c"] = "i am a string"
-
- -

This API provided a number of benefits, the principal one being the seamless integration of standard Swift types (e.g. Int) and driver custom ones (e.g ObjectId) into Document’s methods. It also had a few drawbacks, however. In order for BSONValue to be used as an existential type, it could not have Self or associated type requirements. This ended being a big restriction as it meant BSONValue could not be Equatable, Hashable, or Codable. Instead, all of this functionaltiy was put onto the separate wrapper type AnyBSONValue, which was used instead of an existential BSONValue in many places in order to leverage these common protocol conformances.

- -

Another drawback is that subdocument literals could not be inferred and had to be explicitly casted:

-
let x: Document = [
-    "x": [
-        "y": [
-            z: 4
-        ] as Document
-    ] as Document
-]
-
-

Required Updates

- -

In BSON API v2, BSONNumber, BSONValue, and AnyBSONValue no longer exist. They are all entirely replaced by the BSON enum.

-

Updating BSONValue references

- -

Anywhere in the driver that formerly accepted or returned a BSONValue will now accept or return a BSON. Wherever BSONValue is used as an existential value in your application, a BSON will probably work as a drop-in replacement. Any casts will need to be updated to call the appropriate helper property instead.

-
func foo(x: BSONValue) -> String? {
-    guard let stringValue = x as? String else {
-        return nil
-    }
-    return "foo" + stringValue
-}
-
- -

becomes:

-
func foo(x: BSON) -> String? {
-    guard let stringValue = x.stringValue else {
-        return nil
-    }
-    // or
-    guard case let .string(stringValue) = x else {
-        return nil
-    }
-    return "foo" + stringValue
-}
-
- -

Similarly, BSON’s Equatable conformance can be leveraged instead of the old bsonEquals.

-
func foo(x: BSONValue, y: BSONValue) { 
-    if x.bsonEquals(y) { ... }
-}
-
- -

becomes simply:

-
func foo(x: BSON, y: BSON) {
-    if x == y { ... }
-}
-
- -

Generic Requirement -Currently, there is no equivalent protocol in BSON API v2 to BSONValue, so if your application was using it as a generic requirement there is no alternative in the driver. You may have to implement your own similar protocol to achieve the same effect. If such a protocol would be useful to you, please file a ticket on the driver’s Jira project.

-

Updating BSONNumber references

- -

BSON should be a drop-in replacement for anywhere BSONNumber is used, except for as a generic requirement. One thing to note that BSONNumber’s properties (e.g. .int32Value) are conversions, whereas BSON’s are simple unwraps. The conversions on BSON are implemented as methods (e.g. asInt32()).

-
// old
-func foo(doc: Document) -> Int? {
-    // conversion
-    guard let int = (doc["a"] as? BSONNumber)?.intValue else {
-        return nil
-    }
-    // cast
-    guard let otherInt = doc["b"] as? Int32 else {
-        return nil
-    }
-    return int*Int(otherInt)
-}
-
-// new
-func foo(doc: Document) -> Int? {
-    // conversion
-    guard let int = doc["a"]?.asInt() else {
-        return nil
-    }
-    // cast
-    guard let otherInt = doc["b"]?.int32Value else {
-        return nil
-    }
-    // or can use case let
-    guard case let .int32(otherInt) = doc["b"] else {
-        return nil
-    }
-    return int * Int(otherInt)
-}
-
-

Updating AnyBSONValue references

- -

BSON should be able to serve as a complete replacement for AnyBSONValue. -Codable usage:

-
// old
-struct X: Codable {
-    let x: AnyBSONValue
-}
-// new
-struct X: Codable {
-    let x: BSON
-}
-
- -

Equatable usage:

-
// old 
-let a: [BSONValue] = ["1", 2, false]
-let b: [BSONValue] = ["not", "equal"]
-return a.map { AnyBSONValue($0) } == b.map { AnyBSONValue($0) }
-// new
-let a: [BSON] = ["1", 2, false]
-let b: [BSON] = ["not", "equal"]
-return a == b
-
- -

Hashable usage:

-
// old
-let a: [AnyBSONValue: Int] = [AnyBSONValue("hello"): 4, AnyBSONValue(ObjectId()): 26]
-print(a[AnyBSONValue(true)] ?? "nil")
-// new
-let a: [BSON, Int] = ["hello": 4, .objectId(ObjectId()): 26]
-print(a[true] ?? "nil")
-
-

Updating Document literals

- -

BSON can be expressed by a dictionary literal, string literal, integer literal, float literal, boolean literal, and array literal, so document literals consisting of those literals can largely be left alone. All the other types that formerly conformed to BSONValue will need to have their cases explicitly constructed. The cast to Document will no longer be required for subdocuments and will need to be removed. All runtime variables will also need to have their cases explicitly constructed whereas in BSON API v1 they could just be inserted directly.

-
// BSON API v1
-let x: Document = [
-    "_id": self.getDocument()
-    "x": Date()
-    "y": [
-        "z": [1, 2, false, ["x": 123] as Document]
-    ] as Document
-]
-
- -

becomes

-
// BSON API v2
-let x: Document = [
-    "_id": .document(self.getDocument())
-    "x": .datetime(Date()),
-    "y": [
-        "z": [1, 2, false, ["x": 123]
-    ]
-]
-
- -
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/change-streams.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/change-streams.html deleted file mode 100644 index 7873babb2..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/change-streams.html +++ /dev/null @@ -1,626 +0,0 @@ - - - - Change-Streams Reference - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
- -

Using Change Streams

- -

MongoSwift 0.2.0 added support for change streams, which allow applications to access real-time data changes. Applications can use change streams to subscribe to all data changes on a single collection, a database, or an entire deployment, and immediately react to them. Because change streams use the aggregation framework, applications can also filter for specific changes or transform the notifications at will.

- -

Note: Change streams only work with MongoDB replica sets and sharded clusters.

-

Examples

-

Open a Change Stream on a MongoCollection<Document> (MongoDB 3.6+)

-
let client = try MongoClient()
-let inventory = client.db("example").collection("inventory")
-let stream = try inventory.watch() // returns a `ChangeStream<ChangeStreamEvent<Document>>`
-
-// perform some operations using `inventory`...
-
-for change in stream {
-    // process `ChangeStreamEvent<Document>` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
-

Open a Change Stream on a MongoCollection<MyCodableType> (MongoDB 3.6+)

-
let client = try MongoClient()
-let inventory = client.db("example").collection("inventory", withType: MyCodableType.self)
-let stream = try inventory.watch() // returns a `ChangeStream<ChangeStreamEvent<MyCodableType>>`
-
-// perform some operations using `inventory`...
-
-for change in stream {
-    // process `ChangeStreamEvent<MyCodableType>` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
-

Use a Custom Codable Type for the fullDocument Property of Returned ChangeStreamEvents

-
let client = try MongoClient()
-let inventory = client.db("example").collection("inventory")
-let stream = try inventory.watch(withFullDocumentType: MyCodableType.self) // returns a `ChangeStream<ChangeStreamEvent<MyCodableType>>`
-
-// perform some operations using `inventory`...
-
-for change in stream {
-    // process `ChangeStreamEvent<MyCodableType>` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
-

Use a Custom Codable Type for the Return type of ChangeStream.next()

-
let client = try MongoClient()
-let inventory = client.db("example").collection("inventory")
-let stream = try inventory.watch(withEventType: MyCodableType.self) // returns a `ChangeStream<MyCodableType>`
-
-// perform some operations using `inventory`...
-
-for change in stream {
-    // process `MyCodableType` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
-

Open a Change Stream on a MongoDatabase (MongoDB 4.0+)

-
let client = try MongoClient()
-let db = client.db("example")
-let stream = try db.watch()
-
-// perform some operations using `db`...
-
-for change in stream {
-    // process `ChangeStreamEvent<Document>` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
- -

Note: the types of the fullDocument property, as well as the return type of ChangeStream.next(), may be customized in the same fashion as the examples using MongoCollection above.

-

Open a Change Stream on a MongoClient (MongoDB 4.0+)

-
let client = try MongoClient()
-let stream = try client.watch()
-
-// perform some operations using `client`...
-
-for change in stream {
-    // process `ChangeStreamEvent<Document>` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
- -

Note: the types of the fullDocument property, as well as the return type of ChangeStream.next(), may be customized in the same fashion as the examples using MongoCollection above.

-

Resume a Change Stream

-
let client = try MongoClient()
-let inventory = client.db("example").collection("inventory")
-let stream = try inventory.watch()
-
-// perform some operations using `inventory`...
-
-// read the first change event
-let next = try stream.nextOrError()
-
-// create a new change stream that starts after the first change event
-let resumeToken = stream.resumeToken
-let resumedStream = try inventory.watch(options: ChangeStreamOptions(resumeAfter: resumeToken))
-for change in resumedStream {
-    // process `ChangeStreamEvent<Document>` here
-}
-
-// check if any errors occurred while iterating
-if let error = resumedStream.error {
-    // handle error
-}
-
-

Modify Change Stream Output

-
let client = try MongoClient()
-let inventory = client.db("example").collection("inventory")
-
-// Only include events where the changed document's username = "alice"
-let pipeline: [Document] = [
-    ["$match": ["fullDocument.username": "alice"] as Document]
-]
-
-let stream = try inventory.watch(pipeline)
-for change in stream {
-    // process `ChangeStreamEvent<Document>` here
-}
-
-// check if any errors occurred while iterating
-if let error = stream.error {
-    // handle error
-}
-
-

See Also

- - - -
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/css/highlight.css b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/css/highlight.css deleted file mode 100644 index d0db0e13b..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/css/highlight.css +++ /dev/null @@ -1,200 +0,0 @@ -/* Credit to https://gist.github.com/wataru420/2048287 */ -.highlight { - /* Comment */ - /* Error */ - /* Keyword */ - /* Operator */ - /* Comment.Multiline */ - /* Comment.Preproc */ - /* Comment.Single */ - /* Comment.Special */ - /* Generic.Deleted */ - /* Generic.Deleted.Specific */ - /* Generic.Emph */ - /* Generic.Error */ - /* Generic.Heading */ - /* Generic.Inserted */ - /* Generic.Inserted.Specific */ - /* Generic.Output */ - /* Generic.Prompt */ - /* Generic.Strong */ - /* Generic.Subheading */ - /* Generic.Traceback */ - /* Keyword.Constant */ - /* Keyword.Declaration */ - /* Keyword.Pseudo */ - /* Keyword.Reserved */ - /* Keyword.Type */ - /* Literal.Number */ - /* Literal.String */ - /* Name.Attribute */ - /* Name.Builtin */ - /* Name.Class */ - /* Name.Constant */ - /* Name.Entity */ - /* Name.Exception */ - /* Name.Function */ - /* Name.Namespace */ - /* Name.Tag */ - /* Name.Variable */ - /* Operator.Word */ - /* Text.Whitespace */ - /* Literal.Number.Float */ - /* Literal.Number.Hex */ - /* Literal.Number.Integer */ - /* Literal.Number.Oct */ - /* Literal.String.Backtick */ - /* Literal.String.Char */ - /* Literal.String.Doc */ - /* Literal.String.Double */ - /* Literal.String.Escape */ - /* Literal.String.Heredoc */ - /* Literal.String.Interpol */ - /* Literal.String.Other */ - /* Literal.String.Regex */ - /* Literal.String.Single */ - /* Literal.String.Symbol */ - /* Name.Builtin.Pseudo */ - /* Name.Variable.Class */ - /* Name.Variable.Global */ - /* Name.Variable.Instance */ - /* Literal.Number.Integer.Long */ } - .highlight .c { - color: #999988; - font-style: italic; } - .highlight .err { - color: #a61717; - background-color: #e3d2d2; } - .highlight .k { - color: #000000; - font-weight: bold; } - .highlight .o { - color: #000000; - font-weight: bold; } - .highlight .cm { - color: #999988; - font-style: italic; } - .highlight .cp { - color: #999999; - font-weight: bold; } - .highlight .c1 { - color: #999988; - font-style: italic; } - .highlight .cs { - color: #999999; - font-weight: bold; - font-style: italic; } - .highlight .gd { - color: #000000; - background-color: #ffdddd; } - .highlight .gd .x { - color: #000000; - background-color: #ffaaaa; } - .highlight .ge { - color: #000000; - font-style: italic; } - .highlight .gr { - color: #aa0000; } - .highlight .gh { - color: #999999; } - .highlight .gi { - color: #000000; - background-color: #ddffdd; } - .highlight .gi .x { - color: #000000; - background-color: #aaffaa; } - .highlight .go { - color: #888888; } - .highlight .gp { - color: #555555; } - .highlight .gs { - font-weight: bold; } - .highlight .gu { - color: #aaaaaa; } - .highlight .gt { - color: #aa0000; } - .highlight .kc { - color: #000000; - font-weight: bold; } - .highlight .kd { - color: #000000; - font-weight: bold; } - .highlight .kp { - color: #000000; - font-weight: bold; } - .highlight .kr { - color: #000000; - font-weight: bold; } - .highlight .kt { - color: #445588; } - .highlight .m { - color: #009999; } - .highlight .s { - color: #d14; } - .highlight .na { - color: #008080; } - .highlight .nb { - color: #0086B3; } - .highlight .nc { - color: #445588; - font-weight: bold; } - .highlight .no { - color: #008080; } - .highlight .ni { - color: #800080; } - .highlight .ne { - color: #990000; - font-weight: bold; } - .highlight .nf { - color: #990000; } - .highlight .nn { - color: #555555; } - .highlight .nt { - color: #000080; } - .highlight .nv { - color: #008080; } - .highlight .ow { - color: #000000; - font-weight: bold; } - .highlight .w { - color: #bbbbbb; } - .highlight .mf { - color: #009999; } - .highlight .mh { - color: #009999; } - .highlight .mi { - color: #009999; } - .highlight .mo { - color: #009999; } - .highlight .sb { - color: #d14; } - .highlight .sc { - color: #d14; } - .highlight .sd { - color: #d14; } - .highlight .s2 { - color: #d14; } - .highlight .se { - color: #d14; } - .highlight .sh { - color: #d14; } - .highlight .si { - color: #d14; } - .highlight .sx { - color: #d14; } - .highlight .sr { - color: #009926; } - .highlight .s1 { - color: #d14; } - .highlight .ss { - color: #990073; } - .highlight .bp { - color: #999999; } - .highlight .vc { - color: #008080; } - .highlight .vg { - color: #008080; } - .highlight .vi { - color: #008080; } - .highlight .il { - color: #009999; } diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/css/jazzy.css b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/css/jazzy.css deleted file mode 100644 index 2d5656d5b..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/css/jazzy.css +++ /dev/null @@ -1,372 +0,0 @@ -html, body, div, span, h1, h3, h4, p, a, code, em, img, ul, li, table, tbody, tr, td { - background: transparent; - border: 0; - margin: 0; - outline: 0; - padding: 0; - vertical-align: baseline; } - -body { - background-color: #f2f2f2; - font-family: Helvetica, freesans, Arial, sans-serif; - font-size: 14px; - -webkit-font-smoothing: subpixel-antialiased; - word-wrap: break-word; } - -h1, h2, h3 { - margin-top: 0.8em; - margin-bottom: 0.3em; - font-weight: 100; - color: black; } - -h1 { - font-size: 2.5em; } - -h2 { - font-size: 2em; - border-bottom: 1px solid #e2e2e2; } - -h4 { - font-size: 13px; - line-height: 1.5; - margin-top: 21px; } - -h5 { - font-size: 1.1em; } - -h6 { - font-size: 1.1em; - color: #777; } - -.section-name { - color: gray; - display: block; - font-family: Helvetica; - font-size: 22px; - font-weight: 100; - margin-bottom: 15px; } - -pre, code { - font: 0.95em Menlo, monospace; - color: #777; - word-wrap: normal; } - -p code, li code { - background-color: #eee; - padding: 2px 4px; - border-radius: 4px; } - -a { - color: #0088cc; - text-decoration: none; } - -ul { - padding-left: 15px; } - -li { - line-height: 1.8em; } - -img { - max-width: 100%; } - -blockquote { - margin-left: 0; - padding: 0 10px; - border-left: 4px solid #ccc; } - -.content-wrapper { - margin: 0 auto; - width: 980px; } - -header { - font-size: 0.85em; - line-height: 26px; - background-color: #414141; - position: fixed; - width: 100%; - z-index: 2; } - header img { - padding-right: 6px; - vertical-align: -4px; - height: 16px; } - header a { - color: #fff; } - header p { - float: left; - color: #999; } - header .header-right { - float: right; - margin-left: 16px; } - -#breadcrumbs { - background-color: #f2f2f2; - height: 27px; - padding-top: 17px; - position: fixed; - width: 100%; - z-index: 2; - margin-top: 26px; } - #breadcrumbs #carat { - height: 10px; - margin: 0 5px; } - -.sidebar { - background-color: #f9f9f9; - border: 1px solid #e2e2e2; - overflow-y: auto; - overflow-x: hidden; - position: fixed; - top: 70px; - bottom: 0; - width: 230px; - word-wrap: normal; } - -.nav-groups { - list-style-type: none; - background: #fff; - padding-left: 0; } - -.nav-group-name { - border-bottom: 1px solid #e2e2e2; - font-size: 1.1em; - font-weight: 100; - padding: 15px 0 15px 20px; } - .nav-group-name > a { - color: #333; } - -.nav-group-tasks { - margin-top: 5px; } - -.nav-group-task { - font-size: 0.9em; - list-style-type: none; - white-space: nowrap; } - .nav-group-task a { - color: #888; } - -.main-content { - background-color: #fff; - border: 1px solid #e2e2e2; - margin-left: 246px; - position: absolute; - overflow: hidden; - padding-bottom: 20px; - top: 70px; - width: 734px; } - .main-content p, .main-content a, .main-content code, .main-content em, .main-content ul, .main-content table, .main-content blockquote { - margin-bottom: 1em; } - .main-content p { - line-height: 1.8em; } - .main-content section .section:first-child { - margin-top: 0; - padding-top: 0; } - .main-content section .task-group-section .task-group:first-of-type { - padding-top: 10px; } - .main-content section .task-group-section .task-group:first-of-type .section-name { - padding-top: 15px; } - .main-content section .heading:before { - content: ""; - display: block; - padding-top: 70px; - margin: -70px 0 0; } - .main-content .section-name p { - margin-bottom: inherit; - line-height: inherit; } - .main-content .section-name code { - background-color: inherit; - padding: inherit; - color: inherit; } - -.section { - padding: 0 25px; } - -.highlight { - background-color: #eee; - padding: 10px 12px; - border: 1px solid #e2e2e2; - border-radius: 4px; - overflow-x: auto; } - -.declaration .highlight { - overflow-x: initial; - padding: 0 40px 40px 0; - margin-bottom: -25px; - background-color: transparent; - border: none; } - -.section-name { - margin: 0; - margin-left: 18px; } - -.task-group-section { - padding-left: 6px; - border-top: 1px solid #e2e2e2; } - -.task-group { - padding-top: 0px; } - -.task-name-container a[name]:before { - content: ""; - display: block; - padding-top: 70px; - margin: -70px 0 0; } - -.section-name-container { - position: relative; - display: inline-block; } - .section-name-container .section-name-link { - position: absolute; - top: 0; - left: 0; - bottom: 0; - right: 0; - margin-bottom: 0; } - .section-name-container .section-name { - position: relative; - pointer-events: none; - z-index: 1; } - .section-name-container .section-name a { - pointer-events: auto; } - -.item { - padding-top: 8px; - width: 100%; - list-style-type: none; } - .item a[name]:before { - content: ""; - display: block; - padding-top: 70px; - margin: -70px 0 0; } - .item code { - background-color: transparent; - padding: 0; } - .item .token, .item .direct-link { - padding-left: 3px; - margin-left: 15px; - font-size: 11.9px; - transition: all 300ms; } - .item .token-open { - margin-left: 0px; } - .item .discouraged { - text-decoration: line-through; } - .item .declaration-note { - font-size: .85em; - color: gray; - font-style: italic; } - -.pointer-container { - border-bottom: 1px solid #e2e2e2; - left: -23px; - padding-bottom: 13px; - position: relative; - width: 110%; } - -.pointer { - background: #f9f9f9; - border-left: 1px solid #e2e2e2; - border-top: 1px solid #e2e2e2; - height: 12px; - left: 21px; - top: -7px; - -webkit-transform: rotate(45deg); - -moz-transform: rotate(45deg); - -o-transform: rotate(45deg); - transform: rotate(45deg); - position: absolute; - width: 12px; } - -.height-container { - display: none; - left: -25px; - padding: 0 25px; - position: relative; - width: 100%; - overflow: hidden; } - .height-container .section { - background: #f9f9f9; - border-bottom: 1px solid #e2e2e2; - left: -25px; - position: relative; - width: 100%; - padding-top: 10px; - padding-bottom: 5px; } - -.aside, .language { - padding: 6px 12px; - margin: 12px 0; - border-left: 5px solid #dddddd; - overflow-y: hidden; } - .aside .aside-title, .language .aside-title { - font-size: 9px; - letter-spacing: 2px; - text-transform: uppercase; - padding-bottom: 0; - margin: 0; - color: #aaa; - -webkit-user-select: none; } - .aside p:last-child, .language p:last-child { - margin-bottom: 0; } - -.language { - border-left: 5px solid #cde9f4; } - .language .aside-title { - color: #4b8afb; } - -.aside-warning, .aside-deprecated, .aside-unavailable { - border-left: 5px solid #ff6666; } - .aside-warning .aside-title, .aside-deprecated .aside-title, .aside-unavailable .aside-title { - color: #ff0000; } - -.graybox { - border-collapse: collapse; - width: 100%; } - .graybox p { - margin: 0; - word-break: break-word; - min-width: 50px; } - .graybox td { - border: 1px solid #e2e2e2; - padding: 5px 25px 5px 10px; - vertical-align: middle; } - .graybox tr td:first-of-type { - text-align: right; - padding: 7px; - vertical-align: top; - word-break: normal; - width: 40px; } - -.slightly-smaller { - font-size: 0.9em; } - -#footer { - position: relative; - top: 10px; - bottom: 0px; - margin-left: 25px; } - #footer p { - margin: 0; - color: #aaa; - font-size: 0.8em; } - -html.dash header, html.dash #breadcrumbs, html.dash .sidebar { - display: none; } - -html.dash .main-content { - width: 980px; - margin-left: 0; - border: none; - width: 100%; - top: 0; - padding-bottom: 0; } - -html.dash .height-container { - display: block; } - -html.dash .item .token { - margin-left: 0; } - -html.dash .content-wrapper { - width: auto; } - -html.dash #footer { - position: static; } diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/development.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/development.html deleted file mode 100644 index 81f654855..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/development.html +++ /dev/null @@ -1,628 +0,0 @@ - - - - Development Reference - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
- -

Swift Driver Development Guide

-

Index

- - -

Things to install

- -
    -
  • swiftenv: a command-line tool that allows easy installation of and switching between versions of Swift. - -
      -
    • Use this to install Swift 4.2 and Swift 5.0.
    • -
  • -
  • Jazzy: the tool we use to generate documentation.
  • -
  • SwiftLint: the Swift linter we use.
  • -
  • Sourcery: the tool we use to generate lists of test names (required to run the tests on Linux).
  • -
  • libmongoc: the MongoDB C driver, which this library wraps. See the installation instructions provided in our README or on the libmongoc docs.
  • -
-

If you are using (Vim/Neovim)

- -
    -
  • swift.vim: A fork of Keith Smiley’s swift.vim with fixed indenting rules. This adds proper indenting and syntax for Swift to Vim. This fork also provides a match rule for column width highlighting. - -
      -
    • Please read the NOTICE for proper credits.
    • -
  • -
-

The code

- -

You should clone this repository, as well as the MongoDB Driver specifications. -Since this library wraps the MongoDB C Driver, we also recommend cloning mongodb/mongo-c-driver so you have the source code and documentation easily accessible.

-

Building

-

From the Command line

- -

Run swift build or simply make in the project’s root directory.

-

In Xcode

- -

We do not provide or maintain an already-generated .xcodeproj in our repository. Instead, you must generate it locally.

- -

To generate the .xcodeproj file:

- -
    -
  1. Install the Ruby gem xcodeproj with gem install xcodeproj (you may need to sudo)
  2. -
  3. Run make project
  4. -
  5. You’re ready to go! Open MongoSwift.xcodeproj and build and test as normal.
  6. -
- -

Why is this necessary? The project requires a customized “copy resources” build phase to include various test .json files. By default, this phase is not included when you run swift package generate-xcodeproj. So make project first generates the project, and then uses xcodeproj to manually add the files to the appropriate targets (see add_json_files.rb).

-

Running Tests

- -

NOTE: Several of the tests require a mongod instance to be running on the default host/port, localhost:27017. (You can start this by simply running mongod.)

- -

You can run tests from Xcode as usual. If you prefer to test from the command line, keep reading.

-

From the Command Line

- -

We recommend installing the ruby gem xcpretty and running tests by executing make test-pretty, as this provides output in a much more readable format. (Works on MacOS only.)

- -

Alternatively, you can just run the tests with swift test, or make test.

- -

To filter tests by regular expression:

- -
    -
  • If you are using swift test, provide the --filter argument: for example, swift test --filter=MongoClientTests.
  • -
  • If you are using make test or make test-pretty, provide the FILTER environment variable: for example, make test-pretty FILTER=MongoCollectionTests.
  • -
-

Diagnosing Backtraces on Linux

- -

SWIFT-755 documents an outstanding problem on Linux where backtraces do not contain debug symbols. As discussed in this Stack Overflow thread, a symbolicate-linux-fatal script may be used to add symbols to an existing backtrace. Consider the following:

-
$ swift test --filter CrashingTest &> crash.log
-$ symbolicate-linux-fatal /path/to/MongoSwiftPackageTests.xctest crash.log
-
- -

This will require you to manually provide the path to the compiled test binary (e.g. .build/x86_64-unknown-linux/debug/MongoSwiftPackageTests.xctest).

-

Writing and Generating Documentation

- -

We document new code as we write it. We use C-style documentation blocks (/** ... */) for documentation longer than 3 lines, and triple-slash (///) for shorter documentation. -Comments that are not documentation should use two slashes (//).

- -

Documentation comments should generally be complete sentences and should end with periods.

- -

Our documentation site is automatically generated from the source code using Jazzy. We regenerate it each time we release a new version of the driver. -To regenerate the files, run make documentation from the project’s root directory. You can then inspect the changes to the site by opening the files in /docs in your web browser.

-

Linting and Style

- -

We use SwiftLint for linting. You can see our configuration in the .swiftlint.yml file in the project’s root directory. Run swiftlint in the /Sources directory to lint all of our files. Running swiftlint autocorrect will correct some types of violations.

- -

We use SwiftFormat for formatting the code. You can see our configuration in the .swiftformat file in the project’s root directory. Our linter config contains a superset of the rules that our formatter does, so some manual tweaking may be necessary to satisfy both once the formatter is run (e.g. line length enforcement). Most of the time, the formatter should put the code into a format that passes the linter.

- -

To pass all the formatting stages of our testing matrix, both swiftlint --strict and swiftformat --lint . must finish successfully.

- -

For style guidance, look at Swift’s API design guidelines and Google’s Swift Style Guide.

-

Sublime Text Setup

- -

If you use Sublime Text, you can get linting violations shown in the editor by installing the packages SublimeLinter and SublimeLinter-contrib-swiftlint.

-

Vim/Neovim Setup

- -

If you use Vim or Neovim, then you can get linting support by using ale by w0rp. This will show symbols in the gutter for warnings/errors and show linter messages in the status.

-

Workflow

- -
    -
  1. Create a feature branch, named by the corresponding JIRA ticket if exists, along with a short descriptor of the work: for example, SWIFT-30/writeconcern.
  2. -
  3. Do your work on the branch.
  4. -
  5. If you add, remove, or rename any tests, make sure to update LinuxMain.swift accordingly. If you are on MacOS, you can do that by running make sourcery.
  6. -
  7. Make sure your code builds and passes all tests on Travis. Every time you push to GitHub or open a pull request, it will trigger a new build.
  8. -
  9. Open a pull request on the repository. Make sure you have rebased your branch onto the latest commits on master.
  10. -
  11. Go through code review to get the team’s approval on your changes. (See the next section on Code Review for more details on this process.)
  12. -
- -

Once you get the required approvals and your code passes all tests:

- -
    -
  1. Rebase on master again if needed.
  2. -
  3. Build and rerun tests.
  4. -
  5. Squash all commits into a single, descriptive commit method, formatted as: TICKET-NUMBER: Description of changes. For example, SWIFT-30: Implement WriteConcern type.
  6. -
  7. Merge it, or if you don’t have permissions, ask someone to merge it for you.
  8. -
-

Code Review

-

Giving a review

- -

When giving a review, please batch your comments together to cut down on the number of emails sent to others involved in the pull request. You can do this by going to the “Files Changed” tab. When you post your first comment, press “Start a review”. When you’re done commenting, click “Finish your review” (top right). -Please feel free to leave reviews on your own code when you open a pull request in order add additional context, point out an aspect of the design you’re unsure of, etc.

-

Responding to a review

- -

You can use the same batching approach as above to respond to review comments. Once you’ve posted your responses and pushed new commits addressing the comments, re-request reviews from your reviewers by clicking the arrow circle icons next to their names on the list of reviewers.

- -

Note: GitHub allows marking comment threads on pull requests as “resolved”, which hides them from view. Always allow the original commenter to resolve a conversation. This allows them to verify that your changes match what they requested before the conversation is hidden.

-

Resources

-

Swift

- - -

MongoDB and Drivers

- - - -
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/error-handling.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/error-handling.html deleted file mode 100644 index ee7c70b56..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/error-handling.html +++ /dev/null @@ -1,656 +0,0 @@ - - - - Error-Handling Reference - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
- -

Swift Driver Error Handling Guide

-

Index

- - -

Error Types

- -

The driver uses errors to communicate that an operation failed, an assumption wasn’t met, or that the user did something incorrectly. Applications that use the driver can in turn catch these errors and respond appropriately without crashing or resulting in an otherwise inconsistent state. To correctly model the different sources of errors, the driver defines three separate types of errors (ServerError, UserError, RuntimeError), each of which conforms to the MongoError protocol. These errors are defined in MongoError.swift and are outlined here. The documentation for every public function that throws lists some of the errors that could possibly be thrown and the reasons they might be. The errors listed there are not comprehensive but will generally cover the most common cases.

- -

Error Labels: Some types of errors may contain more specific information describing the context in which they occured. This information is conveyed through the usage of errorLabels. Specifically, any server error or connection related error may contain labels.

-

Server Errors

- -

Server errors correspond to failures that occur in the database itself and are returned to the driver via some response to a command. Each ServerError case contains at least one error code representing what went wrong on the server.

- -

For an enumeration of the possible server error codes, see this list.

- -

The ServerError cases are as follows:

- -
    -
  • .commandError(code: ServerErrorCode, message: String, errorLabels: [String]?): - -
      -
    • Thrown when commands experience errors server side that prevent execution.
    • -
    • Example command failures include failure to parse, operation aborted by the user, and unexpected errors during execution.
    • -
  • -
  • .writeError(writeError: WriteError?, writeConcernError: WriteConcernError?, errorLabels: [String]?) - -
      -
    • Thrown when a single write command fails on the server.
    • -
    • Only one of the two optionals will be non-nil.
    • -
  • -
  • .bulkWriteError(writeErrors: [BulkWriteError]?, writeConcernError: WriteConcernError?, result: BulkWriteResult, errorLabels: [String]?) - -
      -
    • Thrown when the server returns errors as part of an executed bulk write.
    • -
    • If WriteConcernError is populated, writeErrors may not be.
    • -
    • Note: InsertMany throws a .bulkWriteError, not a .writeError.
    • -
  • -
-

User Errors

- -

User applications can sometimes cause errors by using the driver incorrectly (e.g. by passing invalid argument combinations). This category of error covers those cases.

- -

The UserError cases are as follows:

- -
    -
  • .logicError(message: String) - -
      -
    • Thrown when the user uses the driver incorrectly (e.g. advancing a dead cursor).
    • -
  • -
  • .invalidArgument(message: String) - -
      -
    • Thrown when user passes invalid arguments to some driver function.
    • -
  • -
-

Runtime Errors

- -

The driver may experience errors that happen at runtime unexpectedly. These errors don’t fit neatly into the categories of occurring only server-side or only as part of the user’s fault, so they are represented by their own set of cases.

- -

The RuntimeError cases are as follows:

- -
    -
  • .internalError(message: String) - -
      -
    • Thrown when something is null when it shouldn’t be, the driver has an internal failure, or MongoSwift cannot understand a server response.
    • -
    • This is generally indicative of a bug somewhere in the driver stack or a system related failure (e.g. memory allocation failure). If you experience an error that you think is the result of a bug, please file a bug report on GitHub or our Jira project.
    • -
  • -
  • .connectionError(message: String, errorLabels: [String]?) - -
      -
    • Thrown during any connection establishment / socket related errors.
    • -
  • -
  • .authenticationError(message: String) - -
      -
    • Thrown when the driver is not authorized to perform a requested command (e.g. due to invalid credentials)
    • -
  • -
-

Encoding/Decoding Errors

- -

As part of the driver, BSONEncoder and BSONDecoder are implemented according to the Encoder and Decoder protocols defined in Apple’s Foundation. User applications can use them to seamlessly convert between their Swift data structures and the BSON documents stored in the database. While this functionality is part of the public API, the driver itself also makes heavy use of it internally. During any encoding or decoding operations, errors can occur that prevent the data from being written to or read from BSON. In these cases, the driver throws an EncodingError or DecodingError as appropriate. These error types are not unique to MongoSwift and are commonly used by other encoder implementations, such as Foundation’s JSONEncoder, so they do not conform to the MongoError protocol.

- -

See the official documentation for both EncodingErrors and DecodingErrors for more information.

-

Examples

-

Handling any error thrown by the driver

-
do {
-    // something involving the driver
-} catch let error as MongoError {
-    print("Driver error!")
-    switch error.self {
-    case let runtimeError as RuntimeError:
-        // handle RuntimeError
-    case let serverError as ServerError:
-        // handle ServerError
-    case let userError as UserError:
-        // handle UserError
-    default:
-        // should never get here
-    }
-} catch let error as DecodingError {
-    // handle DecodingError
-} catch let error as EncodingError {
-    // handle EncodingError
-} catch { ... }
-
-

Handling a CommandError

-
do {
-    try db.runCommand(["asdfasdf": "sadfsadfasdf"])
-} catch let ServerError.commandError(code, message, _) {
-    print("Command failed: code: \(code) message: \(message)")
-} catch { ... }
-
- -

Output:

-
Command failed: code: 59 message: no such command: 'asdfasdf'
-
-

Handling a WriteError

-
// if you want to ignore duplicate key errors
-do {
-    try coll.insertOne(["_id": 1])
-    try coll.insertOne(["_id": 1])
-} catch let ServerError.writeError(writeError, _, _) where writeError?.code == 11000 {
-    print("duplicate key error: \(1) \(writeError?.message ?? "")")
-}
-
- -

Output:

-
duplicate key error: 1 E11000 duplicate key error collection: mydb.mycoll1 index: _id_ dup key: { : 1 }
-
-

Handling a BulkWriteError

-
let docs: [Document] = [["_id": 2], ["_id": 1]]
-do {
-    try coll.insertOne(["_id": 1])
-    try coll.insertMany(docs)
-} catch let ServerError.bulkWriteError(writeErrors, _, result, _) {
-    if let writeErrors = writeErrors {
-        writeErrors.forEach { err in print("Write Error inserting \(docs[err.index]), code: \(err.code), message: \(err.message)") }
-    }
-    if let result = result {
-        print("Result: ")
-        print("nInserted: \(result.insertedCount)")
-        print("InsertedIds: \(result.insertedIds)")
-    }
-} catch { ... }
-
- -

Output:

-
Write Error inserting { "_id" : 1 }, code: 11000, message: E11000 duplicate key error collection: mydb.mycoll1 index: _id_ dup key: { : 1 }
-Result:
-nInserted: 1
-InsertedIds: [0: 2]
-
-

See Also

- - - -
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/img/carat.png b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/img/carat.png deleted file mode 100755 index 29d2f7fd4..000000000 Binary files a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/img/carat.png and /dev/null differ diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/img/dash.png b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/img/dash.png deleted file mode 100755 index 6f694c7a0..000000000 Binary files a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/img/dash.png and /dev/null differ diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/img/gh.png b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/img/gh.png deleted file mode 100755 index 628da97c7..000000000 Binary files a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/img/gh.png and /dev/null differ diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/index.html b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/index.html deleted file mode 100644 index 58e2c46ea..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/index.html +++ /dev/null @@ -1,619 +0,0 @@ - - - - MongoSwift Reference - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
- -

Build Status -Code Coverage

-

MongoSwift

- -

The official MongoDB driver for Swift.

-

Index

- - -

Documentation

- -

The latest documentation is available here.

-

Bugs / Feature Requests

- -

Think you’ve found a bug? Want to see a new feature in mongo-swift-driver? Please open a case in our issue management tool, JIRA:

- -
    -
  1. Create an account and login: jira.mongodb.org
  2. -
  3. Navigate to the SWIFT project: jira.mongodb.org/browse/SWIFT
  4. -
  5. Click Create Issue - Please provide as much information as possible about the issue and how to reproduce it.
  6. -
- -

Bug reports in JIRA for all driver projects (i.e. NODE, PYTHON, CSHARP, JAVA) and the -Core Server (i.e. SERVER) project are public.

-

Installation

- -

MongoSwift works with Swift 5.0+ on MacOS and Linux.

- -

Installation is supported via Swift Package Manager.

-

Step 1: Install the MongoDB C Driver

- -

The driver wraps the MongoDB C driver, and using it requires having the C driver’s two components, libbson and libmongoc, installed on your system. The minimum required version of the C Driver is 1.15.1.

- -

On a Mac, you can install both components at once using Homebrew: -brew install mongo-c-driver.

- -

On Linux: please follow the instructions from libmongoc‘s documentation. Note that the versions provided by your package manager may be too old, in which case you can follow the instructions for building and installing from source.

- -

See example installation from source on Ubuntu in Docker.

-

Step 2: Install MongoSwift

- -

Please follow the instructions in the previous section on installing the MongoDB C Driver before proceeding.

- -

Add MongoSwift to your dependencies in Package.swift:

-
// swift-tools-version:5.0
-import PackageDescription
-
-let package = Package(
-    name: "MyPackage",
-    dependencies: [
-        .package(url: "https://github.com/mongodb/mongo-swift-driver.git", from: "VERSION.STRING.HERE"),
-    ],
-    targets: [
-        .target(name: "MyPackage", dependencies: ["MongoSwift"])
-    ]
-)
-
- -

Then run swift build to download, compile, and link all your dependencies.

-

Example Usage

- -

Note: You should call cleanupMongoSwift() exactly once at the end of your application to release all memory and other resources allocated by libmongoc.

-

Connect to MongoDB and Create a Collection

-
import MongoSwift
-
-let client = try MongoClient("mongodb://localhost:27017")
-let db = client.db("myDB")
-let collection = try db.createCollection("myCollection")
-
-// free all resources
-cleanupMongoSwift()
-
- -

Note: we have included the client connectionString parameter for clarity, but if connecting to the default "mongodb://localhost:27017"it may be omitted: let client = try MongoClient().

-

Create and Insert a Document

-
let doc: Document = ["_id": 100, "a": 1, "b": 2, "c": 3]
-let result = try collection.insertOne(doc)
-print(result?.insertedId ?? "") // prints `.int64(100)`
-
-

Find Documents

-
let query: Document = ["a": 1]
-let documents = try collection.find(query)
-for d in documents {
-    print(d)
-}
-
-

Work With and Modify Documents

-
var doc: Document = ["a": 1, "b": 2, "c": 3]
-
-print(doc) // prints `{"a" : 1, "b" : 2, "c" : 3}`
-print(doc["a"] ?? "") // prints `.int64(1)`
-
-// Set a new value
-doc["d"] = 4
-print(doc) // prints `{"a" : 1, "b" : 2, "c" : 3, "d" : 4}`
-
-// Using functional methods like map, filter:
-let evensDoc = doc.filter { elem in
-    guard let value = elem.value.asInt() else {
-        return false
-    }
-    return value % 2 == 0
-}
-print(evensDoc) // prints `{ "b" : 2, "d" : 4 }`
-
-let doubled = doc.map { elem -> Int in
-    guard case let value = .int64(value) else {
-        return 0
-    }
-
-    return Int(value * 2)
-}
-print(doubled) // prints `[2, 4, 6, 8]`
-
- -

Note that Document conforms to Collection, so useful methods from -Sequence and -Collection are -all available. However, runtime guarantees are not yet met for many of these -methods.

-

Usage With Kitura, Vapor, and Perfect

- -

The Examples/ directory contains sample projects that use the driver with Kitura, Vapor, and Perfect.

-

Development Instructions

- -

See our development guide for instructions for building and testing the driver.

- -
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/js/jazzy.js b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/js/jazzy.js deleted file mode 100755 index c31dc05e4..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/js/jazzy.js +++ /dev/null @@ -1,59 +0,0 @@ -window.jazzy = {'docset': false} -if (typeof window.dash != 'undefined') { - document.documentElement.className += ' dash' - window.jazzy.docset = true -} -if (navigator.userAgent.match(/xcode/i)) { - document.documentElement.className += ' xcode' - window.jazzy.docset = true -} - -function toggleItem($link, $content) { - var animationDuration = 300; - $link.toggleClass('token-open'); - $content.slideToggle(animationDuration); -} - -function itemLinkToContent($link) { - return $link.parent().parent().next(); -} - -// On doc load + hash-change, open any targetted item -function openCurrentItemIfClosed() { - if (window.jazzy.docset) { - return; - } - var $link = $(`.token[href="${location.hash}"]`); - $content = itemLinkToContent($link); - if ($content.is(':hidden')) { - toggleItem($link, $content); - } -} - -$(openCurrentItemIfClosed); -$(window).on('hashchange', openCurrentItemIfClosed); - -// On item link ('token') click, toggle its discussion -$('.token').on('click', function(event) { - if (window.jazzy.docset) { - return; - } - var $link = $(this); - toggleItem($link, itemLinkToContent($link)); - - // Keeps the document from jumping to the hash. - var href = $link.attr('href'); - if (history.pushState) { - history.pushState({}, '', href); - } else { - location.hash = href; - } - event.preventDefault(); -}); - -// Clicks on links to the current, closed, item need to open the item -$("a:not('.token')").on('click', function() { - if (location == this.href) { - openCurrentItemIfClosed(); - } -}); diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/js/jquery.min.js b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/js/jquery.min.js deleted file mode 100755 index a1c07fd80..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/js/jquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0 - - - Multithreaded-Usage Reference - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
- -

Using MongoSwift in Mulithreaded Applications

-

Threadsafe Types

- -

As of MongoSwift 0.2.0, the following types are safe to use across threads:

- - - -

We make no guarantees about the safety of using any other type across threads.

-

Best Practices

- -

Each MongoClient is backed by a pool of server connections. Any time a client or one of its child objects (a MongoDatabase or MongoCollection) makes a request to the database (a find, insertOne, etc.) a connection will be retrieved from the pool, used to execute the operation, and then returned to the pool when it is finished.

- -

Each MongoClient uses its own background thread to monitor the MongoDB topology you are connected to.

- -

In order to share the connection pool across threads and minimize the number of background monitoring threads, we recommend sharing MongoClients across threads.

-

Usage With Server-side Swift Frameworks

- -

See the Examples/ directory in the driver GitHub repository for examples of how to integrate the driver in multithreaded frameworks.

- -
-
- -
-
- - - diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/search.json b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/search.json deleted file mode 100644 index 5923ded1f..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/search.json +++ /dev/null @@ -1 +0,0 @@ -{"Typealiases.html#/s:10MongoSwift17InsertManyOptionsa":{"name":"InsertManyOptions","abstract":"

Options to use when executing a multi-document insert operation on a MongoCollection.

"},"Typealiases.html#/s:10MongoSwift15ServerErrorCodea":{"name":"ServerErrorCode","abstract":"

A MongoDB server error code.

"},"Structs/WriteConcern/W.html#/s:10MongoSwift12WriteConcernV1WO6numberyAEs5Int32VcAEmF":{"name":"number(_:)","abstract":"

Specifies the number of nodes that should acknowledge the write. MUST be greater than or equal to 0.

","parent_name":"W"},"Structs/WriteConcern/W.html#/s:10MongoSwift12WriteConcernV1WO3tagyAESScAEmF":{"name":"tag(_:)","abstract":"

Indicates a tag for nodes that should acknowledge the write.

","parent_name":"W"},"Structs/WriteConcern/W.html#/s:10MongoSwift12WriteConcernV1WO8majorityyA2EmF":{"name":"majority","abstract":"

Specifies that a majority of nodes should acknowledge the write.

","parent_name":"W"},"Structs/WriteConcern/W.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"W"},"Structs/WriteConcern/W.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"W"},"Structs/WriteConcern/W.html":{"name":"W","abstract":"

An option to request acknowledgement that the write operation has propagated to specified mongod instances.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV1wAC1WOSgvp":{"name":"w","abstract":"

Indicates the W value for this WriteConcern.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV7journalSbSgvp":{"name":"journal","abstract":"

Indicates whether to wait for the write operation to get committed to the journal.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV10wtimeoutMSs5Int64VSgvp":{"name":"wtimeoutMS","abstract":"

If the write concern is not satisfied within this timeout (in milliseconds),","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV14isAcknowledgedSbvp":{"name":"isAcknowledged","abstract":"

Indicates whether this is an acknowledged write concern.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV9isDefaultSbvp":{"name":"isDefault","abstract":"

Indicates whether this is the default write concern.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernVACycfc":{"name":"init()","abstract":"

Initializes a new, empty WriteConcern.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV7journal1w10wtimeoutMSACSbSg_AC1WOSgs5Int64VSgtKcfc":{"name":"init(journal:w:wtimeoutMS:)","abstract":"

Initializes a new WriteConcern.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV11descriptionSSvp":{"name":"description","abstract":"

Returns the relaxed extended JSON representation of this WriteConcern.","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"WriteConcern"},"Structs/TopologyDescription/TopologyType.html#/s:10MongoSwift19TopologyDescriptionV0C4TypeO6singleyA2EmF":{"name":"single","abstract":"

A single mongod server.

","parent_name":"TopologyType"},"Structs/TopologyDescription/TopologyType.html#/s:10MongoSwift19TopologyDescriptionV0C4TypeO19replicaSetNoPrimaryyA2EmF":{"name":"replicaSetNoPrimary","abstract":"

A replica set with no primary.

","parent_name":"TopologyType"},"Structs/TopologyDescription/TopologyType.html#/s:10MongoSwift19TopologyDescriptionV0C4TypeO21replicaSetWithPrimaryyA2EmF":{"name":"replicaSetWithPrimary","abstract":"

A replica set with a primary.

","parent_name":"TopologyType"},"Structs/TopologyDescription/TopologyType.html#/s:10MongoSwift19TopologyDescriptionV0C4TypeO7shardedyA2EmF":{"name":"sharded","abstract":"

Sharded topology.

","parent_name":"TopologyType"},"Structs/TopologyDescription/TopologyType.html#/s:10MongoSwift19TopologyDescriptionV0C4TypeO7unknownyA2EmF":{"name":"unknown","abstract":"

A topology whose type is not yet known.

","parent_name":"TopologyType"},"Structs/TopologyDescription/TopologyType.html":{"name":"TopologyType","abstract":"

The possible types for a topology.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV4typeAC0C4TypeOvp":{"name":"type","abstract":"

The type of this topology.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV7setNameSSSgvp":{"name":"setName","abstract":"

The replica set name.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV13maxSetVersions5Int64VSgvp":{"name":"maxSetVersion","abstract":"

The largest setVersion ever reported by a primary.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV13maxElectionIdAA06ObjectG0VSgvp":{"name":"maxElectionId","abstract":"

The largest electionId ever reported by a primary.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV7serversSayAA06ServerD0VGvp":{"name":"servers","abstract":"

The servers comprising this topology. By default, no servers.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV5staleSbvp":{"name":"stale","abstract":"

For single-threaded clients, indicates whether the topology must be re-scanned.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV18compatibilityErrorAA0aF0_pSgvp":{"name":"compatibilityError","abstract":"

Exists if any server’s wire protocol version range is incompatible with the client’s.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV28logicalSessionTimeoutMinutess5Int64VSgvp":{"name":"logicalSessionTimeoutMinutes","abstract":"

The logicalSessionTimeoutMinutes value for this topology. This value is the minimum","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV17hasReadableServerSbyF":{"name":"hasReadableServer()","abstract":"

Returns true if the topology has a readable server available, and false otherwise.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV17hasWritableServerSbyF":{"name":"hasWritableServer()","abstract":"

Returns true if the topology has a writable server available, and false otherwise.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"TopologyDescription"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO10standaloneyA2EmF":{"name":"standalone","abstract":"

A standalone mongod server.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO6mongosyA2EmF":{"name":"mongos","abstract":"

A router to a sharded cluster, i.e. a mongos server.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO15possiblePrimaryyA2EmF":{"name":"possiblePrimary","abstract":"

A replica set member which is not yet checked, but another member thinks it is the primary.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO9rsPrimaryyA2EmF":{"name":"rsPrimary","abstract":"

A replica set primary.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO11rsSecondaryyA2EmF":{"name":"rsSecondary","abstract":"

A replica set secondary.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO9rsArbiteryA2EmF":{"name":"rsArbiter","abstract":"

A replica set arbiter.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO7rsOtheryA2EmF":{"name":"rsOther","abstract":"

A replica set member that is none of the other types (a passive, for example).

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO7rsGhostyA2EmF":{"name":"rsGhost","abstract":"

A replica set member that does not report a set name or a hosts list.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO7unknownyA2EmF":{"name":"unknown","abstract":"

A server type that is not yet known.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html":{"name":"ServerType","abstract":"

The possible types for a server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV12connectionIdAA010ConnectionF0Vvp":{"name":"connectionId","abstract":"

The hostname or IP and the port number that the client connects to. Note that this is not the","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV5errorAA0A5Error_pSgvp":{"name":"error","abstract":"

The last error related to this server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV13roundTripTimes5Int64VSgvp":{"name":"roundTripTime","abstract":"

The duration of the server’s last ismaster call.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV13lastWriteDate10Foundation0G0VSgvp":{"name":"lastWriteDate","abstract":"

The “lastWriteDate” from the server’s most recent ismaster response.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV6opTimeAA8ObjectIdVSgvp":{"name":"opTime","abstract":"

The last opTime reported by the server. Only mongos and shard servers","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV4typeAC0C4TypeOvp":{"name":"type","abstract":"

The type of this server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV14minWireVersions5Int32Vvp":{"name":"minWireVersion","abstract":"

The minimum wire protocol version supported by the server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV14maxWireVersions5Int32Vvp":{"name":"maxWireVersion","abstract":"

The maximum wire protocol version supported by the server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV2meAA12ConnectionIdVSgvp":{"name":"me","abstract":"

The hostname or IP and the port number that this server was configured with in the replica set.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV5hostsSayAA12ConnectionIdVGvp":{"name":"hosts","abstract":"

This server’s opinion of the replica set’s hosts, if any.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV8arbitersSayAA12ConnectionIdVGvp":{"name":"arbiters","abstract":"

This server’s opinion of the replica set’s arbiters, if any.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV8passivesSayAA12ConnectionIdVGvp":{"name":"passives","abstract":"

“Passives” are priority-zero replica set members that cannot become primary.","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV4tagsSDyS2SGvp":{"name":"tags","abstract":"

Tags for this server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV7setNameSSSgvp":{"name":"setName","abstract":"

The replica set name.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV10setVersions5Int64VSgvp":{"name":"setVersion","abstract":"

The replica set version.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV10electionIdAA06ObjectF0VSgvp":{"name":"electionId","abstract":"

The election ID where this server was elected, if this is a replica set member that believes it is primary.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV7primaryAA12ConnectionIdVSgvp":{"name":"primary","abstract":"

This server’s opinion of who the primary is.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV14lastUpdateTime10Foundation4DateVSgvp":{"name":"lastUpdateTime","abstract":"

When this server was last checked.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV28logicalSessionTimeoutMinutess5Int64VSgvp":{"name":"logicalSessionTimeoutMinutes","abstract":"

The logicalSessionTimeoutMinutes value for this server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"ServerDescription"},"Structs/ConnectionId.html#/s:10MongoSwift12ConnectionIdV4hostSSvp":{"name":"host","abstract":"

A string representing the host for this connection.

","parent_name":"ConnectionId"},"Structs/ConnectionId.html#/s:10MongoSwift12ConnectionIdV4ports6UInt16Vvp":{"name":"port","abstract":"

The port number for this connection.

","parent_name":"ConnectionId"},"Structs/ReadConcern/Level.html#/s:10MongoSwift11ReadConcernV5LevelO5localyA2EmF":{"name":"local","abstract":"

See https://docs.mongodb.com/manual/reference/read-concern-local/

","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:10MongoSwift11ReadConcernV5LevelO9availableyA2EmF":{"name":"available","abstract":"

See https://docs.mongodb.com/manual/reference/read-concern-available/

","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:10MongoSwift11ReadConcernV5LevelO8majorityyA2EmF":{"name":"majority","abstract":"

See https://docs.mongodb.com/manual/reference/read-concern-majority/

","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:10MongoSwift11ReadConcernV5LevelO12linearizableyA2EmF":{"name":"linearizable","abstract":"

See https://docs.mongodb.com/manual/reference/read-concern-linearizable/

","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:10MongoSwift11ReadConcernV5LevelO8snapshotyA2EmF":{"name":"snapshot","abstract":"

See https://docs.mongodb.com/master/reference/read-concern-snapshot/

","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:10MongoSwift11ReadConcernV5LevelO5otheryAESS_tcAEmF":{"name":"other(level:)","abstract":"

Any other read concern level not covered by the other cases.","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"Level"},"Structs/ReadConcern/Level.html":{"name":"Level","abstract":"

An enumeration of possible ReadConcern levels.

","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:10MongoSwift11ReadConcernV5levelAC5LevelOSgvp":{"name":"level","abstract":"

The level of this ReadConcern, or nil if the level is not set.

","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:10MongoSwift11ReadConcernV9isDefaultSbvp":{"name":"isDefault","abstract":"

Indicates whether this ReadConcern is the server default.

","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:10MongoSwift11ReadConcernVyA2C5LevelOcfc":{"name":"init(_:)","abstract":"

Initialize a new ReadConcern with a Level.

","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:10MongoSwift11ReadConcernVyACSScfc":{"name":"init(_:)","abstract":"

Initialize a new ReadConcern from a String corresponding to a read concern level.

","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:10MongoSwift11ReadConcernVACycfc":{"name":"init()","abstract":"

Initialize a new empty ReadConcern.

","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:10MongoSwift11ReadConcernV11descriptionSSvp":{"name":"description","abstract":"

Returns the relaxed extended JSON representation of this ReadConcern.","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"ReadConcern"},"Structs/RunCommandOptions.html#/s:10MongoSwift17RunCommandOptionsV11readConcernAA04ReadG0VSgvp":{"name":"readConcern","abstract":"

An optional ReadConcern to use for this operation. This option should only be used when executing a command","parent_name":"RunCommandOptions"},"Structs/RunCommandOptions.html#/s:10MongoSwift17RunCommandOptionsV14readPreferenceAA04ReadG0CSgvp":{"name":"readPreference","abstract":"

An optional ReadPreference to use for this operation. This option should only be used when executing a","parent_name":"RunCommandOptions"},"Structs/RunCommandOptions.html#/s:10MongoSwift17RunCommandOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for this operation. This option should only be used when executing a command","parent_name":"RunCommandOptions"},"Structs/RunCommandOptions.html#/s:10MongoSwift17RunCommandOptionsV11readConcern0F10Preference05writeG0AcA04ReadG0VSg_AA0jH0CSgAA05WriteG0VSgtcfc":{"name":"init(readConcern:readPreference:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted or optional.

","parent_name":"RunCommandOptions"},"Structs/DatabaseSpecification.html#/s:10MongoSwift21DatabaseSpecificationV4nameSSvp":{"name":"name","abstract":"

The name of the database.

","parent_name":"DatabaseSpecification"},"Structs/DatabaseSpecification.html#/s:10MongoSwift21DatabaseSpecificationV10sizeOnDiskSivp":{"name":"sizeOnDisk","abstract":"

The amount of disk space consumed by this database.

","parent_name":"DatabaseSpecification"},"Structs/DatabaseSpecification.html#/s:10MongoSwift21DatabaseSpecificationV5emptySbvp":{"name":"empty","abstract":"

Whether or not this database is empty.

","parent_name":"DatabaseSpecification"},"Structs/DatabaseSpecification.html#/s:10MongoSwift21DatabaseSpecificationV6shardsAA8DocumentVSgvp":{"name":"shards","abstract":"

For sharded clusters, this field includes a document which maps each shard to the size in bytes of the database","parent_name":"DatabaseSpecification"},"Structs/ListCollectionsOptions.html#/s:10MongoSwift22ListCollectionsOptionsV9batchSizeSiSgvp":{"name":"batchSize","abstract":"

The batchSize for the returned cursor.

","parent_name":"ListCollectionsOptions"},"Structs/ListCollectionsOptions.html#/s:10MongoSwift22ListCollectionsOptionsV9batchSizeACSiSg_tcfc":{"name":"init(batchSize:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted or optional

","parent_name":"ListCollectionsOptions"},"Structs/CollectionSpecification.html#/s:10MongoSwift23CollectionSpecificationV4nameSSvp":{"name":"name","abstract":"

The name of the collection.

","parent_name":"CollectionSpecification"},"Structs/CollectionSpecification.html#/s:10MongoSwift23CollectionSpecificationV4typeAA0C4TypeOvp":{"name":"type","abstract":"

The type of data store returned.

","parent_name":"CollectionSpecification"},"Structs/CollectionSpecification.html#/s:10MongoSwift23CollectionSpecificationV7optionsAA06CreateC7OptionsVSgvp":{"name":"options","abstract":"

Options that were used when creating this collection.

","parent_name":"CollectionSpecification"},"Structs/CollectionSpecification.html#/s:10MongoSwift23CollectionSpecificationV4infoAA0cD4InfoVvp":{"name":"info","abstract":"

Contains info pertaining to the collection.

","parent_name":"CollectionSpecification"},"Structs/CollectionSpecification.html#/s:10MongoSwift23CollectionSpecificationV7idIndexAA0F5ModelVSgvp":{"name":"idIndex","abstract":"

Provides info on the _id index of the collection. nil when this data store is of type view.

","parent_name":"CollectionSpecification"},"Structs/CollectionSpecificationInfo.html#/s:10MongoSwift27CollectionSpecificationInfoV8readOnlySbvp":{"name":"readOnly","abstract":"

Indicates whether or not the data store is read-only.

","parent_name":"CollectionSpecificationInfo"},"Structs/CollectionSpecificationInfo.html#/s:10MongoSwift27CollectionSpecificationInfoV4uuid10Foundation4UUIDVSgvp":{"name":"uuid","abstract":"

The collection’s UUID - once established, this does not change and remains the same across replica","parent_name":"CollectionSpecificationInfo"},"Structs/EstimatedDocumentCountOptions.html#/s:10MongoSwift29EstimatedDocumentCountOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"EstimatedDocumentCountOptions"},"Structs/EstimatedDocumentCountOptions.html#/s:10MongoSwift29EstimatedDocumentCountOptionsV11readConcernAA04ReadH0VSgvp":{"name":"readConcern","abstract":"

A ReadConcern to use for this operation.

","parent_name":"EstimatedDocumentCountOptions"},"Structs/EstimatedDocumentCountOptions.html#/s:10MongoSwift29EstimatedDocumentCountOptionsV14readPreferenceAA04ReadH0CSgvp":{"name":"readPreference","abstract":"

A ReadPreference to use for this operation.

","parent_name":"EstimatedDocumentCountOptions"},"Structs/EstimatedDocumentCountOptions.html#/s:10MongoSwift29EstimatedDocumentCountOptionsV9maxTimeMS11readConcern0J10PreferenceACs5Int64VSg_AA04ReadK0VSgAA0nL0CSgtcfc":{"name":"init(maxTimeMS:readConcern:readPreference:)","abstract":"

Convenience initializer allowing any/all parameters to be optional

","parent_name":"EstimatedDocumentCountOptions"},"Structs/DropIndexOptions.html#/s:10MongoSwift16DropIndexOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run - enforced server-side.

","parent_name":"DropIndexOptions"},"Structs/DropIndexOptions.html#/s:10MongoSwift16DropIndexOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"DropIndexOptions"},"Structs/DropIndexOptions.html#/s:10MongoSwift16DropIndexOptionsV9maxTimeMS12writeConcernACs5Int64VSg_AA05WriteJ0VSgtcfc":{"name":"init(maxTimeMS:writeConcern:)","abstract":"

Initializer allowing any/all parameters to be omitted.

","parent_name":"DropIndexOptions"},"Structs/DistinctOptions.html#/s:10MongoSwift15DistinctOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"DistinctOptions"},"Structs/DistinctOptions.html#/s:10MongoSwift15DistinctOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"DistinctOptions"},"Structs/DistinctOptions.html#/s:10MongoSwift15DistinctOptionsV11readConcernAA04ReadF0VSgvp":{"name":"readConcern","abstract":"

A ReadConcern to use for this operation.

","parent_name":"DistinctOptions"},"Structs/DistinctOptions.html#/s:10MongoSwift15DistinctOptionsV14readPreferenceAA04ReadF0CSgvp":{"name":"readPreference","abstract":"

A ReadPreference to use for this operation.

","parent_name":"DistinctOptions"},"Structs/DistinctOptions.html#/s:10MongoSwift15DistinctOptionsV9collation9maxTimeMS11readConcern0I10PreferenceAcA8DocumentVSg_s5Int64VSgAA04ReadJ0VSgAA0nK0CSgtcfc":{"name":"init(collation:maxTimeMS:readConcern:readPreference:)","abstract":"

Convenience initializer allowing any/all parameters to be optional

","parent_name":"DistinctOptions"},"Structs/CreateIndexOptions.html#/s:10MongoSwift18CreateIndexOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run - enforced server-side.

","parent_name":"CreateIndexOptions"},"Structs/CreateIndexOptions.html#/s:10MongoSwift18CreateIndexOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"CreateIndexOptions"},"Structs/CreateIndexOptions.html#/s:10MongoSwift18CreateIndexOptionsV9maxTimeMS12writeConcernACs5Int64VSg_AA05WriteJ0VSgtcfc":{"name":"init(maxTimeMS:writeConcern:)","abstract":"

Initializer allowing any/all parameters to be omitted.

","parent_name":"CreateIndexOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV11autoIndexIdSbSgvp":{"name":"autoIndexId","abstract":"

Whether or not this collection will automatically generate an index on _id.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV6cappedSbSgvp":{"name":"capped","abstract":"

Indicates whether this will be a capped collection.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies the default collation for the collection.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV18dataCodingStrategyAA04DatagH0OSgvp":{"name":"dataCodingStrategy","abstract":"

Specifies the DataCodingStrategy to use for BSON encoding/decoding operations performed by this collection.","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV18dateCodingStrategyAA04DategH0OSgvp":{"name":"dateCodingStrategy","abstract":"

Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this collection.","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV19indexOptionDefaultsAA8DocumentVSgvp":{"name":"indexOptionDefaults","abstract":"

Specify a default configuration for indexes created on this collection.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV3maxs5Int64VSgvp":{"name":"max","abstract":"

Maximum number of documents allowed in the collection (if capped).

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV8pipelineSayAA8DocumentVGSgvp":{"name":"pipeline","abstract":"

An array consisting of aggregation pipeline stages. When used with viewOn, will create the view by applying","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV4sizes5Int64VSgvp":{"name":"size","abstract":"

Maximum size, in bytes, of this collection (if capped).

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV13storageEngineAA8DocumentVSgvp":{"name":"storageEngine","abstract":"

Specifies storage engine configuration for this collection.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV18uuidCodingStrategyAA010UUIDCodingH0OSgvp":{"name":"uuidCodingStrategy","abstract":"

Specifies the UUIDCodingStrategy to use for BSON encoding/decoding operations performed by this collection.","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV16validationActionSSSgvp":{"name":"validationAction","abstract":"

Determines whether to error on invalid documents or just warn about the violations but allow invalid documents","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV15validationLevelSSSgvp":{"name":"validationLevel","abstract":"

Determines how strictly MongoDB applies the validation rules to existing documents during an update.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV9validatorAA8DocumentVSgvp":{"name":"validator","abstract":"

What validator should be used for the collection.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV6viewOnSSSgvp":{"name":"viewOn","abstract":"

The name of the source collection or view from which to create the view.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

A write concern to use when executing this command. To set a read or write concern for the collection itself,","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV11autoIndexId6capped9collation18dataCodingStrategy04datelM019indexOptionDefaults3max8pipeline4size13storageEngine04uuidlM016validationAction0X5Level9validator6viewOn12writeConcernACSbSg_AtA8DocumentVSgAA04DatalM0OSgAA04DatelM0OSgAWs5Int64VSgSayAVGSgA4_AwA010UUIDCodingM0OSgSSSgA10_AWA10_AA12WriteConcernVSgtcfc":{"name":"init(autoIndexId:capped:collation:dataCodingStrategy:dateCodingStrategy:indexOptionDefaults:max:pipeline:size:storageEngine:uuidCodingStrategy:validationAction:validationLevel:validator:viewOn:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted or optional.

","parent_name":"CreateCollectionOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV4hintAA4HintOSgvp":{"name":"hint","abstract":"

A hint for the index to use.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV5limits5Int64VSgvp":{"name":"limit","abstract":"

The maximum number of documents to count.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV11readConcernAA04ReadG0VSgvp":{"name":"readConcern","abstract":"

A ReadConcern to use for this operation.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV14readPreferenceAA04ReadG0CSgvp":{"name":"readPreference","abstract":"

A ReadPreference to use for this operation.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV4skips5Int64VSgvp":{"name":"skip","abstract":"

The number of documents to skip before counting.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV9collation4hint5limit9maxTimeMS11readConcern0L10Preference4skipAcA8DocumentVSg_AA4HintOSgs5Int64VSgAsA04ReadM0VSgAA0sN0CSgAStcfc":{"name":"init(collation:hint:limit:maxTimeMS:readConcern:readPreference:skip:)","abstract":"

Convenience initializer allowing any/all parameters to be optional

","parent_name":"CountDocumentsOptions"},"Structs/MongoNamespace.html#/s:10MongoSwift0A9NamespaceV2dbSSvp":{"name":"db","abstract":"

The database name.

","parent_name":"MongoNamespace"},"Structs/MongoNamespace.html#/s:10MongoSwift0A9NamespaceV10collectionSSSgvp":{"name":"collection","abstract":"

The collection name if this is a collection’s namespace, or nil otherwise.

","parent_name":"MongoNamespace"},"Structs/MongoNamespace.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"MongoNamespace"},"Structs/BulkWriteError.html#/s:10MongoSwift14BulkWriteErrorV4codeSivp":{"name":"code","abstract":"

An integer value identifying the error.

","parent_name":"BulkWriteError"},"Structs/BulkWriteError.html#/s:10MongoSwift14BulkWriteErrorV8codeNameSSvp":{"name":"codeName","abstract":"

A human-readable string identifying the error.

","parent_name":"BulkWriteError"},"Structs/BulkWriteError.html#/s:10MongoSwift14BulkWriteErrorV7messageSSvp":{"name":"message","abstract":"

A description of the error.

","parent_name":"BulkWriteError"},"Structs/BulkWriteError.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BulkWriteError"},"Structs/WriteConcernError.html#/s:10MongoSwift17WriteConcernErrorV4codeSivp":{"name":"code","abstract":"

An integer value identifying the write concern error.

","parent_name":"WriteConcernError"},"Structs/WriteConcernError.html#/s:10MongoSwift17WriteConcernErrorV8codeNameSSvp":{"name":"codeName","abstract":"

A human-readable string identifying write concern error.

","parent_name":"WriteConcernError"},"Structs/WriteConcernError.html#/s:10MongoSwift17WriteConcernErrorV7detailsAA8DocumentVSgvp":{"name":"details","abstract":"

A document identifying the write concern setting related to the error.

","parent_name":"WriteConcernError"},"Structs/WriteConcernError.html#/s:10MongoSwift17WriteConcernErrorV7messageSSvp":{"name":"message","abstract":"

A description of the error.

","parent_name":"WriteConcernError"},"Structs/WriteError.html#/s:10MongoSwift10WriteErrorV4codeSivp":{"name":"code","abstract":"

An integer value identifying the error.

","parent_name":"WriteError"},"Structs/WriteError.html#/s:10MongoSwift10WriteErrorV8codeNameSSvp":{"name":"codeName","abstract":"

A human-readable string identifying the error.

","parent_name":"WriteError"},"Structs/WriteError.html#/s:10MongoSwift10WriteErrorV7messageSSvp":{"name":"message","abstract":"

A description of the error.

","parent_name":"WriteError"},"Structs/WriteError.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"WriteError"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV7encoderAA11BSONEncoderCvp":{"name":"encoder","abstract":"

Encoder used by this database for BSON conversions. This encoder’s options are inherited by collections derived","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV7decoderAA11BSONDecoderCvp":{"name":"decoder","abstract":"

Decoder whose options are inherited by collections derived from this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV4nameSSvp":{"name":"name","abstract":"

The name of this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV11readConcernAA04ReadE0VSgvp":{"name":"readConcern","abstract":"

The ReadConcern set on this database, or nil if one is not set.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV14readPreferenceAA04ReadE0Cvp":{"name":"readPreference","abstract":"

The ReadPreference set on this database

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV12writeConcernAA05WriteE0VSgvp":{"name":"writeConcern","abstract":"

The WriteConcern set on this database, or nil if one is not set.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV4drop7options7sessionyAA04DropC7OptionsVSg_AA13ClientSessionCSgtKF":{"name":"drop(options:session:)","abstract":"

Drops this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV10collection_7optionsAA0A10CollectionVyAA8DocumentVGSS_AA0F7OptionsVSgtF":{"name":"collection(_:options:)","abstract":"

Access a collection within this database. If an option is not specified in the CollectionOptions param, the","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV10collection_8withType7optionsAA0A10CollectionVyxGSS_xmAA0H7OptionsVSgtSeRzSERzlF":{"name":"collection(_:withType:options:)","abstract":"

Access a collection within this database, and associates the specified Codable type T with the","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV16createCollection_7options7sessionAA0aE0VyAA8DocumentVGSS_AA06CreateE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"createCollection(_:options:session:)","abstract":"

Creates a collection in this database with the specified options.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV16createCollection_8withType7options7sessionAA0aE0VyxGSS_xmAA06CreateE7OptionsVSgAA13ClientSessionCSgtKSeRzSERzlF":{"name":"createCollection(_:withType:options:session:)","abstract":"

Creates a collection in this database with the specified options, and associates the","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV15listCollections_7options7sessionAA0A6CursorCyAA23CollectionSpecificationVGAA8DocumentVSg_AA04ListE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"listCollections(_:options:session:)","abstract":"

Lists all the collections in this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV04listA11Collections_7options7sessionSayAA0A10CollectionVyAA8DocumentVGGAJSg_AA04ListE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"listMongoCollections(_:options:session:)","abstract":"

Gets a list of MongoCollections in this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV19listCollectionNames_7options7sessionSaySSGAA8DocumentVSg_AA22ListCollectionsOptionsVSgAA13ClientSessionCSgtKF":{"name":"listCollectionNames(_:options:session:)","abstract":"

Gets a list of names of collections in this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV10runCommand_7options7sessionAA8DocumentVAH_AA03RunE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"runCommand(_:options:session:)","abstract":"

Issues a MongoDB command against this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV5watch_7options7sessionAA12ChangeStreamCyAA0gH5EventVyAA8DocumentVGGSayALG_AA0gH7OptionsVSgAA13ClientSessionCSgtKF":{"name":"watch(_:options:session:)","abstract":"

Starts a ChangeStream on a database. Excludes system collections.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV5watch_7options7session20withFullDocumentTypeAA12ChangeStreamCyAA0kL5EventVyxGGSayAA0I0VG_AA0kL7OptionsVSgAA13ClientSessionCSgxmtKSeRzSERzlF":{"name":"watch(_:options:session:withFullDocumentType:)","abstract":"

Starts a ChangeStream on a database. Excludes system collections.","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV5watch_7options7session13withEventTypeAA12ChangeStreamCyxGSayAA8DocumentVG_AA0jK7OptionsVSgAA13ClientSessionCSgxmtKSeRzSERzlF":{"name":"watch(_:options:session:withEventType:)","abstract":"

Starts a ChangeStream on a database. Excludes system collections.","parent_name":"MongoDatabase"},"Structs/DropDatabaseOptions.html#/s:10MongoSwift19DropDatabaseOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"DropDatabaseOptions"},"Structs/DropDatabaseOptions.html#/s:10MongoSwift19DropDatabaseOptionsV12writeConcernAcA05WriteG0VSg_tcfc":{"name":"init(writeConcern:)","abstract":"

Initializer allowing any/all parameters to be omitted.

","parent_name":"DropDatabaseOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV18dataCodingStrategyAA04DatafG0OSgvp":{"name":"dataCodingStrategy","abstract":"

Specifies the DataCodingStrategy to use for BSON encoding/decoding operations performed by this collection.","parent_name":"CollectionOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV18dateCodingStrategyAA04DatefG0OSgvp":{"name":"dateCodingStrategy","abstract":"

Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this collection.","parent_name":"CollectionOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV11readConcernAA04ReadF0VSgvp":{"name":"readConcern","abstract":"

A read concern to set on the returned collection.

","parent_name":"CollectionOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV14readPreferenceAA04ReadF0CSgvp":{"name":"readPreference","abstract":"

A read preference to set on the returned collection.

","parent_name":"CollectionOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV18uuidCodingStrategyAA010UUIDCodingG0OSgvp":{"name":"uuidCodingStrategy","abstract":"

Specifies the UUIDCodingStrategy to use for BSON encoding/decoding operations performed by this collection.","parent_name":"CollectionOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

A write concern to set on the returned collection.

","parent_name":"CollectionOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV18dataCodingStrategy04datefG011readConcern0I10Preference04uuidfG005writeJ0AcA04DatafG0OSg_AA04DatefG0OSgAA04ReadJ0VSgAA0pK0CSgAA010UUIDCodingG0OSgAA05WriteJ0VSgtcfc":{"name":"init(dataCodingStrategy:dateCodingStrategy:readConcern:readPreference:uuidCodingStrategy:writeConcern:)","abstract":"

Convenience initializer allowing any/all arguments to be omitted or optional.

","parent_name":"CollectionOptions"},"Structs/DropCollectionOptions.html#/s:10MongoSwift21DropCollectionOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"DropCollectionOptions"},"Structs/DropCollectionOptions.html#/s:10MongoSwift21DropCollectionOptionsV12writeConcernAcA05WriteG0VSg_tcfc":{"name":"init(writeConcern:)","abstract":"

Initializer allowing any/all parameters to be omitted.

","parent_name":"DropCollectionOptions"},"Structs/UpdateResult.html#/s:10MongoSwift12UpdateResultV12matchedCountSivp":{"name":"matchedCount","abstract":"

The number of documents that matched the filter.

","parent_name":"UpdateResult"},"Structs/UpdateResult.html#/s:10MongoSwift12UpdateResultV13modifiedCountSivp":{"name":"modifiedCount","abstract":"

The number of documents that were modified.

","parent_name":"UpdateResult"},"Structs/UpdateResult.html#/s:10MongoSwift12UpdateResultV10upsertedIdAA4BSONOSgvp":{"name":"upsertedId","abstract":"

The identifier of the inserted document if an upsert took place.

","parent_name":"UpdateResult"},"Structs/UpdateResult.html#/s:10MongoSwift12UpdateResultV13upsertedCountSivp":{"name":"upsertedCount","abstract":"

The number of documents that were upserted.

","parent_name":"UpdateResult"},"Structs/DeleteResult.html#/s:10MongoSwift12DeleteResultV12deletedCountSivp":{"name":"deletedCount","abstract":"

The number of documents that were deleted.

","parent_name":"DeleteResult"},"Structs/InsertManyResult.html#/s:10MongoSwift16InsertManyResultV13insertedCountSivp":{"name":"insertedCount","abstract":"

Number of documents inserted.

","parent_name":"InsertManyResult"},"Structs/InsertManyResult.html#/s:10MongoSwift16InsertManyResultV11insertedIdsSDySiAA4BSONOGvp":{"name":"insertedIds","abstract":"

Map of the index of the document in values to the value of its ID

","parent_name":"InsertManyResult"},"Structs/InsertOneResult.html#/s:10MongoSwift15InsertOneResultV10insertedIdAA4BSONOvp":{"name":"insertedId","abstract":"

The identifier that was inserted. If the document doesn’t have an identifier, this value","parent_name":"InsertOneResult"},"Structs/DeleteOptions.html#/s:10MongoSwift13DeleteOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"DeleteOptions"},"Structs/DeleteOptions.html#/s:10MongoSwift13DeleteOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"DeleteOptions"},"Structs/DeleteOptions.html#/s:10MongoSwift13DeleteOptionsV9collation12writeConcernAcA8DocumentVSg_AA05WriteG0VSgtcfc":{"name":"init(collation:writeConcern:)","abstract":"

Convenience initializer allowing collation to be omitted or optional

","parent_name":"DeleteOptions"},"Structs/ReplaceOptions.html#/s:10MongoSwift14ReplaceOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation.

","parent_name":"ReplaceOptions"},"Structs/ReplaceOptions.html#/s:10MongoSwift14ReplaceOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"ReplaceOptions"},"Structs/ReplaceOptions.html#/s:10MongoSwift14ReplaceOptionsV6upsertSbSgvp":{"name":"upsert","abstract":"

When true, creates a new document if no document matches the query.

","parent_name":"ReplaceOptions"},"Structs/ReplaceOptions.html#/s:10MongoSwift14ReplaceOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"ReplaceOptions"},"Structs/ReplaceOptions.html#/s:10MongoSwift14ReplaceOptionsV24bypassDocumentValidation9collation6upsert12writeConcernACSbSg_AA0F0VSgAhA05WriteK0VSgtcfc":{"name":"init(bypassDocumentValidation:collation:upsert:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be optional

","parent_name":"ReplaceOptions"},"Structs/UpdateOptions.html#/s:10MongoSwift13UpdateOptionsV12arrayFiltersSayAA8DocumentVGSgvp":{"name":"arrayFilters","abstract":"

A set of filters specifying to which array elements an update should apply.

","parent_name":"UpdateOptions"},"Structs/UpdateOptions.html#/s:10MongoSwift13UpdateOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation.

","parent_name":"UpdateOptions"},"Structs/UpdateOptions.html#/s:10MongoSwift13UpdateOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"UpdateOptions"},"Structs/UpdateOptions.html#/s:10MongoSwift13UpdateOptionsV6upsertSbSgvp":{"name":"upsert","abstract":"

When true, creates a new document if no document matches the query.

","parent_name":"UpdateOptions"},"Structs/UpdateOptions.html#/s:10MongoSwift13UpdateOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"UpdateOptions"},"Structs/UpdateOptions.html#/s:10MongoSwift13UpdateOptionsV12arrayFilters24bypassDocumentValidation9collation6upsert12writeConcernACSayAA0H0VGSg_SbSgAJSgAmA05WriteM0VSgtcfc":{"name":"init(arrayFilters:bypassDocumentValidation:collation:upsert:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be optional

","parent_name":"UpdateOptions"},"Structs/InsertOneOptions.html#/s:10MongoSwift16InsertOneOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation.

","parent_name":"InsertOneOptions"},"Structs/InsertOneOptions.html#/s:10MongoSwift16InsertOneOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"InsertOneOptions"},"Structs/InsertOneOptions.html#/s:10MongoSwift16InsertOneOptionsV24bypassDocumentValidation12writeConcernACSbSg_AA05WriteJ0VSgtcfc":{"name":"init(bypassDocumentValidation:writeConcern:)","abstract":"

Convenience initializer allowing bypassDocumentValidation to be omitted or optional

","parent_name":"InsertOneOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV19allowPartialResultsSbSgvp":{"name":"allowPartialResults","abstract":"

Get partial results from a mongos if some shards are down (instead of throwing an error).

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV9batchSizes5Int32VSgvp":{"name":"batchSize","abstract":"

The number of documents to return per batch.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV7commentSSSgvp":{"name":"comment","abstract":"

Attaches a comment to the query.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV10cursorTypeAA06CursorF0OSgvp":{"name":"cursorType","abstract":"

Indicates the type of cursor to use. This value includes both the tailable and awaitData options.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV4hintAA4HintOSgvp":{"name":"hint","abstract":"

A hint for the index to use.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV5limits5Int64VSgvp":{"name":"limit","abstract":"

The maximum number of documents to return.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV3maxAA8DocumentVSgvp":{"name":"max","abstract":"

The exclusive upper bound for a specific index.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV14maxAwaitTimeMSs5Int64VSgvp":{"name":"maxAwaitTimeMS","abstract":"

The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV7maxScans5Int64VSgvp":{"name":"maxScan","abstract":"

Maximum number of documents or index keys to scan when executing the query.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV3minAA8DocumentVSgvp":{"name":"min","abstract":"

The inclusive lower bound for a specific index.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV15noCursorTimeoutSbSgvp":{"name":"noCursorTimeout","abstract":"

The server normally times out idle cursors after an inactivity period (10 minutes)","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV10projectionAA8DocumentVSgvp":{"name":"projection","abstract":"

Limits the fields to return for all matching documents.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV11readConcernAA04ReadF0VSgvp":{"name":"readConcern","abstract":"

A ReadConcern to use for this operation.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV14readPreferenceAA04ReadF0CSgvp":{"name":"readPreference","abstract":"

A ReadPreference to use for this operation.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV9returnKeySbSgvp":{"name":"returnKey","abstract":"

If true, returns only the index keys in the resulting documents.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV12showRecordIdSbSgvp":{"name":"showRecordId","abstract":"

Determines whether to return the record identifier for each document. If true, adds a field $recordId","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV4skips5Int64VSgvp":{"name":"skip","abstract":"

The number of documents to skip before returning.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV4sortAA8DocumentVSgvp":{"name":"sort","abstract":"

The order in which to return matching documents.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV19allowPartialResults9batchSize9collation7comment10cursorType4hint5limit3max0P11AwaitTimeMS0P4Scan0prS03min15noCursorTimeout10projection11readConcern0Z10Preference9returnKey12showRecordId4skip4sortACSbSg_s5Int32VSgAA8DocumentVSgSSSgAA0wM0OSgAA4HintOSgs5Int64VSgA2_A12_A12_A12_A2_AXA2_AA11ReadConcernVSgAA14ReadPreferenceCSgA2XA12_A2_tcfc":{"name":"init(allowPartialResults:batchSize:collation:comment:cursorType:hint:limit:max:maxAwaitTimeMS:maxScan:maxTimeMS:min:noCursorTimeout:projection:readConcern:readPreference:returnKey:showRecordId:skip:sort:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted or optional.

","parent_name":"FindOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV12allowDiskUseSbSgvp":{"name":"allowDiskUse","abstract":"

Enables writing to temporary files. When set to true, aggregation stages","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV9batchSizes5Int32VSgvp":{"name":"batchSize","abstract":"

The number of Documents to return per batch.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation. This only applies","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV7commentSSSgvp":{"name":"comment","abstract":"

Enables users to specify an arbitrary string to help trace the operation through","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV4hintAA4HintOSgvp":{"name":"hint","abstract":"

The index hint to use for the aggregation. The hint does not apply to $lookup and $graphLookup stages.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV11readConcernAA04ReadF0VSgvp":{"name":"readConcern","abstract":"

A ReadConcern to use in read stages of this operation.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV14readPreferenceAA04ReadF0CSgvp":{"name":"readPreference","abstract":"

A ReadPreference to use for this operation.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

A WriteConcern to use in $out stages of this operation.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV12allowDiskUse9batchSize24bypassDocumentValidation9collation7comment4hint9maxTimeMS11readConcern0S10Preference05writeT0ACSbSg_s5Int32VSgAnA0K0VSgSSSgAA4HintOSgs5Int64VSgAA04ReadT0VSgAA0zU0CSgAA05WriteT0VSgtcfc":{"name":"init(allowDiskUse:batchSize:bypassDocumentValidation:collation:comment:hint:maxTimeMS:readConcern:readPreference:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted or optional.

","parent_name":"AggregateOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV10backgroundSbSgvp":{"name":"background","abstract":"

Optionally tells the server to build the index in the background and not block other tasks.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV4bitss5Int32VSgvp":{"name":"bits","abstract":"

Optionally specifies the precision of the stored geo hash in the 2d index, from 1 to 32.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV10bucketSizes5Int32VSgvp":{"name":"bucketSize","abstract":"

Optionally specifies the number of units within which to group the location values in a geo haystack index.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Optionally specifies a collation to use for the index in MongoDB 3.4 and higher. If not specified, no collation","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV15defaultLanguageSSSgvp":{"name":"defaultLanguage","abstract":"

Optionally specifies the default language for text indexes. Is ‘english’ if none is provided.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV18expireAfterSecondss5Int32VSgvp":{"name":"expireAfterSeconds","abstract":"

Optionally specifies the length in time, in seconds, for documents to remain in a collection.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV16languageOverrideSSSgvp":{"name":"languageOverride","abstract":"

Optionally specifies the field in the document to override the language.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV3maxSdSgvp":{"name":"max","abstract":"

Optionally sets the maximum boundary for latitude and longitude in the 2d index.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV3minSdSgvp":{"name":"min","abstract":"

Optionally sets the minimum boundary for latitude and longitude in the index in a 2d index.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV4nameSSSgvp":{"name":"name","abstract":"

Optionally specify a specific name for the index outside of the default generated name. If none is provided then","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV23partialFilterExpressionAA8DocumentVSgvp":{"name":"partialFilterExpression","abstract":"

Optionally specifies a filter for use in a partial index. Only documents that match the filter expression are","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV6sparseSbSgvp":{"name":"sparse","abstract":"

Optionally tells the index to only reference documents with the specified field in the index.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV06sphereC7Versions5Int32VSgvp":{"name":"sphereIndexVersion","abstract":"

Optionally specifies the 2dsphere index version number. MongoDB 2.4 can only support version 1. MongoDB 2.6 and","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV13storageEngineAA8DocumentVSgvp":{"name":"storageEngine","abstract":"

Optionally used only in MongoDB 3.0.0 and higher. Allows users to configure the storage engine on a per-index","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV04textC7Versions5Int32VSgvp":{"name":"textIndexVersion","abstract":"

Optionally provides the text index version number. MongoDB 2.4 can only support version 1. MongoDB 2.6 and","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV6uniqueSbSgvp":{"name":"unique","abstract":"

Optionally forces the index to be unique.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV7versions5Int32VSgvp":{"name":"version","abstract":"

Optionally specifies the index version number, either 0 or 1.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV7weightsAA8DocumentVSgvp":{"name":"weights","abstract":"

Optionally specifies fields in the index and their corresponding weight values.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV10background4bits10bucketSize9collation15defaultLanguage18expireAfterSeconds16languageOverride3max3min4name23partialFilterExpression6sparse06sphereC7Version13storageEngine04textcY06unique7version7weightsACSbSg_s5Int32VSgAyA8DocumentVSgSSSgAYA1_SdSgA2_A1_A0_AvYA0_AyvYA0_tcfc":{"name":"init(background:bits:bucketSize:collation:defaultLanguage:expireAfterSeconds:languageOverride:max:min:name:partialFilterExpression:sparse:sphereIndexVersion:storageEngine:textIndexVersion:unique:version:weights:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted.

","parent_name":"IndexOptions"},"Structs/IndexModel.html#/s:10MongoSwift10IndexModelV4keysAA8DocumentVvp":{"name":"keys","abstract":"

Contains the required keys for the index.

","parent_name":"IndexModel"},"Structs/IndexModel.html#/s:10MongoSwift10IndexModelV7optionsAA0C7OptionsVSgvp":{"name":"options","abstract":"

Contains the options for the index.

","parent_name":"IndexModel"},"Structs/IndexModel.html#/s:10MongoSwift10IndexModelV4keys7optionsAcA8DocumentV_AA0C7OptionsVSgtcfc":{"name":"init(keys:options:)","abstract":"

Convenience initializer providing a default options value

","parent_name":"IndexModel"},"Structs/IndexModel.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"IndexModel"},"Structs/IndexModel.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"IndexModel"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV12arrayFiltersSayAA8DocumentVGSgvp":{"name":"arrayFilters","abstract":"

A set of filters specifying to which array elements an update should apply.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation to use.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV10projectionAA8DocumentVSgvp":{"name":"projection","abstract":"

Limits the fields to return for the matching document.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV14returnDocumentAA06ReturnI0OSgvp":{"name":"returnDocument","abstract":"

WhenReturnDocument.After, returns the updated or inserted document rather than the original.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV4sortAA8DocumentVSgvp":{"name":"sort","abstract":"

Determines which document the operation modifies if the query selects multiple documents.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV6upsertSbSgvp":{"name":"upsert","abstract":"

When true, creates a new document if no document matches the query.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV12writeConcernAA05WriteI0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV12arrayFilters24bypassDocumentValidation9collation9maxTimeMS10projection06returnK04sort6upsert12writeConcernACSayAA0K0VGSg_SbSgANSgs5Int64VSgArA06ReturnK0OSgArqA05WriteV0VSgtcfc":{"name":"init(arrayFilters:bypassDocumentValidation:collation:maxTimeMS:projection:returnDocument:sort:upsert:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted/optional.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation to use.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV10projectionAA8DocumentVSgvp":{"name":"projection","abstract":"

Limits the fields to return for the matching document.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV14returnDocumentAA06ReturnI0OSgvp":{"name":"returnDocument","abstract":"

When ReturnDocument.After, returns the replaced or inserted document rather than the original.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV4sortAA8DocumentVSgvp":{"name":"sort","abstract":"

Determines which document the operation modifies if the query selects multiple documents.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV6upsertSbSgvp":{"name":"upsert","abstract":"

When true, creates a new document if no document matches the query.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV12writeConcernAA05WriteI0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV24bypassDocumentValidation9collation9maxTimeMS10projection06returnI04sort6upsert12writeConcernACSbSg_AA0I0VSgs5Int64VSgAoA06ReturnI0OSgAolA05WriteT0VSgtcfc":{"name":"init(bypassDocumentValidation:collation:maxTimeMS:projection:returnDocument:sort:upsert:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted/optional.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndDeleteOptions.html#/s:10MongoSwift23FindOneAndDeleteOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation to use.

","parent_name":"FindOneAndDeleteOptions"},"Structs/FindOneAndDeleteOptions.html#/s:10MongoSwift23FindOneAndDeleteOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"FindOneAndDeleteOptions"},"Structs/FindOneAndDeleteOptions.html#/s:10MongoSwift23FindOneAndDeleteOptionsV10projectionAA8DocumentVSgvp":{"name":"projection","abstract":"

Limits the fields to return for the matching document.

","parent_name":"FindOneAndDeleteOptions"},"Structs/FindOneAndDeleteOptions.html#/s:10MongoSwift23FindOneAndDeleteOptionsV4sortAA8DocumentVSgvp":{"name":"sort","abstract":"

Determines which document the operation modifies if the query selects multiple documents.

","parent_name":"FindOneAndDeleteOptions"},"Structs/FindOneAndDeleteOptions.html#/s:10MongoSwift23FindOneAndDeleteOptionsV12writeConcernAA05WriteI0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"FindOneAndDeleteOptions"},"Structs/FindOneAndDeleteOptions.html#/s:10MongoSwift23FindOneAndDeleteOptionsV9collation9maxTimeMS10projection4sort12writeConcernAcA8DocumentVSg_s5Int64VSgA2kA05WriteO0VSgtcfc":{"name":"init(collation:maxTimeMS:projection:sort:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted/optional

","parent_name":"FindOneAndDeleteOptions"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV12deletedCountSivp":{"name":"deletedCount","abstract":"

Number of documents deleted.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV13insertedCountSivp":{"name":"insertedCount","abstract":"

Number of documents inserted.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV11insertedIdsSDySiAA4BSONOGvp":{"name":"insertedIds","abstract":"

Map of the index of the operation to the id of the inserted document.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV12matchedCountSivp":{"name":"matchedCount","abstract":"

Number of documents matched for update.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV13modifiedCountSivp":{"name":"modifiedCount","abstract":"

Number of documents modified.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV13upsertedCountSivp":{"name":"upsertedCount","abstract":"

Number of documents upserted.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV11upsertedIdsSDySiAA4BSONOGvp":{"name":"upsertedIds","abstract":"

Map of the index of the operation to the id of the upserted document.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BulkWriteResult"},"Structs/BulkWriteOptions.html#/s:10MongoSwift16BulkWriteOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation.

","parent_name":"BulkWriteOptions"},"Structs/BulkWriteOptions.html#/s:10MongoSwift16BulkWriteOptionsV7orderedSbvp":{"name":"ordered","abstract":"

If true (the default), operations will be executed serially in order","parent_name":"BulkWriteOptions"},"Structs/BulkWriteOptions.html#/s:10MongoSwift16BulkWriteOptionsV12writeConcernAA0dG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the bulk write.

","parent_name":"BulkWriteOptions"},"Structs/BulkWriteOptions.html#/s:10MongoSwift16BulkWriteOptionsV24bypassDocumentValidation7ordered12writeConcernACSbSg_AgA0dK0VSgtcfc":{"name":"init(bypassDocumentValidation:ordered:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted or optional

","parent_name":"BulkWriteOptions"},"Structs/UpdateModelOptions.html#/s:10MongoSwift18UpdateModelOptionsV12arrayFiltersSayAA8DocumentVGSgvp":{"name":"arrayFilters","abstract":"

A set of filters specifying to which array elements an update should apply.

","parent_name":"UpdateModelOptions"},"Structs/UpdateModelOptions.html#/s:10MongoSwift18UpdateModelOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

The collation to use.

","parent_name":"UpdateModelOptions"},"Structs/UpdateModelOptions.html#/s:10MongoSwift18UpdateModelOptionsV6upsertSbSgvp":{"name":"upsert","abstract":"

When true, creates a new document if no document matches the query.

","parent_name":"UpdateModelOptions"},"Structs/UpdateModelOptions.html#/s:10MongoSwift18UpdateModelOptionsV12arrayFilters9collation6upsertACSayAA8DocumentVGSg_AHSgSbSgtcfc":{"name":"init(arrayFilters:collation:upsert:)","abstract":"

Initializer allowing any/all options to be omitted or optional.

","parent_name":"UpdateModelOptions"},"Structs/ReplaceOneModelOptions.html#/s:10MongoSwift22ReplaceOneModelOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

The collation to use.

","parent_name":"ReplaceOneModelOptions"},"Structs/ReplaceOneModelOptions.html#/s:10MongoSwift22ReplaceOneModelOptionsV6upsertSbSgvp":{"name":"upsert","abstract":"

When true, creates a new document if no document matches the query.

","parent_name":"ReplaceOneModelOptions"},"Structs/ReplaceOneModelOptions.html#/s:10MongoSwift22ReplaceOneModelOptionsV9collation6upsertAcA8DocumentVSg_SbSgtcfc":{"name":"init(collation:upsert:)","abstract":"

Initializer allowing any/all options to be omitted or optional.

","parent_name":"ReplaceOneModelOptions"},"Structs/DeleteModelOptions.html#/s:10MongoSwift18DeleteModelOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

The collation to use.

","parent_name":"DeleteModelOptions"},"Structs/DeleteModelOptions.html#/s:10MongoSwift18DeleteModelOptionsV9collationAcA8DocumentVSg_tcfc":{"name":"init(collation:)","abstract":"

Initializer allowing any/all options to be omitted or optional.

","parent_name":"DeleteModelOptions"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV7encoderAA11BSONEncoderCvp":{"name":"encoder","abstract":"

Encoder used by this collection for BSON conversions. (e.g. converting CollectionTypes, indexes, and options","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV7decoderAA11BSONDecoderCvp":{"name":"decoder","abstract":"

Decoder used by this collection for BSON conversions (e.g. converting documents to CollectionTypes).

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV0C4Typea":{"name":"CollectionType","abstract":"

A Codable type associated with this MongoCollection instance.","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV4nameSSvp":{"name":"name","abstract":"

The name of this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV11readConcernAA04ReadE0VSgvp":{"name":"readConcern","abstract":"

The ReadConcern set on this collection, or nil if one is not set.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV14readPreferenceAA04ReadE0Cvp":{"name":"readPreference","abstract":"

The ReadPreference set on this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV12writeConcernAA05WriteE0VSgvp":{"name":"writeConcern","abstract":"

The WriteConcern set on this collection, or nil if one is not set.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV4drop7options7sessionyAA04DropC7OptionsVSg_AA13ClientSessionCSgtKF":{"name":"drop(options:session:)","abstract":"

Drops this collection from its parent database.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9bulkWrite_7options7sessionAA04BulkE6ResultVSgSayAA0E5ModelOyxGG_AA0hE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"bulkWrite(_:options:session:)","abstract":"

Execute multiple write operations.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV5watch_7options7sessionAA12ChangeStreamCyAA0gH5EventVyxGGSayAA8DocumentVG_AA0gH7OptionsVSgAA13ClientSessionCSgtKF":{"name":"watch(_:options:session:)","abstract":"

Starts a ChangeStream on a collection. The CollectionType will be associated with the fullDocument","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV5watch_7options7session20withFullDocumentTypeAA12ChangeStreamCyAA0kL5EventVyqd__GGSayAA0I0VG_AA0kL7OptionsVSgAA13ClientSessionCSgqd__mtKSeRd__SERd__lF":{"name":"watch(_:options:session:withFullDocumentType:)","abstract":"

Starts a ChangeStream on a collection. Associates the specified Codable type T with the fullDocument","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV5watch_7options7session13withEventTypeAA12ChangeStreamCyqd__GSayAA8DocumentVG_AA0jK7OptionsVSgAA13ClientSessionCSgqd__mtKSeRd__SERd__lF":{"name":"watch(_:options:session:withEventType:)","abstract":"

Starts a ChangeStream on a collection. Associates the specified Codable type T with the returned","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV16findOneAndDelete_7options7sessionxSgAA8DocumentV_AA04FindefG7OptionsVSgAA13ClientSessionCSgtKF":{"name":"findOneAndDelete(_:options:session:)","abstract":"

Finds a single document and deletes it, returning the original.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV17findOneAndReplace6filter11replacement7options7sessionxSgAA8DocumentV_xAA04FindefG7OptionsVSgAA13ClientSessionCSgtKF":{"name":"findOneAndReplace(filter:replacement:options:session:)","abstract":"

Finds a single document and replaces it, returning either the original or the replaced document.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV16findOneAndUpdate6filter6update7options7sessionxSgAA8DocumentV_AkA04FindefG7OptionsVSgAA13ClientSessionCSgtKF":{"name":"findOneAndUpdate(filter:update:options:session:)","abstract":"

Finds a single document and updates it, returning either the original or the updated document.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV11createIndex_12indexOptions7options7sessionSSAA8DocumentV_AA0eG0VSgAA06CreateeG0VSgAA13ClientSessionCSgtKF":{"name":"createIndex(_:indexOptions:options:session:)","abstract":"

Creates an index over the collection for the provided keys with the provided options.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV11createIndex_7options7sessionSSAA0E5ModelV_AA06CreateE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"createIndex(_:options:session:)","abstract":"

Creates an index over the collection for the provided keys with the provided options.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV13createIndexes_7options7sessionSaySSGSayAA10IndexModelVG_AA06CreateH7OptionsVSgAA13ClientSessionCSgtKF":{"name":"createIndexes(_:options:session:)","abstract":"

Creates multiple indexes in the collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9dropIndex_7options7sessionAA8DocumentVSS_AA04DropE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"dropIndex(_:options:session:)","abstract":"

Drops a single index from the collection by the index name.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9dropIndex_7options7sessionAA8DocumentVAH_AA04DropE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"dropIndex(_:options:session:)","abstract":"

Attempts to drop a single index from the collection given the keys describing it.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9dropIndex_7options7sessionAA8DocumentVAA0E5ModelV_AA04DropE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"dropIndex(_:options:session:)","abstract":"

Attempts to drop a single index from the collection given an IndexModel describing it.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV11dropIndexes7options7sessionAA8DocumentVAA16DropIndexOptionsVSg_AA13ClientSessionCSgtKF":{"name":"dropIndexes(options:session:)","abstract":"

Drops all indexes in the collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV11listIndexes7sessionAA0A6CursorCyAA10IndexModelVGAA13ClientSessionCSg_tKF":{"name":"listIndexes(session:)","abstract":"

Retrieves a list of the indexes currently on this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV14listIndexNames7sessionSaySSGAA13ClientSessionCSg_tKF":{"name":"listIndexNames(session:)","abstract":"

Retrieves a list of names of the indexes currently on this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV4find_7options7sessionAA0A6CursorCyxGAA8DocumentV_AA11FindOptionsVSgAA13ClientSessionCSgtKF":{"name":"find(_:options:session:)","abstract":"

Finds the documents in this collection which match the provided filter.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9aggregate_7options7sessionAA0A6CursorCyAA8DocumentVGSayAJG_AA16AggregateOptionsVSgAA13ClientSessionCSgtKF":{"name":"aggregate(_:options:session:)","abstract":"

Runs an aggregation framework pipeline against this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV14countDocuments_7options7sessionSiAA8DocumentV_AA05CountE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"countDocuments(_:options:session:)","abstract":"

Counts the number of documents in this collection matching the provided filter. Note that an empty filter will","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV22estimatedDocumentCount7options7sessionSiAA09EstimatedeF7OptionsVSg_AA13ClientSessionCSgtKF":{"name":"estimatedDocumentCount(options:session:)","abstract":"

Gets an estimate of the count of documents in this collection using collection metadata.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV8distinct9fieldName6filter7options7sessionSayAA4BSONOGSS_AA8DocumentVAA15DistinctOptionsVSgAA13ClientSessionCSgtKF":{"name":"distinct(fieldName:filter:options:session:)","abstract":"

Finds the distinct values for a specified field across the collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9insertOne_7options7sessionAA06InsertE6ResultVSgx_AA0hE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"insertOne(_:options:session:)","abstract":"

Encodes the provided value to BSON and inserts it. If the value is missing an identifier, one will be","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV10insertMany_7options7sessionAA06InsertE6ResultVSgSayxG_AA16BulkWriteOptionsVSgAA13ClientSessionCSgtKF":{"name":"insertMany(_:options:session:)","abstract":"

Encodes the provided values to BSON and inserts them. If any values are","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV10replaceOne6filter11replacement7options7sessionAA12UpdateResultVSgAA8DocumentV_xAA14ReplaceOptionsVSgAA13ClientSessionCSgtKF":{"name":"replaceOne(filter:replacement:options:session:)","abstract":"

Replaces a single document matching the provided filter in this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9updateOne6filter0D07options7sessionAA12UpdateResultVSgAA8DocumentV_AmA0I7OptionsVSgAA13ClientSessionCSgtKF":{"name":"updateOne(filter:update:options:session:)","abstract":"

Updates a single document matching the provided filter in this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV10updateMany6filter0D07options7sessionAA12UpdateResultVSgAA8DocumentV_AmA0I7OptionsVSgAA13ClientSessionCSgtKF":{"name":"updateMany(filter:update:options:session:)","abstract":"

Updates multiple documents matching the provided filter in this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9deleteOne_7options7sessionAA12DeleteResultVSgAA8DocumentV_AA0H7OptionsVSgAA13ClientSessionCSgtKF":{"name":"deleteOne(_:options:session:)","abstract":"

Deletes a single matching document from the collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV10deleteMany_7options7sessionAA12DeleteResultVSgAA8DocumentV_AA0H7OptionsVSgAA13ClientSessionCSgtKF":{"name":"deleteMany(_:options:session:)","abstract":"

Deletes multiple documents

","parent_name":"MongoCollection"},"Structs/TLSOptions.html#/s:10MongoSwift10TLSOptionsV21allowInvalidHostnamesSbSgvp":{"name":"allowInvalidHostnames","abstract":"

Indicates whether invalid hostnames are allowed. By default this is set to false.

","parent_name":"TLSOptions"},"Structs/TLSOptions.html#/s:10MongoSwift10TLSOptionsV6caFile10Foundation3URLVSgvp":{"name":"caFile","abstract":"

Specifies the path to the certificate authority file.

","parent_name":"TLSOptions"},"Structs/TLSOptions.html#/s:10MongoSwift10TLSOptionsV7pemFile10Foundation3URLVSgvp":{"name":"pemFile","abstract":"

Specifies the path to the client certificate key file.

","parent_name":"TLSOptions"},"Structs/TLSOptions.html#/s:10MongoSwift10TLSOptionsV11pemPasswordSSSgvp":{"name":"pemPassword","abstract":"

Specifies the client certificate key password.

","parent_name":"TLSOptions"},"Structs/TLSOptions.html#/s:10MongoSwift10TLSOptionsV18weakCertValidationSbSgvp":{"name":"weakCertValidation","abstract":"

Indicates whether invalid certificates are allowed. By default this is set to false.

","parent_name":"TLSOptions"},"Structs/TLSOptions.html#/s:10MongoSwift10TLSOptionsV21allowInvalidHostnames6caFile03pemH00I8Password18weakCertValidationACSbSg_10Foundation3URLVSgAMSSSgAItcfc":{"name":"init(allowInvalidHostnames:caFile:pemFile:pemPassword:weakCertValidation:)","abstract":"

Convenience initializer allowing any/all arguments to be omitted or optional.

","parent_name":"TLSOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV18dataCodingStrategyAA04DatafG0OSgvp":{"name":"dataCodingStrategy","abstract":"

Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this database and","parent_name":"DatabaseOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV18dateCodingStrategyAA04DatefG0OSgvp":{"name":"dateCodingStrategy","abstract":"

Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this database and","parent_name":"DatabaseOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV11readConcernAA04ReadF0VSgvp":{"name":"readConcern","abstract":"

A read concern to set on the retrieved database.

","parent_name":"DatabaseOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV14readPreferenceAA04ReadF0CSgvp":{"name":"readPreference","abstract":"

A read preference to set on the retrieved database.

","parent_name":"DatabaseOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV18uuidCodingStrategyAA010UUIDCodingG0OSgvp":{"name":"uuidCodingStrategy","abstract":"

Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this database and","parent_name":"DatabaseOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

A write concern to set on the retrieved database.

","parent_name":"DatabaseOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV18dataCodingStrategy04datefG011readConcern0I10Preference04uuidfG005writeJ0AcA04DatafG0OSg_AA04DatefG0OSgAA04ReadJ0VSgAA0pK0CSgAA010UUIDCodingG0OSgAA05WriteJ0VSgtcfc":{"name":"init(dataCodingStrategy:dateCodingStrategy:readConcern:readPreference:uuidCodingStrategy:writeConcern:)","abstract":"

Convenience initializer allowing any/all arguments to be omitted or optional.

","parent_name":"DatabaseOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV17commandMonitoringSbvp":{"name":"commandMonitoring","abstract":"

Indicates whether this client should publish command monitoring events. If true, the following event types will","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV18dataCodingStrategyAA04DatafG0OSgvp":{"name":"dataCodingStrategy","abstract":"

Specifies the DataCodingStrategy to use for BSON encoding/decoding operations performed by this client and any","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV18dateCodingStrategyAA04DatefG0OSgvp":{"name":"dateCodingStrategy","abstract":"

Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this client and any","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV18notificationCenterSo014NSNotificationF0CSgvp":{"name":"notificationCenter","abstract":"

If command and/or server monitoring is enabled, indicates the NotificationCenter events are posted to. If one","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV11readConcernAA04ReadF0VSgvp":{"name":"readConcern","abstract":"

Specifies a ReadConcern to use for the client.

","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV14readPreferenceAA04ReadF0CSgvp":{"name":"readPreference","abstract":"

Specifies a ReadPreference to use for the client.

","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV10retryReadsSbSgvp":{"name":"retryReads","abstract":"

Determines whether the client should retry supported read operations (on by default).

","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV11retryWritesSbSgvp":{"name":"retryWrites","abstract":"

Determines whether the client should retry supported write operations (on by default).

","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV16serverMonitoringSbvp":{"name":"serverMonitoring","abstract":"

Indicates whether this client should publish command monitoring events. If true, the following event types will","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV03tlsD0AA10TLSOptionsVSgvp":{"name":"tlsOptions","abstract":"

Specifies the TLS/SSL options to use for database connections.

","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV18uuidCodingStrategyAA010UUIDCodingG0OSgvp":{"name":"uuidCodingStrategy","abstract":"

Specifies the UUIDCodingStrategy to use for BSON encoding/decoding operations performed by this client and any","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

Specifies a WriteConcern to use for the client.

","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV17commandMonitoring18dataCodingStrategy04datehI018notificationCenter11readConcern0M10Preference10retryReads0P6Writes06serverF003tlsD004uuidhI005writeN0ACSb_AA04DatahI0OSgAA04DatehI0OSgSo014NSNotificationL0CSgAA04ReadN0VSgAA0zO0CSgSbSgA3_SbAA10TLSOptionsVSgAA010UUIDCodingI0OSgAA05WriteN0VSgtcfc":{"name":"init(commandMonitoring:dataCodingStrategy:dateCodingStrategy:notificationCenter:readConcern:readPreference:retryReads:retryWrites:serverMonitoring:tlsOptions:uuidCodingStrategy:writeConcern:)","abstract":"

Convenience initializer allowing any/all to be omitted or optional.

","parent_name":"ClientOptions"},"Structs/ClientSessionOptions.html#/s:10MongoSwift20ClientSessionOptionsV17causalConsistencySbSgvp":{"name":"causalConsistency","abstract":"

Whether to enable causal consistency for this session. By default, causal consistency is enabled.

","parent_name":"ClientSessionOptions"},"Structs/ClientSessionOptions.html#/s:10MongoSwift20ClientSessionOptionsV17causalConsistencyACSbSg_tcfc":{"name":"init(causalConsistency:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted.

","parent_name":"ClientSessionOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV9batchSizes5Int32VSgvp":{"name":"batchSize","abstract":"

The number of documents to return per batch. If omitted, the server will use its default batch size.

","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV12fullDocumentAA04FullG0OSgvp":{"name":"fullDocument","abstract":"

Indicates how the fullDocument field of a change stream document should be filled out by the server.","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV14maxAwaitTimeMSs5Int64VSgvp":{"name":"maxAwaitTimeMS","abstract":"

The maximum amount of time in milliseconds for the server to wait on new documents to satisfy a","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV11resumeAfterAA11ResumeTokenVSgvp":{"name":"resumeAfter","abstract":"

A ResumeToken that manually specifies the logical starting point for the new change stream.","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV20startAtOperationTimeAA9TimestampVSgvp":{"name":"startAtOperationTime","abstract":"

The change stream will only provide changes that occurred at or after the specified timestamp.","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV9batchSize9collation12fullDocument14maxAwaitTimeMS11resumeAfter016startAtOperationM0ACs5Int32VSg_AA0J0VSgAA04FullJ0OSgs5Int64VSgAA11ResumeTokenVSgAA9TimestampVSgtcfc":{"name":"init(batchSize:collation:fullDocument:maxAwaitTimeMS:resumeAfter:startAtOperationTime:)","abstract":"

Initializes a ChangeStreamOptions.

","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamEvent.html#/s:10MongoSwift17ChangeStreamEventV13operationTypeAA09OperationG0Ovp":{"name":"operationType","abstract":"

Describes the type of operation for this change.

","parent_name":"ChangeStreamEvent"},"Structs/ChangeStreamEvent.html#/s:10MongoSwift17ChangeStreamEventV3_idAA11ResumeTokenVvp":{"name":"_id","abstract":"

An opaque token for use when resuming an interrupted change stream.

","parent_name":"ChangeStreamEvent"},"Structs/ChangeStreamEvent.html#/s:10MongoSwift17ChangeStreamEventV2nsAA0A9NamespaceVvp":{"name":"ns","abstract":"

A document containing the database and collection names in which this change happened.

","parent_name":"ChangeStreamEvent"},"Structs/ChangeStreamEvent.html#/s:10MongoSwift17ChangeStreamEventV11documentKeyAA8DocumentVSgvp":{"name":"documentKey","abstract":"

Only present for options of type insert, update, replace and delete. For unsharded collections this","parent_name":"ChangeStreamEvent"},"Structs/ChangeStreamEvent.html#/s:10MongoSwift17ChangeStreamEventV17updateDescriptionAA06UpdateG0VSgvp":{"name":"updateDescription","abstract":"

An UpdateDescription containing updated and removed fields in this operation. Only present for operations of","parent_name":"ChangeStreamEvent"},"Structs/ChangeStreamEvent.html#/s:10MongoSwift17ChangeStreamEventV12fullDocumentxSgvp":{"name":"fullDocument","abstract":"

Always present for operations of type insert and replace. Also present for operations of type update if","parent_name":"ChangeStreamEvent"},"Structs/UpdateDescription.html#/s:10MongoSwift17UpdateDescriptionV13updatedFieldsAA8DocumentVvp":{"name":"updatedFields","abstract":"

A document containing key:value pairs of names of the fields that were changed, and the new","parent_name":"UpdateDescription"},"Structs/UpdateDescription.html#/s:10MongoSwift17UpdateDescriptionV13removedFieldsSaySSGvp":{"name":"removedFields","abstract":"

An array of field names that were removed from the document.

","parent_name":"UpdateDescription"},"Structs/ResumeToken.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"ResumeToken"},"Structs/ResumeToken.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"ResumeToken"},"Structs/Document.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV4fromACs7Decoder_p_tKcfc":{"name":"init(from:)","abstract":"

This method will work with any Decoder, but for non-BSON","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV5Indexa":{"name":"Index","abstract":"

The index type of a document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV10startIndexSivp":{"name":"startIndex","abstract":"

Returns the start index of the Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV8endIndexSivp":{"name":"endIndex","abstract":"

Returns the end index of the Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV5index5afterS2i_tF":{"name":"index(after:)","abstract":"

Returns the index after the given index for this Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentVySS3key_AA4BSONO5valuetSicip":{"name":"subscript(_:)","abstract":"

Allows access to a KeyValuePair from the Document, given the position of the desired KeyValuePair held","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentVyACSnySiGcip":{"name":"subscript(_:)","abstract":"

Allows access to a KeyValuePair from the Document, given a range of indices of the desired KeyValuePair‘s","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV12KeyValuePaira":{"name":"KeyValuePair","abstract":"

The element type of a document: a tuple containing an individual key-value pair.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV11SubSequencea":{"name":"SubSequence","abstract":"

The type that is returned from methods such as dropFirst() and split().

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV7isEmptySbvp":{"name":"isEmpty","abstract":"

Returns a Bool indicating whether the document is empty.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV12makeIteratorAA0cE0CyF":{"name":"makeIterator()","abstract":"

Returns a DocumentIterator over the values in this Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV9mapValuesyAcA4BSONOAFKXEKF":{"name":"mapValues(_:)","abstract":"

Returns a new document containing the keys of this document with the values transformed by the given closure.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV9dropFirstyACSiF":{"name":"dropFirst(_:)","abstract":"

Returns a document containing all but the given number of initial key-value pairs.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV8dropLastyACSiF":{"name":"dropLast(_:)","abstract":"

Returns a document containing all but the given number of final key-value pairs.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV4drop5whileACSbSS3key_AA4BSONO5valuet_tKXE_tKF":{"name":"drop(while:)","abstract":"

Returns a document by skipping the initial, consecutive key-value pairs that satisfy the given predicate.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV6prefixyACSiF":{"name":"prefix(_:)","abstract":"

Returns a document, up to the specified maximum length, containing the initial key-value pairs of the document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV6prefix5whileACSbSS3key_AA4BSONO5valuet_tKXE_tKF":{"name":"prefix(while:)","abstract":"

Returns a document containing the initial, consecutive key-value pairs that satisfy the given predicate.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV6suffixyACSiF":{"name":"suffix(_:)","abstract":"

Returns a document, up to the specified maximum length, containing the final key-value pairs of the document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV5split9maxSplits25omittingEmptySubsequences14whereSeparatorSayACGSi_S2bSS3key_AA4BSONO5valuet_tKXEtKF":{"name":"split(maxSplits:omittingEmptySubsequences:whereSeparator:)","abstract":"

Returns the longest possible subsequences of the document, in order, that don’t contain key-value pairs","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV6filteryACSbSS3key_AA4BSONO5valuet_tKXEKF":{"name":"filter(_:)","abstract":"

Returns a new document containing the elements of the document that satisfy the given predicate.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV4keysSaySSGvp":{"name":"keys","abstract":"

Returns a [String] containing the keys in this Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV6valuesSayAA4BSONOGvp":{"name":"values","abstract":"

Returns a [BSONValue] containing the values stored in this Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV5countSivp":{"name":"count","abstract":"

Returns the number of (key, value) pairs stored at the top level of this Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV12extendedJSONSSvp":{"name":"extendedJSON","abstract":"

Returns the relaxed extended JSON representation of this Document.","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV21canonicalExtendedJSONSSvp":{"name":"canonicalExtendedJSON","abstract":"

Returns the canonical extended JSON representation of this Document.","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV7rawBSON10Foundation4DataVvp":{"name":"rawBSON","abstract":"

Returns a copy of the raw BSON data for this Document, represented as Data.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentVACycfc":{"name":"init()","abstract":"

Initializes a new, empty Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV8fromJSONAC10Foundation4DataV_tKcfc":{"name":"init(fromJSON:)","abstract":"

Constructs a new Document from the provided JSON text.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV8fromJSONACSS_tKcfc":{"name":"init(fromJSON:)","abstract":"

Convenience initializer for constructing a Document from a String.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV8fromBSONAC10Foundation4DataV_tKcfc":{"name":"init(fromBSON:)","abstract":"

Constructs a Document from raw BSON Data.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV6hasKeyySbSSF":{"name":"hasKey(_:)","abstract":"

Returns a Boolean indicating whether this Document contains the provided key.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentVyAA4BSONOSgSScip":{"name":"subscript(_:)","abstract":"

Allows setting values and retrieving values using subscript syntax.","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV_7defaultAA4BSONOSS_AFyXKtcip":{"name":"subscript(_:default:)","abstract":"

An implementation identical to subscript(key: String), but offers the ability to choose a default value if the","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV13dynamicMemberAA4BSONOSgSS_tcip":{"name":"subscript(dynamicMember:)","abstract":"

Allows setting values and retrieving values using dot-notation syntax.","parent_name":"Document"},"Structs/Document.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV11descriptionSSvp":{"name":"description","abstract":"

Returns the relaxed extended JSON representation of this Document.","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV17dictionaryLiteralACSS_AA4BSONOtd_tcfc":{"name":"init(dictionaryLiteral:)","abstract":"

Initializes a Document using a dictionary literal where the","parent_name":"Document"},"Structs/Document.html#/s:SH4hash4intoys6HasherVz_tF":{"name":"hash(into:)","parent_name":"Document"},"Structs/BSONCoderOptions.html#/s:10MongoSwift22CodingStrategyProviderP04datacD0AA04DatacD0OSgvp":{"name":"dataCodingStrategy","parent_name":"BSONCoderOptions"},"Structs/BSONCoderOptions.html#/s:10MongoSwift22CodingStrategyProviderP04datecD0AA04DatecD0OSgvp":{"name":"dateCodingStrategy","parent_name":"BSONCoderOptions"},"Structs/BSONCoderOptions.html#/s:10MongoSwift22CodingStrategyProviderP04uuidcD0AA010UUIDCodingD0OSgvp":{"name":"uuidCodingStrategy","parent_name":"BSONCoderOptions"},"Structs/BSONCoderOptions.html#/s:10MongoSwift16BSONCoderOptionsV18dataCodingStrategy04datefG004uuidfG0AcA04DatafG0OSg_AA04DatefG0OSgAA010UUIDCodingG0OSgtcfc":{"name":"init(dataCodingStrategy:dateCodingStrategy:uuidCodingStrategy:)","abstract":"

Initializes a new BSONCoderOptions.

","parent_name":"BSONCoderOptions"},"Structs/Timestamp.html#/s:10MongoSwift9TimestampV9timestamps6UInt32Vvp":{"name":"timestamp","abstract":"

A timestamp representing seconds since the Unix epoch.

","parent_name":"Timestamp"},"Structs/Timestamp.html#/s:10MongoSwift9TimestampV9increments6UInt32Vvp":{"name":"increment","abstract":"

An incrementing ordinal for operations within a given second.

","parent_name":"Timestamp"},"Structs/Timestamp.html#/s:10MongoSwift9TimestampV9timestamp3incACs6UInt32V_AGtcfc":{"name":"init(timestamp:inc:)","abstract":"

Initializes a new Timestamp with the provided timestamp and increment values.

","parent_name":"Timestamp"},"Structs/Timestamp.html#/s:10MongoSwift9TimestampV9timestamp3incACSi_Sitcfc":{"name":"init(timestamp:inc:)","abstract":"

Initializes a new Timestamp with the provided timestamp and increment values. Assumes","parent_name":"Timestamp"},"Structs/Timestamp.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Timestamp"},"Structs/Timestamp.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Timestamp"},"Structs/Symbol.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"Symbol"},"Structs/Symbol.html#/s:10MongoSwift6SymbolV11stringValueSSvp":{"name":"stringValue","abstract":"

String representation of this Symbol.

","parent_name":"Symbol"},"Structs/Symbol.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Symbol"},"Structs/Symbol.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Symbol"},"Structs/RegularExpression.html#/s:10MongoSwift17RegularExpressionV7patternSSvp":{"name":"pattern","abstract":"

The pattern for this regular expression.

","parent_name":"RegularExpression"},"Structs/RegularExpression.html#/s:10MongoSwift17RegularExpressionV7optionsSSvp":{"name":"options","abstract":"

A string containing options for this regular expression.

","parent_name":"RegularExpression"},"Structs/RegularExpression.html#/s:10MongoSwift17RegularExpressionV7pattern7optionsACSS_SStcfc":{"name":"init(pattern:options:)","abstract":"

Initializes a new RegularExpression with the provided pattern and options.

","parent_name":"RegularExpression"},"Structs/RegularExpression.html#/s:10MongoSwift17RegularExpressionV4fromACSo09NSRegularD0C_tcfc":{"name":"init(from:)","abstract":"

Initializes a new RegularExpression with the pattern and options of the provided NSRegularExpression.

","parent_name":"RegularExpression"},"Structs/RegularExpression.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"RegularExpression"},"Structs/RegularExpression.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"RegularExpression"},"Structs/ObjectId.html#/s:10MongoSwift8ObjectIdV3hexSSvp":{"name":"hex","abstract":"

This ObjectId‘s data represented as a String.

","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:10MongoSwift8ObjectIdV9timestamps6UInt32Vvp":{"name":"timestamp","abstract":"

The timestamp used to create this ObjectId

","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:10MongoSwift8ObjectIdVACycfc":{"name":"init()","abstract":"

Initializes a new ObjectId.

","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:10MongoSwift8ObjectIdVyACSgSScfc":{"name":"init(_:)","abstract":"

Initializes an ObjectId from the provided hex String. Returns nil if the string is not a valid ObjectId.

","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:SH4hash4intoys6HasherVz_tF":{"name":"hash(into:)","parent_name":"ObjectId"},"Structs/Code.html#/s:10MongoSwift4CodeV4codeSSvp":{"name":"code","abstract":"

A string containing Javascript code.

","parent_name":"Code"},"Structs/Code.html#/s:10MongoSwift4CodeV4codeACSS_tcfc":{"name":"init(code:)","abstract":"

Initializes a CodeWithScope with an optional scope value.

","parent_name":"Code"},"Structs/Code.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Code"},"Structs/Code.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Code"},"Structs/CodeWithScope.html#/s:10MongoSwift13CodeWithScopeV4codeSSvp":{"name":"code","abstract":"

A string containing Javascript code.

","parent_name":"CodeWithScope"},"Structs/CodeWithScope.html#/s:10MongoSwift13CodeWithScopeV5scopeAA8DocumentVvp":{"name":"scope","abstract":"

An optional scope Document containing a mapping of identifiers to values,","parent_name":"CodeWithScope"},"Structs/CodeWithScope.html#/s:10MongoSwift13CodeWithScopeV4code5scopeACSS_AA8DocumentVtcfc":{"name":"init(code:scope:)","abstract":"

Initializes a CodeWithScope with an optional scope value.

","parent_name":"CodeWithScope"},"Structs/CodeWithScope.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"CodeWithScope"},"Structs/CodeWithScope.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"CodeWithScope"},"Structs/Decimal128.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"Decimal128"},"Structs/Decimal128.html#/s:10MongoSwift10Decimal128VyACSgSScfc":{"name":"init(_:)","abstract":"

Initializes a Decimal128 value from the provided String. Returns nil if the input is not a valid","parent_name":"Decimal128"},"Structs/Decimal128.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Decimal128"},"Structs/Decimal128.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Decimal128"},"Structs/Decimal128.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"Decimal128"},"Structs/Decimal128.html#/s:SH4hash4intoys6HasherVz_tF":{"name":"hash(into:)","parent_name":"Decimal128"},"Structs/DBPointer.html#/s:10MongoSwift9DBPointerV3refSSvp":{"name":"ref","abstract":"

Destination namespace of the pointer.

","parent_name":"DBPointer"},"Structs/DBPointer.html#/s:10MongoSwift9DBPointerV2idAA8ObjectIdVvp":{"name":"id","abstract":"

Destination _id (assumed to be an ObjectId) of the pointed-to document.

","parent_name":"DBPointer"},"Structs/DBPointer.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"DBPointer"},"Structs/DBPointer.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"DBPointer"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO7genericyA2EmF":{"name":"generic","abstract":"

Generic binary subtype

","parent_name":"Subtype"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO8functionyA2EmF":{"name":"function","abstract":"

A function

","parent_name":"Subtype"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO16binaryDeprecatedyA2EmF":{"name":"binaryDeprecated","abstract":"

Binary (old)

","parent_name":"Subtype"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO14uuidDeprecatedyA2EmF":{"name":"uuidDeprecated","abstract":"

UUID (old)

","parent_name":"Subtype"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO4uuidyA2EmF":{"name":"uuid","abstract":"

UUID (RFC 4122)

","parent_name":"Subtype"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO3md5yA2EmF":{"name":"md5","abstract":"

MD5

","parent_name":"Subtype"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO11userDefinedyA2EmF":{"name":"userDefined","abstract":"

User defined

","parent_name":"Subtype"},"Structs/Binary.html#/s:10MongoSwift6BinaryV4data10Foundation4DataVvp":{"name":"data","abstract":"

The binary data.

","parent_name":"Binary"},"Structs/Binary.html#/s:10MongoSwift6BinaryV7subtypes5UInt8Vvp":{"name":"subtype","abstract":"

The binary subtype for this data.

","parent_name":"Binary"},"Structs/Binary/Subtype.html":{"name":"Subtype","abstract":"

Subtypes for BSON Binary values.

","parent_name":"Binary"},"Structs/Binary.html#/s:10MongoSwift6BinaryV4fromAC10Foundation4UUIDV_tKcfc":{"name":"init(from:)","abstract":"

Initializes a Binary instance from a UUID.

","parent_name":"Binary"},"Structs/Binary.html#/s:10MongoSwift6BinaryV4data7subtypeAC10Foundation4DataV_s5UInt8VtKcfc":{"name":"init(data:subtype:)","abstract":"

Initializes a Binary instance from a Data object and a UInt8 subtype.

","parent_name":"Binary"},"Structs/Binary.html#/s:10MongoSwift6BinaryV4data7subtypeAC10Foundation4DataV_AC7SubtypeOtKcfc":{"name":"init(data:subtype:)","abstract":"

Initializes a Binary instance from a Data object and a Subtype.

","parent_name":"Binary"},"Structs/Binary.html#/s:10MongoSwift6BinaryV6base647subtypeACSS_s5UInt8VtKcfc":{"name":"init(base64:subtype:)","abstract":"

Initializes a Binary instance from a base64 String and a UInt8 subtype.

","parent_name":"Binary"},"Structs/Binary.html#/s:10MongoSwift6BinaryV6base647subtypeACSS_AC7SubtypeOtKcfc":{"name":"init(base64:subtype:)","abstract":"

Initializes a Binary instance from a base64 String and a Subtype.

","parent_name":"Binary"},"Structs/Binary.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Binary"},"Structs/Binary.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Binary"},"Structs/ServerHeartbeatFailedEvent.html#/s:10MongoSwift26ServerHeartbeatFailedEventV9eventNameSo014NSNotificationH0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"ServerHeartbeatFailedEvent"},"Structs/ServerHeartbeatFailedEvent.html#/s:10MongoSwift26ServerHeartbeatFailedEventV8durations5Int64Vvp":{"name":"duration","abstract":"

The execution time of the event, in microseconds.

","parent_name":"ServerHeartbeatFailedEvent"},"Structs/ServerHeartbeatFailedEvent.html#/s:10MongoSwift26ServerHeartbeatFailedEventV7failureAA0A5Error_pvp":{"name":"failure","abstract":"

The failure.

","parent_name":"ServerHeartbeatFailedEvent"},"Structs/ServerHeartbeatFailedEvent.html#/s:10MongoSwift26ServerHeartbeatFailedEventV12connectionIdAA010ConnectionH0Vvp":{"name":"connectionId","abstract":"

The connection ID (host/port pair) of the server.

","parent_name":"ServerHeartbeatFailedEvent"},"Structs/ServerHeartbeatSucceededEvent.html#/s:10MongoSwift29ServerHeartbeatSucceededEventV9eventNameSo014NSNotificationH0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"ServerHeartbeatSucceededEvent"},"Structs/ServerHeartbeatSucceededEvent.html#/s:10MongoSwift29ServerHeartbeatSucceededEventV8durations5Int64Vvp":{"name":"duration","abstract":"

The execution time of the event, in microseconds.

","parent_name":"ServerHeartbeatSucceededEvent"},"Structs/ServerHeartbeatSucceededEvent.html#/s:10MongoSwift29ServerHeartbeatSucceededEventV5replyAA8DocumentVvp":{"name":"reply","abstract":"

The command reply.

","parent_name":"ServerHeartbeatSucceededEvent"},"Structs/ServerHeartbeatSucceededEvent.html#/s:10MongoSwift29ServerHeartbeatSucceededEventV12connectionIdAA010ConnectionH0Vvp":{"name":"connectionId","abstract":"

The connection ID (host/port pair) of the server.

","parent_name":"ServerHeartbeatSucceededEvent"},"Structs/ServerHeartbeatStartedEvent.html#/s:10MongoSwift27ServerHeartbeatStartedEventV9eventNameSo014NSNotificationH0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"ServerHeartbeatStartedEvent"},"Structs/ServerHeartbeatStartedEvent.html#/s:10MongoSwift27ServerHeartbeatStartedEventV12connectionIdAA010ConnectionH0Vvp":{"name":"connectionId","abstract":"

The connection ID (host/port pair) of the server.

","parent_name":"ServerHeartbeatStartedEvent"},"Structs/TopologyClosedEvent.html#/s:10MongoSwift19TopologyClosedEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"TopologyClosedEvent"},"Structs/TopologyClosedEvent.html#/s:10MongoSwift19TopologyClosedEventV10topologyIdAA06ObjectG0Vvp":{"name":"topologyId","abstract":"

A unique identifier for the topology.

","parent_name":"TopologyClosedEvent"},"Structs/TopologyOpeningEvent.html#/s:10MongoSwift20TopologyOpeningEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"TopologyOpeningEvent"},"Structs/TopologyOpeningEvent.html#/s:10MongoSwift20TopologyOpeningEventV10topologyIdAA06ObjectG0Vvp":{"name":"topologyId","abstract":"

A unique identifier for the topology.

","parent_name":"TopologyOpeningEvent"},"Structs/TopologyDescriptionChangedEvent.html#/s:10MongoSwift31TopologyDescriptionChangedEventV9eventNameSo014NSNotificationH0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"TopologyDescriptionChangedEvent"},"Structs/TopologyDescriptionChangedEvent.html#/s:10MongoSwift31TopologyDescriptionChangedEventV10topologyIdAA06ObjectH0Vvp":{"name":"topologyId","abstract":"

A unique identifier for the topology.

","parent_name":"TopologyDescriptionChangedEvent"},"Structs/TopologyDescriptionChangedEvent.html#/s:10MongoSwift31TopologyDescriptionChangedEventV08previousD0AA0cD0Vvp":{"name":"previousDescription","abstract":"

The old topology description.

","parent_name":"TopologyDescriptionChangedEvent"},"Structs/TopologyDescriptionChangedEvent.html#/s:10MongoSwift31TopologyDescriptionChangedEventV03newD0AA0cD0Vvp":{"name":"newDescription","abstract":"

The new topology description.

","parent_name":"TopologyDescriptionChangedEvent"},"Structs/ServerClosedEvent.html#/s:10MongoSwift17ServerClosedEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"ServerClosedEvent"},"Structs/ServerClosedEvent.html#/s:10MongoSwift17ServerClosedEventV12connectionIdAA010ConnectionG0Vvp":{"name":"connectionId","abstract":"

The connection ID (host/port pair) of the server.

","parent_name":"ServerClosedEvent"},"Structs/ServerClosedEvent.html#/s:10MongoSwift17ServerClosedEventV10topologyIdAA06ObjectG0Vvp":{"name":"topologyId","abstract":"

A unique identifier for the topology.

","parent_name":"ServerClosedEvent"},"Structs/ServerOpeningEvent.html#/s:10MongoSwift18ServerOpeningEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"ServerOpeningEvent"},"Structs/ServerOpeningEvent.html#/s:10MongoSwift18ServerOpeningEventV12connectionIdAA010ConnectionG0Vvp":{"name":"connectionId","abstract":"

The connection ID (host/port pair) of the server.

","parent_name":"ServerOpeningEvent"},"Structs/ServerOpeningEvent.html#/s:10MongoSwift18ServerOpeningEventV10topologyIdAA06ObjectG0Vvp":{"name":"topologyId","abstract":"

A unique identifier for the topology.

","parent_name":"ServerOpeningEvent"},"Structs/ServerDescriptionChangedEvent.html#/s:10MongoSwift29ServerDescriptionChangedEventV9eventNameSo014NSNotificationH0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"ServerDescriptionChangedEvent"},"Structs/ServerDescriptionChangedEvent.html#/s:10MongoSwift29ServerDescriptionChangedEventV12connectionIdAA010ConnectionH0Vvp":{"name":"connectionId","abstract":"

The connection ID (host/port pair) of the server.

","parent_name":"ServerDescriptionChangedEvent"},"Structs/ServerDescriptionChangedEvent.html#/s:10MongoSwift29ServerDescriptionChangedEventV10topologyIdAA06ObjectH0Vvp":{"name":"topologyId","abstract":"

A unique identifier for the topology.

","parent_name":"ServerDescriptionChangedEvent"},"Structs/ServerDescriptionChangedEvent.html#/s:10MongoSwift29ServerDescriptionChangedEventV08previousD0AA0cD0Vvp":{"name":"previousDescription","abstract":"

The previous server description.

","parent_name":"ServerDescriptionChangedEvent"},"Structs/ServerDescriptionChangedEvent.html#/s:10MongoSwift29ServerDescriptionChangedEventV03newD0AA0cD0Vvp":{"name":"newDescription","abstract":"

The new server description.

","parent_name":"ServerDescriptionChangedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"CommandFailedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV8durations5Int64Vvp":{"name":"duration","abstract":"

The execution time of the event, in microseconds.

","parent_name":"CommandFailedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV11commandNameSSvp":{"name":"commandName","abstract":"

The command name.

","parent_name":"CommandFailedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV7failureAA0A5Error_pvp":{"name":"failure","abstract":"

The failure, represented as a MongoError.

","parent_name":"CommandFailedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV9requestIds5Int64Vvp":{"name":"requestId","abstract":"

The client generated request id.

","parent_name":"CommandFailedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV11operationIds5Int64Vvp":{"name":"operationId","abstract":"

The driver generated operation id. This is used to link events together such","parent_name":"CommandFailedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV12connectionIdAA010ConnectionG0Vvp":{"name":"connectionId","abstract":"

The connection id for the command.

","parent_name":"CommandFailedEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"CommandSucceededEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV8durations5Int64Vvp":{"name":"duration","abstract":"

The execution time of the event, in microseconds.

","parent_name":"CommandSucceededEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV5replyAA8DocumentVvp":{"name":"reply","abstract":"

The command reply.

","parent_name":"CommandSucceededEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV11commandNameSSvp":{"name":"commandName","abstract":"

The command name.

","parent_name":"CommandSucceededEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV9requestIds5Int64Vvp":{"name":"requestId","abstract":"

The driver generated request id.

","parent_name":"CommandSucceededEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV11operationIds5Int64Vvp":{"name":"operationId","abstract":"

The driver generated operation id. This is used to link events together such","parent_name":"CommandSucceededEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV12connectionIdAA010ConnectionG0Vvp":{"name":"connectionId","abstract":"

The connection id for the command.

","parent_name":"CommandSucceededEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV7commandAA8DocumentVvp":{"name":"command","abstract":"

The command.

","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV12databaseNameSSvp":{"name":"databaseName","abstract":"

The database name.

","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV11commandNameSSvp":{"name":"commandName","abstract":"

The command name.

","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV9requestIds5Int64Vvp":{"name":"requestId","abstract":"

The driver generated request id.

","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV11operationIds5Int64Vvp":{"name":"operationId","abstract":"

The driver generated operation id. This is used to link events together such","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV12connectionIdAA010ConnectionG0Vvp":{"name":"connectionId","abstract":"

The connection id for the command.

","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html":{"name":"CommandStartedEvent","abstract":"

An event published when a command starts. The event is stored under the key event"},"Structs/CommandSucceededEvent.html":{"name":"CommandSucceededEvent","abstract":"

An event published when a command succeeds. The event is stored under the key event"},"Structs/CommandFailedEvent.html":{"name":"CommandFailedEvent","abstract":"

An event published when a command fails. The event is stored under the key event"},"Structs/ServerDescriptionChangedEvent.html":{"name":"ServerDescriptionChangedEvent","abstract":"

Published when a server description changes. This does NOT include changes to the server’s roundTripTime property.

"},"Structs/ServerOpeningEvent.html":{"name":"ServerOpeningEvent","abstract":"

Published when a server is initialized.

"},"Structs/ServerClosedEvent.html":{"name":"ServerClosedEvent","abstract":"

Published when a server is closed.

"},"Structs/TopologyDescriptionChangedEvent.html":{"name":"TopologyDescriptionChangedEvent","abstract":"

Published when a topology description changes.

"},"Structs/TopologyOpeningEvent.html":{"name":"TopologyOpeningEvent","abstract":"

Published when a topology is initialized.

"},"Structs/TopologyClosedEvent.html":{"name":"TopologyClosedEvent","abstract":"

Published when a topology is closed.

"},"Structs/ServerHeartbeatStartedEvent.html":{"name":"ServerHeartbeatStartedEvent","abstract":"

Published when the server monitor’s ismaster command is started - immediately before"},"Structs/ServerHeartbeatSucceededEvent.html":{"name":"ServerHeartbeatSucceededEvent","abstract":"

Published when the server monitor’s ismaster succeeds.

"},"Structs/ServerHeartbeatFailedEvent.html":{"name":"ServerHeartbeatFailedEvent","abstract":"

Published when the server monitor’s ismaster fails, either with an “ok: 0” or a socket exception.

"},"Structs/Binary.html":{"name":"Binary","abstract":"

A struct to represent the BSON Binary type.

"},"Structs/DBPointer.html":{"name":"DBPointer","abstract":"

A struct to represent the deprecated DBPointer type."},"Structs/Decimal128.html":{"name":"Decimal128","abstract":"

A struct to represent the BSON Decimal128 type.

"},"Structs/CodeWithScope.html":{"name":"CodeWithScope","abstract":"

A struct to represent BSON CodeWithScope.

"},"Structs/Code.html":{"name":"Code","abstract":"

A struct to represent the BSON Code type.

"},"Structs/ObjectId.html":{"name":"ObjectId","abstract":"

A struct to represent the BSON ObjectId type.

"},"Structs/RegularExpression.html":{"name":"RegularExpression","abstract":"

A struct to represent a BSON regular expression.

"},"Structs/Symbol.html":{"name":"Symbol","abstract":"

A struct to represent the deprecated Symbol type."},"Structs/Timestamp.html":{"name":"Timestamp","abstract":"

A struct to represent the BSON Timestamp type.

"},"Structs/BSONCoderOptions.html":{"name":"BSONCoderOptions","abstract":"

Options struct used for configuring the coding strategies on BSONEncoder and BSONDecoder.

"},"Structs/Document.html":{"name":"Document","abstract":"

A struct representing the BSON document type.

"},"Structs/ResumeToken.html":{"name":"ResumeToken","abstract":"

A token used for manually resuming a change stream. Pass this to the resumeAfter field of"},"Structs/UpdateDescription.html":{"name":"UpdateDescription","abstract":"

An UpdateDescription containing fields that will be present in the change stream document for"},"Structs/ChangeStreamEvent.html":{"name":"ChangeStreamEvent","abstract":"

The response document type from a ChangeStream.

"},"Structs/ChangeStreamOptions.html":{"name":"ChangeStreamOptions","abstract":"

Options to use when creating a ChangeStream.

"},"Structs/ClientSessionOptions.html":{"name":"ClientSessionOptions","abstract":"

Options to use when creating a ClientSession.

"},"Structs/ClientOptions.html":{"name":"ClientOptions","abstract":"

Options to use when creating a MongoClient.

"},"Structs/DatabaseOptions.html":{"name":"DatabaseOptions","abstract":"

Options to use when retrieving a MongoDatabase from a MongoClient.

"},"Structs/TLSOptions.html":{"name":"TLSOptions","abstract":"

Options used to configure TLS/SSL connections to the database.

"},"Structs/MongoCollection.html":{"name":"MongoCollection","abstract":"

A MongoDB collection.

"},"Structs/DeleteModelOptions.html":{"name":"DeleteModelOptions","abstract":"

Options to use with a WriteModel.deleteOne or WriteModel.deleteMany.

"},"Structs/ReplaceOneModelOptions.html":{"name":"ReplaceOneModelOptions","abstract":"

Options to use with a WriteModel.replaceOne.

"},"Structs/UpdateModelOptions.html":{"name":"UpdateModelOptions","abstract":"

Options to use with a WriteModel.updateOne or WriteModel.updateMany.

"},"Structs/BulkWriteOptions.html":{"name":"BulkWriteOptions","abstract":"

Options to use when performing a bulk write operation on a MongoCollection.

"},"Structs/BulkWriteResult.html":{"name":"BulkWriteResult","abstract":"

The result of a bulk write operation on a MongoCollection.

"},"Structs/FindOneAndDeleteOptions.html":{"name":"FindOneAndDeleteOptions","abstract":"

Options to use when executing a findOneAndDelete command on a MongoCollection.

"},"Structs/FindOneAndReplaceOptions.html":{"name":"FindOneAndReplaceOptions","abstract":"

Options to use when executing a findOneAndReplace command on a MongoCollection.

"},"Structs/FindOneAndUpdateOptions.html":{"name":"FindOneAndUpdateOptions","abstract":"

Options to use when executing a findOneAndUpdate command on a MongoCollection.

"},"Structs/IndexModel.html":{"name":"IndexModel","abstract":"

A struct representing an index on a MongoCollection.

"},"Structs/IndexOptions.html":{"name":"IndexOptions","abstract":"

Options to use when creating an index for a collection.

"},"Structs/AggregateOptions.html":{"name":"AggregateOptions","abstract":"

Options to use when executing an aggregate command on a MongoCollection.

"},"Structs/FindOptions.html":{"name":"FindOptions","abstract":"

Options to use when executing a find command on a MongoCollection.

"},"Structs/InsertOneOptions.html":{"name":"InsertOneOptions","abstract":"

Options to use when executing an insertOne command on a MongoCollection.

"},"Structs/UpdateOptions.html":{"name":"UpdateOptions","abstract":"

Options to use when executing an update command on a MongoCollection.

"},"Structs/ReplaceOptions.html":{"name":"ReplaceOptions","abstract":"

Options to use when executing a replace command on a MongoCollection.

"},"Structs/DeleteOptions.html":{"name":"DeleteOptions","abstract":"

Options to use when executing a delete command on a MongoCollection.

"},"Structs/InsertOneResult.html":{"name":"InsertOneResult","abstract":"

The result of an insertOne command on a MongoCollection.

"},"Structs/InsertManyResult.html":{"name":"InsertManyResult","abstract":"

The result of a multi-document insert operation on a MongoCollection.

"},"Structs/DeleteResult.html":{"name":"DeleteResult","abstract":"

The result of a delete command on a MongoCollection.

"},"Structs/UpdateResult.html":{"name":"UpdateResult","abstract":"

The result of an update operation on a MongoCollection.

"},"Structs/DropCollectionOptions.html":{"name":"DropCollectionOptions","abstract":"

Options to use when dropping a collection.

"},"Structs/CollectionOptions.html":{"name":"CollectionOptions","abstract":"

Options to set on a retrieved MongoCollection.

"},"Structs/DropDatabaseOptions.html":{"name":"DropDatabaseOptions","abstract":"

Options to use when executing a dropDatabase command.

"},"Structs/MongoDatabase.html":{"name":"MongoDatabase","abstract":"

A MongoDB Database.

"},"Structs/WriteError.html":{"name":"WriteError","abstract":"

A struct to represent a single write error not resulting from an executed bulk write.

"},"Structs/WriteConcernError.html":{"name":"WriteConcernError","abstract":"

A struct to represent a write concern error resulting from an executed bulk write.

"},"Structs/BulkWriteError.html":{"name":"BulkWriteError","abstract":"

A struct to represent a write error resulting from an executed bulk write.

"},"Structs/MongoNamespace.html":{"name":"MongoNamespace","abstract":"

Represents a MongoDB namespace for a database or collection.

"},"Structs/CountDocumentsOptions.html":{"name":"CountDocumentsOptions","abstract":"

Options to use when executing a countDocuments command on a MongoCollection.

"},"Structs/CreateCollectionOptions.html":{"name":"CreateCollectionOptions","abstract":"

Options to use when executing a createCollection command on a MongoDatabase.

"},"Structs/CreateIndexOptions.html":{"name":"CreateIndexOptions","abstract":"

Options to use when creating a new index on a MongoCollection.

"},"Structs/DistinctOptions.html":{"name":"DistinctOptions","abstract":"

Options to use when executing a distinct command on a MongoCollection.

"},"Structs/DropIndexOptions.html":{"name":"DropIndexOptions","abstract":"

Options to use when dropping an index from a MongoCollection.

"},"Structs/EstimatedDocumentCountOptions.html":{"name":"EstimatedDocumentCountOptions","abstract":"

Options to use when executing an estimatedDocumentCount command on a MongoCollection.

"},"Structs/CollectionSpecificationInfo.html":{"name":"CollectionSpecificationInfo","abstract":"

Info about the collection that is returned with a listCollections call.

"},"Structs/CollectionSpecification.html":{"name":"CollectionSpecification","abstract":"

Specifications of a collection returned when executing listCollections.

"},"Structs/ListCollectionsOptions.html":{"name":"ListCollectionsOptions","abstract":"

Options to use when executing a listCollections command on a MongoDatabase.

"},"Structs/DatabaseSpecification.html":{"name":"DatabaseSpecification","abstract":"

A struct modeling the information returned from the listDatabases command about a single database.

"},"Structs/RunCommandOptions.html":{"name":"RunCommandOptions","abstract":"

Options to use when running a command against a MongoDatabase.

"},"Structs/ReadConcern.html":{"name":"ReadConcern","abstract":"

A struct to represent a MongoDB read concern.

"},"Structs/ConnectionId.html":{"name":"ConnectionId","abstract":"

A struct representing a server connection, consisting of a host and port.

"},"Structs/ServerDescription.html":{"name":"ServerDescription","abstract":"

A struct describing a mongod or mongos process.

"},"Structs/TopologyDescription.html":{"name":"TopologyDescription","abstract":"

A struct describing the state of a MongoDB deployment: its type (standalone, replica set, or sharded),"},"Structs/WriteConcern.html":{"name":"WriteConcern","abstract":"

A class to represent a MongoDB write concern.

"},"Protocols/CodingStrategyProvider.html#/s:10MongoSwift22CodingStrategyProviderP04datecD0AA04DatecD0OSgvp":{"name":"dateCodingStrategy","abstract":"

Specifies the strategy to use when converting Dates between their BSON representations and their","parent_name":"CodingStrategyProvider"},"Protocols/CodingStrategyProvider.html#/s:10MongoSwift22CodingStrategyProviderP04uuidcD0AA010UUIDCodingD0OSgvp":{"name":"uuidCodingStrategy","abstract":"

Specifies the strategy to use when converting UUIDs between their BSON representations and their","parent_name":"CodingStrategyProvider"},"Protocols/CodingStrategyProvider.html#/s:10MongoSwift22CodingStrategyProviderP04datacD0AA04DatacD0OSgvp":{"name":"dataCodingStrategy","abstract":"

Specifies the strategy to use when converting Datas between their BSON representations and their","parent_name":"CodingStrategyProvider"},"Protocols/MongoCommandEvent.html#/s:10MongoSwift0A12CommandEventP11commandNameSSvp":{"name":"commandName","abstract":"

The command name.

","parent_name":"MongoCommandEvent"},"Protocols/MongoCommandEvent.html#/s:10MongoSwift0A12CommandEventP9requestIds5Int64Vvp":{"name":"requestId","abstract":"

The driver generated request id.

","parent_name":"MongoCommandEvent"},"Protocols/MongoCommandEvent.html#/s:10MongoSwift0A12CommandEventP11operationIds5Int64Vvp":{"name":"operationId","abstract":"

The driver generated operation id. This is used to link events together such","parent_name":"MongoCommandEvent"},"Protocols/MongoCommandEvent.html#/s:10MongoSwift0A12CommandEventP12connectionIdAA010ConnectionF0Vvp":{"name":"connectionId","abstract":"

The connection id for the command.

","parent_name":"MongoCommandEvent"},"Protocols/MongoEvent.html#/s:10MongoSwift0A5EventP9eventNameSo014NSNotificationE0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"MongoEvent"},"Protocols/MongoEvent.html":{"name":"MongoEvent","abstract":"

A protocol for monitoring events to implement, specifying their name.

"},"Protocols/MongoCommandEvent.html":{"name":"MongoCommandEvent","abstract":"

A protocol for command monitoring events to implement, specifying the command name and other shared fields.

"},"Protocols/CodingStrategyProvider.html":{"name":"CodingStrategyProvider","abstract":"

Protocol indicating a set of options can be used to configure BSONEncoder and BSONDecoder.

"},"Protocols.html#/s:10MongoSwift0A5ErrorP":{"name":"MongoError","abstract":"

An empty protocol for encapsulating all errors that this package can throw.

"},"Functions.html#/s:10MongoSwift07cleanupaB0yyF":{"name":"cleanupMongoSwift()","abstract":"

Release all internal memory and other resources allocated by MongoSwift.

"},"Extensions/NSRegularExpression.html#/s:So19NSRegularExpressionC10MongoSwiftE4fromAbC07RegularB0V_tKcfc":{"name":"init(from:)","abstract":"

Initializes a new NSRegularExpression with the pattern and options of the provided RegularExpression.","parent_name":"NSRegularExpression"},"Extensions/UUID.html#/s:10Foundation4UUIDV10MongoSwiftE4fromAcD6BinaryV_tKcfc":{"name":"init(from:)","abstract":"

Initializes a UUID instance from a Binary BSONValue.

","parent_name":"UUID"},"Extensions/Date.html#/s:10Foundation4DateV10MongoSwiftE12msSinceEpochACs5Int64V_tcfc":{"name":"init(msSinceEpoch:)","abstract":"

Initializes a new Date representing the instance msSinceEpoch milliseconds","parent_name":"Date"},"Extensions/Date.html#/s:10Foundation4DateV10MongoSwiftE12msSinceEpochs5Int64Vvp":{"name":"msSinceEpoch","abstract":"

The number of milliseconds after the Unix epoch that this Date occurs.

","parent_name":"Date"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE14commandStartedABvpZ":{"name":"commandStarted","abstract":"

The name corresponding to a CommandStartedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE16commandSucceededABvpZ":{"name":"commandSucceeded","abstract":"

The name corresponding to a CommandSucceededEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE13commandFailedABvpZ":{"name":"commandFailed","abstract":"

The name corresponding to a CommandFailedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE24serverDescriptionChangedABvpZ":{"name":"serverDescriptionChanged","abstract":"

The name corresponding to a ServerDescriptionChangedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE13serverOpeningABvpZ":{"name":"serverOpening","abstract":"

The name corresponding to a ServerOpeningEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE12serverClosedABvpZ":{"name":"serverClosed","abstract":"

The name corresponding to a ServerClosedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE26topologyDescriptionChangedABvpZ":{"name":"topologyDescriptionChanged","abstract":"

The name corresponding to a TopologyDescriptionChangedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE15topologyOpeningABvpZ":{"name":"topologyOpening","abstract":"

The name corresponding to a TopologyOpeningEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE14topologyClosedABvpZ":{"name":"topologyClosed","abstract":"

The name corresponding to a TopologyClosedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE22serverHeartbeatStartedABvpZ":{"name":"serverHeartbeatStarted","abstract":"

The name corresponding to a ServerHeartbeatStartedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE24serverHeartbeatSucceededABvpZ":{"name":"serverHeartbeatSucceeded","abstract":"

The name corresponding to a ServerHeartbeatSucceededEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE21serverHeartbeatFailedABvpZ":{"name":"serverHeartbeatFailed","abstract":"

The name corresponding to a ServerHeartbeatFailedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html":{"name":"Name","abstract":"

Extend Notification.Name to have class properties corresponding to each type","parent_name":"Notification"},"Extensions/Notification.html":{"name":"Notification"},"Extensions/Date.html":{"name":"Date","abstract":"

An extension of Date to represent the BSON Datetime type. Supports millisecond level precision.

"},"Extensions/UUID.html":{"name":"UUID","abstract":"

Extension to allow a UUID to be initialized from a Binary BSONValue.

"},"Extensions/NSRegularExpression.html":{"name":"NSRegularExpression","abstract":"

An extension of NSRegularExpression to allow it to be initialized from a RegularExpression BSONValue.

"},"Enums/CollectionType.html#/s:10MongoSwift14CollectionTypeO10collectionyA2CmF":{"name":"collection","abstract":"

Specifies that the data store returned is a collection.

","parent_name":"CollectionType"},"Enums/CollectionType.html#/s:10MongoSwift14CollectionTypeO4viewyA2CmF":{"name":"view","abstract":"

Specifies that the data store returned is a view.

","parent_name":"CollectionType"},"Enums/CollectionType.html#/s:10MongoSwift14CollectionTypeO5otheryACSScACmF":{"name":"other(_:)","abstract":"

For an unknown value. For forwards compatibility, no error will be thrown when an unknown value is provided.

","parent_name":"CollectionType"},"Enums/CollectionType.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"CollectionType"},"Enums/CollectionType.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"CollectionType"},"Enums/RuntimeError.html#/s:10MongoSwift12RuntimeErrorO08internalD0yACSS_tcACmF":{"name":"internalError(message:)","abstract":"

Thrown when the driver encounters a internal error not caused by the user. This is usually indicative of a bug","parent_name":"RuntimeError"},"Enums/RuntimeError.html#/s:10MongoSwift12RuntimeErrorO010connectionD0yACSS_SaySSGSgtcACmF":{"name":"connectionError(message:errorLabels:)","abstract":"

Thrown when encountering a connection or socket related error.","parent_name":"RuntimeError"},"Enums/RuntimeError.html#/s:10MongoSwift12RuntimeErrorO014authenticationD0yACSS_tcACmF":{"name":"authenticationError(message:)","abstract":"

Thrown when encountering an authentication related error (e.g. invalid credentials).

","parent_name":"RuntimeError"},"Enums/RuntimeError.html#/s:10MongoSwift12RuntimeErrorO013compatibilityD0yACSS_tcACmF":{"name":"compatibilityError(message:)","abstract":"

Thrown when trying to use a feature that the deployment does not support.

","parent_name":"RuntimeError"},"Enums/RuntimeError.html#/s:10Foundation14LocalizedErrorP16errorDescriptionSSSgvp":{"name":"errorDescription","parent_name":"RuntimeError"},"Enums/UserError.html#/s:10MongoSwift9UserErrorO05logicD0yACSS_tcACmF":{"name":"logicError(message:)","abstract":"

Thrown when the driver is incorrectly used.

","parent_name":"UserError"},"Enums/UserError.html#/s:10MongoSwift9UserErrorO015invalidArgumentD0yACSS_tcACmF":{"name":"invalidArgumentError(message:)","abstract":"

Thrown when the user passes in invalid arguments to a driver method.

","parent_name":"UserError"},"Enums/UserError.html#/s:10Foundation14LocalizedErrorP16errorDescriptionSSSgvp":{"name":"errorDescription","parent_name":"UserError"},"Enums/ServerError.html#/s:10MongoSwift11ServerErrorO07commandD0yACSi_S2SSaySSGSgtcACmF":{"name":"commandError(code:codeName:message:errorLabels:)","abstract":"

Thrown when commands experience errors on the server that prevent execution.

","parent_name":"ServerError"},"Enums/ServerError.html#/s:10MongoSwift11ServerErrorO05writeD0yAcA05WriteD0VSg_AA0f7ConcernD0VSgSaySSGSgtcACmF":{"name":"writeError(writeError:writeConcernError:errorLabels:)","abstract":"

Thrown when a single write command fails on the server.","parent_name":"ServerError"},"Enums/ServerError.html#/s:10MongoSwift11ServerErrorO09bulkWriteD0yACSayAA04BulkfD0VGSg_AA0f7ConcernD0VSgs0D0_pSgAA0gF6ResultVSgSaySSGSgtcACmF":{"name":"bulkWriteError(writeErrors:writeConcernError:otherError:result:errorLabels:)","abstract":"

Thrown when the server returns errors as part of an executed bulk write.","parent_name":"ServerError"},"Enums/ServerError.html#/s:10Foundation14LocalizedErrorP16errorDescriptionSSSgvp":{"name":"errorDescription","parent_name":"ServerError"},"Enums/CursorType.html#/s:10MongoSwift10CursorTypeO11nonTailableyA2CmF":{"name":"nonTailable","abstract":"

The default value. A vast majority of cursors will be of this type.

","parent_name":"CursorType"},"Enums/CursorType.html#/s:10MongoSwift10CursorTypeO8tailableyA2CmF":{"name":"tailable","abstract":"

Tailable means the cursor is not closed when the last data is retrieved.","parent_name":"CursorType"},"Enums/CursorType.html#/s:10MongoSwift10CursorTypeO13tailableAwaityA2CmF":{"name":"tailableAwait","abstract":"

Combines the tailable option with awaitData, as defined below.

","parent_name":"CursorType"},"Enums/Hint.html#/s:10MongoSwift4HintO9indexNameyACSScACmF":{"name":"indexName(_:)","abstract":"

Specifies an index to use by its name.

","parent_name":"Hint"},"Enums/Hint.html#/s:10MongoSwift4HintO9indexSpecyAcA8DocumentVcACmF":{"name":"indexSpec(_:)","abstract":"

Specifies an index to use by a specification Document containing the index key(s).

","parent_name":"Hint"},"Enums/Hint.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Hint"},"Enums/Hint.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Hint"},"Enums/ReturnDocument.html#/s:10MongoSwift14ReturnDocumentO6beforeyA2CmF":{"name":"before","abstract":"

Indicates to return the document before the update, replacement, or insert occurred.

","parent_name":"ReturnDocument"},"Enums/ReturnDocument.html#/s:10MongoSwift14ReturnDocumentO5afteryA2CmF":{"name":"after","abstract":"

Indicates to return the document after the update, replacement, or insert occurred.

","parent_name":"ReturnDocument"},"Enums/WriteModel.html#/s:10MongoSwift10WriteModelO9deleteOneyACyxGAA8DocumentV_AA06DeleteD7OptionsVSgtcAEmSeRzSERzlF":{"name":"deleteOne(_:options:)","abstract":"

A deleteOne.","parent_name":"WriteModel"},"Enums/WriteModel.html#/s:10MongoSwift10WriteModelO10deleteManyyACyxGAA8DocumentV_AA06DeleteD7OptionsVSgtcAEmSeRzSERzlF":{"name":"deleteMany(_:options:)","abstract":"

A deleteMany.","parent_name":"WriteModel"},"Enums/WriteModel.html#/s:10MongoSwift10WriteModelO9insertOneyACyxGxcAEmSeRzSERzlF":{"name":"insertOne(_:)","abstract":"

An insertOne.","parent_name":"WriteModel"},"Enums/WriteModel.html#/s:10MongoSwift10WriteModelO10replaceOneyACyxGAA8DocumentV_xAA07ReplacefD7OptionsVSgtcAEmSeRzSERzlF":{"name":"replaceOne(filter:replacement:options:)","abstract":"

A replaceOne.","parent_name":"WriteModel"},"Enums/WriteModel.html#/s:10MongoSwift10WriteModelO9updateOneyACyxGAA8DocumentV_AgA06UpdateD7OptionsVSgtcAEmSeRzSERzlF":{"name":"updateOne(filter:update:options:)","abstract":"

An updateOne.","parent_name":"WriteModel"},"Enums/WriteModel.html#/s:10MongoSwift10WriteModelO10updateManyyACyxGAA8DocumentV_AgA06UpdateD7OptionsVSgtcAEmSeRzSERzlF":{"name":"updateMany(filter:update:options:)","abstract":"

An updateMany.","parent_name":"WriteModel"},"Enums/FullDocument.html#/s:10MongoSwift12FullDocumentO12updateLookupyA2CmF":{"name":"updateLookup","abstract":"

Specifies that the fullDocument field of an update event will contain a copy of the entire document that","parent_name":"FullDocument"},"Enums/FullDocument.html#/s:10MongoSwift12FullDocumentO5otheryACSScACmF":{"name":"other(_:)","abstract":"

For an unknown value. For forwards compatibility, no error will be thrown when an unknown value is provided.

","parent_name":"FullDocument"},"Enums/FullDocument.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"FullDocument"},"Enums/FullDocument.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"FullDocument"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO6insertyA2CmF":{"name":"insert","abstract":"

Specifies an operation of type insert.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO6updateyA2CmF":{"name":"update","abstract":"

Specifies an operation of type update.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO7replaceyA2CmF":{"name":"replace","abstract":"

Specifies an operation of type replace.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO6deleteyA2CmF":{"name":"delete","abstract":"

Specifies an operation of type delete.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO10invalidateyA2CmF":{"name":"invalidate","abstract":"

Specifies an operation of type invalidate.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO4dropyA2CmF":{"name":"drop","abstract":"

Specifies an operation of type drop.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO12dropDatabaseyA2CmF":{"name":"dropDatabase","abstract":"

Specifies an operation of type dropDatabase.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO6renameyA2CmF":{"name":"rename","abstract":"

Specifies an operation of type rename.

","parent_name":"OperationType"},"Enums/DataCodingStrategy.html#/s:SY8RawValueQa":{"name":"RawValue","parent_name":"DataCodingStrategy"},"Enums/DataCodingStrategy.html#/s:10MongoSwift18DataCodingStrategyO010deferredToC0yA2CmF":{"name":"deferredToData","abstract":"

Encode/decode the Data by deferring to its default encoding implementations.

","parent_name":"DataCodingStrategy"},"Enums/DataCodingStrategy.html#/s:10MongoSwift18DataCodingStrategyO6binaryyA2CmF":{"name":"binary","abstract":"

Encode/decode the Data to/from a BSON binary type (default).

","parent_name":"DataCodingStrategy"},"Enums/DataCodingStrategy.html#/s:10MongoSwift18DataCodingStrategyO6base64yA2CmF":{"name":"base64","abstract":"

Encode the Data to/from a base64 encoded string.

","parent_name":"DataCodingStrategy"},"Enums/DataCodingStrategy.html#/s:10MongoSwift18DataCodingStrategyO6customyACy10Foundation0C0V_s7Encoder_ptKc_AGs7Decoder_pKctcACmF":{"name":"custom(encodeFunc:decodeFunc:)","abstract":"

Encode the Data by using the given encodeFunc. Decode the Data by using the given decodeFunc.","parent_name":"DataCodingStrategy"},"Enums/DataCodingStrategy.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"DataCodingStrategy"},"Enums/DataCodingStrategy.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"DataCodingStrategy"},"Enums/UUIDCodingStrategy.html#/s:SY8RawValueQa":{"name":"RawValue","parent_name":"UUIDCodingStrategy"},"Enums/UUIDCodingStrategy.html#/s:10MongoSwift18UUIDCodingStrategyO14deferredToUUIDyA2CmF":{"name":"deferredToUUID","abstract":"

Encode/decode the UUID by deferring to its default encoding/decoding implementations.

","parent_name":"UUIDCodingStrategy"},"Enums/UUIDCodingStrategy.html#/s:10MongoSwift18UUIDCodingStrategyO6binaryyA2CmF":{"name":"binary","abstract":"

Encode/decode the UUID to/from a BSON binary type (default).

","parent_name":"UUIDCodingStrategy"},"Enums/UUIDCodingStrategy.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"UUIDCodingStrategy"},"Enums/UUIDCodingStrategy.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"UUIDCodingStrategy"},"Enums/DateCodingStrategy.html#/s:SY8RawValueQa":{"name":"RawValue","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO010deferredToC0yA2CmF":{"name":"deferredToDate","abstract":"

Encode/decode the Date by deferring to its default encoding/decoding implementations.

","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO04bsonC4TimeyA2CmF":{"name":"bsonDateTime","abstract":"

Encode/decode the Date to/from a BSON datetime object (default).

","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO21millisecondsSince1970yA2CmF":{"name":"millisecondsSince1970","abstract":"

Encode/decode the Date to/from a 64-bit integer counting the number of milliseconds since January 1, 1970.

","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO16secondsSince1970yA2CmF":{"name":"secondsSince1970","abstract":"

Encode/decode the Date to/from a BSON double counting the number of seconds since January 1, 1970.

","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO7iso8601yA2CmF":{"name":"iso8601","abstract":"

Encode/decode the Date to/from an ISO-8601-formatted string (in RFC 339 format).

","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO9formattedyACSo15NSDateFormatterCcACmF":{"name":"formatted(_:)","abstract":"

Encode/decode the Date to/from a string formatted by the given formatter.

","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO6customyACy10Foundation0C0V_s7Encoder_ptKc_AGs7Decoder_pKctcACmF":{"name":"custom(encodeFunc:decodeFunc:)","abstract":"

Encode the Date by using the given encodeFunc. Decode the Date by using the given decodeFunc.","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"DateCodingStrategy"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO7invalidyA2CmF":{"name":"invalid","abstract":"

An invalid type

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO6doubleyA2CmF":{"name":"double","abstract":"

64-bit binary floating point

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO6stringyA2CmF":{"name":"string","abstract":"

UTF-8 string

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO8documentyA2CmF":{"name":"document","abstract":"

BSON document

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO5arrayyA2CmF":{"name":"array","abstract":"

Array

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO6binaryyA2CmF":{"name":"binary","abstract":"

Binary data

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO9undefinedyA2CmF":{"name":"undefined","abstract":"

Undefined value - deprecated

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO8objectIdyA2CmF":{"name":"objectId","abstract":"

A MongoDB ObjectId.

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO4boolyA2CmF":{"name":"bool","abstract":"

A boolean

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO8datetimeyA2CmF":{"name":"datetime","abstract":"

UTC datetime, stored as UTC milliseconds since the Unix epoch

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO4nullyA2CmF":{"name":"null","abstract":"

Null value

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO5regexyA2CmF":{"name":"regex","abstract":"

A regular expression

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO9dbPointeryA2CmF":{"name":"dbPointer","abstract":"

A database pointer - deprecated

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO4codeyA2CmF":{"name":"code","abstract":"

Javascript code

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO6symbolyA2CmF":{"name":"symbol","abstract":"

A symbol - deprecated

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO13codeWithScopeyA2CmF":{"name":"codeWithScope","abstract":"

JavaScript code w/ scope

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO5int32yA2CmF":{"name":"int32","abstract":"

32-bit integer

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO9timestampyA2CmF":{"name":"timestamp","abstract":"

Special internal type used by MongoDB replication and sharding

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO5int64yA2CmF":{"name":"int64","abstract":"

64-bit integer

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO10decimal128yA2CmF":{"name":"decimal128","abstract":"

128-bit decimal floating point

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO6minKeyyA2CmF":{"name":"minKey","abstract":"

Special type which compares lower than all other possible BSON element values

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO6maxKeyyA2CmF":{"name":"maxKey","abstract":"

Special type which compares higher than all other possible BSON element values

","parent_name":"BSONType"},"Enums/BSON.html#/s:10MongoSwift4BSONO6doubleyACSdcACmF":{"name":"double(_:)","abstract":"

A BSON double.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO6stringyACSScACmF":{"name":"string(_:)","abstract":"

A BSON string.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO8documentyAcA8DocumentVcACmF":{"name":"document(_:)","abstract":"

A BSON document.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO5arrayyACSayACGcACmF":{"name":"array(_:)","abstract":"

A BSON array.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO6binaryyAcA6BinaryVcACmF":{"name":"binary(_:)","abstract":"

A BSON binary.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO9undefinedyA2CmF":{"name":"undefined","abstract":"

A BSON undefined.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO8objectIdyAcA06ObjectE0VcACmF":{"name":"objectId(_:)","abstract":"

A BSON ObjectId.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO4boolyACSbcACmF":{"name":"bool(_:)","abstract":"

A BSON boolean.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO8datetimeyAC10Foundation4DateVcACmF":{"name":"datetime(_:)","abstract":"

A BSON UTC datetime.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO4nullyA2CmF":{"name":"null","abstract":"

A BSON null.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO5regexyAcA17RegularExpressionVcACmF":{"name":"regex(_:)","abstract":"

A BSON regular expression.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO9dbPointeryAcA9DBPointerVcACmF":{"name":"dbPointer(_:)","abstract":"

A BSON dbPointer.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO6symbolyAcA6SymbolVcACmF":{"name":"symbol(_:)","abstract":"

A BSON symbol.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO4codeyAcA4CodeVcACmF":{"name":"code(_:)","abstract":"

A BSON JavaScript code.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO13codeWithScopeyAcA04CodeeF0VcACmF":{"name":"codeWithScope(_:)","abstract":"

A BSON JavaScript code with scope.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO5int32yACs5Int32VcACmF":{"name":"int32(_:)","abstract":"

A BSON int32.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO9timestampyAcA9TimestampVcACmF":{"name":"timestamp(_:)","abstract":"

A BSON timestamp.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO5int64yACs5Int64VcACmF":{"name":"int64(_:)","abstract":"

A BSON int64.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO10decimal128yAcA10Decimal128VcACmF":{"name":"decimal128(_:)","abstract":"

A BSON Decimal128.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO6minKeyyA2CmF":{"name":"minKey","abstract":"

A BSON minKey.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO6maxKeyyA2CmF":{"name":"maxKey","abstract":"

A BSON maxKey.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONOyACSicfc":{"name":"init(_:)","abstract":"

Initialize a BSON from an integer. On 64-bit systems, this will result in an .int64. On 32-bit systems,","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO4typeAA8BSONTypeOvp":{"name":"type","abstract":"

Get the BSONType of this BSON.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO10int32Values5Int32VSgvp":{"name":"int32Value","abstract":"

If this BSON is an .int32, return it as an Int32. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO10regexValueAA17RegularExpressionVSgvp":{"name":"regexValue","abstract":"

If this BSON is a .regex, return it as a RegularExpression. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO18codeWithScopeValueAA04CodeeF0VSgvp":{"name":"codeWithScopeValue","abstract":"

If this BSON is a .codeWithScope, return it as a CodeWithScope. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO9codeValueAA4CodeVSgvp":{"name":"codeValue","abstract":"

If this BSON is a .code, return it as a Code. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO10int64Values5Int64VSgvp":{"name":"int64Value","abstract":"

If this BSON is an .int64, return it as an Int64. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO13objectIdValueAA06ObjectE0VSgvp":{"name":"objectIdValue","abstract":"

If this BSON is an .objectId, return it as an ObjectId. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO9dateValue10Foundation4DateVSgvp":{"name":"dateValue","abstract":"

If this BSON is a .date, return it as a Date. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO10arrayValueSayACGSgvp":{"name":"arrayValue","abstract":"

If this BSON is an .array, return it as an [BSON]. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO11stringValueSSSgvp":{"name":"stringValue","abstract":"

If this BSON is a .string, return it as a String. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO13documentValueAA8DocumentVSgvp":{"name":"documentValue","abstract":"

If this BSON is a .document, return it as a Document. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO9boolValueSbSgvp":{"name":"boolValue","abstract":"

If this BSON is a .bool, return it as an Bool. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO11binaryValueAA6BinaryVSgvp":{"name":"binaryValue","abstract":"

If this BSON is a .binary, return it as a Binary. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO11doubleValueSdSgvp":{"name":"doubleValue","abstract":"

If this BSON is a .double, return it as a Double. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO15decimal128ValueAA10Decimal128VSgvp":{"name":"decimal128Value","abstract":"

If this BSON is a .decimal128, return it as a Decimal128. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO11symbolValueAA6SymbolVSgvp":{"name":"symbolValue","abstract":"

If this BSON is a .symbol, return it as a Symbol. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO14dbPointerValueAA9DBPointerVSgvp":{"name":"dbPointerValue","abstract":"

If this BSON is a .dbPointer, return it as a DBPointer. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO14timestampValueAA9TimestampVSgvp":{"name":"timestampValue","abstract":"

If this BSON is a .timestamp, return it as a Timestamp. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO5asIntSiSgyF":{"name":"asInt()","abstract":"

Return this BSON as an Int if possible.","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO7asInt32s0E0VSgyF":{"name":"asInt32()","abstract":"

Return this BSON as an Int32 if possible.","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO7asInt64s0E0VSgyF":{"name":"asInt64()","abstract":"

Return this BSON as an Int64 if possible.","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO8asDoubleSdSgyF":{"name":"asDouble()","abstract":"

Return this BSON as a Double if possible.","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO12asDecimal128AA0E0VSgyF":{"name":"asDecimal128()","abstract":"

Return this BSON as a Decimal128 if possible.","parent_name":"BSON"},"Enums/BSON.html#/s:s26ExpressibleByStringLiteralP06stringD0x0cD4TypeQz_tcfc":{"name":"init(stringLiteral:)","parent_name":"BSON"},"Enums/BSON.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"BSON"},"Enums/BSON.html#/s:s25ExpressibleByFloatLiteralP05floatD0x0cD4TypeQz_tcfc":{"name":"init(floatLiteral:)","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO14integerLiteralACSi_tcfc":{"name":"init(integerLiteral:)","abstract":"

Initialize a BSON from an integer. On 64-bit systems, this will result in an .int64. On 32-bit systems,","parent_name":"BSON"},"Enums/BSON.html#/s:s30ExpressibleByDictionaryLiteralP010dictionaryD0x3KeyQz_5ValueQztd_tcfc":{"name":"init(dictionaryLiteral:)","parent_name":"BSON"},"Enums/BSON.html#/s:s25ExpressibleByArrayLiteralP05arrayD0x0cD7ElementQzd_tcfc":{"name":"init(arrayLiteral:)","parent_name":"BSON"},"Enums/BSON.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BSON"},"Enums/BSON.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"BSON"},"Enums/BSON.html":{"name":"BSON","abstract":"

Enum representing a BSON value.

"},"Enums/BSONType.html":{"name":"BSONType","abstract":"

The possible types of BSON values and their corresponding integer values.

"},"Enums/DateCodingStrategy.html":{"name":"DateCodingStrategy","abstract":"

Enum representing the various encoding/decoding strategy pairs for Dates."},"Enums/UUIDCodingStrategy.html":{"name":"UUIDCodingStrategy","abstract":"

Enum representing the various encoding/decoding strategy pairs for Dates."},"Enums/DataCodingStrategy.html":{"name":"DataCodingStrategy","abstract":"

Enum representing the various encoding/decoding strategy pairs for Dates."},"Enums/OperationType.html":{"name":"OperationType","abstract":"

An enum representing the type of operation for this change event.

"},"Enums/FullDocument.html":{"name":"FullDocument","abstract":"

Describes the modes for configuring the fullDocument field of a change stream document.

"},"Enums/WriteModel.html":{"name":"WriteModel","abstract":"

Enum encompassing operations that can be run as part of a bulkWrite.

"},"Enums/ReturnDocument.html":{"name":"ReturnDocument","abstract":"

Indicates which document to return in a find and modify operation.

"},"Enums/Hint.html":{"name":"Hint","abstract":"

An index to “hint” or force MongoDB to use when performing a query.

"},"Enums/CursorType.html":{"name":"CursorType","abstract":"

The possible types of MongoCursor or MongoCursor an operation can return.

"},"Enums/ServerError.html":{"name":"ServerError","abstract":"

The possible errors corresponding to types of errors encountered in the MongoDB server."},"Enums/UserError.html":{"name":"UserError","abstract":"

The possible errors caused by improper use of the driver by the user.

"},"Enums/RuntimeError.html":{"name":"RuntimeError","abstract":"

The possible errors that can occur unexpectedly during runtime.

"},"Enums/CollectionType.html":{"name":"CollectionType","abstract":"

Describes the type of data store returned when executing listCollections.

"},"Classes/ReadPreference/Mode.html#/s:10MongoSwift14ReadPreferenceC4ModeO7primaryyA2EmF":{"name":"primary","abstract":"

Default mode. All operations read from the current replica set primary.

","parent_name":"Mode"},"Classes/ReadPreference/Mode.html#/s:10MongoSwift14ReadPreferenceC4ModeO16primaryPreferredyA2EmF":{"name":"primaryPreferred","abstract":"

In most situations, operations read from the primary but if it is","parent_name":"Mode"},"Classes/ReadPreference/Mode.html#/s:10MongoSwift14ReadPreferenceC4ModeO9secondaryyA2EmF":{"name":"secondary","abstract":"

All operations read from the secondary members of the replica set.

","parent_name":"Mode"},"Classes/ReadPreference/Mode.html#/s:10MongoSwift14ReadPreferenceC4ModeO18secondaryPreferredyA2EmF":{"name":"secondaryPreferred","abstract":"

In most situations, operations read from secondary members but if no","parent_name":"Mode"},"Classes/ReadPreference/Mode.html#/s:10MongoSwift14ReadPreferenceC4ModeO7nearestyA2EmF":{"name":"nearest","abstract":"

Operations read from member of the replica set with the least network","parent_name":"Mode"},"Classes/ReadPreference/Mode.html":{"name":"Mode","abstract":"

An enumeration of possible ReadPreference modes.

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceC4modeAC4ModeOvp":{"name":"mode","abstract":"

The mode of this ReadPreference

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceC7tagSetsSayAA8DocumentVGvp":{"name":"tagSets","abstract":"

The tags of this ReadPreference

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceC19maxStalenessSecondss5Int64VSgvp":{"name":"maxStalenessSeconds","abstract":"

The maxStalenessSeconds of this ReadPreference

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceCyA2C4ModeOcfc":{"name":"init(_:)","abstract":"

Initializes a ReadPreference from a Mode.

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceCACycfc":{"name":"init()","abstract":"

Initializes a new ReadPreference with the default mode (primary).

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceC_7tagSets19maxStalenessSecondsA2C4ModeO_SayAA8DocumentVGSgs5Int64VSgtKcfc":{"name":"init(_:tagSets:maxStalenessSeconds:)","abstract":"

Initializes a ReadPreference.

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceC4fromA2C_tcfc":{"name":"init(from:)","abstract":"

Initializes a new ReadPreference by copying an existing ReadPreference.

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"ReadPreference"},"Classes/MongoCursor.html#/s:10MongoSwift0A6CursorC5errors5Error_pSgvp":{"name":"error","abstract":"

The error that occurred while iterating this cursor, if one exists. This should be used to check for errors","parent_name":"MongoCursor"},"Classes/MongoCursor.html#/s:10MongoSwift0A6CursorC7isAliveSbvp":{"name":"isAlive","abstract":"

Indicates whether this cursor has the potential to return more data. This property is mainly useful for","parent_name":"MongoCursor"},"Classes/MongoCursor.html#/s:10MongoSwift0A6CursorC11nextOrErrorxSgyKF":{"name":"nextOrError()","abstract":"

Returns the next Document in this cursor or nil, or throws an error if one occurs – compared to next(),","parent_name":"MongoCursor"},"Classes/MongoCursor.html#/s:10MongoSwift0A6CursorC4nextxSgyF":{"name":"next()","abstract":"

Returns the next Document in this cursor, or nil. After this function returns nil, the caller should use","parent_name":"MongoCursor"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC7encoderAA11BSONEncoderCvp":{"name":"encoder","abstract":"

Encoder whose options are inherited by databases derived from this client.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC7decoderAA11BSONDecoderCvp":{"name":"decoder","abstract":"

Decoder whose options are inherited by databases derived from this client.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC11readConcernAA04ReadE0VSgvp":{"name":"readConcern","abstract":"

The read concern set on this client, or nil if one is not set.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC14readPreferenceAA04ReadE0Cvp":{"name":"readPreference","abstract":"

The ReadPreference set on this client.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC12writeConcernAA05WriteE0VSgvp":{"name":"writeConcern","abstract":"

The write concern set on this client, or nil if one is not set.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC_7optionsACSS_AA0C7OptionsVSgtKcfc":{"name":"init(_:options:)","abstract":"

Create a new client connection to a MongoDB server. For options that included in both the connection string URI","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC12startSession7optionsAA0cE0CAA0cE7OptionsVSg_tKF":{"name":"startSession(options:)","abstract":"

Starts a new ClientSession with the provided options.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC11withSession7options_xAA0cE7OptionsVSg_xAA0cE0CKXEtKlF":{"name":"withSession(options:_:)","abstract":"

Starts a new ClientSession with the provided options and passes it to the provided closure.","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC13listDatabases_7sessionSayAA21DatabaseSpecificationVGAA8DocumentVSg_AA0C7SessionCSgtKF":{"name":"listDatabases(_:session:)","abstract":"

Run the listDatabases command.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC04listA9Databases_7sessionSayAA0A8DatabaseVGAA8DocumentVSg_AA0C7SessionCSgtKF":{"name":"listMongoDatabases(_:session:)","abstract":"

Get a list of MongoDatabases.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC17listDatabaseNames_7sessionSaySSGAA8DocumentVSg_AA0C7SessionCSgtKF":{"name":"listDatabaseNames(_:session:)","abstract":"

Get a list of names of databases.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC2db_7optionsAA0A8DatabaseVSS_AA0F7OptionsVSgtF":{"name":"db(_:options:)","abstract":"

Gets a MongoDatabase instance for the given database name. If an option is not specified in the optional","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC5watch_7options7sessionAA12ChangeStreamCyAA0gH5EventVyAA8DocumentVGGSayALG_AA0gH7OptionsVSgAA0C7SessionCSgtKF":{"name":"watch(_:options:session:)","abstract":"

Starts a ChangeStream on a MongoClient. Allows the client to observe all changes in a cluster -","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC5watch_7options7session20withFullDocumentTypeAA12ChangeStreamCyAA0kL5EventVyxGGSayAA0I0VG_AA0kL7OptionsVSgAA0C7SessionCSgxmtKSeRzSERzlF":{"name":"watch(_:options:session:withFullDocumentType:)","abstract":"

Starts a ChangeStream on a MongoClient. Allows the client to observe all changes in a cluster -","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC5watch_7options7session13withEventTypeAA12ChangeStreamCyxGSayAA8DocumentVG_AA0jK7OptionsVSgAA0C7SessionCSgxmtKSeRzSERzlF":{"name":"watch(_:options:session:withEventType:)","abstract":"

Starts a ChangeStream on a MongoClient. Allows the client to observe all changes in a cluster -","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"MongoClient"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC6clientAA0aC0Cvp":{"name":"client","abstract":"

The client used to start this session.

","parent_name":"ClientSession"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC2idAA8DocumentVvp":{"name":"id","abstract":"

The session ID of this session.

","parent_name":"ClientSession"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC11clusterTimeAA8DocumentVSgvp":{"name":"clusterTime","abstract":"

The most recent cluster time seen by this session. This value will be nil if either of the following are true:

","parent_name":"ClientSession"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC13operationTimeAA9TimestampVSgvp":{"name":"operationTime","abstract":"

The operation time of the most recent operation performed using this session. This value will be nil if either","parent_name":"ClientSession"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC7optionsAA0cD7OptionsVSgvp":{"name":"options","abstract":"

The options used to start this session.

","parent_name":"ClientSession"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC18advanceClusterTime2toyAA8DocumentV_tF":{"name":"advanceClusterTime(to:)","abstract":"

Advances the clusterTime for this session to the given time, if it is greater than the current clusterTime. If","parent_name":"ClientSession"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC20advanceOperationTime2toyAA9TimestampV_tF":{"name":"advanceOperationTime(to:)","abstract":"

Advances the operationTime for this session to the given time if it is greater than the current operationTime.","parent_name":"ClientSession"},"Classes/ChangeStream.html#/s:10MongoSwift12ChangeStreamC11resumeTokenAA06ResumeF0VSgvp":{"name":"resumeToken","abstract":"

A ResumeToken associated with the most recent event seen by the change stream.

","parent_name":"ChangeStream"},"Classes/ChangeStream.html#/s:10MongoSwift12ChangeStreamC5errors5Error_pSgvp":{"name":"error","abstract":"

The error that occurred while iterating the change stream, if one exists. This should be used to check","parent_name":"ChangeStream"},"Classes/ChangeStream.html#/s:10MongoSwift12ChangeStreamC4nextxSgyF":{"name":"next()","abstract":"

Returns the next T in the change stream or nil if there is no next value. Will block for a maximum of","parent_name":"ChangeStream"},"Classes/ChangeStream.html#/s:10MongoSwift12ChangeStreamC11nextOrErrorxSgyKF":{"name":"nextOrError()","abstract":"

Returns the next T in this change stream or nil, or throws an error if one occurs – compared to next(),","parent_name":"ChangeStream"},"Classes/DocumentIterator.html#/s:10MongoSwift16DocumentIteratorC4nextSS3key_AA4BSONO5valuetSgyF":{"name":"next()","abstract":"

Returns the next value in the sequence, or nil if the iterator is exhausted.

","parent_name":"DocumentIterator"},"Classes/BSONEncoder/DataEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DataEncodingStrategyO010deferredToD0yA2EmF":{"name":"deferredToData","abstract":"

Encode the Data by deferring to its default encoding implementation.

","parent_name":"DataEncodingStrategy"},"Classes/BSONEncoder/DataEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DataEncodingStrategyO6binaryyA2EmF":{"name":"binary","abstract":"

Encode the Data as a BSON binary type (default).

","parent_name":"DataEncodingStrategy"},"Classes/BSONEncoder/DataEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DataEncodingStrategyO6base64yA2EmF":{"name":"base64","abstract":"

Encode the Data as a base64 encoded string.

","parent_name":"DataEncodingStrategy"},"Classes/BSONEncoder/DataEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DataEncodingStrategyO6customyAEy10Foundation0D0V_s7Encoder_ptKccAEmF":{"name":"custom(_:)","abstract":"

Encode the Data by using the given closure.","parent_name":"DataEncodingStrategy"},"Classes/BSONEncoder/UUIDEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20UUIDEncodingStrategyO14deferredToUUIDyA2EmF":{"name":"deferredToUUID","abstract":"

Encode the UUID by deferring to its default encoding implementation.

","parent_name":"UUIDEncodingStrategy"},"Classes/BSONEncoder/UUIDEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20UUIDEncodingStrategyO6binaryyA2EmF":{"name":"binary","abstract":"

Encode the UUID as a BSON binary type (default).

","parent_name":"UUIDEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO010deferredToD0yA2EmF":{"name":"deferredToDate","abstract":"

Encode the Date by deferring to its default encoding implementation.

","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO04bsonD4TimeyA2EmF":{"name":"bsonDateTime","abstract":"

Encode the Date as a BSON datetime object (default).

","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO21millisecondsSince1970yA2EmF":{"name":"millisecondsSince1970","abstract":"

Encode the Date as a 64-bit integer counting the number of milliseconds since January 1, 1970.

","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO16secondsSince1970yA2EmF":{"name":"secondsSince1970","abstract":"

Encode the Date as a BSON double counting the number of seconds since January 1, 1970.

","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO7iso8601yA2EmF":{"name":"iso8601","abstract":"

Encode the Date as an ISO-8601-formatted string (in RFC 339 format).

","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO9formattedyAESo15NSDateFormatterCcAEmF":{"name":"formatted(_:)","abstract":"

Encode the Date as a string formatted by the given formatter.

","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO6customyAEy10Foundation0D0V_s7Encoder_ptKccAEmF":{"name":"custom(_:)","abstract":"

Encode the Date by using the given closure.","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html":{"name":"DateEncodingStrategy","abstract":"

Enum representing the various strategies for encoding Dates.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder/UUIDEncodingStrategy.html":{"name":"UUIDEncodingStrategy","abstract":"

Enum representing the various strategies for encoding UUIDs.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder/DataEncodingStrategy.html":{"name":"DataEncodingStrategy","abstract":"

Enum representing the various strategies for encoding Datas.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC20dateEncodingStrategyAC04DateeF0Ovp":{"name":"dateEncodingStrategy","abstract":"

The strategy to use for encoding Dates with this instance.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC20uuidEncodingStrategyAC012UUIDEncodingF0Ovp":{"name":"uuidEncodingStrategy","abstract":"

The strategy to use for encoding UUIDs with this instance.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC20dataEncodingStrategyAC04DataeF0Ovp":{"name":"dataEncodingStrategy","abstract":"

The strategy to use for encoding Datas with this instance.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC8userInfoSDys010CodingUserE3KeyVypGvp":{"name":"userInfo","abstract":"

Contextual user-provided information for use during encoding.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC7optionsAcA22CodingStrategyProvider_pSg_tcfc":{"name":"init(options:)","abstract":"

Initializes self.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC6encodeyAA8DocumentVxKSERzlF":{"name":"encode(_:)","abstract":"

Encodes the given top-level value and returns its BSON representation.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC6encodeyAA8DocumentVSgxSgKSERzlF":{"name":"encode(_:)","abstract":"

Encodes the given top-level optional value and returns its BSON representation. Returns nil if the","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC6encodeySayAA8DocumentVGSayxGKSERzlF":{"name":"encode(_:)","abstract":"

Encodes the given array of top-level values and returns an array of their BSON representations.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC6encodeySayAA8DocumentVSgGSayxSgGKSERzlF":{"name":"encode(_:)","abstract":"

Encodes the given array of top-level optional values and returns an array of their BSON representations.","parent_name":"BSONEncoder"},"Classes/BSONDecoder/DataDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DataDecodingStrategyO010deferredToD0yA2EmF":{"name":"deferredToData","abstract":"

Decode Datas by deferring to their default decoding implementation.

","parent_name":"DataDecodingStrategy"},"Classes/BSONDecoder/DataDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DataDecodingStrategyO6binaryyA2EmF":{"name":"binary","abstract":"

Decode Datas stored as the BSON Binary type (default).

","parent_name":"DataDecodingStrategy"},"Classes/BSONDecoder/DataDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DataDecodingStrategyO6base64yA2EmF":{"name":"base64","abstract":"

Decode Datas stored as base64 encoded strings.

","parent_name":"DataDecodingStrategy"},"Classes/BSONDecoder/DataDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DataDecodingStrategyO6customyAE10Foundation0D0Vs7Decoder_pKccAEmF":{"name":"custom(_:)","abstract":"

Decode Datas using the provided closure.

","parent_name":"DataDecodingStrategy"},"Classes/BSONDecoder/UUIDDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20UUIDDecodingStrategyO14deferredToUUIDyA2EmF":{"name":"deferredToUUID","abstract":"

Decode UUIDs by deferring to their default decoding implementation.

","parent_name":"UUIDDecodingStrategy"},"Classes/BSONDecoder/UUIDDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20UUIDDecodingStrategyO6binaryyA2EmF":{"name":"binary","abstract":"

Decode UUIDs stored as the BSON Binary type (default).

","parent_name":"UUIDDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO04bsonD4TimeyA2EmF":{"name":"bsonDateTime","abstract":"

Decode Dates stored as BSON datetimes (default).

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO21millisecondsSince1970yA2EmF":{"name":"millisecondsSince1970","abstract":"

Decode Dates stored as numbers of seconds since January 1, 1970.

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO16secondsSince1970yA2EmF":{"name":"secondsSince1970","abstract":"

Decode Dates stored as numbers of milliseconds since January 1, 1970.

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO010deferredToD0yA2EmF":{"name":"deferredToDate","abstract":"

Decode Dates by deferring to their default decoding implementation.

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO7iso8601yA2EmF":{"name":"iso8601","abstract":"

Decode Dates stored as ISO8601 formatted strings.

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO9formattedyAESo15NSDateFormatterCcAEmF":{"name":"formatted(_:)","abstract":"

Decode Dates stored as strings parsable by the given formatter.

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO6customyAE10Foundation0D0Vs7Decoder_pKccAEmF":{"name":"custom(_:)","abstract":"

Decode Dates using the provided closure.

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html":{"name":"DateDecodingStrategy","abstract":"

Enum representing the various strategies for decoding Dates from BSON.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder/UUIDDecodingStrategy.html":{"name":"UUIDDecodingStrategy","abstract":"

Enum representing the various strategies for decoding UUIDs from BSON.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder/DataDecodingStrategy.html":{"name":"DataDecodingStrategy","abstract":"

Enum representing the various strategies for decoding Datas from BSON.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC8userInfoSDys010CodingUserE3KeyVypGvp":{"name":"userInfo","abstract":"

Contextual user-provided information for use during decoding.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC20dateDecodingStrategyAC04DateeF0Ovp":{"name":"dateDecodingStrategy","abstract":"

The strategy used for decoding Dates with this instance.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC20uuidDecodingStrategyAC012UUIDDecodingF0Ovp":{"name":"uuidDecodingStrategy","abstract":"

The strategy used for decoding UUIDs with this instance.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC20dataDecodingStrategyAC04DataeF0Ovp":{"name":"dataDecodingStrategy","abstract":"

The strategy used for decoding Datas with this instance.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC7optionsAcA22CodingStrategyProvider_pSg_tcfc":{"name":"init(options:)","abstract":"

Initializes self.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC6decode_4fromxxm_AA8DocumentVtKSeRzlF":{"name":"decode(_:from:)","abstract":"

Decodes a top-level value of the given type from the given BSON document.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC6decode_4fromxxm_10Foundation4DataVtKSeRzlF":{"name":"decode(_:from:)","abstract":"

Decodes a top-level value of the given type from the given BSON data.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC6decode_4fromxxm_SStKSeRzlF":{"name":"decode(_:from:)","abstract":"

Decodes a top-level value of the given type from the given JSON/extended JSON string.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html":{"name":"BSONDecoder","abstract":"

BSONDecoder facilitates the decoding of BSON into semantic Decodable types.

"},"Classes/BSONEncoder.html":{"name":"BSONEncoder","abstract":"

BSONEncoder facilitates the encoding of Encodable values into BSON.

"},"Classes.html#/s:10MongoSwift15DocumentStorageC":{"name":"DocumentStorage","abstract":"

The storage backing a MongoSwift Document.

"},"Classes/DocumentIterator.html":{"name":"DocumentIterator","abstract":"

An iterator over the values in a Document.

"},"Classes/ChangeStream.html":{"name":"ChangeStream","abstract":"

A MongoDB change stream.

"},"Classes/ClientSession.html":{"name":"ClientSession","abstract":"

A MongoDB client session."},"Classes/MongoClient.html":{"name":"MongoClient","abstract":"

A MongoDB Client.

"},"Classes/MongoCursor.html":{"name":"MongoCursor","abstract":"

A MongoDB cursor.

"},"Classes/ReadPreference.html":{"name":"ReadPreference","abstract":"

A class to represent a MongoDB read preference.

"},"multithreaded-usage.html":{"name":"Multithreaded-Usage"},"bson.html":{"name":"BSON"},"error-handling.html":{"name":"Error-Handling"},"development.html":{"name":"Development"},"change-streams.html":{"name":"Change-Streams"},"Guides.html":{"name":"Guides","abstract":"

The following guides are available globally.

"},"Classes.html":{"name":"Classes","abstract":"

The following classes are available globally.

"},"Enums.html":{"name":"Enumerations","abstract":"

The following enumerations are available globally.

"},"Extensions.html":{"name":"Extensions","abstract":"

The following extensions are available globally.

"},"Functions.html":{"name":"Functions","abstract":"

The following functions are available globally.

"},"Protocols.html":{"name":"Protocols","abstract":"

The following protocols are available globally.

"},"Structs.html":{"name":"Structures","abstract":"

The following structures are available globally.

"},"Typealiases.html":{"name":"Type Aliases","abstract":"

The following type aliases are available globally.

"}} \ No newline at end of file diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/undocumented.json b/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/undocumented.json deleted file mode 100644 index ed7cf60bf..000000000 --- a/docs/docsets/MongoSwift.docset/Contents/Resources/Documents/undocumented.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "warnings": [ - - ], - "source_directory": "/Users/kaitlinmahar/mongo-swift-driver" -} \ No newline at end of file diff --git a/docs/docsets/MongoSwift.docset/Contents/Resources/docSet.dsidx b/docs/docsets/MongoSwift.docset/Contents/Resources/docSet.dsidx deleted file mode 100644 index f0a6939f4..000000000 Binary files a/docs/docsets/MongoSwift.docset/Contents/Resources/docSet.dsidx and /dev/null differ diff --git a/docs/docsets/MongoSwift.tgz b/docs/docsets/MongoSwift.tgz deleted file mode 100644 index c9c654353..000000000 Binary files a/docs/docsets/MongoSwift.tgz and /dev/null differ diff --git a/docs/docsets/MongoSwift.xml b/docs/docsets/MongoSwift.xml deleted file mode 100644 index 462a15e91..000000000 --- a/docs/docsets/MongoSwift.xml +++ /dev/null @@ -1 +0,0 @@ -1.0https://mongodb.github.io/docsets/MongoSwift.tgz diff --git a/docs/error-handling.html b/docs/error-handling.html deleted file mode 100644 index ee7c70b56..000000000 --- a/docs/error-handling.html +++ /dev/null @@ -1,656 +0,0 @@ - - - - Error-Handling Reference - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
- -

Swift Driver Error Handling Guide

-

Index

- - -

Error Types

- -

The driver uses errors to communicate that an operation failed, an assumption wasn’t met, or that the user did something incorrectly. Applications that use the driver can in turn catch these errors and respond appropriately without crashing or resulting in an otherwise inconsistent state. To correctly model the different sources of errors, the driver defines three separate types of errors (ServerError, UserError, RuntimeError), each of which conforms to the MongoError protocol. These errors are defined in MongoError.swift and are outlined here. The documentation for every public function that throws lists some of the errors that could possibly be thrown and the reasons they might be. The errors listed there are not comprehensive but will generally cover the most common cases.

- -

Error Labels: Some types of errors may contain more specific information describing the context in which they occured. This information is conveyed through the usage of errorLabels. Specifically, any server error or connection related error may contain labels.

-

Server Errors

- -

Server errors correspond to failures that occur in the database itself and are returned to the driver via some response to a command. Each ServerError case contains at least one error code representing what went wrong on the server.

- -

For an enumeration of the possible server error codes, see this list.

- -

The ServerError cases are as follows:

- -
    -
  • .commandError(code: ServerErrorCode, message: String, errorLabels: [String]?): - -
      -
    • Thrown when commands experience errors server side that prevent execution.
    • -
    • Example command failures include failure to parse, operation aborted by the user, and unexpected errors during execution.
    • -
  • -
  • .writeError(writeError: WriteError?, writeConcernError: WriteConcernError?, errorLabels: [String]?) - -
      -
    • Thrown when a single write command fails on the server.
    • -
    • Only one of the two optionals will be non-nil.
    • -
  • -
  • .bulkWriteError(writeErrors: [BulkWriteError]?, writeConcernError: WriteConcernError?, result: BulkWriteResult, errorLabels: [String]?) - -
      -
    • Thrown when the server returns errors as part of an executed bulk write.
    • -
    • If WriteConcernError is populated, writeErrors may not be.
    • -
    • Note: InsertMany throws a .bulkWriteError, not a .writeError.
    • -
  • -
-

User Errors

- -

User applications can sometimes cause errors by using the driver incorrectly (e.g. by passing invalid argument combinations). This category of error covers those cases.

- -

The UserError cases are as follows:

- -
    -
  • .logicError(message: String) - -
      -
    • Thrown when the user uses the driver incorrectly (e.g. advancing a dead cursor).
    • -
  • -
  • .invalidArgument(message: String) - -
      -
    • Thrown when user passes invalid arguments to some driver function.
    • -
  • -
-

Runtime Errors

- -

The driver may experience errors that happen at runtime unexpectedly. These errors don’t fit neatly into the categories of occurring only server-side or only as part of the user’s fault, so they are represented by their own set of cases.

- -

The RuntimeError cases are as follows:

- -
    -
  • .internalError(message: String) - -
      -
    • Thrown when something is null when it shouldn’t be, the driver has an internal failure, or MongoSwift cannot understand a server response.
    • -
    • This is generally indicative of a bug somewhere in the driver stack or a system related failure (e.g. memory allocation failure). If you experience an error that you think is the result of a bug, please file a bug report on GitHub or our Jira project.
    • -
  • -
  • .connectionError(message: String, errorLabels: [String]?) - -
      -
    • Thrown during any connection establishment / socket related errors.
    • -
  • -
  • .authenticationError(message: String) - -
      -
    • Thrown when the driver is not authorized to perform a requested command (e.g. due to invalid credentials)
    • -
  • -
-

Encoding/Decoding Errors

- -

As part of the driver, BSONEncoder and BSONDecoder are implemented according to the Encoder and Decoder protocols defined in Apple’s Foundation. User applications can use them to seamlessly convert between their Swift data structures and the BSON documents stored in the database. While this functionality is part of the public API, the driver itself also makes heavy use of it internally. During any encoding or decoding operations, errors can occur that prevent the data from being written to or read from BSON. In these cases, the driver throws an EncodingError or DecodingError as appropriate. These error types are not unique to MongoSwift and are commonly used by other encoder implementations, such as Foundation’s JSONEncoder, so they do not conform to the MongoError protocol.

- -

See the official documentation for both EncodingErrors and DecodingErrors for more information.

-

Examples

-

Handling any error thrown by the driver

-
do {
-    // something involving the driver
-} catch let error as MongoError {
-    print("Driver error!")
-    switch error.self {
-    case let runtimeError as RuntimeError:
-        // handle RuntimeError
-    case let serverError as ServerError:
-        // handle ServerError
-    case let userError as UserError:
-        // handle UserError
-    default:
-        // should never get here
-    }
-} catch let error as DecodingError {
-    // handle DecodingError
-} catch let error as EncodingError {
-    // handle EncodingError
-} catch { ... }
-
-

Handling a CommandError

-
do {
-    try db.runCommand(["asdfasdf": "sadfsadfasdf"])
-} catch let ServerError.commandError(code, message, _) {
-    print("Command failed: code: \(code) message: \(message)")
-} catch { ... }
-
- -

Output:

-
Command failed: code: 59 message: no such command: 'asdfasdf'
-
-

Handling a WriteError

-
// if you want to ignore duplicate key errors
-do {
-    try coll.insertOne(["_id": 1])
-    try coll.insertOne(["_id": 1])
-} catch let ServerError.writeError(writeError, _, _) where writeError?.code == 11000 {
-    print("duplicate key error: \(1) \(writeError?.message ?? "")")
-}
-
- -

Output:

-
duplicate key error: 1 E11000 duplicate key error collection: mydb.mycoll1 index: _id_ dup key: { : 1 }
-
-

Handling a BulkWriteError

-
let docs: [Document] = [["_id": 2], ["_id": 1]]
-do {
-    try coll.insertOne(["_id": 1])
-    try coll.insertMany(docs)
-} catch let ServerError.bulkWriteError(writeErrors, _, result, _) {
-    if let writeErrors = writeErrors {
-        writeErrors.forEach { err in print("Write Error inserting \(docs[err.index]), code: \(err.code), message: \(err.message)") }
-    }
-    if let result = result {
-        print("Result: ")
-        print("nInserted: \(result.insertedCount)")
-        print("InsertedIds: \(result.insertedIds)")
-    }
-} catch { ... }
-
- -

Output:

-
Write Error inserting { "_id" : 1 }, code: 11000, message: E11000 duplicate key error collection: mydb.mycoll1 index: _id_ dup key: { : 1 }
-Result:
-nInserted: 1
-InsertedIds: [0: 2]
-
-

See Also

- - - -
-
- -
-
- - - diff --git a/docs/img/carat.png b/docs/img/carat.png deleted file mode 100755 index 29d2f7fd4..000000000 Binary files a/docs/img/carat.png and /dev/null differ diff --git a/docs/img/dash.png b/docs/img/dash.png deleted file mode 100755 index 6f694c7a0..000000000 Binary files a/docs/img/dash.png and /dev/null differ diff --git a/docs/img/gh.png b/docs/img/gh.png deleted file mode 100755 index 628da97c7..000000000 Binary files a/docs/img/gh.png and /dev/null differ diff --git a/docs/index.html b/docs/index.html index 58e2c46ea..3916b4e26 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,619 +1 @@ - - - - MongoSwift Reference - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
- -

Build Status -Code Coverage

-

MongoSwift

- -

The official MongoDB driver for Swift.

-

Index

- - -

Documentation

- -

The latest documentation is available here.

-

Bugs / Feature Requests

- -

Think you’ve found a bug? Want to see a new feature in mongo-swift-driver? Please open a case in our issue management tool, JIRA:

- -
    -
  1. Create an account and login: jira.mongodb.org
  2. -
  3. Navigate to the SWIFT project: jira.mongodb.org/browse/SWIFT
  4. -
  5. Click Create Issue - Please provide as much information as possible about the issue and how to reproduce it.
  6. -
- -

Bug reports in JIRA for all driver projects (i.e. NODE, PYTHON, CSHARP, JAVA) and the -Core Server (i.e. SERVER) project are public.

-

Installation

- -

MongoSwift works with Swift 5.0+ on MacOS and Linux.

- -

Installation is supported via Swift Package Manager.

-

Step 1: Install the MongoDB C Driver

- -

The driver wraps the MongoDB C driver, and using it requires having the C driver’s two components, libbson and libmongoc, installed on your system. The minimum required version of the C Driver is 1.15.1.

- -

On a Mac, you can install both components at once using Homebrew: -brew install mongo-c-driver.

- -

On Linux: please follow the instructions from libmongoc‘s documentation. Note that the versions provided by your package manager may be too old, in which case you can follow the instructions for building and installing from source.

- -

See example installation from source on Ubuntu in Docker.

-

Step 2: Install MongoSwift

- -

Please follow the instructions in the previous section on installing the MongoDB C Driver before proceeding.

- -

Add MongoSwift to your dependencies in Package.swift:

-
// swift-tools-version:5.0
-import PackageDescription
-
-let package = Package(
-    name: "MyPackage",
-    dependencies: [
-        .package(url: "https://github.com/mongodb/mongo-swift-driver.git", from: "VERSION.STRING.HERE"),
-    ],
-    targets: [
-        .target(name: "MyPackage", dependencies: ["MongoSwift"])
-    ]
-)
-
- -

Then run swift build to download, compile, and link all your dependencies.

-

Example Usage

- -

Note: You should call cleanupMongoSwift() exactly once at the end of your application to release all memory and other resources allocated by libmongoc.

-

Connect to MongoDB and Create a Collection

-
import MongoSwift
-
-let client = try MongoClient("mongodb://localhost:27017")
-let db = client.db("myDB")
-let collection = try db.createCollection("myCollection")
-
-// free all resources
-cleanupMongoSwift()
-
- -

Note: we have included the client connectionString parameter for clarity, but if connecting to the default "mongodb://localhost:27017"it may be omitted: let client = try MongoClient().

-

Create and Insert a Document

-
let doc: Document = ["_id": 100, "a": 1, "b": 2, "c": 3]
-let result = try collection.insertOne(doc)
-print(result?.insertedId ?? "") // prints `.int64(100)`
-
-

Find Documents

-
let query: Document = ["a": 1]
-let documents = try collection.find(query)
-for d in documents {
-    print(d)
-}
-
-

Work With and Modify Documents

-
var doc: Document = ["a": 1, "b": 2, "c": 3]
-
-print(doc) // prints `{"a" : 1, "b" : 2, "c" : 3}`
-print(doc["a"] ?? "") // prints `.int64(1)`
-
-// Set a new value
-doc["d"] = 4
-print(doc) // prints `{"a" : 1, "b" : 2, "c" : 3, "d" : 4}`
-
-// Using functional methods like map, filter:
-let evensDoc = doc.filter { elem in
-    guard let value = elem.value.asInt() else {
-        return false
-    }
-    return value % 2 == 0
-}
-print(evensDoc) // prints `{ "b" : 2, "d" : 4 }`
-
-let doubled = doc.map { elem -> Int in
-    guard case let value = .int64(value) else {
-        return 0
-    }
-
-    return Int(value * 2)
-}
-print(doubled) // prints `[2, 4, 6, 8]`
-
- -

Note that Document conforms to Collection, so useful methods from -Sequence and -Collection are -all available. However, runtime guarantees are not yet met for many of these -methods.

-

Usage With Kitura, Vapor, and Perfect

- -

The Examples/ directory contains sample projects that use the driver with Kitura, Vapor, and Perfect.

-

Development Instructions

- -

See our development guide for instructions for building and testing the driver.

- -
-
- -
-
- - - + diff --git a/docs/js/jazzy.js b/docs/js/jazzy.js deleted file mode 100755 index c31dc05e4..000000000 --- a/docs/js/jazzy.js +++ /dev/null @@ -1,59 +0,0 @@ -window.jazzy = {'docset': false} -if (typeof window.dash != 'undefined') { - document.documentElement.className += ' dash' - window.jazzy.docset = true -} -if (navigator.userAgent.match(/xcode/i)) { - document.documentElement.className += ' xcode' - window.jazzy.docset = true -} - -function toggleItem($link, $content) { - var animationDuration = 300; - $link.toggleClass('token-open'); - $content.slideToggle(animationDuration); -} - -function itemLinkToContent($link) { - return $link.parent().parent().next(); -} - -// On doc load + hash-change, open any targetted item -function openCurrentItemIfClosed() { - if (window.jazzy.docset) { - return; - } - var $link = $(`.token[href="${location.hash}"]`); - $content = itemLinkToContent($link); - if ($content.is(':hidden')) { - toggleItem($link, $content); - } -} - -$(openCurrentItemIfClosed); -$(window).on('hashchange', openCurrentItemIfClosed); - -// On item link ('token') click, toggle its discussion -$('.token').on('click', function(event) { - if (window.jazzy.docset) { - return; - } - var $link = $(this); - toggleItem($link, itemLinkToContent($link)); - - // Keeps the document from jumping to the hash. - var href = $link.attr('href'); - if (history.pushState) { - history.pushState({}, '', href); - } else { - location.hash = href; - } - event.preventDefault(); -}); - -// Clicks on links to the current, closed, item need to open the item -$("a:not('.token')").on('click', function() { - if (location == this.href) { - openCurrentItemIfClosed(); - } -}); diff --git a/docs/js/jquery.min.js b/docs/js/jquery.min.js deleted file mode 100755 index a1c07fd80..000000000 --- a/docs/js/jquery.min.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! jQuery v3.4.1 | (c) JS Foundation and other contributors | jquery.org/license */ -!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],E=C.document,r=Object.getPrototypeOf,s=t.slice,g=t.concat,u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.4.1",k=function(e,t){return new k.fn.init(e,t)},p=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g;function d(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp($),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+$),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),ne=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(m.childNodes),m.childNodes),t[m.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&((e?e.ownerDocument||e:m)!==C&&T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!A[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&U.test(t)){(s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=k),o=(l=h(t)).length;while(o--)l[o]="#"+s+" "+xe(l[o]);c=l.join(","),f=ee.test(t)&&ye(e.parentNode)||e}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){A(t,!0)}finally{s===k&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[k]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:m;return r!==C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),m!==C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=k,!C.getElementsByName||!C.getElementsByName(k).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+k+"-]").length||v.push("~="),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+k+"+*").length||v.push(".#.+[+~]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",$)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e===C||e.ownerDocument===m&&y(m,e)?-1:t===C||t.ownerDocument===m&&y(m,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e===C?-1:t===C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]===m?-1:s[r]===m?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if((e.ownerDocument||e)!==C&&T(e),d.matchesSelector&&E&&!A[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){A(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=p[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&p(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?k.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?k.grep(e,function(e){return e===n!==r}):"string"!=typeof n?k.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(k.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||q,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:L.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof k?t[0]:t,k.merge(this,k.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),D.test(r[1])&&k.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(k):k.makeArray(e,this)}).prototype=k.fn,q=k(E);var H=/^(?:parents|prev(?:Until|All))/,O={children:!0,contents:!0,next:!0,prev:!0};function P(e,t){while((e=e[t])&&1!==e.nodeType);return e}k.fn.extend({has:function(e){var t=k(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i,ge={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?k.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;nx",y.noCloneChecked=!!me.cloneNode(!0).lastChild.defaultValue;var Te=/^key/,Ce=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ee=/^([^.]*)(?:\.(.+)|)/;function ke(){return!0}function Se(){return!1}function Ne(e,t){return e===function(){try{return E.activeElement}catch(e){}}()==("focus"===t)}function Ae(e,t,n,r,i,o){var a,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)Ae(e,s,n,r,t[s],o);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Se;else if(!i)return e;return 1===o&&(a=i,(i=function(e){return k().off(e),a.apply(this,arguments)}).guid=a.guid||(a.guid=k.guid++)),e.each(function(){k.event.add(this,t,i,r,n)})}function De(e,i,o){o?(Q.set(e,i,!1),k.event.add(e,i,{namespace:!1,handler:function(e){var t,n,r=Q.get(this,i);if(1&e.isTrigger&&this[i]){if(r.length)(k.event.special[i]||{}).delegateType&&e.stopPropagation();else if(r=s.call(arguments),Q.set(this,i,r),t=o(this,i),this[i](),r!==(n=Q.get(this,i))||t?Q.set(this,i,!1):n={},r!==n)return e.stopImmediatePropagation(),e.preventDefault(),n.value}else r.length&&(Q.set(this,i,{value:k.event.trigger(k.extend(r[0],k.Event.prototype),r.slice(1),this)}),e.stopImmediatePropagation())}})):void 0===Q.get(e,i)&&k.event.add(e,i,ke)}k.event={global:{},add:function(t,e,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.get(t);if(v){n.handler&&(n=(o=n).handler,i=o.selector),i&&k.find.matchesSelector(ie,i),n.guid||(n.guid=k.guid++),(u=v.events)||(u=v.events={}),(a=v.handle)||(a=v.handle=function(e){return"undefined"!=typeof k&&k.event.triggered!==e.type?k.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(R)||[""]).length;while(l--)d=g=(s=Ee.exec(e[l])||[])[1],h=(s[2]||"").split(".").sort(),d&&(f=k.event.special[d]||{},d=(i?f.delegateType:f.bindType)||d,f=k.event.special[d]||{},c=k.extend({type:d,origType:g,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&k.expr.match.needsContext.test(i),namespace:h.join(".")},o),(p=u[d])||((p=u[d]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,h,a)||t.addEventListener&&t.addEventListener(d,a)),f.add&&(f.add.call(t,c),c.handler.guid||(c.handler.guid=n.guid)),i?p.splice(p.delegateCount++,0,c):p.push(c),k.event.global[d]=!0)}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,v=Q.hasData(e)&&Q.get(e);if(v&&(u=v.events)){l=(t=(t||"").match(R)||[""]).length;while(l--)if(d=g=(s=Ee.exec(t[l])||[])[1],h=(s[2]||"").split(".").sort(),d){f=k.event.special[d]||{},p=u[d=(r?f.delegateType:f.bindType)||d]||[],s=s[2]&&new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),a=o=p.length;while(o--)c=p[o],!i&&g!==c.origType||n&&n.guid!==c.guid||s&&!s.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(p.splice(o,1),c.selector&&p.delegateCount--,f.remove&&f.remove.call(e,c));a&&!p.length&&(f.teardown&&!1!==f.teardown.call(e,h,v.handle)||k.removeEvent(e,d,v.handle),delete u[d])}else for(d in u)k.event.remove(e,d+t[l],n,r,!0);k.isEmptyObject(u)&&Q.remove(e,"handle events")}},dispatch:function(e){var t,n,r,i,o,a,s=k.event.fix(e),u=new Array(arguments.length),l=(Q.get(this,"events")||{})[s.type]||[],c=k.event.special[s.type]||{};for(u[0]=s,t=1;t\x20\t\r\n\f]*)[^>]*)\/>/gi,qe=/\s*$/g;function Oe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&k(e).children("tbody")[0]||e}function Pe(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Re(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Me(e,t){var n,r,i,o,a,s,u,l;if(1===t.nodeType){if(Q.hasData(e)&&(o=Q.access(e),a=Q.set(t,o),l=o.events))for(i in delete a.handle,a.events={},l)for(n=0,r=l[i].length;n")},clone:function(e,t,n){var r,i,o,a,s,u,l,c=e.cloneNode(!0),f=oe(e);if(!(y.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||k.isXMLDoc(e)))for(a=ve(c),r=0,i=(o=ve(e)).length;r").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Vt,Gt=[],Yt=/(=)\?(?=&|$)|\?\?/;k.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Gt.pop()||k.expando+"_"+kt++;return this[e]=!0,e}}),k.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Yt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Yt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Yt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||k.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?k(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Gt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Vt=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Vt.childNodes.length),k.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=D.exec(e))?[t.createElement(i[1])]:(i=we([e],t,o),o&&o.length&&k(o).remove(),k.merge([],i.childNodes)));var r,i,o},k.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(k.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},k.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){k.fn[t]=function(e){return this.on(t,e)}}),k.expr.pseudos.animated=function(t){return k.grep(k.timers,function(e){return t===e.elem}).length},k.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=k.css(e,"position"),c=k(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=k.css(e,"top"),u=k.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,k.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},k.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){k.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===k.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===k.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=k(e).offset()).top+=k.css(e,"borderTopWidth",!0),i.left+=k.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-k.css(r,"marginTop",!0),left:t.left-i.left-k.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===k.css(e,"position"))e=e.offsetParent;return e||ie})}}),k.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;k.fn[t]=function(e){return _(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),k.each(["top","left"],function(e,n){k.cssHooks[n]=ze(y.pixelPosition,function(e,t){if(t)return t=_e(e,n),$e.test(t)?k(e).position()[n]+"px":t})}),k.each({Height:"height",Width:"width"},function(a,s){k.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){k.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return _(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?k.css(e,t,i):k.style(e,t,n,i)},s,n?e:void 0,n)}})}),k.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){k.fn[n]=function(e,t){return 0 - - - Multithreaded-Usage Reference - - - - - - - - - -
-
-

MongoSwift Docs (100% documented)

-

View on GitHub

-

Install in Dash

-
-
-
- -
-
- -
-
-
- -

Using MongoSwift in Mulithreaded Applications

-

Threadsafe Types

- -

As of MongoSwift 0.2.0, the following types are safe to use across threads:

- - - -

We make no guarantees about the safety of using any other type across threads.

-

Best Practices

- -

Each MongoClient is backed by a pool of server connections. Any time a client or one of its child objects (a MongoDatabase or MongoCollection) makes a request to the database (a find, insertOne, etc.) a connection will be retrieved from the pool, used to execute the operation, and then returned to the pool when it is finished.

- -

Each MongoClient uses its own background thread to monitor the MongoDB topology you are connected to.

- -

In order to share the connection pool across threads and minimize the number of background monitoring threads, we recommend sharing MongoClients across threads.

-

Usage With Server-side Swift Frameworks

- -

See the Examples/ directory in the driver GitHub repository for examples of how to integrate the driver in multithreaded frameworks.

- -
-
- -
-
- - - diff --git a/docs/search.json b/docs/search.json deleted file mode 100644 index 5923ded1f..000000000 --- a/docs/search.json +++ /dev/null @@ -1 +0,0 @@ -{"Typealiases.html#/s:10MongoSwift17InsertManyOptionsa":{"name":"InsertManyOptions","abstract":"

Options to use when executing a multi-document insert operation on a MongoCollection.

"},"Typealiases.html#/s:10MongoSwift15ServerErrorCodea":{"name":"ServerErrorCode","abstract":"

A MongoDB server error code.

"},"Structs/WriteConcern/W.html#/s:10MongoSwift12WriteConcernV1WO6numberyAEs5Int32VcAEmF":{"name":"number(_:)","abstract":"

Specifies the number of nodes that should acknowledge the write. MUST be greater than or equal to 0.

","parent_name":"W"},"Structs/WriteConcern/W.html#/s:10MongoSwift12WriteConcernV1WO3tagyAESScAEmF":{"name":"tag(_:)","abstract":"

Indicates a tag for nodes that should acknowledge the write.

","parent_name":"W"},"Structs/WriteConcern/W.html#/s:10MongoSwift12WriteConcernV1WO8majorityyA2EmF":{"name":"majority","abstract":"

Specifies that a majority of nodes should acknowledge the write.

","parent_name":"W"},"Structs/WriteConcern/W.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"W"},"Structs/WriteConcern/W.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"W"},"Structs/WriteConcern/W.html":{"name":"W","abstract":"

An option to request acknowledgement that the write operation has propagated to specified mongod instances.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV1wAC1WOSgvp":{"name":"w","abstract":"

Indicates the W value for this WriteConcern.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV7journalSbSgvp":{"name":"journal","abstract":"

Indicates whether to wait for the write operation to get committed to the journal.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV10wtimeoutMSs5Int64VSgvp":{"name":"wtimeoutMS","abstract":"

If the write concern is not satisfied within this timeout (in milliseconds),","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV14isAcknowledgedSbvp":{"name":"isAcknowledged","abstract":"

Indicates whether this is an acknowledged write concern.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV9isDefaultSbvp":{"name":"isDefault","abstract":"

Indicates whether this is the default write concern.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernVACycfc":{"name":"init()","abstract":"

Initializes a new, empty WriteConcern.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV7journal1w10wtimeoutMSACSbSg_AC1WOSgs5Int64VSgtKcfc":{"name":"init(journal:w:wtimeoutMS:)","abstract":"

Initializes a new WriteConcern.

","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:10MongoSwift12WriteConcernV11descriptionSSvp":{"name":"description","abstract":"

Returns the relaxed extended JSON representation of this WriteConcern.","parent_name":"WriteConcern"},"Structs/WriteConcern.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"WriteConcern"},"Structs/TopologyDescription/TopologyType.html#/s:10MongoSwift19TopologyDescriptionV0C4TypeO6singleyA2EmF":{"name":"single","abstract":"

A single mongod server.

","parent_name":"TopologyType"},"Structs/TopologyDescription/TopologyType.html#/s:10MongoSwift19TopologyDescriptionV0C4TypeO19replicaSetNoPrimaryyA2EmF":{"name":"replicaSetNoPrimary","abstract":"

A replica set with no primary.

","parent_name":"TopologyType"},"Structs/TopologyDescription/TopologyType.html#/s:10MongoSwift19TopologyDescriptionV0C4TypeO21replicaSetWithPrimaryyA2EmF":{"name":"replicaSetWithPrimary","abstract":"

A replica set with a primary.

","parent_name":"TopologyType"},"Structs/TopologyDescription/TopologyType.html#/s:10MongoSwift19TopologyDescriptionV0C4TypeO7shardedyA2EmF":{"name":"sharded","abstract":"

Sharded topology.

","parent_name":"TopologyType"},"Structs/TopologyDescription/TopologyType.html#/s:10MongoSwift19TopologyDescriptionV0C4TypeO7unknownyA2EmF":{"name":"unknown","abstract":"

A topology whose type is not yet known.

","parent_name":"TopologyType"},"Structs/TopologyDescription/TopologyType.html":{"name":"TopologyType","abstract":"

The possible types for a topology.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV4typeAC0C4TypeOvp":{"name":"type","abstract":"

The type of this topology.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV7setNameSSSgvp":{"name":"setName","abstract":"

The replica set name.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV13maxSetVersions5Int64VSgvp":{"name":"maxSetVersion","abstract":"

The largest setVersion ever reported by a primary.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV13maxElectionIdAA06ObjectG0VSgvp":{"name":"maxElectionId","abstract":"

The largest electionId ever reported by a primary.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV7serversSayAA06ServerD0VGvp":{"name":"servers","abstract":"

The servers comprising this topology. By default, no servers.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV5staleSbvp":{"name":"stale","abstract":"

For single-threaded clients, indicates whether the topology must be re-scanned.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV18compatibilityErrorAA0aF0_pSgvp":{"name":"compatibilityError","abstract":"

Exists if any server’s wire protocol version range is incompatible with the client’s.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV28logicalSessionTimeoutMinutess5Int64VSgvp":{"name":"logicalSessionTimeoutMinutes","abstract":"

The logicalSessionTimeoutMinutes value for this topology. This value is the minimum","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV17hasReadableServerSbyF":{"name":"hasReadableServer()","abstract":"

Returns true if the topology has a readable server available, and false otherwise.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:10MongoSwift19TopologyDescriptionV17hasWritableServerSbyF":{"name":"hasWritableServer()","abstract":"

Returns true if the topology has a writable server available, and false otherwise.

","parent_name":"TopologyDescription"},"Structs/TopologyDescription.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"TopologyDescription"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO10standaloneyA2EmF":{"name":"standalone","abstract":"

A standalone mongod server.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO6mongosyA2EmF":{"name":"mongos","abstract":"

A router to a sharded cluster, i.e. a mongos server.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO15possiblePrimaryyA2EmF":{"name":"possiblePrimary","abstract":"

A replica set member which is not yet checked, but another member thinks it is the primary.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO9rsPrimaryyA2EmF":{"name":"rsPrimary","abstract":"

A replica set primary.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO11rsSecondaryyA2EmF":{"name":"rsSecondary","abstract":"

A replica set secondary.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO9rsArbiteryA2EmF":{"name":"rsArbiter","abstract":"

A replica set arbiter.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO7rsOtheryA2EmF":{"name":"rsOther","abstract":"

A replica set member that is none of the other types (a passive, for example).

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO7rsGhostyA2EmF":{"name":"rsGhost","abstract":"

A replica set member that does not report a set name or a hosts list.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html#/s:10MongoSwift17ServerDescriptionV0C4TypeO7unknownyA2EmF":{"name":"unknown","abstract":"

A server type that is not yet known.

","parent_name":"ServerType"},"Structs/ServerDescription/ServerType.html":{"name":"ServerType","abstract":"

The possible types for a server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV12connectionIdAA010ConnectionF0Vvp":{"name":"connectionId","abstract":"

The hostname or IP and the port number that the client connects to. Note that this is not the","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV5errorAA0A5Error_pSgvp":{"name":"error","abstract":"

The last error related to this server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV13roundTripTimes5Int64VSgvp":{"name":"roundTripTime","abstract":"

The duration of the server’s last ismaster call.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV13lastWriteDate10Foundation0G0VSgvp":{"name":"lastWriteDate","abstract":"

The “lastWriteDate” from the server’s most recent ismaster response.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV6opTimeAA8ObjectIdVSgvp":{"name":"opTime","abstract":"

The last opTime reported by the server. Only mongos and shard servers","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV4typeAC0C4TypeOvp":{"name":"type","abstract":"

The type of this server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV14minWireVersions5Int32Vvp":{"name":"minWireVersion","abstract":"

The minimum wire protocol version supported by the server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV14maxWireVersions5Int32Vvp":{"name":"maxWireVersion","abstract":"

The maximum wire protocol version supported by the server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV2meAA12ConnectionIdVSgvp":{"name":"me","abstract":"

The hostname or IP and the port number that this server was configured with in the replica set.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV5hostsSayAA12ConnectionIdVGvp":{"name":"hosts","abstract":"

This server’s opinion of the replica set’s hosts, if any.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV8arbitersSayAA12ConnectionIdVGvp":{"name":"arbiters","abstract":"

This server’s opinion of the replica set’s arbiters, if any.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV8passivesSayAA12ConnectionIdVGvp":{"name":"passives","abstract":"

“Passives” are priority-zero replica set members that cannot become primary.","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV4tagsSDyS2SGvp":{"name":"tags","abstract":"

Tags for this server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV7setNameSSSgvp":{"name":"setName","abstract":"

The replica set name.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV10setVersions5Int64VSgvp":{"name":"setVersion","abstract":"

The replica set version.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV10electionIdAA06ObjectF0VSgvp":{"name":"electionId","abstract":"

The election ID where this server was elected, if this is a replica set member that believes it is primary.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV7primaryAA12ConnectionIdVSgvp":{"name":"primary","abstract":"

This server’s opinion of who the primary is.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV14lastUpdateTime10Foundation4DateVSgvp":{"name":"lastUpdateTime","abstract":"

When this server was last checked.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:10MongoSwift17ServerDescriptionV28logicalSessionTimeoutMinutess5Int64VSgvp":{"name":"logicalSessionTimeoutMinutes","abstract":"

The logicalSessionTimeoutMinutes value for this server.

","parent_name":"ServerDescription"},"Structs/ServerDescription.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"ServerDescription"},"Structs/ConnectionId.html#/s:10MongoSwift12ConnectionIdV4hostSSvp":{"name":"host","abstract":"

A string representing the host for this connection.

","parent_name":"ConnectionId"},"Structs/ConnectionId.html#/s:10MongoSwift12ConnectionIdV4ports6UInt16Vvp":{"name":"port","abstract":"

The port number for this connection.

","parent_name":"ConnectionId"},"Structs/ReadConcern/Level.html#/s:10MongoSwift11ReadConcernV5LevelO5localyA2EmF":{"name":"local","abstract":"

See https://docs.mongodb.com/manual/reference/read-concern-local/

","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:10MongoSwift11ReadConcernV5LevelO9availableyA2EmF":{"name":"available","abstract":"

See https://docs.mongodb.com/manual/reference/read-concern-available/

","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:10MongoSwift11ReadConcernV5LevelO8majorityyA2EmF":{"name":"majority","abstract":"

See https://docs.mongodb.com/manual/reference/read-concern-majority/

","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:10MongoSwift11ReadConcernV5LevelO12linearizableyA2EmF":{"name":"linearizable","abstract":"

See https://docs.mongodb.com/manual/reference/read-concern-linearizable/

","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:10MongoSwift11ReadConcernV5LevelO8snapshotyA2EmF":{"name":"snapshot","abstract":"

See https://docs.mongodb.com/master/reference/read-concern-snapshot/

","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:10MongoSwift11ReadConcernV5LevelO5otheryAESS_tcAEmF":{"name":"other(level:)","abstract":"

Any other read concern level not covered by the other cases.","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"Level"},"Structs/ReadConcern/Level.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"Level"},"Structs/ReadConcern/Level.html":{"name":"Level","abstract":"

An enumeration of possible ReadConcern levels.

","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:10MongoSwift11ReadConcernV5levelAC5LevelOSgvp":{"name":"level","abstract":"

The level of this ReadConcern, or nil if the level is not set.

","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:10MongoSwift11ReadConcernV9isDefaultSbvp":{"name":"isDefault","abstract":"

Indicates whether this ReadConcern is the server default.

","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:10MongoSwift11ReadConcernVyA2C5LevelOcfc":{"name":"init(_:)","abstract":"

Initialize a new ReadConcern with a Level.

","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:10MongoSwift11ReadConcernVyACSScfc":{"name":"init(_:)","abstract":"

Initialize a new ReadConcern from a String corresponding to a read concern level.

","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:10MongoSwift11ReadConcernVACycfc":{"name":"init()","abstract":"

Initialize a new empty ReadConcern.

","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:10MongoSwift11ReadConcernV11descriptionSSvp":{"name":"description","abstract":"

Returns the relaxed extended JSON representation of this ReadConcern.","parent_name":"ReadConcern"},"Structs/ReadConcern.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"ReadConcern"},"Structs/RunCommandOptions.html#/s:10MongoSwift17RunCommandOptionsV11readConcernAA04ReadG0VSgvp":{"name":"readConcern","abstract":"

An optional ReadConcern to use for this operation. This option should only be used when executing a command","parent_name":"RunCommandOptions"},"Structs/RunCommandOptions.html#/s:10MongoSwift17RunCommandOptionsV14readPreferenceAA04ReadG0CSgvp":{"name":"readPreference","abstract":"

An optional ReadPreference to use for this operation. This option should only be used when executing a","parent_name":"RunCommandOptions"},"Structs/RunCommandOptions.html#/s:10MongoSwift17RunCommandOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for this operation. This option should only be used when executing a command","parent_name":"RunCommandOptions"},"Structs/RunCommandOptions.html#/s:10MongoSwift17RunCommandOptionsV11readConcern0F10Preference05writeG0AcA04ReadG0VSg_AA0jH0CSgAA05WriteG0VSgtcfc":{"name":"init(readConcern:readPreference:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted or optional.

","parent_name":"RunCommandOptions"},"Structs/DatabaseSpecification.html#/s:10MongoSwift21DatabaseSpecificationV4nameSSvp":{"name":"name","abstract":"

The name of the database.

","parent_name":"DatabaseSpecification"},"Structs/DatabaseSpecification.html#/s:10MongoSwift21DatabaseSpecificationV10sizeOnDiskSivp":{"name":"sizeOnDisk","abstract":"

The amount of disk space consumed by this database.

","parent_name":"DatabaseSpecification"},"Structs/DatabaseSpecification.html#/s:10MongoSwift21DatabaseSpecificationV5emptySbvp":{"name":"empty","abstract":"

Whether or not this database is empty.

","parent_name":"DatabaseSpecification"},"Structs/DatabaseSpecification.html#/s:10MongoSwift21DatabaseSpecificationV6shardsAA8DocumentVSgvp":{"name":"shards","abstract":"

For sharded clusters, this field includes a document which maps each shard to the size in bytes of the database","parent_name":"DatabaseSpecification"},"Structs/ListCollectionsOptions.html#/s:10MongoSwift22ListCollectionsOptionsV9batchSizeSiSgvp":{"name":"batchSize","abstract":"

The batchSize for the returned cursor.

","parent_name":"ListCollectionsOptions"},"Structs/ListCollectionsOptions.html#/s:10MongoSwift22ListCollectionsOptionsV9batchSizeACSiSg_tcfc":{"name":"init(batchSize:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted or optional

","parent_name":"ListCollectionsOptions"},"Structs/CollectionSpecification.html#/s:10MongoSwift23CollectionSpecificationV4nameSSvp":{"name":"name","abstract":"

The name of the collection.

","parent_name":"CollectionSpecification"},"Structs/CollectionSpecification.html#/s:10MongoSwift23CollectionSpecificationV4typeAA0C4TypeOvp":{"name":"type","abstract":"

The type of data store returned.

","parent_name":"CollectionSpecification"},"Structs/CollectionSpecification.html#/s:10MongoSwift23CollectionSpecificationV7optionsAA06CreateC7OptionsVSgvp":{"name":"options","abstract":"

Options that were used when creating this collection.

","parent_name":"CollectionSpecification"},"Structs/CollectionSpecification.html#/s:10MongoSwift23CollectionSpecificationV4infoAA0cD4InfoVvp":{"name":"info","abstract":"

Contains info pertaining to the collection.

","parent_name":"CollectionSpecification"},"Structs/CollectionSpecification.html#/s:10MongoSwift23CollectionSpecificationV7idIndexAA0F5ModelVSgvp":{"name":"idIndex","abstract":"

Provides info on the _id index of the collection. nil when this data store is of type view.

","parent_name":"CollectionSpecification"},"Structs/CollectionSpecificationInfo.html#/s:10MongoSwift27CollectionSpecificationInfoV8readOnlySbvp":{"name":"readOnly","abstract":"

Indicates whether or not the data store is read-only.

","parent_name":"CollectionSpecificationInfo"},"Structs/CollectionSpecificationInfo.html#/s:10MongoSwift27CollectionSpecificationInfoV4uuid10Foundation4UUIDVSgvp":{"name":"uuid","abstract":"

The collection’s UUID - once established, this does not change and remains the same across replica","parent_name":"CollectionSpecificationInfo"},"Structs/EstimatedDocumentCountOptions.html#/s:10MongoSwift29EstimatedDocumentCountOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"EstimatedDocumentCountOptions"},"Structs/EstimatedDocumentCountOptions.html#/s:10MongoSwift29EstimatedDocumentCountOptionsV11readConcernAA04ReadH0VSgvp":{"name":"readConcern","abstract":"

A ReadConcern to use for this operation.

","parent_name":"EstimatedDocumentCountOptions"},"Structs/EstimatedDocumentCountOptions.html#/s:10MongoSwift29EstimatedDocumentCountOptionsV14readPreferenceAA04ReadH0CSgvp":{"name":"readPreference","abstract":"

A ReadPreference to use for this operation.

","parent_name":"EstimatedDocumentCountOptions"},"Structs/EstimatedDocumentCountOptions.html#/s:10MongoSwift29EstimatedDocumentCountOptionsV9maxTimeMS11readConcern0J10PreferenceACs5Int64VSg_AA04ReadK0VSgAA0nL0CSgtcfc":{"name":"init(maxTimeMS:readConcern:readPreference:)","abstract":"

Convenience initializer allowing any/all parameters to be optional

","parent_name":"EstimatedDocumentCountOptions"},"Structs/DropIndexOptions.html#/s:10MongoSwift16DropIndexOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run - enforced server-side.

","parent_name":"DropIndexOptions"},"Structs/DropIndexOptions.html#/s:10MongoSwift16DropIndexOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"DropIndexOptions"},"Structs/DropIndexOptions.html#/s:10MongoSwift16DropIndexOptionsV9maxTimeMS12writeConcernACs5Int64VSg_AA05WriteJ0VSgtcfc":{"name":"init(maxTimeMS:writeConcern:)","abstract":"

Initializer allowing any/all parameters to be omitted.

","parent_name":"DropIndexOptions"},"Structs/DistinctOptions.html#/s:10MongoSwift15DistinctOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"DistinctOptions"},"Structs/DistinctOptions.html#/s:10MongoSwift15DistinctOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"DistinctOptions"},"Structs/DistinctOptions.html#/s:10MongoSwift15DistinctOptionsV11readConcernAA04ReadF0VSgvp":{"name":"readConcern","abstract":"

A ReadConcern to use for this operation.

","parent_name":"DistinctOptions"},"Structs/DistinctOptions.html#/s:10MongoSwift15DistinctOptionsV14readPreferenceAA04ReadF0CSgvp":{"name":"readPreference","abstract":"

A ReadPreference to use for this operation.

","parent_name":"DistinctOptions"},"Structs/DistinctOptions.html#/s:10MongoSwift15DistinctOptionsV9collation9maxTimeMS11readConcern0I10PreferenceAcA8DocumentVSg_s5Int64VSgAA04ReadJ0VSgAA0nK0CSgtcfc":{"name":"init(collation:maxTimeMS:readConcern:readPreference:)","abstract":"

Convenience initializer allowing any/all parameters to be optional

","parent_name":"DistinctOptions"},"Structs/CreateIndexOptions.html#/s:10MongoSwift18CreateIndexOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run - enforced server-side.

","parent_name":"CreateIndexOptions"},"Structs/CreateIndexOptions.html#/s:10MongoSwift18CreateIndexOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"CreateIndexOptions"},"Structs/CreateIndexOptions.html#/s:10MongoSwift18CreateIndexOptionsV9maxTimeMS12writeConcernACs5Int64VSg_AA05WriteJ0VSgtcfc":{"name":"init(maxTimeMS:writeConcern:)","abstract":"

Initializer allowing any/all parameters to be omitted.

","parent_name":"CreateIndexOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV11autoIndexIdSbSgvp":{"name":"autoIndexId","abstract":"

Whether or not this collection will automatically generate an index on _id.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV6cappedSbSgvp":{"name":"capped","abstract":"

Indicates whether this will be a capped collection.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies the default collation for the collection.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV18dataCodingStrategyAA04DatagH0OSgvp":{"name":"dataCodingStrategy","abstract":"

Specifies the DataCodingStrategy to use for BSON encoding/decoding operations performed by this collection.","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV18dateCodingStrategyAA04DategH0OSgvp":{"name":"dateCodingStrategy","abstract":"

Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this collection.","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV19indexOptionDefaultsAA8DocumentVSgvp":{"name":"indexOptionDefaults","abstract":"

Specify a default configuration for indexes created on this collection.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV3maxs5Int64VSgvp":{"name":"max","abstract":"

Maximum number of documents allowed in the collection (if capped).

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV8pipelineSayAA8DocumentVGSgvp":{"name":"pipeline","abstract":"

An array consisting of aggregation pipeline stages. When used with viewOn, will create the view by applying","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV4sizes5Int64VSgvp":{"name":"size","abstract":"

Maximum size, in bytes, of this collection (if capped).

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV13storageEngineAA8DocumentVSgvp":{"name":"storageEngine","abstract":"

Specifies storage engine configuration for this collection.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV18uuidCodingStrategyAA010UUIDCodingH0OSgvp":{"name":"uuidCodingStrategy","abstract":"

Specifies the UUIDCodingStrategy to use for BSON encoding/decoding operations performed by this collection.","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV16validationActionSSSgvp":{"name":"validationAction","abstract":"

Determines whether to error on invalid documents or just warn about the violations but allow invalid documents","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV15validationLevelSSSgvp":{"name":"validationLevel","abstract":"

Determines how strictly MongoDB applies the validation rules to existing documents during an update.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV9validatorAA8DocumentVSgvp":{"name":"validator","abstract":"

What validator should be used for the collection.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV6viewOnSSSgvp":{"name":"viewOn","abstract":"

The name of the source collection or view from which to create the view.

","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

A write concern to use when executing this command. To set a read or write concern for the collection itself,","parent_name":"CreateCollectionOptions"},"Structs/CreateCollectionOptions.html#/s:10MongoSwift23CreateCollectionOptionsV11autoIndexId6capped9collation18dataCodingStrategy04datelM019indexOptionDefaults3max8pipeline4size13storageEngine04uuidlM016validationAction0X5Level9validator6viewOn12writeConcernACSbSg_AtA8DocumentVSgAA04DatalM0OSgAA04DatelM0OSgAWs5Int64VSgSayAVGSgA4_AwA010UUIDCodingM0OSgSSSgA10_AWA10_AA12WriteConcernVSgtcfc":{"name":"init(autoIndexId:capped:collation:dataCodingStrategy:dateCodingStrategy:indexOptionDefaults:max:pipeline:size:storageEngine:uuidCodingStrategy:validationAction:validationLevel:validator:viewOn:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted or optional.

","parent_name":"CreateCollectionOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV4hintAA4HintOSgvp":{"name":"hint","abstract":"

A hint for the index to use.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV5limits5Int64VSgvp":{"name":"limit","abstract":"

The maximum number of documents to count.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV11readConcernAA04ReadG0VSgvp":{"name":"readConcern","abstract":"

A ReadConcern to use for this operation.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV14readPreferenceAA04ReadG0CSgvp":{"name":"readPreference","abstract":"

A ReadPreference to use for this operation.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV4skips5Int64VSgvp":{"name":"skip","abstract":"

The number of documents to skip before counting.

","parent_name":"CountDocumentsOptions"},"Structs/CountDocumentsOptions.html#/s:10MongoSwift21CountDocumentsOptionsV9collation4hint5limit9maxTimeMS11readConcern0L10Preference4skipAcA8DocumentVSg_AA4HintOSgs5Int64VSgAsA04ReadM0VSgAA0sN0CSgAStcfc":{"name":"init(collation:hint:limit:maxTimeMS:readConcern:readPreference:skip:)","abstract":"

Convenience initializer allowing any/all parameters to be optional

","parent_name":"CountDocumentsOptions"},"Structs/MongoNamespace.html#/s:10MongoSwift0A9NamespaceV2dbSSvp":{"name":"db","abstract":"

The database name.

","parent_name":"MongoNamespace"},"Structs/MongoNamespace.html#/s:10MongoSwift0A9NamespaceV10collectionSSSgvp":{"name":"collection","abstract":"

The collection name if this is a collection’s namespace, or nil otherwise.

","parent_name":"MongoNamespace"},"Structs/MongoNamespace.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"MongoNamespace"},"Structs/BulkWriteError.html#/s:10MongoSwift14BulkWriteErrorV4codeSivp":{"name":"code","abstract":"

An integer value identifying the error.

","parent_name":"BulkWriteError"},"Structs/BulkWriteError.html#/s:10MongoSwift14BulkWriteErrorV8codeNameSSvp":{"name":"codeName","abstract":"

A human-readable string identifying the error.

","parent_name":"BulkWriteError"},"Structs/BulkWriteError.html#/s:10MongoSwift14BulkWriteErrorV7messageSSvp":{"name":"message","abstract":"

A description of the error.

","parent_name":"BulkWriteError"},"Structs/BulkWriteError.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BulkWriteError"},"Structs/WriteConcernError.html#/s:10MongoSwift17WriteConcernErrorV4codeSivp":{"name":"code","abstract":"

An integer value identifying the write concern error.

","parent_name":"WriteConcernError"},"Structs/WriteConcernError.html#/s:10MongoSwift17WriteConcernErrorV8codeNameSSvp":{"name":"codeName","abstract":"

A human-readable string identifying write concern error.

","parent_name":"WriteConcernError"},"Structs/WriteConcernError.html#/s:10MongoSwift17WriteConcernErrorV7detailsAA8DocumentVSgvp":{"name":"details","abstract":"

A document identifying the write concern setting related to the error.

","parent_name":"WriteConcernError"},"Structs/WriteConcernError.html#/s:10MongoSwift17WriteConcernErrorV7messageSSvp":{"name":"message","abstract":"

A description of the error.

","parent_name":"WriteConcernError"},"Structs/WriteError.html#/s:10MongoSwift10WriteErrorV4codeSivp":{"name":"code","abstract":"

An integer value identifying the error.

","parent_name":"WriteError"},"Structs/WriteError.html#/s:10MongoSwift10WriteErrorV8codeNameSSvp":{"name":"codeName","abstract":"

A human-readable string identifying the error.

","parent_name":"WriteError"},"Structs/WriteError.html#/s:10MongoSwift10WriteErrorV7messageSSvp":{"name":"message","abstract":"

A description of the error.

","parent_name":"WriteError"},"Structs/WriteError.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"WriteError"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV7encoderAA11BSONEncoderCvp":{"name":"encoder","abstract":"

Encoder used by this database for BSON conversions. This encoder’s options are inherited by collections derived","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV7decoderAA11BSONDecoderCvp":{"name":"decoder","abstract":"

Decoder whose options are inherited by collections derived from this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV4nameSSvp":{"name":"name","abstract":"

The name of this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV11readConcernAA04ReadE0VSgvp":{"name":"readConcern","abstract":"

The ReadConcern set on this database, or nil if one is not set.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV14readPreferenceAA04ReadE0Cvp":{"name":"readPreference","abstract":"

The ReadPreference set on this database

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV12writeConcernAA05WriteE0VSgvp":{"name":"writeConcern","abstract":"

The WriteConcern set on this database, or nil if one is not set.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV4drop7options7sessionyAA04DropC7OptionsVSg_AA13ClientSessionCSgtKF":{"name":"drop(options:session:)","abstract":"

Drops this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV10collection_7optionsAA0A10CollectionVyAA8DocumentVGSS_AA0F7OptionsVSgtF":{"name":"collection(_:options:)","abstract":"

Access a collection within this database. If an option is not specified in the CollectionOptions param, the","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV10collection_8withType7optionsAA0A10CollectionVyxGSS_xmAA0H7OptionsVSgtSeRzSERzlF":{"name":"collection(_:withType:options:)","abstract":"

Access a collection within this database, and associates the specified Codable type T with the","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV16createCollection_7options7sessionAA0aE0VyAA8DocumentVGSS_AA06CreateE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"createCollection(_:options:session:)","abstract":"

Creates a collection in this database with the specified options.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV16createCollection_8withType7options7sessionAA0aE0VyxGSS_xmAA06CreateE7OptionsVSgAA13ClientSessionCSgtKSeRzSERzlF":{"name":"createCollection(_:withType:options:session:)","abstract":"

Creates a collection in this database with the specified options, and associates the","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV15listCollections_7options7sessionAA0A6CursorCyAA23CollectionSpecificationVGAA8DocumentVSg_AA04ListE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"listCollections(_:options:session:)","abstract":"

Lists all the collections in this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV04listA11Collections_7options7sessionSayAA0A10CollectionVyAA8DocumentVGGAJSg_AA04ListE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"listMongoCollections(_:options:session:)","abstract":"

Gets a list of MongoCollections in this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV19listCollectionNames_7options7sessionSaySSGAA8DocumentVSg_AA22ListCollectionsOptionsVSgAA13ClientSessionCSgtKF":{"name":"listCollectionNames(_:options:session:)","abstract":"

Gets a list of names of collections in this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV10runCommand_7options7sessionAA8DocumentVAH_AA03RunE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"runCommand(_:options:session:)","abstract":"

Issues a MongoDB command against this database.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV5watch_7options7sessionAA12ChangeStreamCyAA0gH5EventVyAA8DocumentVGGSayALG_AA0gH7OptionsVSgAA13ClientSessionCSgtKF":{"name":"watch(_:options:session:)","abstract":"

Starts a ChangeStream on a database. Excludes system collections.

","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV5watch_7options7session20withFullDocumentTypeAA12ChangeStreamCyAA0kL5EventVyxGGSayAA0I0VG_AA0kL7OptionsVSgAA13ClientSessionCSgxmtKSeRzSERzlF":{"name":"watch(_:options:session:withFullDocumentType:)","abstract":"

Starts a ChangeStream on a database. Excludes system collections.","parent_name":"MongoDatabase"},"Structs/MongoDatabase.html#/s:10MongoSwift0A8DatabaseV5watch_7options7session13withEventTypeAA12ChangeStreamCyxGSayAA8DocumentVG_AA0jK7OptionsVSgAA13ClientSessionCSgxmtKSeRzSERzlF":{"name":"watch(_:options:session:withEventType:)","abstract":"

Starts a ChangeStream on a database. Excludes system collections.","parent_name":"MongoDatabase"},"Structs/DropDatabaseOptions.html#/s:10MongoSwift19DropDatabaseOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"DropDatabaseOptions"},"Structs/DropDatabaseOptions.html#/s:10MongoSwift19DropDatabaseOptionsV12writeConcernAcA05WriteG0VSg_tcfc":{"name":"init(writeConcern:)","abstract":"

Initializer allowing any/all parameters to be omitted.

","parent_name":"DropDatabaseOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV18dataCodingStrategyAA04DatafG0OSgvp":{"name":"dataCodingStrategy","abstract":"

Specifies the DataCodingStrategy to use for BSON encoding/decoding operations performed by this collection.","parent_name":"CollectionOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV18dateCodingStrategyAA04DatefG0OSgvp":{"name":"dateCodingStrategy","abstract":"

Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this collection.","parent_name":"CollectionOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV11readConcernAA04ReadF0VSgvp":{"name":"readConcern","abstract":"

A read concern to set on the returned collection.

","parent_name":"CollectionOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV14readPreferenceAA04ReadF0CSgvp":{"name":"readPreference","abstract":"

A read preference to set on the returned collection.

","parent_name":"CollectionOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV18uuidCodingStrategyAA010UUIDCodingG0OSgvp":{"name":"uuidCodingStrategy","abstract":"

Specifies the UUIDCodingStrategy to use for BSON encoding/decoding operations performed by this collection.","parent_name":"CollectionOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

A write concern to set on the returned collection.

","parent_name":"CollectionOptions"},"Structs/CollectionOptions.html#/s:10MongoSwift17CollectionOptionsV18dataCodingStrategy04datefG011readConcern0I10Preference04uuidfG005writeJ0AcA04DatafG0OSg_AA04DatefG0OSgAA04ReadJ0VSgAA0pK0CSgAA010UUIDCodingG0OSgAA05WriteJ0VSgtcfc":{"name":"init(dataCodingStrategy:dateCodingStrategy:readConcern:readPreference:uuidCodingStrategy:writeConcern:)","abstract":"

Convenience initializer allowing any/all arguments to be omitted or optional.

","parent_name":"CollectionOptions"},"Structs/DropCollectionOptions.html#/s:10MongoSwift21DropCollectionOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"DropCollectionOptions"},"Structs/DropCollectionOptions.html#/s:10MongoSwift21DropCollectionOptionsV12writeConcernAcA05WriteG0VSg_tcfc":{"name":"init(writeConcern:)","abstract":"

Initializer allowing any/all parameters to be omitted.

","parent_name":"DropCollectionOptions"},"Structs/UpdateResult.html#/s:10MongoSwift12UpdateResultV12matchedCountSivp":{"name":"matchedCount","abstract":"

The number of documents that matched the filter.

","parent_name":"UpdateResult"},"Structs/UpdateResult.html#/s:10MongoSwift12UpdateResultV13modifiedCountSivp":{"name":"modifiedCount","abstract":"

The number of documents that were modified.

","parent_name":"UpdateResult"},"Structs/UpdateResult.html#/s:10MongoSwift12UpdateResultV10upsertedIdAA4BSONOSgvp":{"name":"upsertedId","abstract":"

The identifier of the inserted document if an upsert took place.

","parent_name":"UpdateResult"},"Structs/UpdateResult.html#/s:10MongoSwift12UpdateResultV13upsertedCountSivp":{"name":"upsertedCount","abstract":"

The number of documents that were upserted.

","parent_name":"UpdateResult"},"Structs/DeleteResult.html#/s:10MongoSwift12DeleteResultV12deletedCountSivp":{"name":"deletedCount","abstract":"

The number of documents that were deleted.

","parent_name":"DeleteResult"},"Structs/InsertManyResult.html#/s:10MongoSwift16InsertManyResultV13insertedCountSivp":{"name":"insertedCount","abstract":"

Number of documents inserted.

","parent_name":"InsertManyResult"},"Structs/InsertManyResult.html#/s:10MongoSwift16InsertManyResultV11insertedIdsSDySiAA4BSONOGvp":{"name":"insertedIds","abstract":"

Map of the index of the document in values to the value of its ID

","parent_name":"InsertManyResult"},"Structs/InsertOneResult.html#/s:10MongoSwift15InsertOneResultV10insertedIdAA4BSONOvp":{"name":"insertedId","abstract":"

The identifier that was inserted. If the document doesn’t have an identifier, this value","parent_name":"InsertOneResult"},"Structs/DeleteOptions.html#/s:10MongoSwift13DeleteOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"DeleteOptions"},"Structs/DeleteOptions.html#/s:10MongoSwift13DeleteOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"DeleteOptions"},"Structs/DeleteOptions.html#/s:10MongoSwift13DeleteOptionsV9collation12writeConcernAcA8DocumentVSg_AA05WriteG0VSgtcfc":{"name":"init(collation:writeConcern:)","abstract":"

Convenience initializer allowing collation to be omitted or optional

","parent_name":"DeleteOptions"},"Structs/ReplaceOptions.html#/s:10MongoSwift14ReplaceOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation.

","parent_name":"ReplaceOptions"},"Structs/ReplaceOptions.html#/s:10MongoSwift14ReplaceOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"ReplaceOptions"},"Structs/ReplaceOptions.html#/s:10MongoSwift14ReplaceOptionsV6upsertSbSgvp":{"name":"upsert","abstract":"

When true, creates a new document if no document matches the query.

","parent_name":"ReplaceOptions"},"Structs/ReplaceOptions.html#/s:10MongoSwift14ReplaceOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"ReplaceOptions"},"Structs/ReplaceOptions.html#/s:10MongoSwift14ReplaceOptionsV24bypassDocumentValidation9collation6upsert12writeConcernACSbSg_AA0F0VSgAhA05WriteK0VSgtcfc":{"name":"init(bypassDocumentValidation:collation:upsert:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be optional

","parent_name":"ReplaceOptions"},"Structs/UpdateOptions.html#/s:10MongoSwift13UpdateOptionsV12arrayFiltersSayAA8DocumentVGSgvp":{"name":"arrayFilters","abstract":"

A set of filters specifying to which array elements an update should apply.

","parent_name":"UpdateOptions"},"Structs/UpdateOptions.html#/s:10MongoSwift13UpdateOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation.

","parent_name":"UpdateOptions"},"Structs/UpdateOptions.html#/s:10MongoSwift13UpdateOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"UpdateOptions"},"Structs/UpdateOptions.html#/s:10MongoSwift13UpdateOptionsV6upsertSbSgvp":{"name":"upsert","abstract":"

When true, creates a new document if no document matches the query.

","parent_name":"UpdateOptions"},"Structs/UpdateOptions.html#/s:10MongoSwift13UpdateOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"UpdateOptions"},"Structs/UpdateOptions.html#/s:10MongoSwift13UpdateOptionsV12arrayFilters24bypassDocumentValidation9collation6upsert12writeConcernACSayAA0H0VGSg_SbSgAJSgAmA05WriteM0VSgtcfc":{"name":"init(arrayFilters:bypassDocumentValidation:collation:upsert:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be optional

","parent_name":"UpdateOptions"},"Structs/InsertOneOptions.html#/s:10MongoSwift16InsertOneOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation.

","parent_name":"InsertOneOptions"},"Structs/InsertOneOptions.html#/s:10MongoSwift16InsertOneOptionsV12writeConcernAA05WriteG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"InsertOneOptions"},"Structs/InsertOneOptions.html#/s:10MongoSwift16InsertOneOptionsV24bypassDocumentValidation12writeConcernACSbSg_AA05WriteJ0VSgtcfc":{"name":"init(bypassDocumentValidation:writeConcern:)","abstract":"

Convenience initializer allowing bypassDocumentValidation to be omitted or optional

","parent_name":"InsertOneOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV19allowPartialResultsSbSgvp":{"name":"allowPartialResults","abstract":"

Get partial results from a mongos if some shards are down (instead of throwing an error).

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV9batchSizes5Int32VSgvp":{"name":"batchSize","abstract":"

The number of documents to return per batch.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV7commentSSSgvp":{"name":"comment","abstract":"

Attaches a comment to the query.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV10cursorTypeAA06CursorF0OSgvp":{"name":"cursorType","abstract":"

Indicates the type of cursor to use. This value includes both the tailable and awaitData options.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV4hintAA4HintOSgvp":{"name":"hint","abstract":"

A hint for the index to use.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV5limits5Int64VSgvp":{"name":"limit","abstract":"

The maximum number of documents to return.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV3maxAA8DocumentVSgvp":{"name":"max","abstract":"

The exclusive upper bound for a specific index.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV14maxAwaitTimeMSs5Int64VSgvp":{"name":"maxAwaitTimeMS","abstract":"

The maximum amount of time for the server to wait on new documents to satisfy a tailable cursor","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV7maxScans5Int64VSgvp":{"name":"maxScan","abstract":"

Maximum number of documents or index keys to scan when executing the query.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV3minAA8DocumentVSgvp":{"name":"min","abstract":"

The inclusive lower bound for a specific index.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV15noCursorTimeoutSbSgvp":{"name":"noCursorTimeout","abstract":"

The server normally times out idle cursors after an inactivity period (10 minutes)","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV10projectionAA8DocumentVSgvp":{"name":"projection","abstract":"

Limits the fields to return for all matching documents.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV11readConcernAA04ReadF0VSgvp":{"name":"readConcern","abstract":"

A ReadConcern to use for this operation.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV14readPreferenceAA04ReadF0CSgvp":{"name":"readPreference","abstract":"

A ReadPreference to use for this operation.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV9returnKeySbSgvp":{"name":"returnKey","abstract":"

If true, returns only the index keys in the resulting documents.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV12showRecordIdSbSgvp":{"name":"showRecordId","abstract":"

Determines whether to return the record identifier for each document. If true, adds a field $recordId","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV4skips5Int64VSgvp":{"name":"skip","abstract":"

The number of documents to skip before returning.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV4sortAA8DocumentVSgvp":{"name":"sort","abstract":"

The order in which to return matching documents.

","parent_name":"FindOptions"},"Structs/FindOptions.html#/s:10MongoSwift11FindOptionsV19allowPartialResults9batchSize9collation7comment10cursorType4hint5limit3max0P11AwaitTimeMS0P4Scan0prS03min15noCursorTimeout10projection11readConcern0Z10Preference9returnKey12showRecordId4skip4sortACSbSg_s5Int32VSgAA8DocumentVSgSSSgAA0wM0OSgAA4HintOSgs5Int64VSgA2_A12_A12_A12_A2_AXA2_AA11ReadConcernVSgAA14ReadPreferenceCSgA2XA12_A2_tcfc":{"name":"init(allowPartialResults:batchSize:collation:comment:cursorType:hint:limit:max:maxAwaitTimeMS:maxScan:maxTimeMS:min:noCursorTimeout:projection:readConcern:readPreference:returnKey:showRecordId:skip:sort:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted or optional.

","parent_name":"FindOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV12allowDiskUseSbSgvp":{"name":"allowDiskUse","abstract":"

Enables writing to temporary files. When set to true, aggregation stages","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV9batchSizes5Int32VSgvp":{"name":"batchSize","abstract":"

The number of Documents to return per batch.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation. This only applies","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV7commentSSSgvp":{"name":"comment","abstract":"

Enables users to specify an arbitrary string to help trace the operation through","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV4hintAA4HintOSgvp":{"name":"hint","abstract":"

The index hint to use for the aggregation. The hint does not apply to $lookup and $graphLookup stages.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV11readConcernAA04ReadF0VSgvp":{"name":"readConcern","abstract":"

A ReadConcern to use in read stages of this operation.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV14readPreferenceAA04ReadF0CSgvp":{"name":"readPreference","abstract":"

A ReadPreference to use for this operation.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

A WriteConcern to use in $out stages of this operation.

","parent_name":"AggregateOptions"},"Structs/AggregateOptions.html#/s:10MongoSwift16AggregateOptionsV12allowDiskUse9batchSize24bypassDocumentValidation9collation7comment4hint9maxTimeMS11readConcern0S10Preference05writeT0ACSbSg_s5Int32VSgAnA0K0VSgSSSgAA4HintOSgs5Int64VSgAA04ReadT0VSgAA0zU0CSgAA05WriteT0VSgtcfc":{"name":"init(allowDiskUse:batchSize:bypassDocumentValidation:collation:comment:hint:maxTimeMS:readConcern:readPreference:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted or optional.

","parent_name":"AggregateOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV10backgroundSbSgvp":{"name":"background","abstract":"

Optionally tells the server to build the index in the background and not block other tasks.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV4bitss5Int32VSgvp":{"name":"bits","abstract":"

Optionally specifies the precision of the stored geo hash in the 2d index, from 1 to 32.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV10bucketSizes5Int32VSgvp":{"name":"bucketSize","abstract":"

Optionally specifies the number of units within which to group the location values in a geo haystack index.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Optionally specifies a collation to use for the index in MongoDB 3.4 and higher. If not specified, no collation","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV15defaultLanguageSSSgvp":{"name":"defaultLanguage","abstract":"

Optionally specifies the default language for text indexes. Is ‘english’ if none is provided.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV18expireAfterSecondss5Int32VSgvp":{"name":"expireAfterSeconds","abstract":"

Optionally specifies the length in time, in seconds, for documents to remain in a collection.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV16languageOverrideSSSgvp":{"name":"languageOverride","abstract":"

Optionally specifies the field in the document to override the language.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV3maxSdSgvp":{"name":"max","abstract":"

Optionally sets the maximum boundary for latitude and longitude in the 2d index.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV3minSdSgvp":{"name":"min","abstract":"

Optionally sets the minimum boundary for latitude and longitude in the index in a 2d index.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV4nameSSSgvp":{"name":"name","abstract":"

Optionally specify a specific name for the index outside of the default generated name. If none is provided then","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV23partialFilterExpressionAA8DocumentVSgvp":{"name":"partialFilterExpression","abstract":"

Optionally specifies a filter for use in a partial index. Only documents that match the filter expression are","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV6sparseSbSgvp":{"name":"sparse","abstract":"

Optionally tells the index to only reference documents with the specified field in the index.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV06sphereC7Versions5Int32VSgvp":{"name":"sphereIndexVersion","abstract":"

Optionally specifies the 2dsphere index version number. MongoDB 2.4 can only support version 1. MongoDB 2.6 and","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV13storageEngineAA8DocumentVSgvp":{"name":"storageEngine","abstract":"

Optionally used only in MongoDB 3.0.0 and higher. Allows users to configure the storage engine on a per-index","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV04textC7Versions5Int32VSgvp":{"name":"textIndexVersion","abstract":"

Optionally provides the text index version number. MongoDB 2.4 can only support version 1. MongoDB 2.6 and","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV6uniqueSbSgvp":{"name":"unique","abstract":"

Optionally forces the index to be unique.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV7versions5Int32VSgvp":{"name":"version","abstract":"

Optionally specifies the index version number, either 0 or 1.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV7weightsAA8DocumentVSgvp":{"name":"weights","abstract":"

Optionally specifies fields in the index and their corresponding weight values.

","parent_name":"IndexOptions"},"Structs/IndexOptions.html#/s:10MongoSwift12IndexOptionsV10background4bits10bucketSize9collation15defaultLanguage18expireAfterSeconds16languageOverride3max3min4name23partialFilterExpression6sparse06sphereC7Version13storageEngine04textcY06unique7version7weightsACSbSg_s5Int32VSgAyA8DocumentVSgSSSgAYA1_SdSgA2_A1_A0_AvYA0_AyvYA0_tcfc":{"name":"init(background:bits:bucketSize:collation:defaultLanguage:expireAfterSeconds:languageOverride:max:min:name:partialFilterExpression:sparse:sphereIndexVersion:storageEngine:textIndexVersion:unique:version:weights:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted.

","parent_name":"IndexOptions"},"Structs/IndexModel.html#/s:10MongoSwift10IndexModelV4keysAA8DocumentVvp":{"name":"keys","abstract":"

Contains the required keys for the index.

","parent_name":"IndexModel"},"Structs/IndexModel.html#/s:10MongoSwift10IndexModelV7optionsAA0C7OptionsVSgvp":{"name":"options","abstract":"

Contains the options for the index.

","parent_name":"IndexModel"},"Structs/IndexModel.html#/s:10MongoSwift10IndexModelV4keys7optionsAcA8DocumentV_AA0C7OptionsVSgtcfc":{"name":"init(keys:options:)","abstract":"

Convenience initializer providing a default options value

","parent_name":"IndexModel"},"Structs/IndexModel.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"IndexModel"},"Structs/IndexModel.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"IndexModel"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV12arrayFiltersSayAA8DocumentVGSgvp":{"name":"arrayFilters","abstract":"

A set of filters specifying to which array elements an update should apply.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation to use.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV10projectionAA8DocumentVSgvp":{"name":"projection","abstract":"

Limits the fields to return for the matching document.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV14returnDocumentAA06ReturnI0OSgvp":{"name":"returnDocument","abstract":"

WhenReturnDocument.After, returns the updated or inserted document rather than the original.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV4sortAA8DocumentVSgvp":{"name":"sort","abstract":"

Determines which document the operation modifies if the query selects multiple documents.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV6upsertSbSgvp":{"name":"upsert","abstract":"

When true, creates a new document if no document matches the query.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV12writeConcernAA05WriteI0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndUpdateOptions.html#/s:10MongoSwift23FindOneAndUpdateOptionsV12arrayFilters24bypassDocumentValidation9collation9maxTimeMS10projection06returnK04sort6upsert12writeConcernACSayAA0K0VGSg_SbSgANSgs5Int64VSgArA06ReturnK0OSgArqA05WriteV0VSgtcfc":{"name":"init(arrayFilters:bypassDocumentValidation:collation:maxTimeMS:projection:returnDocument:sort:upsert:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted/optional.

","parent_name":"FindOneAndUpdateOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation to use.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV10projectionAA8DocumentVSgvp":{"name":"projection","abstract":"

Limits the fields to return for the matching document.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV14returnDocumentAA06ReturnI0OSgvp":{"name":"returnDocument","abstract":"

When ReturnDocument.After, returns the replaced or inserted document rather than the original.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV4sortAA8DocumentVSgvp":{"name":"sort","abstract":"

Determines which document the operation modifies if the query selects multiple documents.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV6upsertSbSgvp":{"name":"upsert","abstract":"

When true, creates a new document if no document matches the query.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV12writeConcernAA05WriteI0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndReplaceOptions.html#/s:10MongoSwift24FindOneAndReplaceOptionsV24bypassDocumentValidation9collation9maxTimeMS10projection06returnI04sort6upsert12writeConcernACSbSg_AA0I0VSgs5Int64VSgAoA06ReturnI0OSgAolA05WriteT0VSgtcfc":{"name":"init(bypassDocumentValidation:collation:maxTimeMS:projection:returnDocument:sort:upsert:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted/optional.

","parent_name":"FindOneAndReplaceOptions"},"Structs/FindOneAndDeleteOptions.html#/s:10MongoSwift23FindOneAndDeleteOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation to use.

","parent_name":"FindOneAndDeleteOptions"},"Structs/FindOneAndDeleteOptions.html#/s:10MongoSwift23FindOneAndDeleteOptionsV9maxTimeMSs5Int64VSgvp":{"name":"maxTimeMS","abstract":"

The maximum amount of time to allow the query to run.

","parent_name":"FindOneAndDeleteOptions"},"Structs/FindOneAndDeleteOptions.html#/s:10MongoSwift23FindOneAndDeleteOptionsV10projectionAA8DocumentVSgvp":{"name":"projection","abstract":"

Limits the fields to return for the matching document.

","parent_name":"FindOneAndDeleteOptions"},"Structs/FindOneAndDeleteOptions.html#/s:10MongoSwift23FindOneAndDeleteOptionsV4sortAA8DocumentVSgvp":{"name":"sort","abstract":"

Determines which document the operation modifies if the query selects multiple documents.

","parent_name":"FindOneAndDeleteOptions"},"Structs/FindOneAndDeleteOptions.html#/s:10MongoSwift23FindOneAndDeleteOptionsV12writeConcernAA05WriteI0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the command.

","parent_name":"FindOneAndDeleteOptions"},"Structs/FindOneAndDeleteOptions.html#/s:10MongoSwift23FindOneAndDeleteOptionsV9collation9maxTimeMS10projection4sort12writeConcernAcA8DocumentVSg_s5Int64VSgA2kA05WriteO0VSgtcfc":{"name":"init(collation:maxTimeMS:projection:sort:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted/optional

","parent_name":"FindOneAndDeleteOptions"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV12deletedCountSivp":{"name":"deletedCount","abstract":"

Number of documents deleted.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV13insertedCountSivp":{"name":"insertedCount","abstract":"

Number of documents inserted.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV11insertedIdsSDySiAA4BSONOGvp":{"name":"insertedIds","abstract":"

Map of the index of the operation to the id of the inserted document.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV12matchedCountSivp":{"name":"matchedCount","abstract":"

Number of documents matched for update.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV13modifiedCountSivp":{"name":"modifiedCount","abstract":"

Number of documents modified.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV13upsertedCountSivp":{"name":"upsertedCount","abstract":"

Number of documents upserted.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:10MongoSwift15BulkWriteResultV11upsertedIdsSDySiAA4BSONOGvp":{"name":"upsertedIds","abstract":"

Map of the index of the operation to the id of the upserted document.

","parent_name":"BulkWriteResult"},"Structs/BulkWriteResult.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BulkWriteResult"},"Structs/BulkWriteOptions.html#/s:10MongoSwift16BulkWriteOptionsV24bypassDocumentValidationSbSgvp":{"name":"bypassDocumentValidation","abstract":"

If true, allows the write to opt-out of document level validation.

","parent_name":"BulkWriteOptions"},"Structs/BulkWriteOptions.html#/s:10MongoSwift16BulkWriteOptionsV7orderedSbvp":{"name":"ordered","abstract":"

If true (the default), operations will be executed serially in order","parent_name":"BulkWriteOptions"},"Structs/BulkWriteOptions.html#/s:10MongoSwift16BulkWriteOptionsV12writeConcernAA0dG0VSgvp":{"name":"writeConcern","abstract":"

An optional WriteConcern to use for the bulk write.

","parent_name":"BulkWriteOptions"},"Structs/BulkWriteOptions.html#/s:10MongoSwift16BulkWriteOptionsV24bypassDocumentValidation7ordered12writeConcernACSbSg_AgA0dK0VSgtcfc":{"name":"init(bypassDocumentValidation:ordered:writeConcern:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted or optional

","parent_name":"BulkWriteOptions"},"Structs/UpdateModelOptions.html#/s:10MongoSwift18UpdateModelOptionsV12arrayFiltersSayAA8DocumentVGSgvp":{"name":"arrayFilters","abstract":"

A set of filters specifying to which array elements an update should apply.

","parent_name":"UpdateModelOptions"},"Structs/UpdateModelOptions.html#/s:10MongoSwift18UpdateModelOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

The collation to use.

","parent_name":"UpdateModelOptions"},"Structs/UpdateModelOptions.html#/s:10MongoSwift18UpdateModelOptionsV6upsertSbSgvp":{"name":"upsert","abstract":"

When true, creates a new document if no document matches the query.

","parent_name":"UpdateModelOptions"},"Structs/UpdateModelOptions.html#/s:10MongoSwift18UpdateModelOptionsV12arrayFilters9collation6upsertACSayAA8DocumentVGSg_AHSgSbSgtcfc":{"name":"init(arrayFilters:collation:upsert:)","abstract":"

Initializer allowing any/all options to be omitted or optional.

","parent_name":"UpdateModelOptions"},"Structs/ReplaceOneModelOptions.html#/s:10MongoSwift22ReplaceOneModelOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

The collation to use.

","parent_name":"ReplaceOneModelOptions"},"Structs/ReplaceOneModelOptions.html#/s:10MongoSwift22ReplaceOneModelOptionsV6upsertSbSgvp":{"name":"upsert","abstract":"

When true, creates a new document if no document matches the query.

","parent_name":"ReplaceOneModelOptions"},"Structs/ReplaceOneModelOptions.html#/s:10MongoSwift22ReplaceOneModelOptionsV9collation6upsertAcA8DocumentVSg_SbSgtcfc":{"name":"init(collation:upsert:)","abstract":"

Initializer allowing any/all options to be omitted or optional.

","parent_name":"ReplaceOneModelOptions"},"Structs/DeleteModelOptions.html#/s:10MongoSwift18DeleteModelOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

The collation to use.

","parent_name":"DeleteModelOptions"},"Structs/DeleteModelOptions.html#/s:10MongoSwift18DeleteModelOptionsV9collationAcA8DocumentVSg_tcfc":{"name":"init(collation:)","abstract":"

Initializer allowing any/all options to be omitted or optional.

","parent_name":"DeleteModelOptions"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV7encoderAA11BSONEncoderCvp":{"name":"encoder","abstract":"

Encoder used by this collection for BSON conversions. (e.g. converting CollectionTypes, indexes, and options","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV7decoderAA11BSONDecoderCvp":{"name":"decoder","abstract":"

Decoder used by this collection for BSON conversions (e.g. converting documents to CollectionTypes).

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV0C4Typea":{"name":"CollectionType","abstract":"

A Codable type associated with this MongoCollection instance.","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV4nameSSvp":{"name":"name","abstract":"

The name of this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV11readConcernAA04ReadE0VSgvp":{"name":"readConcern","abstract":"

The ReadConcern set on this collection, or nil if one is not set.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV14readPreferenceAA04ReadE0Cvp":{"name":"readPreference","abstract":"

The ReadPreference set on this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV12writeConcernAA05WriteE0VSgvp":{"name":"writeConcern","abstract":"

The WriteConcern set on this collection, or nil if one is not set.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV4drop7options7sessionyAA04DropC7OptionsVSg_AA13ClientSessionCSgtKF":{"name":"drop(options:session:)","abstract":"

Drops this collection from its parent database.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9bulkWrite_7options7sessionAA04BulkE6ResultVSgSayAA0E5ModelOyxGG_AA0hE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"bulkWrite(_:options:session:)","abstract":"

Execute multiple write operations.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV5watch_7options7sessionAA12ChangeStreamCyAA0gH5EventVyxGGSayAA8DocumentVG_AA0gH7OptionsVSgAA13ClientSessionCSgtKF":{"name":"watch(_:options:session:)","abstract":"

Starts a ChangeStream on a collection. The CollectionType will be associated with the fullDocument","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV5watch_7options7session20withFullDocumentTypeAA12ChangeStreamCyAA0kL5EventVyqd__GGSayAA0I0VG_AA0kL7OptionsVSgAA13ClientSessionCSgqd__mtKSeRd__SERd__lF":{"name":"watch(_:options:session:withFullDocumentType:)","abstract":"

Starts a ChangeStream on a collection. Associates the specified Codable type T with the fullDocument","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV5watch_7options7session13withEventTypeAA12ChangeStreamCyqd__GSayAA8DocumentVG_AA0jK7OptionsVSgAA13ClientSessionCSgqd__mtKSeRd__SERd__lF":{"name":"watch(_:options:session:withEventType:)","abstract":"

Starts a ChangeStream on a collection. Associates the specified Codable type T with the returned","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV16findOneAndDelete_7options7sessionxSgAA8DocumentV_AA04FindefG7OptionsVSgAA13ClientSessionCSgtKF":{"name":"findOneAndDelete(_:options:session:)","abstract":"

Finds a single document and deletes it, returning the original.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV17findOneAndReplace6filter11replacement7options7sessionxSgAA8DocumentV_xAA04FindefG7OptionsVSgAA13ClientSessionCSgtKF":{"name":"findOneAndReplace(filter:replacement:options:session:)","abstract":"

Finds a single document and replaces it, returning either the original or the replaced document.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV16findOneAndUpdate6filter6update7options7sessionxSgAA8DocumentV_AkA04FindefG7OptionsVSgAA13ClientSessionCSgtKF":{"name":"findOneAndUpdate(filter:update:options:session:)","abstract":"

Finds a single document and updates it, returning either the original or the updated document.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV11createIndex_12indexOptions7options7sessionSSAA8DocumentV_AA0eG0VSgAA06CreateeG0VSgAA13ClientSessionCSgtKF":{"name":"createIndex(_:indexOptions:options:session:)","abstract":"

Creates an index over the collection for the provided keys with the provided options.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV11createIndex_7options7sessionSSAA0E5ModelV_AA06CreateE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"createIndex(_:options:session:)","abstract":"

Creates an index over the collection for the provided keys with the provided options.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV13createIndexes_7options7sessionSaySSGSayAA10IndexModelVG_AA06CreateH7OptionsVSgAA13ClientSessionCSgtKF":{"name":"createIndexes(_:options:session:)","abstract":"

Creates multiple indexes in the collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9dropIndex_7options7sessionAA8DocumentVSS_AA04DropE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"dropIndex(_:options:session:)","abstract":"

Drops a single index from the collection by the index name.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9dropIndex_7options7sessionAA8DocumentVAH_AA04DropE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"dropIndex(_:options:session:)","abstract":"

Attempts to drop a single index from the collection given the keys describing it.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9dropIndex_7options7sessionAA8DocumentVAA0E5ModelV_AA04DropE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"dropIndex(_:options:session:)","abstract":"

Attempts to drop a single index from the collection given an IndexModel describing it.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV11dropIndexes7options7sessionAA8DocumentVAA16DropIndexOptionsVSg_AA13ClientSessionCSgtKF":{"name":"dropIndexes(options:session:)","abstract":"

Drops all indexes in the collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV11listIndexes7sessionAA0A6CursorCyAA10IndexModelVGAA13ClientSessionCSg_tKF":{"name":"listIndexes(session:)","abstract":"

Retrieves a list of the indexes currently on this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV14listIndexNames7sessionSaySSGAA13ClientSessionCSg_tKF":{"name":"listIndexNames(session:)","abstract":"

Retrieves a list of names of the indexes currently on this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV4find_7options7sessionAA0A6CursorCyxGAA8DocumentV_AA11FindOptionsVSgAA13ClientSessionCSgtKF":{"name":"find(_:options:session:)","abstract":"

Finds the documents in this collection which match the provided filter.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9aggregate_7options7sessionAA0A6CursorCyAA8DocumentVGSayAJG_AA16AggregateOptionsVSgAA13ClientSessionCSgtKF":{"name":"aggregate(_:options:session:)","abstract":"

Runs an aggregation framework pipeline against this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV14countDocuments_7options7sessionSiAA8DocumentV_AA05CountE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"countDocuments(_:options:session:)","abstract":"

Counts the number of documents in this collection matching the provided filter. Note that an empty filter will","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV22estimatedDocumentCount7options7sessionSiAA09EstimatedeF7OptionsVSg_AA13ClientSessionCSgtKF":{"name":"estimatedDocumentCount(options:session:)","abstract":"

Gets an estimate of the count of documents in this collection using collection metadata.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV8distinct9fieldName6filter7options7sessionSayAA4BSONOGSS_AA8DocumentVAA15DistinctOptionsVSgAA13ClientSessionCSgtKF":{"name":"distinct(fieldName:filter:options:session:)","abstract":"

Finds the distinct values for a specified field across the collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9insertOne_7options7sessionAA06InsertE6ResultVSgx_AA0hE7OptionsVSgAA13ClientSessionCSgtKF":{"name":"insertOne(_:options:session:)","abstract":"

Encodes the provided value to BSON and inserts it. If the value is missing an identifier, one will be","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV10insertMany_7options7sessionAA06InsertE6ResultVSgSayxG_AA16BulkWriteOptionsVSgAA13ClientSessionCSgtKF":{"name":"insertMany(_:options:session:)","abstract":"

Encodes the provided values to BSON and inserts them. If any values are","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV10replaceOne6filter11replacement7options7sessionAA12UpdateResultVSgAA8DocumentV_xAA14ReplaceOptionsVSgAA13ClientSessionCSgtKF":{"name":"replaceOne(filter:replacement:options:session:)","abstract":"

Replaces a single document matching the provided filter in this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9updateOne6filter0D07options7sessionAA12UpdateResultVSgAA8DocumentV_AmA0I7OptionsVSgAA13ClientSessionCSgtKF":{"name":"updateOne(filter:update:options:session:)","abstract":"

Updates a single document matching the provided filter in this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV10updateMany6filter0D07options7sessionAA12UpdateResultVSgAA8DocumentV_AmA0I7OptionsVSgAA13ClientSessionCSgtKF":{"name":"updateMany(filter:update:options:session:)","abstract":"

Updates multiple documents matching the provided filter in this collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV9deleteOne_7options7sessionAA12DeleteResultVSgAA8DocumentV_AA0H7OptionsVSgAA13ClientSessionCSgtKF":{"name":"deleteOne(_:options:session:)","abstract":"

Deletes a single matching document from the collection.

","parent_name":"MongoCollection"},"Structs/MongoCollection.html#/s:10MongoSwift0A10CollectionV10deleteMany_7options7sessionAA12DeleteResultVSgAA8DocumentV_AA0H7OptionsVSgAA13ClientSessionCSgtKF":{"name":"deleteMany(_:options:session:)","abstract":"

Deletes multiple documents

","parent_name":"MongoCollection"},"Structs/TLSOptions.html#/s:10MongoSwift10TLSOptionsV21allowInvalidHostnamesSbSgvp":{"name":"allowInvalidHostnames","abstract":"

Indicates whether invalid hostnames are allowed. By default this is set to false.

","parent_name":"TLSOptions"},"Structs/TLSOptions.html#/s:10MongoSwift10TLSOptionsV6caFile10Foundation3URLVSgvp":{"name":"caFile","abstract":"

Specifies the path to the certificate authority file.

","parent_name":"TLSOptions"},"Structs/TLSOptions.html#/s:10MongoSwift10TLSOptionsV7pemFile10Foundation3URLVSgvp":{"name":"pemFile","abstract":"

Specifies the path to the client certificate key file.

","parent_name":"TLSOptions"},"Structs/TLSOptions.html#/s:10MongoSwift10TLSOptionsV11pemPasswordSSSgvp":{"name":"pemPassword","abstract":"

Specifies the client certificate key password.

","parent_name":"TLSOptions"},"Structs/TLSOptions.html#/s:10MongoSwift10TLSOptionsV18weakCertValidationSbSgvp":{"name":"weakCertValidation","abstract":"

Indicates whether invalid certificates are allowed. By default this is set to false.

","parent_name":"TLSOptions"},"Structs/TLSOptions.html#/s:10MongoSwift10TLSOptionsV21allowInvalidHostnames6caFile03pemH00I8Password18weakCertValidationACSbSg_10Foundation3URLVSgAMSSSgAItcfc":{"name":"init(allowInvalidHostnames:caFile:pemFile:pemPassword:weakCertValidation:)","abstract":"

Convenience initializer allowing any/all arguments to be omitted or optional.

","parent_name":"TLSOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV18dataCodingStrategyAA04DatafG0OSgvp":{"name":"dataCodingStrategy","abstract":"

Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this database and","parent_name":"DatabaseOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV18dateCodingStrategyAA04DatefG0OSgvp":{"name":"dateCodingStrategy","abstract":"

Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this database and","parent_name":"DatabaseOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV11readConcernAA04ReadF0VSgvp":{"name":"readConcern","abstract":"

A read concern to set on the retrieved database.

","parent_name":"DatabaseOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV14readPreferenceAA04ReadF0CSgvp":{"name":"readPreference","abstract":"

A read preference to set on the retrieved database.

","parent_name":"DatabaseOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV18uuidCodingStrategyAA010UUIDCodingG0OSgvp":{"name":"uuidCodingStrategy","abstract":"

Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this database and","parent_name":"DatabaseOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

A write concern to set on the retrieved database.

","parent_name":"DatabaseOptions"},"Structs/DatabaseOptions.html#/s:10MongoSwift15DatabaseOptionsV18dataCodingStrategy04datefG011readConcern0I10Preference04uuidfG005writeJ0AcA04DatafG0OSg_AA04DatefG0OSgAA04ReadJ0VSgAA0pK0CSgAA010UUIDCodingG0OSgAA05WriteJ0VSgtcfc":{"name":"init(dataCodingStrategy:dateCodingStrategy:readConcern:readPreference:uuidCodingStrategy:writeConcern:)","abstract":"

Convenience initializer allowing any/all arguments to be omitted or optional.

","parent_name":"DatabaseOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV17commandMonitoringSbvp":{"name":"commandMonitoring","abstract":"

Indicates whether this client should publish command monitoring events. If true, the following event types will","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV18dataCodingStrategyAA04DatafG0OSgvp":{"name":"dataCodingStrategy","abstract":"

Specifies the DataCodingStrategy to use for BSON encoding/decoding operations performed by this client and any","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV18dateCodingStrategyAA04DatefG0OSgvp":{"name":"dateCodingStrategy","abstract":"

Specifies the DateCodingStrategy to use for BSON encoding/decoding operations performed by this client and any","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV18notificationCenterSo014NSNotificationF0CSgvp":{"name":"notificationCenter","abstract":"

If command and/or server monitoring is enabled, indicates the NotificationCenter events are posted to. If one","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV11readConcernAA04ReadF0VSgvp":{"name":"readConcern","abstract":"

Specifies a ReadConcern to use for the client.

","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV14readPreferenceAA04ReadF0CSgvp":{"name":"readPreference","abstract":"

Specifies a ReadPreference to use for the client.

","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV10retryReadsSbSgvp":{"name":"retryReads","abstract":"

Determines whether the client should retry supported read operations (on by default).

","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV11retryWritesSbSgvp":{"name":"retryWrites","abstract":"

Determines whether the client should retry supported write operations (on by default).

","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV16serverMonitoringSbvp":{"name":"serverMonitoring","abstract":"

Indicates whether this client should publish command monitoring events. If true, the following event types will","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV03tlsD0AA10TLSOptionsVSgvp":{"name":"tlsOptions","abstract":"

Specifies the TLS/SSL options to use for database connections.

","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV18uuidCodingStrategyAA010UUIDCodingG0OSgvp":{"name":"uuidCodingStrategy","abstract":"

Specifies the UUIDCodingStrategy to use for BSON encoding/decoding operations performed by this client and any","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV12writeConcernAA05WriteF0VSgvp":{"name":"writeConcern","abstract":"

Specifies a WriteConcern to use for the client.

","parent_name":"ClientOptions"},"Structs/ClientOptions.html#/s:10MongoSwift13ClientOptionsV17commandMonitoring18dataCodingStrategy04datehI018notificationCenter11readConcern0M10Preference10retryReads0P6Writes06serverF003tlsD004uuidhI005writeN0ACSb_AA04DatahI0OSgAA04DatehI0OSgSo014NSNotificationL0CSgAA04ReadN0VSgAA0zO0CSgSbSgA3_SbAA10TLSOptionsVSgAA010UUIDCodingI0OSgAA05WriteN0VSgtcfc":{"name":"init(commandMonitoring:dataCodingStrategy:dateCodingStrategy:notificationCenter:readConcern:readPreference:retryReads:retryWrites:serverMonitoring:tlsOptions:uuidCodingStrategy:writeConcern:)","abstract":"

Convenience initializer allowing any/all to be omitted or optional.

","parent_name":"ClientOptions"},"Structs/ClientSessionOptions.html#/s:10MongoSwift20ClientSessionOptionsV17causalConsistencySbSgvp":{"name":"causalConsistency","abstract":"

Whether to enable causal consistency for this session. By default, causal consistency is enabled.

","parent_name":"ClientSessionOptions"},"Structs/ClientSessionOptions.html#/s:10MongoSwift20ClientSessionOptionsV17causalConsistencyACSbSg_tcfc":{"name":"init(causalConsistency:)","abstract":"

Convenience initializer allowing any/all parameters to be omitted.

","parent_name":"ClientSessionOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV9batchSizes5Int32VSgvp":{"name":"batchSize","abstract":"

The number of documents to return per batch. If omitted, the server will use its default batch size.

","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV9collationAA8DocumentVSgvp":{"name":"collation","abstract":"

Specifies a collation.

","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV12fullDocumentAA04FullG0OSgvp":{"name":"fullDocument","abstract":"

Indicates how the fullDocument field of a change stream document should be filled out by the server.","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV14maxAwaitTimeMSs5Int64VSgvp":{"name":"maxAwaitTimeMS","abstract":"

The maximum amount of time in milliseconds for the server to wait on new documents to satisfy a","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV11resumeAfterAA11ResumeTokenVSgvp":{"name":"resumeAfter","abstract":"

A ResumeToken that manually specifies the logical starting point for the new change stream.","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV20startAtOperationTimeAA9TimestampVSgvp":{"name":"startAtOperationTime","abstract":"

The change stream will only provide changes that occurred at or after the specified timestamp.","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamOptions.html#/s:10MongoSwift19ChangeStreamOptionsV9batchSize9collation12fullDocument14maxAwaitTimeMS11resumeAfter016startAtOperationM0ACs5Int32VSg_AA0J0VSgAA04FullJ0OSgs5Int64VSgAA11ResumeTokenVSgAA9TimestampVSgtcfc":{"name":"init(batchSize:collation:fullDocument:maxAwaitTimeMS:resumeAfter:startAtOperationTime:)","abstract":"

Initializes a ChangeStreamOptions.

","parent_name":"ChangeStreamOptions"},"Structs/ChangeStreamEvent.html#/s:10MongoSwift17ChangeStreamEventV13operationTypeAA09OperationG0Ovp":{"name":"operationType","abstract":"

Describes the type of operation for this change.

","parent_name":"ChangeStreamEvent"},"Structs/ChangeStreamEvent.html#/s:10MongoSwift17ChangeStreamEventV3_idAA11ResumeTokenVvp":{"name":"_id","abstract":"

An opaque token for use when resuming an interrupted change stream.

","parent_name":"ChangeStreamEvent"},"Structs/ChangeStreamEvent.html#/s:10MongoSwift17ChangeStreamEventV2nsAA0A9NamespaceVvp":{"name":"ns","abstract":"

A document containing the database and collection names in which this change happened.

","parent_name":"ChangeStreamEvent"},"Structs/ChangeStreamEvent.html#/s:10MongoSwift17ChangeStreamEventV11documentKeyAA8DocumentVSgvp":{"name":"documentKey","abstract":"

Only present for options of type insert, update, replace and delete. For unsharded collections this","parent_name":"ChangeStreamEvent"},"Structs/ChangeStreamEvent.html#/s:10MongoSwift17ChangeStreamEventV17updateDescriptionAA06UpdateG0VSgvp":{"name":"updateDescription","abstract":"

An UpdateDescription containing updated and removed fields in this operation. Only present for operations of","parent_name":"ChangeStreamEvent"},"Structs/ChangeStreamEvent.html#/s:10MongoSwift17ChangeStreamEventV12fullDocumentxSgvp":{"name":"fullDocument","abstract":"

Always present for operations of type insert and replace. Also present for operations of type update if","parent_name":"ChangeStreamEvent"},"Structs/UpdateDescription.html#/s:10MongoSwift17UpdateDescriptionV13updatedFieldsAA8DocumentVvp":{"name":"updatedFields","abstract":"

A document containing key:value pairs of names of the fields that were changed, and the new","parent_name":"UpdateDescription"},"Structs/UpdateDescription.html#/s:10MongoSwift17UpdateDescriptionV13removedFieldsSaySSGvp":{"name":"removedFields","abstract":"

An array of field names that were removed from the document.

","parent_name":"UpdateDescription"},"Structs/ResumeToken.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"ResumeToken"},"Structs/ResumeToken.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"ResumeToken"},"Structs/Document.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV4fromACs7Decoder_p_tKcfc":{"name":"init(from:)","abstract":"

This method will work with any Decoder, but for non-BSON","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV5Indexa":{"name":"Index","abstract":"

The index type of a document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV10startIndexSivp":{"name":"startIndex","abstract":"

Returns the start index of the Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV8endIndexSivp":{"name":"endIndex","abstract":"

Returns the end index of the Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV5index5afterS2i_tF":{"name":"index(after:)","abstract":"

Returns the index after the given index for this Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentVySS3key_AA4BSONO5valuetSicip":{"name":"subscript(_:)","abstract":"

Allows access to a KeyValuePair from the Document, given the position of the desired KeyValuePair held","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentVyACSnySiGcip":{"name":"subscript(_:)","abstract":"

Allows access to a KeyValuePair from the Document, given a range of indices of the desired KeyValuePair‘s","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV12KeyValuePaira":{"name":"KeyValuePair","abstract":"

The element type of a document: a tuple containing an individual key-value pair.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV11SubSequencea":{"name":"SubSequence","abstract":"

The type that is returned from methods such as dropFirst() and split().

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV7isEmptySbvp":{"name":"isEmpty","abstract":"

Returns a Bool indicating whether the document is empty.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV12makeIteratorAA0cE0CyF":{"name":"makeIterator()","abstract":"

Returns a DocumentIterator over the values in this Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV9mapValuesyAcA4BSONOAFKXEKF":{"name":"mapValues(_:)","abstract":"

Returns a new document containing the keys of this document with the values transformed by the given closure.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV9dropFirstyACSiF":{"name":"dropFirst(_:)","abstract":"

Returns a document containing all but the given number of initial key-value pairs.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV8dropLastyACSiF":{"name":"dropLast(_:)","abstract":"

Returns a document containing all but the given number of final key-value pairs.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV4drop5whileACSbSS3key_AA4BSONO5valuet_tKXE_tKF":{"name":"drop(while:)","abstract":"

Returns a document by skipping the initial, consecutive key-value pairs that satisfy the given predicate.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV6prefixyACSiF":{"name":"prefix(_:)","abstract":"

Returns a document, up to the specified maximum length, containing the initial key-value pairs of the document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV6prefix5whileACSbSS3key_AA4BSONO5valuet_tKXE_tKF":{"name":"prefix(while:)","abstract":"

Returns a document containing the initial, consecutive key-value pairs that satisfy the given predicate.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV6suffixyACSiF":{"name":"suffix(_:)","abstract":"

Returns a document, up to the specified maximum length, containing the final key-value pairs of the document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV5split9maxSplits25omittingEmptySubsequences14whereSeparatorSayACGSi_S2bSS3key_AA4BSONO5valuet_tKXEtKF":{"name":"split(maxSplits:omittingEmptySubsequences:whereSeparator:)","abstract":"

Returns the longest possible subsequences of the document, in order, that don’t contain key-value pairs","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV6filteryACSbSS3key_AA4BSONO5valuet_tKXEKF":{"name":"filter(_:)","abstract":"

Returns a new document containing the elements of the document that satisfy the given predicate.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV4keysSaySSGvp":{"name":"keys","abstract":"

Returns a [String] containing the keys in this Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV6valuesSayAA4BSONOGvp":{"name":"values","abstract":"

Returns a [BSONValue] containing the values stored in this Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV5countSivp":{"name":"count","abstract":"

Returns the number of (key, value) pairs stored at the top level of this Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV12extendedJSONSSvp":{"name":"extendedJSON","abstract":"

Returns the relaxed extended JSON representation of this Document.","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV21canonicalExtendedJSONSSvp":{"name":"canonicalExtendedJSON","abstract":"

Returns the canonical extended JSON representation of this Document.","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV7rawBSON10Foundation4DataVvp":{"name":"rawBSON","abstract":"

Returns a copy of the raw BSON data for this Document, represented as Data.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentVACycfc":{"name":"init()","abstract":"

Initializes a new, empty Document.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV8fromJSONAC10Foundation4DataV_tKcfc":{"name":"init(fromJSON:)","abstract":"

Constructs a new Document from the provided JSON text.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV8fromJSONACSS_tKcfc":{"name":"init(fromJSON:)","abstract":"

Convenience initializer for constructing a Document from a String.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV8fromBSONAC10Foundation4DataV_tKcfc":{"name":"init(fromBSON:)","abstract":"

Constructs a Document from raw BSON Data.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV6hasKeyySbSSF":{"name":"hasKey(_:)","abstract":"

Returns a Boolean indicating whether this Document contains the provided key.

","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentVyAA4BSONOSgSScip":{"name":"subscript(_:)","abstract":"

Allows setting values and retrieving values using subscript syntax.","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV_7defaultAA4BSONOSS_AFyXKtcip":{"name":"subscript(_:default:)","abstract":"

An implementation identical to subscript(key: String), but offers the ability to choose a default value if the","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV13dynamicMemberAA4BSONOSgSS_tcip":{"name":"subscript(dynamicMember:)","abstract":"

Allows setting values and retrieving values using dot-notation syntax.","parent_name":"Document"},"Structs/Document.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV11descriptionSSvp":{"name":"description","abstract":"

Returns the relaxed extended JSON representation of this Document.","parent_name":"Document"},"Structs/Document.html#/s:10MongoSwift8DocumentV17dictionaryLiteralACSS_AA4BSONOtd_tcfc":{"name":"init(dictionaryLiteral:)","abstract":"

Initializes a Document using a dictionary literal where the","parent_name":"Document"},"Structs/Document.html#/s:SH4hash4intoys6HasherVz_tF":{"name":"hash(into:)","parent_name":"Document"},"Structs/BSONCoderOptions.html#/s:10MongoSwift22CodingStrategyProviderP04datacD0AA04DatacD0OSgvp":{"name":"dataCodingStrategy","parent_name":"BSONCoderOptions"},"Structs/BSONCoderOptions.html#/s:10MongoSwift22CodingStrategyProviderP04datecD0AA04DatecD0OSgvp":{"name":"dateCodingStrategy","parent_name":"BSONCoderOptions"},"Structs/BSONCoderOptions.html#/s:10MongoSwift22CodingStrategyProviderP04uuidcD0AA010UUIDCodingD0OSgvp":{"name":"uuidCodingStrategy","parent_name":"BSONCoderOptions"},"Structs/BSONCoderOptions.html#/s:10MongoSwift16BSONCoderOptionsV18dataCodingStrategy04datefG004uuidfG0AcA04DatafG0OSg_AA04DatefG0OSgAA010UUIDCodingG0OSgtcfc":{"name":"init(dataCodingStrategy:dateCodingStrategy:uuidCodingStrategy:)","abstract":"

Initializes a new BSONCoderOptions.

","parent_name":"BSONCoderOptions"},"Structs/Timestamp.html#/s:10MongoSwift9TimestampV9timestamps6UInt32Vvp":{"name":"timestamp","abstract":"

A timestamp representing seconds since the Unix epoch.

","parent_name":"Timestamp"},"Structs/Timestamp.html#/s:10MongoSwift9TimestampV9increments6UInt32Vvp":{"name":"increment","abstract":"

An incrementing ordinal for operations within a given second.

","parent_name":"Timestamp"},"Structs/Timestamp.html#/s:10MongoSwift9TimestampV9timestamp3incACs6UInt32V_AGtcfc":{"name":"init(timestamp:inc:)","abstract":"

Initializes a new Timestamp with the provided timestamp and increment values.

","parent_name":"Timestamp"},"Structs/Timestamp.html#/s:10MongoSwift9TimestampV9timestamp3incACSi_Sitcfc":{"name":"init(timestamp:inc:)","abstract":"

Initializes a new Timestamp with the provided timestamp and increment values. Assumes","parent_name":"Timestamp"},"Structs/Timestamp.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Timestamp"},"Structs/Timestamp.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Timestamp"},"Structs/Symbol.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"Symbol"},"Structs/Symbol.html#/s:10MongoSwift6SymbolV11stringValueSSvp":{"name":"stringValue","abstract":"

String representation of this Symbol.

","parent_name":"Symbol"},"Structs/Symbol.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Symbol"},"Structs/Symbol.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Symbol"},"Structs/RegularExpression.html#/s:10MongoSwift17RegularExpressionV7patternSSvp":{"name":"pattern","abstract":"

The pattern for this regular expression.

","parent_name":"RegularExpression"},"Structs/RegularExpression.html#/s:10MongoSwift17RegularExpressionV7optionsSSvp":{"name":"options","abstract":"

A string containing options for this regular expression.

","parent_name":"RegularExpression"},"Structs/RegularExpression.html#/s:10MongoSwift17RegularExpressionV7pattern7optionsACSS_SStcfc":{"name":"init(pattern:options:)","abstract":"

Initializes a new RegularExpression with the provided pattern and options.

","parent_name":"RegularExpression"},"Structs/RegularExpression.html#/s:10MongoSwift17RegularExpressionV4fromACSo09NSRegularD0C_tcfc":{"name":"init(from:)","abstract":"

Initializes a new RegularExpression with the pattern and options of the provided NSRegularExpression.

","parent_name":"RegularExpression"},"Structs/RegularExpression.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"RegularExpression"},"Structs/RegularExpression.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"RegularExpression"},"Structs/ObjectId.html#/s:10MongoSwift8ObjectIdV3hexSSvp":{"name":"hex","abstract":"

This ObjectId‘s data represented as a String.

","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:10MongoSwift8ObjectIdV9timestamps6UInt32Vvp":{"name":"timestamp","abstract":"

The timestamp used to create this ObjectId

","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:10MongoSwift8ObjectIdVACycfc":{"name":"init()","abstract":"

Initializes a new ObjectId.

","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:10MongoSwift8ObjectIdVyACSgSScfc":{"name":"init(_:)","abstract":"

Initializes an ObjectId from the provided hex String. Returns nil if the string is not a valid ObjectId.

","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"ObjectId"},"Structs/ObjectId.html#/s:SH4hash4intoys6HasherVz_tF":{"name":"hash(into:)","parent_name":"ObjectId"},"Structs/Code.html#/s:10MongoSwift4CodeV4codeSSvp":{"name":"code","abstract":"

A string containing Javascript code.

","parent_name":"Code"},"Structs/Code.html#/s:10MongoSwift4CodeV4codeACSS_tcfc":{"name":"init(code:)","abstract":"

Initializes a CodeWithScope with an optional scope value.

","parent_name":"Code"},"Structs/Code.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Code"},"Structs/Code.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Code"},"Structs/CodeWithScope.html#/s:10MongoSwift13CodeWithScopeV4codeSSvp":{"name":"code","abstract":"

A string containing Javascript code.

","parent_name":"CodeWithScope"},"Structs/CodeWithScope.html#/s:10MongoSwift13CodeWithScopeV5scopeAA8DocumentVvp":{"name":"scope","abstract":"

An optional scope Document containing a mapping of identifiers to values,","parent_name":"CodeWithScope"},"Structs/CodeWithScope.html#/s:10MongoSwift13CodeWithScopeV4code5scopeACSS_AA8DocumentVtcfc":{"name":"init(code:scope:)","abstract":"

Initializes a CodeWithScope with an optional scope value.

","parent_name":"CodeWithScope"},"Structs/CodeWithScope.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"CodeWithScope"},"Structs/CodeWithScope.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"CodeWithScope"},"Structs/Decimal128.html#/s:s23CustomStringConvertibleP11descriptionSSvp":{"name":"description","parent_name":"Decimal128"},"Structs/Decimal128.html#/s:10MongoSwift10Decimal128VyACSgSScfc":{"name":"init(_:)","abstract":"

Initializes a Decimal128 value from the provided String. Returns nil if the input is not a valid","parent_name":"Decimal128"},"Structs/Decimal128.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Decimal128"},"Structs/Decimal128.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Decimal128"},"Structs/Decimal128.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"Decimal128"},"Structs/Decimal128.html#/s:SH4hash4intoys6HasherVz_tF":{"name":"hash(into:)","parent_name":"Decimal128"},"Structs/DBPointer.html#/s:10MongoSwift9DBPointerV3refSSvp":{"name":"ref","abstract":"

Destination namespace of the pointer.

","parent_name":"DBPointer"},"Structs/DBPointer.html#/s:10MongoSwift9DBPointerV2idAA8ObjectIdVvp":{"name":"id","abstract":"

Destination _id (assumed to be an ObjectId) of the pointed-to document.

","parent_name":"DBPointer"},"Structs/DBPointer.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"DBPointer"},"Structs/DBPointer.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"DBPointer"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO7genericyA2EmF":{"name":"generic","abstract":"

Generic binary subtype

","parent_name":"Subtype"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO8functionyA2EmF":{"name":"function","abstract":"

A function

","parent_name":"Subtype"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO16binaryDeprecatedyA2EmF":{"name":"binaryDeprecated","abstract":"

Binary (old)

","parent_name":"Subtype"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO14uuidDeprecatedyA2EmF":{"name":"uuidDeprecated","abstract":"

UUID (old)

","parent_name":"Subtype"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO4uuidyA2EmF":{"name":"uuid","abstract":"

UUID (RFC 4122)

","parent_name":"Subtype"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO3md5yA2EmF":{"name":"md5","abstract":"

MD5

","parent_name":"Subtype"},"Structs/Binary/Subtype.html#/s:10MongoSwift6BinaryV7SubtypeO11userDefinedyA2EmF":{"name":"userDefined","abstract":"

User defined

","parent_name":"Subtype"},"Structs/Binary.html#/s:10MongoSwift6BinaryV4data10Foundation4DataVvp":{"name":"data","abstract":"

The binary data.

","parent_name":"Binary"},"Structs/Binary.html#/s:10MongoSwift6BinaryV7subtypes5UInt8Vvp":{"name":"subtype","abstract":"

The binary subtype for this data.

","parent_name":"Binary"},"Structs/Binary/Subtype.html":{"name":"Subtype","abstract":"

Subtypes for BSON Binary values.

","parent_name":"Binary"},"Structs/Binary.html#/s:10MongoSwift6BinaryV4fromAC10Foundation4UUIDV_tKcfc":{"name":"init(from:)","abstract":"

Initializes a Binary instance from a UUID.

","parent_name":"Binary"},"Structs/Binary.html#/s:10MongoSwift6BinaryV4data7subtypeAC10Foundation4DataV_s5UInt8VtKcfc":{"name":"init(data:subtype:)","abstract":"

Initializes a Binary instance from a Data object and a UInt8 subtype.

","parent_name":"Binary"},"Structs/Binary.html#/s:10MongoSwift6BinaryV4data7subtypeAC10Foundation4DataV_AC7SubtypeOtKcfc":{"name":"init(data:subtype:)","abstract":"

Initializes a Binary instance from a Data object and a Subtype.

","parent_name":"Binary"},"Structs/Binary.html#/s:10MongoSwift6BinaryV6base647subtypeACSS_s5UInt8VtKcfc":{"name":"init(base64:subtype:)","abstract":"

Initializes a Binary instance from a base64 String and a UInt8 subtype.

","parent_name":"Binary"},"Structs/Binary.html#/s:10MongoSwift6BinaryV6base647subtypeACSS_AC7SubtypeOtKcfc":{"name":"init(base64:subtype:)","abstract":"

Initializes a Binary instance from a base64 String and a Subtype.

","parent_name":"Binary"},"Structs/Binary.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Binary"},"Structs/Binary.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Binary"},"Structs/ServerHeartbeatFailedEvent.html#/s:10MongoSwift26ServerHeartbeatFailedEventV9eventNameSo014NSNotificationH0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"ServerHeartbeatFailedEvent"},"Structs/ServerHeartbeatFailedEvent.html#/s:10MongoSwift26ServerHeartbeatFailedEventV8durations5Int64Vvp":{"name":"duration","abstract":"

The execution time of the event, in microseconds.

","parent_name":"ServerHeartbeatFailedEvent"},"Structs/ServerHeartbeatFailedEvent.html#/s:10MongoSwift26ServerHeartbeatFailedEventV7failureAA0A5Error_pvp":{"name":"failure","abstract":"

The failure.

","parent_name":"ServerHeartbeatFailedEvent"},"Structs/ServerHeartbeatFailedEvent.html#/s:10MongoSwift26ServerHeartbeatFailedEventV12connectionIdAA010ConnectionH0Vvp":{"name":"connectionId","abstract":"

The connection ID (host/port pair) of the server.

","parent_name":"ServerHeartbeatFailedEvent"},"Structs/ServerHeartbeatSucceededEvent.html#/s:10MongoSwift29ServerHeartbeatSucceededEventV9eventNameSo014NSNotificationH0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"ServerHeartbeatSucceededEvent"},"Structs/ServerHeartbeatSucceededEvent.html#/s:10MongoSwift29ServerHeartbeatSucceededEventV8durations5Int64Vvp":{"name":"duration","abstract":"

The execution time of the event, in microseconds.

","parent_name":"ServerHeartbeatSucceededEvent"},"Structs/ServerHeartbeatSucceededEvent.html#/s:10MongoSwift29ServerHeartbeatSucceededEventV5replyAA8DocumentVvp":{"name":"reply","abstract":"

The command reply.

","parent_name":"ServerHeartbeatSucceededEvent"},"Structs/ServerHeartbeatSucceededEvent.html#/s:10MongoSwift29ServerHeartbeatSucceededEventV12connectionIdAA010ConnectionH0Vvp":{"name":"connectionId","abstract":"

The connection ID (host/port pair) of the server.

","parent_name":"ServerHeartbeatSucceededEvent"},"Structs/ServerHeartbeatStartedEvent.html#/s:10MongoSwift27ServerHeartbeatStartedEventV9eventNameSo014NSNotificationH0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"ServerHeartbeatStartedEvent"},"Structs/ServerHeartbeatStartedEvent.html#/s:10MongoSwift27ServerHeartbeatStartedEventV12connectionIdAA010ConnectionH0Vvp":{"name":"connectionId","abstract":"

The connection ID (host/port pair) of the server.

","parent_name":"ServerHeartbeatStartedEvent"},"Structs/TopologyClosedEvent.html#/s:10MongoSwift19TopologyClosedEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"TopologyClosedEvent"},"Structs/TopologyClosedEvent.html#/s:10MongoSwift19TopologyClosedEventV10topologyIdAA06ObjectG0Vvp":{"name":"topologyId","abstract":"

A unique identifier for the topology.

","parent_name":"TopologyClosedEvent"},"Structs/TopologyOpeningEvent.html#/s:10MongoSwift20TopologyOpeningEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"TopologyOpeningEvent"},"Structs/TopologyOpeningEvent.html#/s:10MongoSwift20TopologyOpeningEventV10topologyIdAA06ObjectG0Vvp":{"name":"topologyId","abstract":"

A unique identifier for the topology.

","parent_name":"TopologyOpeningEvent"},"Structs/TopologyDescriptionChangedEvent.html#/s:10MongoSwift31TopologyDescriptionChangedEventV9eventNameSo014NSNotificationH0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"TopologyDescriptionChangedEvent"},"Structs/TopologyDescriptionChangedEvent.html#/s:10MongoSwift31TopologyDescriptionChangedEventV10topologyIdAA06ObjectH0Vvp":{"name":"topologyId","abstract":"

A unique identifier for the topology.

","parent_name":"TopologyDescriptionChangedEvent"},"Structs/TopologyDescriptionChangedEvent.html#/s:10MongoSwift31TopologyDescriptionChangedEventV08previousD0AA0cD0Vvp":{"name":"previousDescription","abstract":"

The old topology description.

","parent_name":"TopologyDescriptionChangedEvent"},"Structs/TopologyDescriptionChangedEvent.html#/s:10MongoSwift31TopologyDescriptionChangedEventV03newD0AA0cD0Vvp":{"name":"newDescription","abstract":"

The new topology description.

","parent_name":"TopologyDescriptionChangedEvent"},"Structs/ServerClosedEvent.html#/s:10MongoSwift17ServerClosedEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"ServerClosedEvent"},"Structs/ServerClosedEvent.html#/s:10MongoSwift17ServerClosedEventV12connectionIdAA010ConnectionG0Vvp":{"name":"connectionId","abstract":"

The connection ID (host/port pair) of the server.

","parent_name":"ServerClosedEvent"},"Structs/ServerClosedEvent.html#/s:10MongoSwift17ServerClosedEventV10topologyIdAA06ObjectG0Vvp":{"name":"topologyId","abstract":"

A unique identifier for the topology.

","parent_name":"ServerClosedEvent"},"Structs/ServerOpeningEvent.html#/s:10MongoSwift18ServerOpeningEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"ServerOpeningEvent"},"Structs/ServerOpeningEvent.html#/s:10MongoSwift18ServerOpeningEventV12connectionIdAA010ConnectionG0Vvp":{"name":"connectionId","abstract":"

The connection ID (host/port pair) of the server.

","parent_name":"ServerOpeningEvent"},"Structs/ServerOpeningEvent.html#/s:10MongoSwift18ServerOpeningEventV10topologyIdAA06ObjectG0Vvp":{"name":"topologyId","abstract":"

A unique identifier for the topology.

","parent_name":"ServerOpeningEvent"},"Structs/ServerDescriptionChangedEvent.html#/s:10MongoSwift29ServerDescriptionChangedEventV9eventNameSo014NSNotificationH0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"ServerDescriptionChangedEvent"},"Structs/ServerDescriptionChangedEvent.html#/s:10MongoSwift29ServerDescriptionChangedEventV12connectionIdAA010ConnectionH0Vvp":{"name":"connectionId","abstract":"

The connection ID (host/port pair) of the server.

","parent_name":"ServerDescriptionChangedEvent"},"Structs/ServerDescriptionChangedEvent.html#/s:10MongoSwift29ServerDescriptionChangedEventV10topologyIdAA06ObjectH0Vvp":{"name":"topologyId","abstract":"

A unique identifier for the topology.

","parent_name":"ServerDescriptionChangedEvent"},"Structs/ServerDescriptionChangedEvent.html#/s:10MongoSwift29ServerDescriptionChangedEventV08previousD0AA0cD0Vvp":{"name":"previousDescription","abstract":"

The previous server description.

","parent_name":"ServerDescriptionChangedEvent"},"Structs/ServerDescriptionChangedEvent.html#/s:10MongoSwift29ServerDescriptionChangedEventV03newD0AA0cD0Vvp":{"name":"newDescription","abstract":"

The new server description.

","parent_name":"ServerDescriptionChangedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"CommandFailedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV8durations5Int64Vvp":{"name":"duration","abstract":"

The execution time of the event, in microseconds.

","parent_name":"CommandFailedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV11commandNameSSvp":{"name":"commandName","abstract":"

The command name.

","parent_name":"CommandFailedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV7failureAA0A5Error_pvp":{"name":"failure","abstract":"

The failure, represented as a MongoError.

","parent_name":"CommandFailedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV9requestIds5Int64Vvp":{"name":"requestId","abstract":"

The client generated request id.

","parent_name":"CommandFailedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV11operationIds5Int64Vvp":{"name":"operationId","abstract":"

The driver generated operation id. This is used to link events together such","parent_name":"CommandFailedEvent"},"Structs/CommandFailedEvent.html#/s:10MongoSwift18CommandFailedEventV12connectionIdAA010ConnectionG0Vvp":{"name":"connectionId","abstract":"

The connection id for the command.

","parent_name":"CommandFailedEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"CommandSucceededEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV8durations5Int64Vvp":{"name":"duration","abstract":"

The execution time of the event, in microseconds.

","parent_name":"CommandSucceededEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV5replyAA8DocumentVvp":{"name":"reply","abstract":"

The command reply.

","parent_name":"CommandSucceededEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV11commandNameSSvp":{"name":"commandName","abstract":"

The command name.

","parent_name":"CommandSucceededEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV9requestIds5Int64Vvp":{"name":"requestId","abstract":"

The driver generated request id.

","parent_name":"CommandSucceededEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV11operationIds5Int64Vvp":{"name":"operationId","abstract":"

The driver generated operation id. This is used to link events together such","parent_name":"CommandSucceededEvent"},"Structs/CommandSucceededEvent.html#/s:10MongoSwift21CommandSucceededEventV12connectionIdAA010ConnectionG0Vvp":{"name":"connectionId","abstract":"

The connection id for the command.

","parent_name":"CommandSucceededEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV9eventNameSo014NSNotificationG0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV7commandAA8DocumentVvp":{"name":"command","abstract":"

The command.

","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV12databaseNameSSvp":{"name":"databaseName","abstract":"

The database name.

","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV11commandNameSSvp":{"name":"commandName","abstract":"

The command name.

","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV9requestIds5Int64Vvp":{"name":"requestId","abstract":"

The driver generated request id.

","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV11operationIds5Int64Vvp":{"name":"operationId","abstract":"

The driver generated operation id. This is used to link events together such","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html#/s:10MongoSwift19CommandStartedEventV12connectionIdAA010ConnectionG0Vvp":{"name":"connectionId","abstract":"

The connection id for the command.

","parent_name":"CommandStartedEvent"},"Structs/CommandStartedEvent.html":{"name":"CommandStartedEvent","abstract":"

An event published when a command starts. The event is stored under the key event"},"Structs/CommandSucceededEvent.html":{"name":"CommandSucceededEvent","abstract":"

An event published when a command succeeds. The event is stored under the key event"},"Structs/CommandFailedEvent.html":{"name":"CommandFailedEvent","abstract":"

An event published when a command fails. The event is stored under the key event"},"Structs/ServerDescriptionChangedEvent.html":{"name":"ServerDescriptionChangedEvent","abstract":"

Published when a server description changes. This does NOT include changes to the server’s roundTripTime property.

"},"Structs/ServerOpeningEvent.html":{"name":"ServerOpeningEvent","abstract":"

Published when a server is initialized.

"},"Structs/ServerClosedEvent.html":{"name":"ServerClosedEvent","abstract":"

Published when a server is closed.

"},"Structs/TopologyDescriptionChangedEvent.html":{"name":"TopologyDescriptionChangedEvent","abstract":"

Published when a topology description changes.

"},"Structs/TopologyOpeningEvent.html":{"name":"TopologyOpeningEvent","abstract":"

Published when a topology is initialized.

"},"Structs/TopologyClosedEvent.html":{"name":"TopologyClosedEvent","abstract":"

Published when a topology is closed.

"},"Structs/ServerHeartbeatStartedEvent.html":{"name":"ServerHeartbeatStartedEvent","abstract":"

Published when the server monitor’s ismaster command is started - immediately before"},"Structs/ServerHeartbeatSucceededEvent.html":{"name":"ServerHeartbeatSucceededEvent","abstract":"

Published when the server monitor’s ismaster succeeds.

"},"Structs/ServerHeartbeatFailedEvent.html":{"name":"ServerHeartbeatFailedEvent","abstract":"

Published when the server monitor’s ismaster fails, either with an “ok: 0” or a socket exception.

"},"Structs/Binary.html":{"name":"Binary","abstract":"

A struct to represent the BSON Binary type.

"},"Structs/DBPointer.html":{"name":"DBPointer","abstract":"

A struct to represent the deprecated DBPointer type."},"Structs/Decimal128.html":{"name":"Decimal128","abstract":"

A struct to represent the BSON Decimal128 type.

"},"Structs/CodeWithScope.html":{"name":"CodeWithScope","abstract":"

A struct to represent BSON CodeWithScope.

"},"Structs/Code.html":{"name":"Code","abstract":"

A struct to represent the BSON Code type.

"},"Structs/ObjectId.html":{"name":"ObjectId","abstract":"

A struct to represent the BSON ObjectId type.

"},"Structs/RegularExpression.html":{"name":"RegularExpression","abstract":"

A struct to represent a BSON regular expression.

"},"Structs/Symbol.html":{"name":"Symbol","abstract":"

A struct to represent the deprecated Symbol type."},"Structs/Timestamp.html":{"name":"Timestamp","abstract":"

A struct to represent the BSON Timestamp type.

"},"Structs/BSONCoderOptions.html":{"name":"BSONCoderOptions","abstract":"

Options struct used for configuring the coding strategies on BSONEncoder and BSONDecoder.

"},"Structs/Document.html":{"name":"Document","abstract":"

A struct representing the BSON document type.

"},"Structs/ResumeToken.html":{"name":"ResumeToken","abstract":"

A token used for manually resuming a change stream. Pass this to the resumeAfter field of"},"Structs/UpdateDescription.html":{"name":"UpdateDescription","abstract":"

An UpdateDescription containing fields that will be present in the change stream document for"},"Structs/ChangeStreamEvent.html":{"name":"ChangeStreamEvent","abstract":"

The response document type from a ChangeStream.

"},"Structs/ChangeStreamOptions.html":{"name":"ChangeStreamOptions","abstract":"

Options to use when creating a ChangeStream.

"},"Structs/ClientSessionOptions.html":{"name":"ClientSessionOptions","abstract":"

Options to use when creating a ClientSession.

"},"Structs/ClientOptions.html":{"name":"ClientOptions","abstract":"

Options to use when creating a MongoClient.

"},"Structs/DatabaseOptions.html":{"name":"DatabaseOptions","abstract":"

Options to use when retrieving a MongoDatabase from a MongoClient.

"},"Structs/TLSOptions.html":{"name":"TLSOptions","abstract":"

Options used to configure TLS/SSL connections to the database.

"},"Structs/MongoCollection.html":{"name":"MongoCollection","abstract":"

A MongoDB collection.

"},"Structs/DeleteModelOptions.html":{"name":"DeleteModelOptions","abstract":"

Options to use with a WriteModel.deleteOne or WriteModel.deleteMany.

"},"Structs/ReplaceOneModelOptions.html":{"name":"ReplaceOneModelOptions","abstract":"

Options to use with a WriteModel.replaceOne.

"},"Structs/UpdateModelOptions.html":{"name":"UpdateModelOptions","abstract":"

Options to use with a WriteModel.updateOne or WriteModel.updateMany.

"},"Structs/BulkWriteOptions.html":{"name":"BulkWriteOptions","abstract":"

Options to use when performing a bulk write operation on a MongoCollection.

"},"Structs/BulkWriteResult.html":{"name":"BulkWriteResult","abstract":"

The result of a bulk write operation on a MongoCollection.

"},"Structs/FindOneAndDeleteOptions.html":{"name":"FindOneAndDeleteOptions","abstract":"

Options to use when executing a findOneAndDelete command on a MongoCollection.

"},"Structs/FindOneAndReplaceOptions.html":{"name":"FindOneAndReplaceOptions","abstract":"

Options to use when executing a findOneAndReplace command on a MongoCollection.

"},"Structs/FindOneAndUpdateOptions.html":{"name":"FindOneAndUpdateOptions","abstract":"

Options to use when executing a findOneAndUpdate command on a MongoCollection.

"},"Structs/IndexModel.html":{"name":"IndexModel","abstract":"

A struct representing an index on a MongoCollection.

"},"Structs/IndexOptions.html":{"name":"IndexOptions","abstract":"

Options to use when creating an index for a collection.

"},"Structs/AggregateOptions.html":{"name":"AggregateOptions","abstract":"

Options to use when executing an aggregate command on a MongoCollection.

"},"Structs/FindOptions.html":{"name":"FindOptions","abstract":"

Options to use when executing a find command on a MongoCollection.

"},"Structs/InsertOneOptions.html":{"name":"InsertOneOptions","abstract":"

Options to use when executing an insertOne command on a MongoCollection.

"},"Structs/UpdateOptions.html":{"name":"UpdateOptions","abstract":"

Options to use when executing an update command on a MongoCollection.

"},"Structs/ReplaceOptions.html":{"name":"ReplaceOptions","abstract":"

Options to use when executing a replace command on a MongoCollection.

"},"Structs/DeleteOptions.html":{"name":"DeleteOptions","abstract":"

Options to use when executing a delete command on a MongoCollection.

"},"Structs/InsertOneResult.html":{"name":"InsertOneResult","abstract":"

The result of an insertOne command on a MongoCollection.

"},"Structs/InsertManyResult.html":{"name":"InsertManyResult","abstract":"

The result of a multi-document insert operation on a MongoCollection.

"},"Structs/DeleteResult.html":{"name":"DeleteResult","abstract":"

The result of a delete command on a MongoCollection.

"},"Structs/UpdateResult.html":{"name":"UpdateResult","abstract":"

The result of an update operation on a MongoCollection.

"},"Structs/DropCollectionOptions.html":{"name":"DropCollectionOptions","abstract":"

Options to use when dropping a collection.

"},"Structs/CollectionOptions.html":{"name":"CollectionOptions","abstract":"

Options to set on a retrieved MongoCollection.

"},"Structs/DropDatabaseOptions.html":{"name":"DropDatabaseOptions","abstract":"

Options to use when executing a dropDatabase command.

"},"Structs/MongoDatabase.html":{"name":"MongoDatabase","abstract":"

A MongoDB Database.

"},"Structs/WriteError.html":{"name":"WriteError","abstract":"

A struct to represent a single write error not resulting from an executed bulk write.

"},"Structs/WriteConcernError.html":{"name":"WriteConcernError","abstract":"

A struct to represent a write concern error resulting from an executed bulk write.

"},"Structs/BulkWriteError.html":{"name":"BulkWriteError","abstract":"

A struct to represent a write error resulting from an executed bulk write.

"},"Structs/MongoNamespace.html":{"name":"MongoNamespace","abstract":"

Represents a MongoDB namespace for a database or collection.

"},"Structs/CountDocumentsOptions.html":{"name":"CountDocumentsOptions","abstract":"

Options to use when executing a countDocuments command on a MongoCollection.

"},"Structs/CreateCollectionOptions.html":{"name":"CreateCollectionOptions","abstract":"

Options to use when executing a createCollection command on a MongoDatabase.

"},"Structs/CreateIndexOptions.html":{"name":"CreateIndexOptions","abstract":"

Options to use when creating a new index on a MongoCollection.

"},"Structs/DistinctOptions.html":{"name":"DistinctOptions","abstract":"

Options to use when executing a distinct command on a MongoCollection.

"},"Structs/DropIndexOptions.html":{"name":"DropIndexOptions","abstract":"

Options to use when dropping an index from a MongoCollection.

"},"Structs/EstimatedDocumentCountOptions.html":{"name":"EstimatedDocumentCountOptions","abstract":"

Options to use when executing an estimatedDocumentCount command on a MongoCollection.

"},"Structs/CollectionSpecificationInfo.html":{"name":"CollectionSpecificationInfo","abstract":"

Info about the collection that is returned with a listCollections call.

"},"Structs/CollectionSpecification.html":{"name":"CollectionSpecification","abstract":"

Specifications of a collection returned when executing listCollections.

"},"Structs/ListCollectionsOptions.html":{"name":"ListCollectionsOptions","abstract":"

Options to use when executing a listCollections command on a MongoDatabase.

"},"Structs/DatabaseSpecification.html":{"name":"DatabaseSpecification","abstract":"

A struct modeling the information returned from the listDatabases command about a single database.

"},"Structs/RunCommandOptions.html":{"name":"RunCommandOptions","abstract":"

Options to use when running a command against a MongoDatabase.

"},"Structs/ReadConcern.html":{"name":"ReadConcern","abstract":"

A struct to represent a MongoDB read concern.

"},"Structs/ConnectionId.html":{"name":"ConnectionId","abstract":"

A struct representing a server connection, consisting of a host and port.

"},"Structs/ServerDescription.html":{"name":"ServerDescription","abstract":"

A struct describing a mongod or mongos process.

"},"Structs/TopologyDescription.html":{"name":"TopologyDescription","abstract":"

A struct describing the state of a MongoDB deployment: its type (standalone, replica set, or sharded),"},"Structs/WriteConcern.html":{"name":"WriteConcern","abstract":"

A class to represent a MongoDB write concern.

"},"Protocols/CodingStrategyProvider.html#/s:10MongoSwift22CodingStrategyProviderP04datecD0AA04DatecD0OSgvp":{"name":"dateCodingStrategy","abstract":"

Specifies the strategy to use when converting Dates between their BSON representations and their","parent_name":"CodingStrategyProvider"},"Protocols/CodingStrategyProvider.html#/s:10MongoSwift22CodingStrategyProviderP04uuidcD0AA010UUIDCodingD0OSgvp":{"name":"uuidCodingStrategy","abstract":"

Specifies the strategy to use when converting UUIDs between their BSON representations and their","parent_name":"CodingStrategyProvider"},"Protocols/CodingStrategyProvider.html#/s:10MongoSwift22CodingStrategyProviderP04datacD0AA04DatacD0OSgvp":{"name":"dataCodingStrategy","abstract":"

Specifies the strategy to use when converting Datas between their BSON representations and their","parent_name":"CodingStrategyProvider"},"Protocols/MongoCommandEvent.html#/s:10MongoSwift0A12CommandEventP11commandNameSSvp":{"name":"commandName","abstract":"

The command name.

","parent_name":"MongoCommandEvent"},"Protocols/MongoCommandEvent.html#/s:10MongoSwift0A12CommandEventP9requestIds5Int64Vvp":{"name":"requestId","abstract":"

The driver generated request id.

","parent_name":"MongoCommandEvent"},"Protocols/MongoCommandEvent.html#/s:10MongoSwift0A12CommandEventP11operationIds5Int64Vvp":{"name":"operationId","abstract":"

The driver generated operation id. This is used to link events together such","parent_name":"MongoCommandEvent"},"Protocols/MongoCommandEvent.html#/s:10MongoSwift0A12CommandEventP12connectionIdAA010ConnectionF0Vvp":{"name":"connectionId","abstract":"

The connection id for the command.

","parent_name":"MongoCommandEvent"},"Protocols/MongoEvent.html#/s:10MongoSwift0A5EventP9eventNameSo014NSNotificationE0avpZ":{"name":"eventName","abstract":"

The name this event will be posted under.

","parent_name":"MongoEvent"},"Protocols/MongoEvent.html":{"name":"MongoEvent","abstract":"

A protocol for monitoring events to implement, specifying their name.

"},"Protocols/MongoCommandEvent.html":{"name":"MongoCommandEvent","abstract":"

A protocol for command monitoring events to implement, specifying the command name and other shared fields.

"},"Protocols/CodingStrategyProvider.html":{"name":"CodingStrategyProvider","abstract":"

Protocol indicating a set of options can be used to configure BSONEncoder and BSONDecoder.

"},"Protocols.html#/s:10MongoSwift0A5ErrorP":{"name":"MongoError","abstract":"

An empty protocol for encapsulating all errors that this package can throw.

"},"Functions.html#/s:10MongoSwift07cleanupaB0yyF":{"name":"cleanupMongoSwift()","abstract":"

Release all internal memory and other resources allocated by MongoSwift.

"},"Extensions/NSRegularExpression.html#/s:So19NSRegularExpressionC10MongoSwiftE4fromAbC07RegularB0V_tKcfc":{"name":"init(from:)","abstract":"

Initializes a new NSRegularExpression with the pattern and options of the provided RegularExpression.","parent_name":"NSRegularExpression"},"Extensions/UUID.html#/s:10Foundation4UUIDV10MongoSwiftE4fromAcD6BinaryV_tKcfc":{"name":"init(from:)","abstract":"

Initializes a UUID instance from a Binary BSONValue.

","parent_name":"UUID"},"Extensions/Date.html#/s:10Foundation4DateV10MongoSwiftE12msSinceEpochACs5Int64V_tcfc":{"name":"init(msSinceEpoch:)","abstract":"

Initializes a new Date representing the instance msSinceEpoch milliseconds","parent_name":"Date"},"Extensions/Date.html#/s:10Foundation4DateV10MongoSwiftE12msSinceEpochs5Int64Vvp":{"name":"msSinceEpoch","abstract":"

The number of milliseconds after the Unix epoch that this Date occurs.

","parent_name":"Date"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE14commandStartedABvpZ":{"name":"commandStarted","abstract":"

The name corresponding to a CommandStartedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE16commandSucceededABvpZ":{"name":"commandSucceeded","abstract":"

The name corresponding to a CommandSucceededEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE13commandFailedABvpZ":{"name":"commandFailed","abstract":"

The name corresponding to a CommandFailedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE24serverDescriptionChangedABvpZ":{"name":"serverDescriptionChanged","abstract":"

The name corresponding to a ServerDescriptionChangedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE13serverOpeningABvpZ":{"name":"serverOpening","abstract":"

The name corresponding to a ServerOpeningEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE12serverClosedABvpZ":{"name":"serverClosed","abstract":"

The name corresponding to a ServerClosedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE26topologyDescriptionChangedABvpZ":{"name":"topologyDescriptionChanged","abstract":"

The name corresponding to a TopologyDescriptionChangedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE15topologyOpeningABvpZ":{"name":"topologyOpening","abstract":"

The name corresponding to a TopologyOpeningEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE14topologyClosedABvpZ":{"name":"topologyClosed","abstract":"

The name corresponding to a TopologyClosedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE22serverHeartbeatStartedABvpZ":{"name":"serverHeartbeatStarted","abstract":"

The name corresponding to a ServerHeartbeatStartedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE24serverHeartbeatSucceededABvpZ":{"name":"serverHeartbeatSucceeded","abstract":"

The name corresponding to a ServerHeartbeatSucceededEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html#/s:So18NSNotificationNamea10MongoSwiftE21serverHeartbeatFailedABvpZ":{"name":"serverHeartbeatFailed","abstract":"

The name corresponding to a ServerHeartbeatFailedEvent.

","parent_name":"Name"},"Extensions/Notification/Name.html":{"name":"Name","abstract":"

Extend Notification.Name to have class properties corresponding to each type","parent_name":"Notification"},"Extensions/Notification.html":{"name":"Notification"},"Extensions/Date.html":{"name":"Date","abstract":"

An extension of Date to represent the BSON Datetime type. Supports millisecond level precision.

"},"Extensions/UUID.html":{"name":"UUID","abstract":"

Extension to allow a UUID to be initialized from a Binary BSONValue.

"},"Extensions/NSRegularExpression.html":{"name":"NSRegularExpression","abstract":"

An extension of NSRegularExpression to allow it to be initialized from a RegularExpression BSONValue.

"},"Enums/CollectionType.html#/s:10MongoSwift14CollectionTypeO10collectionyA2CmF":{"name":"collection","abstract":"

Specifies that the data store returned is a collection.

","parent_name":"CollectionType"},"Enums/CollectionType.html#/s:10MongoSwift14CollectionTypeO4viewyA2CmF":{"name":"view","abstract":"

Specifies that the data store returned is a view.

","parent_name":"CollectionType"},"Enums/CollectionType.html#/s:10MongoSwift14CollectionTypeO5otheryACSScACmF":{"name":"other(_:)","abstract":"

For an unknown value. For forwards compatibility, no error will be thrown when an unknown value is provided.

","parent_name":"CollectionType"},"Enums/CollectionType.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"CollectionType"},"Enums/CollectionType.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"CollectionType"},"Enums/RuntimeError.html#/s:10MongoSwift12RuntimeErrorO08internalD0yACSS_tcACmF":{"name":"internalError(message:)","abstract":"

Thrown when the driver encounters a internal error not caused by the user. This is usually indicative of a bug","parent_name":"RuntimeError"},"Enums/RuntimeError.html#/s:10MongoSwift12RuntimeErrorO010connectionD0yACSS_SaySSGSgtcACmF":{"name":"connectionError(message:errorLabels:)","abstract":"

Thrown when encountering a connection or socket related error.","parent_name":"RuntimeError"},"Enums/RuntimeError.html#/s:10MongoSwift12RuntimeErrorO014authenticationD0yACSS_tcACmF":{"name":"authenticationError(message:)","abstract":"

Thrown when encountering an authentication related error (e.g. invalid credentials).

","parent_name":"RuntimeError"},"Enums/RuntimeError.html#/s:10MongoSwift12RuntimeErrorO013compatibilityD0yACSS_tcACmF":{"name":"compatibilityError(message:)","abstract":"

Thrown when trying to use a feature that the deployment does not support.

","parent_name":"RuntimeError"},"Enums/RuntimeError.html#/s:10Foundation14LocalizedErrorP16errorDescriptionSSSgvp":{"name":"errorDescription","parent_name":"RuntimeError"},"Enums/UserError.html#/s:10MongoSwift9UserErrorO05logicD0yACSS_tcACmF":{"name":"logicError(message:)","abstract":"

Thrown when the driver is incorrectly used.

","parent_name":"UserError"},"Enums/UserError.html#/s:10MongoSwift9UserErrorO015invalidArgumentD0yACSS_tcACmF":{"name":"invalidArgumentError(message:)","abstract":"

Thrown when the user passes in invalid arguments to a driver method.

","parent_name":"UserError"},"Enums/UserError.html#/s:10Foundation14LocalizedErrorP16errorDescriptionSSSgvp":{"name":"errorDescription","parent_name":"UserError"},"Enums/ServerError.html#/s:10MongoSwift11ServerErrorO07commandD0yACSi_S2SSaySSGSgtcACmF":{"name":"commandError(code:codeName:message:errorLabels:)","abstract":"

Thrown when commands experience errors on the server that prevent execution.

","parent_name":"ServerError"},"Enums/ServerError.html#/s:10MongoSwift11ServerErrorO05writeD0yAcA05WriteD0VSg_AA0f7ConcernD0VSgSaySSGSgtcACmF":{"name":"writeError(writeError:writeConcernError:errorLabels:)","abstract":"

Thrown when a single write command fails on the server.","parent_name":"ServerError"},"Enums/ServerError.html#/s:10MongoSwift11ServerErrorO09bulkWriteD0yACSayAA04BulkfD0VGSg_AA0f7ConcernD0VSgs0D0_pSgAA0gF6ResultVSgSaySSGSgtcACmF":{"name":"bulkWriteError(writeErrors:writeConcernError:otherError:result:errorLabels:)","abstract":"

Thrown when the server returns errors as part of an executed bulk write.","parent_name":"ServerError"},"Enums/ServerError.html#/s:10Foundation14LocalizedErrorP16errorDescriptionSSSgvp":{"name":"errorDescription","parent_name":"ServerError"},"Enums/CursorType.html#/s:10MongoSwift10CursorTypeO11nonTailableyA2CmF":{"name":"nonTailable","abstract":"

The default value. A vast majority of cursors will be of this type.

","parent_name":"CursorType"},"Enums/CursorType.html#/s:10MongoSwift10CursorTypeO8tailableyA2CmF":{"name":"tailable","abstract":"

Tailable means the cursor is not closed when the last data is retrieved.","parent_name":"CursorType"},"Enums/CursorType.html#/s:10MongoSwift10CursorTypeO13tailableAwaityA2CmF":{"name":"tailableAwait","abstract":"

Combines the tailable option with awaitData, as defined below.

","parent_name":"CursorType"},"Enums/Hint.html#/s:10MongoSwift4HintO9indexNameyACSScACmF":{"name":"indexName(_:)","abstract":"

Specifies an index to use by its name.

","parent_name":"Hint"},"Enums/Hint.html#/s:10MongoSwift4HintO9indexSpecyAcA8DocumentVcACmF":{"name":"indexSpec(_:)","abstract":"

Specifies an index to use by a specification Document containing the index key(s).

","parent_name":"Hint"},"Enums/Hint.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"Hint"},"Enums/Hint.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"Hint"},"Enums/ReturnDocument.html#/s:10MongoSwift14ReturnDocumentO6beforeyA2CmF":{"name":"before","abstract":"

Indicates to return the document before the update, replacement, or insert occurred.

","parent_name":"ReturnDocument"},"Enums/ReturnDocument.html#/s:10MongoSwift14ReturnDocumentO5afteryA2CmF":{"name":"after","abstract":"

Indicates to return the document after the update, replacement, or insert occurred.

","parent_name":"ReturnDocument"},"Enums/WriteModel.html#/s:10MongoSwift10WriteModelO9deleteOneyACyxGAA8DocumentV_AA06DeleteD7OptionsVSgtcAEmSeRzSERzlF":{"name":"deleteOne(_:options:)","abstract":"

A deleteOne.","parent_name":"WriteModel"},"Enums/WriteModel.html#/s:10MongoSwift10WriteModelO10deleteManyyACyxGAA8DocumentV_AA06DeleteD7OptionsVSgtcAEmSeRzSERzlF":{"name":"deleteMany(_:options:)","abstract":"

A deleteMany.","parent_name":"WriteModel"},"Enums/WriteModel.html#/s:10MongoSwift10WriteModelO9insertOneyACyxGxcAEmSeRzSERzlF":{"name":"insertOne(_:)","abstract":"

An insertOne.","parent_name":"WriteModel"},"Enums/WriteModel.html#/s:10MongoSwift10WriteModelO10replaceOneyACyxGAA8DocumentV_xAA07ReplacefD7OptionsVSgtcAEmSeRzSERzlF":{"name":"replaceOne(filter:replacement:options:)","abstract":"

A replaceOne.","parent_name":"WriteModel"},"Enums/WriteModel.html#/s:10MongoSwift10WriteModelO9updateOneyACyxGAA8DocumentV_AgA06UpdateD7OptionsVSgtcAEmSeRzSERzlF":{"name":"updateOne(filter:update:options:)","abstract":"

An updateOne.","parent_name":"WriteModel"},"Enums/WriteModel.html#/s:10MongoSwift10WriteModelO10updateManyyACyxGAA8DocumentV_AgA06UpdateD7OptionsVSgtcAEmSeRzSERzlF":{"name":"updateMany(filter:update:options:)","abstract":"

An updateMany.","parent_name":"WriteModel"},"Enums/FullDocument.html#/s:10MongoSwift12FullDocumentO12updateLookupyA2CmF":{"name":"updateLookup","abstract":"

Specifies that the fullDocument field of an update event will contain a copy of the entire document that","parent_name":"FullDocument"},"Enums/FullDocument.html#/s:10MongoSwift12FullDocumentO5otheryACSScACmF":{"name":"other(_:)","abstract":"

For an unknown value. For forwards compatibility, no error will be thrown when an unknown value is provided.

","parent_name":"FullDocument"},"Enums/FullDocument.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"FullDocument"},"Enums/FullDocument.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"FullDocument"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO6insertyA2CmF":{"name":"insert","abstract":"

Specifies an operation of type insert.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO6updateyA2CmF":{"name":"update","abstract":"

Specifies an operation of type update.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO7replaceyA2CmF":{"name":"replace","abstract":"

Specifies an operation of type replace.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO6deleteyA2CmF":{"name":"delete","abstract":"

Specifies an operation of type delete.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO10invalidateyA2CmF":{"name":"invalidate","abstract":"

Specifies an operation of type invalidate.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO4dropyA2CmF":{"name":"drop","abstract":"

Specifies an operation of type drop.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO12dropDatabaseyA2CmF":{"name":"dropDatabase","abstract":"

Specifies an operation of type dropDatabase.

","parent_name":"OperationType"},"Enums/OperationType.html#/s:10MongoSwift13OperationTypeO6renameyA2CmF":{"name":"rename","abstract":"

Specifies an operation of type rename.

","parent_name":"OperationType"},"Enums/DataCodingStrategy.html#/s:SY8RawValueQa":{"name":"RawValue","parent_name":"DataCodingStrategy"},"Enums/DataCodingStrategy.html#/s:10MongoSwift18DataCodingStrategyO010deferredToC0yA2CmF":{"name":"deferredToData","abstract":"

Encode/decode the Data by deferring to its default encoding implementations.

","parent_name":"DataCodingStrategy"},"Enums/DataCodingStrategy.html#/s:10MongoSwift18DataCodingStrategyO6binaryyA2CmF":{"name":"binary","abstract":"

Encode/decode the Data to/from a BSON binary type (default).

","parent_name":"DataCodingStrategy"},"Enums/DataCodingStrategy.html#/s:10MongoSwift18DataCodingStrategyO6base64yA2CmF":{"name":"base64","abstract":"

Encode the Data to/from a base64 encoded string.

","parent_name":"DataCodingStrategy"},"Enums/DataCodingStrategy.html#/s:10MongoSwift18DataCodingStrategyO6customyACy10Foundation0C0V_s7Encoder_ptKc_AGs7Decoder_pKctcACmF":{"name":"custom(encodeFunc:decodeFunc:)","abstract":"

Encode the Data by using the given encodeFunc. Decode the Data by using the given decodeFunc.","parent_name":"DataCodingStrategy"},"Enums/DataCodingStrategy.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"DataCodingStrategy"},"Enums/DataCodingStrategy.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"DataCodingStrategy"},"Enums/UUIDCodingStrategy.html#/s:SY8RawValueQa":{"name":"RawValue","parent_name":"UUIDCodingStrategy"},"Enums/UUIDCodingStrategy.html#/s:10MongoSwift18UUIDCodingStrategyO14deferredToUUIDyA2CmF":{"name":"deferredToUUID","abstract":"

Encode/decode the UUID by deferring to its default encoding/decoding implementations.

","parent_name":"UUIDCodingStrategy"},"Enums/UUIDCodingStrategy.html#/s:10MongoSwift18UUIDCodingStrategyO6binaryyA2CmF":{"name":"binary","abstract":"

Encode/decode the UUID to/from a BSON binary type (default).

","parent_name":"UUIDCodingStrategy"},"Enums/UUIDCodingStrategy.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"UUIDCodingStrategy"},"Enums/UUIDCodingStrategy.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"UUIDCodingStrategy"},"Enums/DateCodingStrategy.html#/s:SY8RawValueQa":{"name":"RawValue","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO010deferredToC0yA2CmF":{"name":"deferredToDate","abstract":"

Encode/decode the Date by deferring to its default encoding/decoding implementations.

","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO04bsonC4TimeyA2CmF":{"name":"bsonDateTime","abstract":"

Encode/decode the Date to/from a BSON datetime object (default).

","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO21millisecondsSince1970yA2CmF":{"name":"millisecondsSince1970","abstract":"

Encode/decode the Date to/from a 64-bit integer counting the number of milliseconds since January 1, 1970.

","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO16secondsSince1970yA2CmF":{"name":"secondsSince1970","abstract":"

Encode/decode the Date to/from a BSON double counting the number of seconds since January 1, 1970.

","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO7iso8601yA2CmF":{"name":"iso8601","abstract":"

Encode/decode the Date to/from an ISO-8601-formatted string (in RFC 339 format).

","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO9formattedyACSo15NSDateFormatterCcACmF":{"name":"formatted(_:)","abstract":"

Encode/decode the Date to/from a string formatted by the given formatter.

","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:10MongoSwift18DateCodingStrategyO6customyACy10Foundation0C0V_s7Encoder_ptKc_AGs7Decoder_pKctcACmF":{"name":"custom(encodeFunc:decodeFunc:)","abstract":"

Encode the Date by using the given encodeFunc. Decode the Date by using the given decodeFunc.","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:SY8rawValuexSg03RawB0Qz_tcfc":{"name":"init(rawValue:)","parent_name":"DateCodingStrategy"},"Enums/DateCodingStrategy.html#/s:SY8rawValue03RawB0Qzvp":{"name":"rawValue","parent_name":"DateCodingStrategy"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO7invalidyA2CmF":{"name":"invalid","abstract":"

An invalid type

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO6doubleyA2CmF":{"name":"double","abstract":"

64-bit binary floating point

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO6stringyA2CmF":{"name":"string","abstract":"

UTF-8 string

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO8documentyA2CmF":{"name":"document","abstract":"

BSON document

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO5arrayyA2CmF":{"name":"array","abstract":"

Array

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO6binaryyA2CmF":{"name":"binary","abstract":"

Binary data

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO9undefinedyA2CmF":{"name":"undefined","abstract":"

Undefined value - deprecated

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO8objectIdyA2CmF":{"name":"objectId","abstract":"

A MongoDB ObjectId.

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO4boolyA2CmF":{"name":"bool","abstract":"

A boolean

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO8datetimeyA2CmF":{"name":"datetime","abstract":"

UTC datetime, stored as UTC milliseconds since the Unix epoch

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO4nullyA2CmF":{"name":"null","abstract":"

Null value

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO5regexyA2CmF":{"name":"regex","abstract":"

A regular expression

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO9dbPointeryA2CmF":{"name":"dbPointer","abstract":"

A database pointer - deprecated

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO4codeyA2CmF":{"name":"code","abstract":"

Javascript code

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO6symbolyA2CmF":{"name":"symbol","abstract":"

A symbol - deprecated

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO13codeWithScopeyA2CmF":{"name":"codeWithScope","abstract":"

JavaScript code w/ scope

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO5int32yA2CmF":{"name":"int32","abstract":"

32-bit integer

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO9timestampyA2CmF":{"name":"timestamp","abstract":"

Special internal type used by MongoDB replication and sharding

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO5int64yA2CmF":{"name":"int64","abstract":"

64-bit integer

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO10decimal128yA2CmF":{"name":"decimal128","abstract":"

128-bit decimal floating point

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO6minKeyyA2CmF":{"name":"minKey","abstract":"

Special type which compares lower than all other possible BSON element values

","parent_name":"BSONType"},"Enums/BSONType.html#/s:10MongoSwift8BSONTypeO6maxKeyyA2CmF":{"name":"maxKey","abstract":"

Special type which compares higher than all other possible BSON element values

","parent_name":"BSONType"},"Enums/BSON.html#/s:10MongoSwift4BSONO6doubleyACSdcACmF":{"name":"double(_:)","abstract":"

A BSON double.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO6stringyACSScACmF":{"name":"string(_:)","abstract":"

A BSON string.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO8documentyAcA8DocumentVcACmF":{"name":"document(_:)","abstract":"

A BSON document.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO5arrayyACSayACGcACmF":{"name":"array(_:)","abstract":"

A BSON array.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO6binaryyAcA6BinaryVcACmF":{"name":"binary(_:)","abstract":"

A BSON binary.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO9undefinedyA2CmF":{"name":"undefined","abstract":"

A BSON undefined.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO8objectIdyAcA06ObjectE0VcACmF":{"name":"objectId(_:)","abstract":"

A BSON ObjectId.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO4boolyACSbcACmF":{"name":"bool(_:)","abstract":"

A BSON boolean.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO8datetimeyAC10Foundation4DateVcACmF":{"name":"datetime(_:)","abstract":"

A BSON UTC datetime.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO4nullyA2CmF":{"name":"null","abstract":"

A BSON null.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO5regexyAcA17RegularExpressionVcACmF":{"name":"regex(_:)","abstract":"

A BSON regular expression.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO9dbPointeryAcA9DBPointerVcACmF":{"name":"dbPointer(_:)","abstract":"

A BSON dbPointer.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO6symbolyAcA6SymbolVcACmF":{"name":"symbol(_:)","abstract":"

A BSON symbol.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO4codeyAcA4CodeVcACmF":{"name":"code(_:)","abstract":"

A BSON JavaScript code.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO13codeWithScopeyAcA04CodeeF0VcACmF":{"name":"codeWithScope(_:)","abstract":"

A BSON JavaScript code with scope.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO5int32yACs5Int32VcACmF":{"name":"int32(_:)","abstract":"

A BSON int32.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO9timestampyAcA9TimestampVcACmF":{"name":"timestamp(_:)","abstract":"

A BSON timestamp.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO5int64yACs5Int64VcACmF":{"name":"int64(_:)","abstract":"

A BSON int64.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO10decimal128yAcA10Decimal128VcACmF":{"name":"decimal128(_:)","abstract":"

A BSON Decimal128.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO6minKeyyA2CmF":{"name":"minKey","abstract":"

A BSON minKey.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO6maxKeyyA2CmF":{"name":"maxKey","abstract":"

A BSON maxKey.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONOyACSicfc":{"name":"init(_:)","abstract":"

Initialize a BSON from an integer. On 64-bit systems, this will result in an .int64. On 32-bit systems,","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO4typeAA8BSONTypeOvp":{"name":"type","abstract":"

Get the BSONType of this BSON.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO10int32Values5Int32VSgvp":{"name":"int32Value","abstract":"

If this BSON is an .int32, return it as an Int32. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO10regexValueAA17RegularExpressionVSgvp":{"name":"regexValue","abstract":"

If this BSON is a .regex, return it as a RegularExpression. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO18codeWithScopeValueAA04CodeeF0VSgvp":{"name":"codeWithScopeValue","abstract":"

If this BSON is a .codeWithScope, return it as a CodeWithScope. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO9codeValueAA4CodeVSgvp":{"name":"codeValue","abstract":"

If this BSON is a .code, return it as a Code. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO10int64Values5Int64VSgvp":{"name":"int64Value","abstract":"

If this BSON is an .int64, return it as an Int64. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO13objectIdValueAA06ObjectE0VSgvp":{"name":"objectIdValue","abstract":"

If this BSON is an .objectId, return it as an ObjectId. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO9dateValue10Foundation4DateVSgvp":{"name":"dateValue","abstract":"

If this BSON is a .date, return it as a Date. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO10arrayValueSayACGSgvp":{"name":"arrayValue","abstract":"

If this BSON is an .array, return it as an [BSON]. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO11stringValueSSSgvp":{"name":"stringValue","abstract":"

If this BSON is a .string, return it as a String. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO13documentValueAA8DocumentVSgvp":{"name":"documentValue","abstract":"

If this BSON is a .document, return it as a Document. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO9boolValueSbSgvp":{"name":"boolValue","abstract":"

If this BSON is a .bool, return it as an Bool. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO11binaryValueAA6BinaryVSgvp":{"name":"binaryValue","abstract":"

If this BSON is a .binary, return it as a Binary. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO11doubleValueSdSgvp":{"name":"doubleValue","abstract":"

If this BSON is a .double, return it as a Double. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO15decimal128ValueAA10Decimal128VSgvp":{"name":"decimal128Value","abstract":"

If this BSON is a .decimal128, return it as a Decimal128. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO11symbolValueAA6SymbolVSgvp":{"name":"symbolValue","abstract":"

If this BSON is a .symbol, return it as a Symbol. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO14dbPointerValueAA9DBPointerVSgvp":{"name":"dbPointerValue","abstract":"

If this BSON is a .dbPointer, return it as a DBPointer. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO14timestampValueAA9TimestampVSgvp":{"name":"timestampValue","abstract":"

If this BSON is a .timestamp, return it as a Timestamp. Otherwise, return nil.

","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO5asIntSiSgyF":{"name":"asInt()","abstract":"

Return this BSON as an Int if possible.","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO7asInt32s0E0VSgyF":{"name":"asInt32()","abstract":"

Return this BSON as an Int32 if possible.","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO7asInt64s0E0VSgyF":{"name":"asInt64()","abstract":"

Return this BSON as an Int64 if possible.","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO8asDoubleSdSgyF":{"name":"asDouble()","abstract":"

Return this BSON as a Double if possible.","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO12asDecimal128AA0E0VSgyF":{"name":"asDecimal128()","abstract":"

Return this BSON as a Decimal128 if possible.","parent_name":"BSON"},"Enums/BSON.html#/s:s26ExpressibleByStringLiteralP06stringD0x0cD4TypeQz_tcfc":{"name":"init(stringLiteral:)","parent_name":"BSON"},"Enums/BSON.html#/s:s27ExpressibleByBooleanLiteralP07booleanD0x0cD4TypeQz_tcfc":{"name":"init(booleanLiteral:)","parent_name":"BSON"},"Enums/BSON.html#/s:s25ExpressibleByFloatLiteralP05floatD0x0cD4TypeQz_tcfc":{"name":"init(floatLiteral:)","parent_name":"BSON"},"Enums/BSON.html#/s:10MongoSwift4BSONO14integerLiteralACSi_tcfc":{"name":"init(integerLiteral:)","abstract":"

Initialize a BSON from an integer. On 64-bit systems, this will result in an .int64. On 32-bit systems,","parent_name":"BSON"},"Enums/BSON.html#/s:s30ExpressibleByDictionaryLiteralP010dictionaryD0x3KeyQz_5ValueQztd_tcfc":{"name":"init(dictionaryLiteral:)","parent_name":"BSON"},"Enums/BSON.html#/s:s25ExpressibleByArrayLiteralP05arrayD0x0cD7ElementQzd_tcfc":{"name":"init(arrayLiteral:)","parent_name":"BSON"},"Enums/BSON.html#/s:Se4fromxs7Decoder_p_tKcfc":{"name":"init(from:)","parent_name":"BSON"},"Enums/BSON.html#/s:SE6encode2toys7Encoder_p_tKF":{"name":"encode(to:)","parent_name":"BSON"},"Enums/BSON.html":{"name":"BSON","abstract":"

Enum representing a BSON value.

"},"Enums/BSONType.html":{"name":"BSONType","abstract":"

The possible types of BSON values and their corresponding integer values.

"},"Enums/DateCodingStrategy.html":{"name":"DateCodingStrategy","abstract":"

Enum representing the various encoding/decoding strategy pairs for Dates."},"Enums/UUIDCodingStrategy.html":{"name":"UUIDCodingStrategy","abstract":"

Enum representing the various encoding/decoding strategy pairs for Dates."},"Enums/DataCodingStrategy.html":{"name":"DataCodingStrategy","abstract":"

Enum representing the various encoding/decoding strategy pairs for Dates."},"Enums/OperationType.html":{"name":"OperationType","abstract":"

An enum representing the type of operation for this change event.

"},"Enums/FullDocument.html":{"name":"FullDocument","abstract":"

Describes the modes for configuring the fullDocument field of a change stream document.

"},"Enums/WriteModel.html":{"name":"WriteModel","abstract":"

Enum encompassing operations that can be run as part of a bulkWrite.

"},"Enums/ReturnDocument.html":{"name":"ReturnDocument","abstract":"

Indicates which document to return in a find and modify operation.

"},"Enums/Hint.html":{"name":"Hint","abstract":"

An index to “hint” or force MongoDB to use when performing a query.

"},"Enums/CursorType.html":{"name":"CursorType","abstract":"

The possible types of MongoCursor or MongoCursor an operation can return.

"},"Enums/ServerError.html":{"name":"ServerError","abstract":"

The possible errors corresponding to types of errors encountered in the MongoDB server."},"Enums/UserError.html":{"name":"UserError","abstract":"

The possible errors caused by improper use of the driver by the user.

"},"Enums/RuntimeError.html":{"name":"RuntimeError","abstract":"

The possible errors that can occur unexpectedly during runtime.

"},"Enums/CollectionType.html":{"name":"CollectionType","abstract":"

Describes the type of data store returned when executing listCollections.

"},"Classes/ReadPreference/Mode.html#/s:10MongoSwift14ReadPreferenceC4ModeO7primaryyA2EmF":{"name":"primary","abstract":"

Default mode. All operations read from the current replica set primary.

","parent_name":"Mode"},"Classes/ReadPreference/Mode.html#/s:10MongoSwift14ReadPreferenceC4ModeO16primaryPreferredyA2EmF":{"name":"primaryPreferred","abstract":"

In most situations, operations read from the primary but if it is","parent_name":"Mode"},"Classes/ReadPreference/Mode.html#/s:10MongoSwift14ReadPreferenceC4ModeO9secondaryyA2EmF":{"name":"secondary","abstract":"

All operations read from the secondary members of the replica set.

","parent_name":"Mode"},"Classes/ReadPreference/Mode.html#/s:10MongoSwift14ReadPreferenceC4ModeO18secondaryPreferredyA2EmF":{"name":"secondaryPreferred","abstract":"

In most situations, operations read from secondary members but if no","parent_name":"Mode"},"Classes/ReadPreference/Mode.html#/s:10MongoSwift14ReadPreferenceC4ModeO7nearestyA2EmF":{"name":"nearest","abstract":"

Operations read from member of the replica set with the least network","parent_name":"Mode"},"Classes/ReadPreference/Mode.html":{"name":"Mode","abstract":"

An enumeration of possible ReadPreference modes.

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceC4modeAC4ModeOvp":{"name":"mode","abstract":"

The mode of this ReadPreference

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceC7tagSetsSayAA8DocumentVGvp":{"name":"tagSets","abstract":"

The tags of this ReadPreference

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceC19maxStalenessSecondss5Int64VSgvp":{"name":"maxStalenessSeconds","abstract":"

The maxStalenessSeconds of this ReadPreference

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceCyA2C4ModeOcfc":{"name":"init(_:)","abstract":"

Initializes a ReadPreference from a Mode.

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceCACycfc":{"name":"init()","abstract":"

Initializes a new ReadPreference with the default mode (primary).

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceC_7tagSets19maxStalenessSecondsA2C4ModeO_SayAA8DocumentVGSgs5Int64VSgtKcfc":{"name":"init(_:tagSets:maxStalenessSeconds:)","abstract":"

Initializes a ReadPreference.

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:10MongoSwift14ReadPreferenceC4fromA2C_tcfc":{"name":"init(from:)","abstract":"

Initializes a new ReadPreference by copying an existing ReadPreference.

","parent_name":"ReadPreference"},"Classes/ReadPreference.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"ReadPreference"},"Classes/MongoCursor.html#/s:10MongoSwift0A6CursorC5errors5Error_pSgvp":{"name":"error","abstract":"

The error that occurred while iterating this cursor, if one exists. This should be used to check for errors","parent_name":"MongoCursor"},"Classes/MongoCursor.html#/s:10MongoSwift0A6CursorC7isAliveSbvp":{"name":"isAlive","abstract":"

Indicates whether this cursor has the potential to return more data. This property is mainly useful for","parent_name":"MongoCursor"},"Classes/MongoCursor.html#/s:10MongoSwift0A6CursorC11nextOrErrorxSgyKF":{"name":"nextOrError()","abstract":"

Returns the next Document in this cursor or nil, or throws an error if one occurs – compared to next(),","parent_name":"MongoCursor"},"Classes/MongoCursor.html#/s:10MongoSwift0A6CursorC4nextxSgyF":{"name":"next()","abstract":"

Returns the next Document in this cursor, or nil. After this function returns nil, the caller should use","parent_name":"MongoCursor"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC7encoderAA11BSONEncoderCvp":{"name":"encoder","abstract":"

Encoder whose options are inherited by databases derived from this client.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC7decoderAA11BSONDecoderCvp":{"name":"decoder","abstract":"

Decoder whose options are inherited by databases derived from this client.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC11readConcernAA04ReadE0VSgvp":{"name":"readConcern","abstract":"

The read concern set on this client, or nil if one is not set.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC14readPreferenceAA04ReadE0Cvp":{"name":"readPreference","abstract":"

The ReadPreference set on this client.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC12writeConcernAA05WriteE0VSgvp":{"name":"writeConcern","abstract":"

The write concern set on this client, or nil if one is not set.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC_7optionsACSS_AA0C7OptionsVSgtKcfc":{"name":"init(_:options:)","abstract":"

Create a new client connection to a MongoDB server. For options that included in both the connection string URI","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC12startSession7optionsAA0cE0CAA0cE7OptionsVSg_tKF":{"name":"startSession(options:)","abstract":"

Starts a new ClientSession with the provided options.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC11withSession7options_xAA0cE7OptionsVSg_xAA0cE0CKXEtKlF":{"name":"withSession(options:_:)","abstract":"

Starts a new ClientSession with the provided options and passes it to the provided closure.","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC13listDatabases_7sessionSayAA21DatabaseSpecificationVGAA8DocumentVSg_AA0C7SessionCSgtKF":{"name":"listDatabases(_:session:)","abstract":"

Run the listDatabases command.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC04listA9Databases_7sessionSayAA0A8DatabaseVGAA8DocumentVSg_AA0C7SessionCSgtKF":{"name":"listMongoDatabases(_:session:)","abstract":"

Get a list of MongoDatabases.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC17listDatabaseNames_7sessionSaySSGAA8DocumentVSg_AA0C7SessionCSgtKF":{"name":"listDatabaseNames(_:session:)","abstract":"

Get a list of names of databases.

","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC2db_7optionsAA0A8DatabaseVSS_AA0F7OptionsVSgtF":{"name":"db(_:options:)","abstract":"

Gets a MongoDatabase instance for the given database name. If an option is not specified in the optional","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC5watch_7options7sessionAA12ChangeStreamCyAA0gH5EventVyAA8DocumentVGGSayALG_AA0gH7OptionsVSgAA0C7SessionCSgtKF":{"name":"watch(_:options:session:)","abstract":"

Starts a ChangeStream on a MongoClient. Allows the client to observe all changes in a cluster -","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC5watch_7options7session20withFullDocumentTypeAA12ChangeStreamCyAA0kL5EventVyxGGSayAA0I0VG_AA0kL7OptionsVSgAA0C7SessionCSgxmtKSeRzSERzlF":{"name":"watch(_:options:session:withFullDocumentType:)","abstract":"

Starts a ChangeStream on a MongoClient. Allows the client to observe all changes in a cluster -","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:10MongoSwift0A6ClientC5watch_7options7session13withEventTypeAA12ChangeStreamCyxGSayAA8DocumentVG_AA0jK7OptionsVSgAA0C7SessionCSgxmtKSeRzSERzlF":{"name":"watch(_:options:session:withEventType:)","abstract":"

Starts a ChangeStream on a MongoClient. Allows the client to observe all changes in a cluster -","parent_name":"MongoClient"},"Classes/MongoClient.html#/s:SQ2eeoiySbx_xtFZ":{"name":"==(_:_:)","parent_name":"MongoClient"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC6clientAA0aC0Cvp":{"name":"client","abstract":"

The client used to start this session.

","parent_name":"ClientSession"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC2idAA8DocumentVvp":{"name":"id","abstract":"

The session ID of this session.

","parent_name":"ClientSession"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC11clusterTimeAA8DocumentVSgvp":{"name":"clusterTime","abstract":"

The most recent cluster time seen by this session. This value will be nil if either of the following are true:

","parent_name":"ClientSession"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC13operationTimeAA9TimestampVSgvp":{"name":"operationTime","abstract":"

The operation time of the most recent operation performed using this session. This value will be nil if either","parent_name":"ClientSession"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC7optionsAA0cD7OptionsVSgvp":{"name":"options","abstract":"

The options used to start this session.

","parent_name":"ClientSession"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC18advanceClusterTime2toyAA8DocumentV_tF":{"name":"advanceClusterTime(to:)","abstract":"

Advances the clusterTime for this session to the given time, if it is greater than the current clusterTime. If","parent_name":"ClientSession"},"Classes/ClientSession.html#/s:10MongoSwift13ClientSessionC20advanceOperationTime2toyAA9TimestampV_tF":{"name":"advanceOperationTime(to:)","abstract":"

Advances the operationTime for this session to the given time if it is greater than the current operationTime.","parent_name":"ClientSession"},"Classes/ChangeStream.html#/s:10MongoSwift12ChangeStreamC11resumeTokenAA06ResumeF0VSgvp":{"name":"resumeToken","abstract":"

A ResumeToken associated with the most recent event seen by the change stream.

","parent_name":"ChangeStream"},"Classes/ChangeStream.html#/s:10MongoSwift12ChangeStreamC5errors5Error_pSgvp":{"name":"error","abstract":"

The error that occurred while iterating the change stream, if one exists. This should be used to check","parent_name":"ChangeStream"},"Classes/ChangeStream.html#/s:10MongoSwift12ChangeStreamC4nextxSgyF":{"name":"next()","abstract":"

Returns the next T in the change stream or nil if there is no next value. Will block for a maximum of","parent_name":"ChangeStream"},"Classes/ChangeStream.html#/s:10MongoSwift12ChangeStreamC11nextOrErrorxSgyKF":{"name":"nextOrError()","abstract":"

Returns the next T in this change stream or nil, or throws an error if one occurs – compared to next(),","parent_name":"ChangeStream"},"Classes/DocumentIterator.html#/s:10MongoSwift16DocumentIteratorC4nextSS3key_AA4BSONO5valuetSgyF":{"name":"next()","abstract":"

Returns the next value in the sequence, or nil if the iterator is exhausted.

","parent_name":"DocumentIterator"},"Classes/BSONEncoder/DataEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DataEncodingStrategyO010deferredToD0yA2EmF":{"name":"deferredToData","abstract":"

Encode the Data by deferring to its default encoding implementation.

","parent_name":"DataEncodingStrategy"},"Classes/BSONEncoder/DataEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DataEncodingStrategyO6binaryyA2EmF":{"name":"binary","abstract":"

Encode the Data as a BSON binary type (default).

","parent_name":"DataEncodingStrategy"},"Classes/BSONEncoder/DataEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DataEncodingStrategyO6base64yA2EmF":{"name":"base64","abstract":"

Encode the Data as a base64 encoded string.

","parent_name":"DataEncodingStrategy"},"Classes/BSONEncoder/DataEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DataEncodingStrategyO6customyAEy10Foundation0D0V_s7Encoder_ptKccAEmF":{"name":"custom(_:)","abstract":"

Encode the Data by using the given closure.","parent_name":"DataEncodingStrategy"},"Classes/BSONEncoder/UUIDEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20UUIDEncodingStrategyO14deferredToUUIDyA2EmF":{"name":"deferredToUUID","abstract":"

Encode the UUID by deferring to its default encoding implementation.

","parent_name":"UUIDEncodingStrategy"},"Classes/BSONEncoder/UUIDEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20UUIDEncodingStrategyO6binaryyA2EmF":{"name":"binary","abstract":"

Encode the UUID as a BSON binary type (default).

","parent_name":"UUIDEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO010deferredToD0yA2EmF":{"name":"deferredToDate","abstract":"

Encode the Date by deferring to its default encoding implementation.

","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO04bsonD4TimeyA2EmF":{"name":"bsonDateTime","abstract":"

Encode the Date as a BSON datetime object (default).

","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO21millisecondsSince1970yA2EmF":{"name":"millisecondsSince1970","abstract":"

Encode the Date as a 64-bit integer counting the number of milliseconds since January 1, 1970.

","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO16secondsSince1970yA2EmF":{"name":"secondsSince1970","abstract":"

Encode the Date as a BSON double counting the number of seconds since January 1, 1970.

","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO7iso8601yA2EmF":{"name":"iso8601","abstract":"

Encode the Date as an ISO-8601-formatted string (in RFC 339 format).

","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO9formattedyAESo15NSDateFormatterCcAEmF":{"name":"formatted(_:)","abstract":"

Encode the Date as a string formatted by the given formatter.

","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html#/s:10MongoSwift11BSONEncoderC20DateEncodingStrategyO6customyAEy10Foundation0D0V_s7Encoder_ptKccAEmF":{"name":"custom(_:)","abstract":"

Encode the Date by using the given closure.","parent_name":"DateEncodingStrategy"},"Classes/BSONEncoder/DateEncodingStrategy.html":{"name":"DateEncodingStrategy","abstract":"

Enum representing the various strategies for encoding Dates.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder/UUIDEncodingStrategy.html":{"name":"UUIDEncodingStrategy","abstract":"

Enum representing the various strategies for encoding UUIDs.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder/DataEncodingStrategy.html":{"name":"DataEncodingStrategy","abstract":"

Enum representing the various strategies for encoding Datas.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC20dateEncodingStrategyAC04DateeF0Ovp":{"name":"dateEncodingStrategy","abstract":"

The strategy to use for encoding Dates with this instance.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC20uuidEncodingStrategyAC012UUIDEncodingF0Ovp":{"name":"uuidEncodingStrategy","abstract":"

The strategy to use for encoding UUIDs with this instance.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC20dataEncodingStrategyAC04DataeF0Ovp":{"name":"dataEncodingStrategy","abstract":"

The strategy to use for encoding Datas with this instance.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC8userInfoSDys010CodingUserE3KeyVypGvp":{"name":"userInfo","abstract":"

Contextual user-provided information for use during encoding.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC7optionsAcA22CodingStrategyProvider_pSg_tcfc":{"name":"init(options:)","abstract":"

Initializes self.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC6encodeyAA8DocumentVxKSERzlF":{"name":"encode(_:)","abstract":"

Encodes the given top-level value and returns its BSON representation.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC6encodeyAA8DocumentVSgxSgKSERzlF":{"name":"encode(_:)","abstract":"

Encodes the given top-level optional value and returns its BSON representation. Returns nil if the","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC6encodeySayAA8DocumentVGSayxGKSERzlF":{"name":"encode(_:)","abstract":"

Encodes the given array of top-level values and returns an array of their BSON representations.

","parent_name":"BSONEncoder"},"Classes/BSONEncoder.html#/s:10MongoSwift11BSONEncoderC6encodeySayAA8DocumentVSgGSayxSgGKSERzlF":{"name":"encode(_:)","abstract":"

Encodes the given array of top-level optional values and returns an array of their BSON representations.","parent_name":"BSONEncoder"},"Classes/BSONDecoder/DataDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DataDecodingStrategyO010deferredToD0yA2EmF":{"name":"deferredToData","abstract":"

Decode Datas by deferring to their default decoding implementation.

","parent_name":"DataDecodingStrategy"},"Classes/BSONDecoder/DataDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DataDecodingStrategyO6binaryyA2EmF":{"name":"binary","abstract":"

Decode Datas stored as the BSON Binary type (default).

","parent_name":"DataDecodingStrategy"},"Classes/BSONDecoder/DataDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DataDecodingStrategyO6base64yA2EmF":{"name":"base64","abstract":"

Decode Datas stored as base64 encoded strings.

","parent_name":"DataDecodingStrategy"},"Classes/BSONDecoder/DataDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DataDecodingStrategyO6customyAE10Foundation0D0Vs7Decoder_pKccAEmF":{"name":"custom(_:)","abstract":"

Decode Datas using the provided closure.

","parent_name":"DataDecodingStrategy"},"Classes/BSONDecoder/UUIDDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20UUIDDecodingStrategyO14deferredToUUIDyA2EmF":{"name":"deferredToUUID","abstract":"

Decode UUIDs by deferring to their default decoding implementation.

","parent_name":"UUIDDecodingStrategy"},"Classes/BSONDecoder/UUIDDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20UUIDDecodingStrategyO6binaryyA2EmF":{"name":"binary","abstract":"

Decode UUIDs stored as the BSON Binary type (default).

","parent_name":"UUIDDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO04bsonD4TimeyA2EmF":{"name":"bsonDateTime","abstract":"

Decode Dates stored as BSON datetimes (default).

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO21millisecondsSince1970yA2EmF":{"name":"millisecondsSince1970","abstract":"

Decode Dates stored as numbers of seconds since January 1, 1970.

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO16secondsSince1970yA2EmF":{"name":"secondsSince1970","abstract":"

Decode Dates stored as numbers of milliseconds since January 1, 1970.

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO010deferredToD0yA2EmF":{"name":"deferredToDate","abstract":"

Decode Dates by deferring to their default decoding implementation.

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO7iso8601yA2EmF":{"name":"iso8601","abstract":"

Decode Dates stored as ISO8601 formatted strings.

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO9formattedyAESo15NSDateFormatterCcAEmF":{"name":"formatted(_:)","abstract":"

Decode Dates stored as strings parsable by the given formatter.

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html#/s:10MongoSwift11BSONDecoderC20DateDecodingStrategyO6customyAE10Foundation0D0Vs7Decoder_pKccAEmF":{"name":"custom(_:)","abstract":"

Decode Dates using the provided closure.

","parent_name":"DateDecodingStrategy"},"Classes/BSONDecoder/DateDecodingStrategy.html":{"name":"DateDecodingStrategy","abstract":"

Enum representing the various strategies for decoding Dates from BSON.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder/UUIDDecodingStrategy.html":{"name":"UUIDDecodingStrategy","abstract":"

Enum representing the various strategies for decoding UUIDs from BSON.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder/DataDecodingStrategy.html":{"name":"DataDecodingStrategy","abstract":"

Enum representing the various strategies for decoding Datas from BSON.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC8userInfoSDys010CodingUserE3KeyVypGvp":{"name":"userInfo","abstract":"

Contextual user-provided information for use during decoding.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC20dateDecodingStrategyAC04DateeF0Ovp":{"name":"dateDecodingStrategy","abstract":"

The strategy used for decoding Dates with this instance.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC20uuidDecodingStrategyAC012UUIDDecodingF0Ovp":{"name":"uuidDecodingStrategy","abstract":"

The strategy used for decoding UUIDs with this instance.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC20dataDecodingStrategyAC04DataeF0Ovp":{"name":"dataDecodingStrategy","abstract":"

The strategy used for decoding Datas with this instance.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC7optionsAcA22CodingStrategyProvider_pSg_tcfc":{"name":"init(options:)","abstract":"

Initializes self.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC6decode_4fromxxm_AA8DocumentVtKSeRzlF":{"name":"decode(_:from:)","abstract":"

Decodes a top-level value of the given type from the given BSON document.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC6decode_4fromxxm_10Foundation4DataVtKSeRzlF":{"name":"decode(_:from:)","abstract":"

Decodes a top-level value of the given type from the given BSON data.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html#/s:10MongoSwift11BSONDecoderC6decode_4fromxxm_SStKSeRzlF":{"name":"decode(_:from:)","abstract":"

Decodes a top-level value of the given type from the given JSON/extended JSON string.

","parent_name":"BSONDecoder"},"Classes/BSONDecoder.html":{"name":"BSONDecoder","abstract":"

BSONDecoder facilitates the decoding of BSON into semantic Decodable types.

"},"Classes/BSONEncoder.html":{"name":"BSONEncoder","abstract":"

BSONEncoder facilitates the encoding of Encodable values into BSON.

"},"Classes.html#/s:10MongoSwift15DocumentStorageC":{"name":"DocumentStorage","abstract":"

The storage backing a MongoSwift Document.

"},"Classes/DocumentIterator.html":{"name":"DocumentIterator","abstract":"

An iterator over the values in a Document.

"},"Classes/ChangeStream.html":{"name":"ChangeStream","abstract":"

A MongoDB change stream.

"},"Classes/ClientSession.html":{"name":"ClientSession","abstract":"

A MongoDB client session."},"Classes/MongoClient.html":{"name":"MongoClient","abstract":"

A MongoDB Client.

"},"Classes/MongoCursor.html":{"name":"MongoCursor","abstract":"

A MongoDB cursor.

"},"Classes/ReadPreference.html":{"name":"ReadPreference","abstract":"

A class to represent a MongoDB read preference.

"},"multithreaded-usage.html":{"name":"Multithreaded-Usage"},"bson.html":{"name":"BSON"},"error-handling.html":{"name":"Error-Handling"},"development.html":{"name":"Development"},"change-streams.html":{"name":"Change-Streams"},"Guides.html":{"name":"Guides","abstract":"

The following guides are available globally.

"},"Classes.html":{"name":"Classes","abstract":"

The following classes are available globally.

"},"Enums.html":{"name":"Enumerations","abstract":"

The following enumerations are available globally.

"},"Extensions.html":{"name":"Extensions","abstract":"

The following extensions are available globally.

"},"Functions.html":{"name":"Functions","abstract":"

The following functions are available globally.

"},"Protocols.html":{"name":"Protocols","abstract":"

The following protocols are available globally.

"},"Structs.html":{"name":"Structures","abstract":"

The following structures are available globally.

"},"Typealiases.html":{"name":"Type Aliases","abstract":"

The following type aliases are available globally.

"}} \ No newline at end of file diff --git a/docs/undocumented.json b/docs/undocumented.json deleted file mode 100644 index 71a967300..000000000 --- a/docs/undocumented.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "warnings": [ - - ], - "source_directory": "/Users/km/mongo-swift-driver" -} \ No newline at end of file diff --git a/etc/build-examples.sh b/etc/build-examples.sh index 4fabebf78..9cfc803d6 100755 --- a/etc/build-examples.sh +++ b/etc/build-examples.sh @@ -15,6 +15,9 @@ for example_project in ${examples[@]}; do # don't exit on failure set +e + if [ ${example_project} == "KituraExample" ]; then + export KITURA_NIO=1 + fi swift build build_success=$? set -e diff --git a/etc/generate-docs.sh b/etc/generate-docs.sh new file mode 100755 index 000000000..a73032323 --- /dev/null +++ b/etc/generate-docs.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# usage: ./etc/generate-docs.sh [new version string] + +# exit if any command fails +set -e + +if ! command -v jazzy > /dev/null; then + gem install jazzy || { echo "ERROR: Failed to locate or install jazzy; please install yourself with 'gem install jazzy' (you may need to use sudo)"; exit 1; } +fi + +version=${1} + +jazzy_args=(--clean + --author 'Matt Broadstone, Kaitlin Mahar, and Patrick Freed' + --readme "docs/README.md" + --author_url https://github.com/mongodb/mongo-swift-driver + --github_url https://github.com/mongodb/mongo-swift-driver + --theme fullwidth + --documentation "Guides/*.md" + --github-file-prefix https://github.com/mongodb/mongo-swift-driver/tree/v${version} + --module-version "${version}" + --swift-build-tool spm) + +modules=( MongoSwift MongoSwiftSync ) + +for module in "${modules[@]}"; do + args=("${jazzy_args[@]}" --output "docs/${module}" --module "${module}" + --root-url "https://mongodb.github.io/mongo-swift-driver/docs/${module}/") + jazzy "${args[@]}" +done diff --git a/etc/release.sh b/etc/release.sh index 16b9221e2..7463beea0 100755 --- a/etc/release.sh +++ b/etc/release.sh @@ -11,8 +11,7 @@ set -e sourcery --sources Sources/MongoSwift --templates Sources/MongoSwift/MongoSwiftVersion.stencil --output Sources/MongoSwift/MongoSwiftVersion.swift --args versionString=${1} # regenerate documentation with new version string -export DOCSVERSION=${1} -make documentation +./etc/generate-docs.sh ${1} # commit changes git add docs/