my8bird / node-leveldb

NodeJS bindings to levelDB - a fast and lightweight key/value database library
http://code.google.com/p/leveldb/
BSD 2-Clause "Simplified" License
63 stars 12 forks source link

Synchronous Open Support #48

Closed ulikoehler closed 11 years ago

ulikoehler commented 11 years ago

I finally managed to get a version of syncOpen() working -- this has already been requested in issue #26.

The behaviour is exactly equal to the async version, I just put all the code from OpenAsync into the new static function syncOpen. It throws an exception on error.

I also wrote a rudimentary unit test for syncOpen() that simply tests if the handle returned passes a simple put/get test.

Merging would be highly appreciated as this feature has been requested repeatedly.

my8bird commented 11 years ago

Sorry, that took to so long. I had a funeral and lost track for a bit. Thanks for the great update.

ulikoehler commented 11 years ago

4 days is really fast IMO ;-) Thanks for merging!