CreateCollectionOptions
public struct CreateCollectionOptions : Codable, CodingStrategyProviderOptions to use when executing a createCollection command on a MongoDatabase.
- 
                  
                  Indicates whether this will be a capped collection. DeclarationSwift public var capped: Bool?
- 
                  
                  Specifies the default collation for the collection. DeclarationSwift public var collation: BSONDocument?
- 
                  
                  Specifies the DataCodingStrategyto use for BSON encoding/decoding operations performed by this collection. It is the responsibility of the user to ensure that anyDatas already stored in this collection can be decoded using this strategy.DeclarationSwift public var dataCodingStrategy: DataCodingStrategy?
- 
                  
                  Specifies the DateCodingStrategyto use for BSON encoding/decoding operations performed by this collection. It is the responsibility of the user to ensure that anyDates already stored in this collection can be decoded using this strategy.DeclarationSwift public var dateCodingStrategy: DateCodingStrategy?
- 
                  
                  Specify a default configuration for indexes created on this collection. DeclarationSwift public var indexOptionDefaults: BSONDocument?
- 
                  
                  Maximum number of documents allowed in the collection (if capped). DeclarationSwift public var max: Int?
- 
                  
                  An array consisting of aggregation pipeline stages. When used with viewOn, will create the view by applying this pipeline to the source collection or view.DeclarationSwift public var pipeline: [BSONDocument]?
- 
                  
                  Maximum size, in bytes, of this collection (if capped). DeclarationSwift public var size: Int?
- 
                  
                  Specifies storage engine configuration for this collection. DeclarationSwift public var storageEngine: BSONDocument?
- 
                  
                  Specifies the UUIDCodingStrategyto use for BSON encoding/decoding operations performed by this collection. It is the responsibility of the user to ensure that anyUUIDs already stored in this collection can be decoded using this strategy.DeclarationSwift public var uuidCodingStrategy: UUIDCodingStrategy?
- 
                  
                  Determines whether to error on invalid documents or just warn about the violations but allow invalid documents to be inserted. DeclarationSwift public var validationAction: String?
- 
                  
                  Determines how strictly MongoDB applies the validation rules to existing documents during an update. DeclarationSwift public var validationLevel: String?
- 
                  
                  What validator should be used for the collection. DeclarationSwift public var validator: BSONDocument?
- 
                  
                  The name of the source collection or view from which to create the view. DeclarationSwift public var viewOn: String?
- 
                  
                  A write concern to use when executing this command. To set a read or write concern for the collection itself, retrieve the collection using MongoDatabase.collection.DeclarationSwift public var writeConcern: WriteConcern?
- 
                  init(capped:collation: dataCodingStrategy: dateCodingStrategy: indexOptionDefaults: max: pipeline: size: storageEngine: uuidCodingStrategy: validationAction: validationLevel: validator: viewOn: writeConcern: ) Convenience initializer allowing any/all parameters to be omitted or optional. DeclarationSwift public init( capped: Bool? = nil, collation: BSONDocument? = nil, dataCodingStrategy: DataCodingStrategy? = nil, dateCodingStrategy: DateCodingStrategy? = nil, indexOptionDefaults: BSONDocument? = nil, max: Int? = nil, pipeline: [BSONDocument]? = nil, size: Int? = nil, storageEngine: BSONDocument? = nil, uuidCodingStrategy: UUIDCodingStrategy? = nil, validationAction: String? = nil, validationLevel: String? = nil, validator: BSONDocument? = nil, viewOn: String? = nil, writeConcern: WriteConcern? = nil )
 View on GitHub
            View on GitHub
           Install in Dash
            Install in Dash
           CreateCollectionOptions Structure Reference
      CreateCollectionOptions Structure Reference