version = 0
name = "Delete"
documentation = "Delete performs a delete operation"

[properties]
enabled = ["write concern"]
retryable = {mode = "once per command", type = "writes"}
batches = "deletes"

[command]
name = "delete"
parameter = "collection"

[request.deletes]
type = "document"
slice = true
constructor = true
variadic = true
required = true
documentation = """
Deletes adds documents to this operation that will be used to determine what documents to delete when this operation
is executed. These documents should have the form {q: <query>, limit: <integer limit>, collation: <document>}. The
collation field is optional. If limit is 0, there will be no limit on the number of documents deleted.\
"""

[request.ordered]
type = "boolean"
documentation = """
Ordered sets ordered. If true, when a write fails, the operation will return the error, when
false write failures do not stop execution of the operation.\
"""

[response]
name = "DeleteResult"

[response.field.n]
type = "int32"
documentation = "Number of documents successfully deleted."
