couch-to-postgres
couch-to-postgres copied to clipboard
SQL DELETE - document functionality
Do with bulk updates setting doc._deleted flag to true
Should be straight forward to do once bulk function in place - as this can be then done with
json_object_set_key(doc::json, '_deleted'::text, true):
Make a function to help which just gets passed the doc id and rev plus array of fields to keep in the deleted doc so not upset anyone with elastic search couch river (https://github.com/elasticsearch/elasticsearch-river-couchdb - Indexing Databases with Multiple Types)
ie bulk submit needs to be something like: "docs" : [{ "_id: 2, "_rev" : "rev", "_deleted" : true, "type" : "Person" }]'
Add example delete to readme