CountOptions
public struct CountOptions : Encodable
Options to use when executing a count
command on a MongoCollection
.
-
Specifies a collation.
Declaration
Swift
public let collation: Document?
-
A hint for the index to use.
Declaration
Swift
public let hint: Hint?
-
The maximum number of documents to count.
Declaration
Swift
public let limit: Int64?
-
The maximum amount of time to allow the query to run.
Declaration
Swift
public let maxTimeMS: Int64?
-
The number of documents to skip before counting.
Declaration
Swift
public let skip: Int64?
-
A ReadConcern to use for this operation.
Declaration
Swift
public let readConcern: ReadConcern?
-
A ReadPreference to use for this operation.
Declaration
Swift
public let 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)