Structs

The following structs are available globally.

  • An option to use for an aggregate operation

    See more

    Declaration

    Swift

    public struct AggregationOptions : ExpressibleByDictionaryLiteral
  • An error thrown by an Insert operation when writing fails

    See more

    Declaration

    Swift

    public struct InsertErrors : Error
  • An error thrown by an Update operation when writing fails

    See more

    Declaration

    Swift

    public struct UpdateError : Error
  • An error thrown by an Remove operation when writing fails

    See more

    Declaration

    Swift

    public struct RemoveError : Error
  • A semantic version

    See more

    Declaration

    Swift

    public struct Version: ValueConvertible, Comparable
  • MongoDB build information

    See more

    Declaration

    Swift

    public struct BuildInfo: ValueConvertible
  • The flags that can be used in a Find/Query message

    See more

    Declaration

    Swift

    public struct QueryFlags : OptionSet
  • DBRef is a structure made to keep references to other MongoDB objects and resolve them easily

    See more

    Declaration

    Swift

    public struct DBRef: ValueConvertible
  • A Pipeline used for aggregation queries

    See more

    Declaration

    Swift

    public struct AggregationPipeline: ExpressibleByArrayLiteral, ValueConvertible
  • A projection removes any keys from it’s input Documents that have not been specified to be included except _id.

    If you don’t want to include _id you’ll have to explicitely not include it.

    See more

    Declaration

    Swift

    public struct Projection: ValueConvertible
  • A Query that consists of an AQT statement

    See more

    Declaration

    Swift

    public struct Query: ExpressibleByDictionaryLiteral, ValueConvertible, ExpressibleByStringLiteral
  • A Sort object specifies to MongoDB in what order certain Documents need to be ordered

    This can be used in normal and aggregate queries

    See more

    Declaration

    Swift

    public struct Sort: ValueConvertible, ExpressibleByDictionaryLiteral
  • Various settings to control the behavior of a MongoClient.

    See more

    Declaration

    Swift

    public struct ClientSettings
  • The location of a Mongo server - i.e. server name and port number

    See more

    Declaration

    Swift

    public struct MongoHost: Equatable, ExpressibleByStringLiteral
  • Represents credentials to authenticate to a mongo server,as well as the source of the credentials and the authentication mechanism to use.

    See more

    Declaration

    Swift

    public struct MongoCredentials
  • Settings for connecting to MongoDB via SSL.

    See more

    Declaration

    Swift

    public struct SSLSettings: ExpressibleByBooleanLiteral