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 mongodb
MongoDB
- filter 0 - 1, json
Filter
Output ports¶
- mongodb 0 - 1, mongodb
MongoDB
- delete_result 0 - 1, json
Delete result
- write_operation 0 - 1, json
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 list
Configuration¶
- Filter (filter)
Filter as json.
- Operation (operation)
Operation used for updating.
Implementation¶
- class node_mongodb.MongoDBDelete[source]