MDSLKTR / pouch-vue

Pouchdb bindings for Vue.js
MIT License
90 stars 17 forks source link

Update doc for "remove" #48

Closed twitwi closed 1 year ago

twitwi commented 4 years ago

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)

MDSLKTR commented 4 years ago

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

twitwi commented 4 years ago

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