Factual / clj-leveldb

Clojure bindings for LevelDB
74 stars 20 forks source link

Idea for adding a "batch" interface to combine puts and deletes #8

Closed worace closed 8 years ago

worace commented 8 years ago

First of all, thanks for providing this library! I've been using it in a project and it's been very helpful.

A few times I've found myself wanting to be able to batch puts and deletes together -- as far as I could tell there isn't currently an interface for this, but thanks to the Batch record y'all had written it was pretty easy to add.

I wrote it to accept a sequence of keys and values as the option for :put since I felt like that matched the current interface to put more cleanly. But it could also be done with a map ((batch db {:put {:k1 :v1 :k2 :v2})) if you think that is cleaner.

dirtyvagabond commented 8 years ago

Thanks @worace !