couch-client icon indicating copy to clipboard operation
couch-client copied to clipboard

merge

Open michael opened this issue 14 years ago • 2 comments

Hey :)

Would you be interested in having a CouchClient#merge (or #update) method that requires an _id and just updates the attributes provided, while leaving others untouched?

This would make obsolete the task of getting the previous document first in order to merge the changes into the object that's being passed to #save.

Would this make sense?

michael avatar Dec 15 '10 19:12 michael

I'd really like to keep the api as simple as possible. It shouldn't be hard to add your own abstractions on top of it if you want.

creationix avatar Dec 15 '10 20:12 creationix

Sure thing! Just wanted to bring it up. :)

Actually, CouchClient's small footprint is what I like about it.

-- Michael

michael avatar Dec 15 '10 21:12 michael