delete method
Deletes every input document. The result of the pipeline is one row
with the number of documents_modified.
The write stages (delete, update, insert, upsert) change the
database directly on the server. They are not queued while offline, do
not go through the local cache and do not raise local events; listeners
see the change when the server reports it (the emulator does not report
it at all, see docs/guides/pipelines.md). Use execute(atomic: true) to apply all
writes of a pipeline in one transaction; the server requires it whenever
it cannot apply the stages to one document at a time, for example for
insert and upsert of documents read from a collection, or after an
aggregation, unnest, union or a subquery.
Implementation
Pipeline delete({Map<String, Object?>? rawOptions}) {
return _append(Stage('delete', rawOptions: rawOptions));
}