WriteModel

public protocol WriteModel

A protocol indicating write operations that can be batched together using MongoCollection.bulkWrite.

  • Adds the operation to a bulk write.

    The index argument denotes the operation’s order within the bulk write and should match its index within the requests array parameter for MongoCollection.bulkWrite.

    Declaration

    Swift

    func addToBulkWrite(bulk: BulkWriteOperation, index: Int) throws

    Parameters

    bulk
    index

    Index of the operation within the MongoCollection.bulkWrite requests array.