Structures
The following structures are available globally.
-
An event published when a command starts. The event is stored under the key
See moreevent
in theuserInfo
property ofNotification
s posted under the name .commandStarted.Declaration
Swift
public struct CommandStartedEvent : MongoEvent, InitializableFromOpaquePointer
-
An event published when a command succeeds. The event is stored under the key
See moreevent
in theuserInfo
property ofNotification
s posted under the name .commandSucceeded.Declaration
Swift
public struct CommandSucceededEvent : MongoEvent, InitializableFromOpaquePointer
-
An event published when a command fails. The event is stored under the key
See moreevent
in theuserInfo
property ofNotification
s posted under the name .commandFailed.Declaration
Swift
public struct CommandFailedEvent : MongoEvent, InitializableFromOpaquePointer
-
Published when a server description changes. This does NOT include changes to the server’s roundTripTime property.
See moreDeclaration
Swift
public struct ServerDescriptionChangedEvent : MongoEvent, InitializableFromOpaquePointer
-
Published when a server is initialized.
See moreDeclaration
Swift
public struct ServerOpeningEvent : MongoEvent, InitializableFromOpaquePointer
-
Published when a server is closed.
See moreDeclaration
Swift
public struct ServerClosedEvent : MongoEvent, InitializableFromOpaquePointer
-
Published when a topology description changes.
See moreDeclaration
Swift
public struct TopologyDescriptionChangedEvent : MongoEvent, InitializableFromOpaquePointer
-
Published when a topology is initialized.
See moreDeclaration
Swift
public struct TopologyOpeningEvent : MongoEvent, InitializableFromOpaquePointer
-
Published when a topology is closed.
See moreDeclaration
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 moreDeclaration
Swift
public struct ServerHeartbeatStartedEvent : MongoEvent, InitializableFromOpaquePointer
-
Published when the server monitor’s ismaster succeeds.
See moreDeclaration
Swift
public struct ServerHeartbeatSucceededEvent : MongoEvent, InitializableFromOpaquePointer
-
Published when the server monitor’s ismaster fails, either with an “ok: 0” or a socket exception.
See moreDeclaration
Swift
public struct ServerHeartbeatFailedEvent : MongoEvent, InitializableFromOpaquePointer
-
A struct to represent the BSON Decimal128 type.
See moreDeclaration
Swift
public struct Decimal128 : BSONNumber, Equatable, Codable, CustomStringConvertible
-
Options struct used for configuring the coding strategies on
See moreBSONEncoder
andBSONDecoder
.Declaration
Swift
public struct BSONCoderOptions : CodingStrategyProvider
-
A struct representing the BSON document type.
See moreDeclaration
Swift
@dynamicMemberLookup public struct Document
-
Options to use when creating a ClientSession.
See moreDeclaration
Swift
public struct ClientSessionOptions
-
Options to use when creating a
See moreMongoClient
.Declaration
Swift
public struct ClientOptions : CodingStrategyProvider, Decodable
-
Options to use when listing available databases.
See moreDeclaration
Swift
public struct ListDatabasesOptions : Encodable
-
Options to use when retrieving a
See moreMongoDatabase
from aMongoClient
.Declaration
Swift
public struct DatabaseOptions : CodingStrategyProvider
-
Options to use when performing a bulk write operation on a
See moreMongoCollection
.Declaration
Swift
public struct BulkWriteOptions : Codable
-
The result of a bulk write operation on a
See moreMongoCollection
.Declaration
Swift
public struct BulkWriteResult : Decodable
-
Options to use when executing a
See morefindOneAndDelete
command on aMongoCollection
.Declaration
Swift
public struct FindOneAndDeleteOptions : FindAndModifyOptionsConvertible, Decodable
-
Options to use when executing a
See morefindOneAndReplace
command on aMongoCollection
.Declaration
Swift
public struct FindOneAndReplaceOptions : FindAndModifyOptionsConvertible, Decodable
-
Options to use when executing a
See morefindOneAndUpdate
command on aMongoCollection
.Declaration
Swift
public struct FindOneAndUpdateOptions : FindAndModifyOptionsConvertible, Decodable
-
A struct representing an index on a
See moreMongoCollection
.Declaration
Swift
public struct IndexModel : Encodable
-
Options to use when creating an index for a collection.
See moreDeclaration
Swift
public struct IndexOptions : Codable
-
Options to use when executing an
See moreaggregate
command on aMongoCollection
.Declaration
Swift
public struct AggregateOptions : Codable
-
Options to use when executing a
See morefind
command on aMongoCollection
.Declaration
Swift
public struct FindOptions : Codable
-
Options to use when executing an
See moreinsertOne
command on aMongoCollection
.Declaration
Swift
public struct InsertOneOptions : Codable, BulkWriteOptionsConvertible
-
Options to use when executing an
See moreupdate
command on aMongoCollection
.Declaration
Swift
public struct UpdateOptions : Codable, BulkWriteOptionsConvertible
-
Options to use when executing a
See morereplace
command on aMongoCollection
.Declaration
Swift
public struct ReplaceOptions : Codable, BulkWriteOptionsConvertible
-
Options to use when executing a
See moredelete
command on aMongoCollection
.Declaration
Swift
public struct DeleteOptions : Codable, BulkWriteOptionsConvertible
-
The result of an
See moreinsertOne
command on aMongoCollection
.Declaration
Swift
public struct InsertOneResult : Decodable
-
The result of a multi-document insert operation on a
See moreMongoCollection
.Declaration
Swift
public struct InsertManyResult
-
The result of a
See moredelete
command on aMongoCollection
.Declaration
Swift
public struct DeleteResult : Decodable
-
The result of an
See moreupdate
operation aMongoCollection
.Declaration
Swift
public struct UpdateResult : Decodable
-
Options to use when executing a
See morelistCollections
command on aMongoDatabase
.Declaration
Swift
public struct ListCollectionsOptions : Encodable
-
Options to set on a retrieved
See moreMongoCollection
.Declaration
Swift
public struct CollectionOptions : CodingStrategyProvider
-
A struct to represent a single write error not resulting from an executed bulk write.
See moreDeclaration
Swift
public struct WriteError : Codable
-
A struct to represent a write concern error resulting from an executed bulk write.
See moreDeclaration
Swift
public struct WriteConcernError : Codable
-
A struct to represent a write error resulting from an executed bulk write.
See moreDeclaration
Swift
public struct BulkWriteError : Codable
-
Options to use when executing a
See morecount
command on aMongoCollection
.Declaration
Swift
public struct CountOptions : Codable
-
Options to use when executing a
See morecreateCollection
command on aMongoDatabase
.Declaration
Swift
public struct CreateCollectionOptions : Codable, CodingStrategyProvider
-
Options to use when creating a new index on a
See moreMongoCollection
.Declaration
Swift
public struct CreateIndexOptions : Encodable
-
Options to use when executing a
See moredistinct
command on aMongoCollection
.Declaration
Swift
public struct DistinctOptions : Codable
-
Options to use when dropping an index from a
See moreMongoCollection
.Declaration
Swift
public struct DropIndexOptions : Encodable
-
Options to use when running a command against a
See moreMongoDatabase
.Declaration
Swift
public struct RunCommandOptions : Encodable
-
A struct representing a server connection, consisting of a host and port.
See moreDeclaration
Swift
public struct ConnectionId : Equatable
-
A struct describing a mongod or mongos process.
See moreDeclaration
Swift
public struct ServerDescription
-
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 moreDeclaration
Swift
public struct TopologyDescription