pouch-vue icon indicating copy to clipboard operation
pouch-vue copied to clipboard

Update doc for "remove"

Open twitwi opened this issue 4 years ago • 2 comments

NB: The existing code works even though it semantically could be updated (variables names). NB: The existing code does not follow the complete pouchdb API (optional second param)

twitwi avatar Apr 20 '20 20:04 twitwi

Hey thanks for the PR. I think we only support the shorthand db.remove(doc, [options], [callback]) at the moment where you pass a doc object instead of spread properties. This will require a bit of workaround to make both versions whereas the shorthand is kinda more intuitive in my opinion, since you always pass _id and _rev so why not as an object. The link to #delete_document could certainly be updated. So i would be willing to support both versions but the code has to be adapted as well to make it work

MDSLKTR avatar Apr 21 '20 07:04 MDSLKTR

I will have to try again, but I initially tried with rev or _rev in the option but it did not work.

twitwi avatar Apr 21 '20 13:04 twitwi