Delete¶
Delete one or more documents in the database
Documentation¶
Delete documents from the database matching filter.
The node can be configured to perform a Delete One or a Delete Many operation. This determines if the delete should be performed on only the first or all documents matching filter.
Filter can be specified either as part of the configuration or using an opt-in json-port.
See https://docs.mongodb.com/manual/reference/method/db.collection.deleteOne/ and https://docs.mongodb.com/manual/reference/method/db.collection.deleteMany/ for more details.
For info on how to input data to MongoDB, see MongoDB data format.
This node can output a write operation, see Output write operation.
Definition¶
Input ports¶
- mongodb
Type: mongodbDescription: MongoDB- filter
Type: jsonDescription: FilterOptional number of ports: 0–1 (default: 0)
Output ports¶
- mongodb
Type: mongodbDescription: MongoDBOptional number of ports: 0–1 (default: 1)- delete_result
Type: jsonDescription: Delete resultOptional number of ports: 0–1 (default: 1)- write_operation
Type: jsonDescription: Write operation. Output write operation instead of performing the operation directly. The write operation can be used as an element in a bulk write input listOptional number of ports: 0–1 (default: 0)
Configuration¶
- Filter (filter)
Filter as json.
- Operation (operation)
Operation used for updating.
Implementation¶
- class node_mongodb.MongoDBDelete[source]