arangodb / arangojs

The official ArangoDB JavaScript driver.
https://arangodb.github.io/arangojs
Apache License 2.0
600 stars 106 forks source link

Support ignoreRevs on `Collection.delete()` calls #708

Closed robross0606 closed 3 years ago

robross0606 commented 3 years ago

The HTTP API for ArangoDB supports revision checking on document removal via the If-Match header:

https://www.arangodb.com/docs/stable/http/document-working-with-documents.html#removes-a-document

However, the ArangoJS API doesn't expose this option. It should be exposed similar to how Collection.update() calls used to work prior to 7.x. Or, at least, how they're supposed to work (#707).

pluma commented 3 years ago

I'm closing this as a duplicate of #707 as that issue provides more additional information and the solution seems to be to re-implement the if-match header from v6.

robross0606 commented 3 years ago

I'm not sure this should have been closed. I don't know if Collection.delete() on ArangoJS ever supported revision checks via If-Match. #707 is a bug ticket on Collection.update(). I had submitted this as a feature request on Collection.delete(). Just want to make sure we're tracking the distinction.