RenameCollectionOptions
public struct RenameCollectionOptions : Codable
Options to use when renaming a collection. These options will be used for MongoCollection.renamed.
-
Specifies whether an existing collection matching the new name should be dropped before the rename. If this is not set to true and a collection with the new collection name exists, the server will throw an error.
Declaration
Swift
public var dropTarget: Bool? -
An optional
WriteConcernto use for the command.Declaration
Swift
public var writeConcern: WriteConcern? -
Declaration
Swift
public init(from decoder: Decoder) throws -
Initializer allowing any/all parameters to be omitted.
Declaration
Swift
public init(dropTarget: Bool = false, writeConcern: WriteConcern? = nil)
View on GitHub
Install in Dash
RenameCollectionOptions Structure Reference