jensarps/IDBWrapper

putAll method

Closed this issue · 1 comments

It would be nice to have a putAll method to iterate over an array of objects and put them

Thanks for your comment!

This can be achieved by using the batch() method (see http://jensarps.github.com/IDBWrapper/jsdoc/IDBStore.html#batch and more detailed https://github.com/jensarps/IDBWrapper/blob/master/README.md#data-manipulation, scroll down to batch) – the documentation is insufficient here, I'll have to add more info to it, sorry for that.

I agree that this is not as convenient as a separate putAll or putMany, but I don't want to add too many convenience methods for now – I might reconsider this at a later point.

However, implementing your own putAllmethod is quite easy, see this gist:
https://gist.github.com/jensarps/5046786

Closing this now, but I might re-open it at a later point.