IndexModel
public struct IndexModel : Encodable
A struct representing an index on a MongoCollection
.
-
Contains the required keys for the index.
Declaration
Swift
public let keys: Document
-
Contains the options for the index.
Declaration
Swift
public let options: IndexOptions?
-
Convenience initializer providing a default
options
valueDeclaration
Swift
public init(keys: Document, options: IndexOptions? = nil)
-
Declaration
Swift
public func encode(to encoder: Encoder) throws