CountOptions

public struct CountOptions : Codable

Options to use when executing a count command on a MongoCollection.

  • Specifies a collation.

    Declaration

    Swift

    public var collation: Document?
  • A hint for the index to use.

    Declaration

    Swift

    public var hint: Hint?
  • The maximum number of documents to count.

    Declaration

    Swift

    public var limit: Int64?
  • The maximum amount of time to allow the query to run.

    Declaration

    Swift

    public var maxTimeMS: Int64?
  • The number of documents to skip before counting.

    Declaration

    Swift

    public var skip: Int64?
  • A ReadConcern to use for this operation.

    Declaration

    Swift

    public var readConcern: ReadConcern?
  • 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)