heapwolf / ldb

A C++ REPL / CLI for LevelDB
MIT License
201 stars 23 forks source link

Non-Blocking --create #60

Open hongkongkiwi opened 6 years ago

hongkongkiwi commented 6 years ago

Hi there,

I'm interested in using ldb in a bash script. Is there a way I can run ldb ./testdb --create without going into REPL mode?

For example I want to create the db if it doesn't exist and then put a key into it.

But now, ldb ./testdb --create is blocking! :/

blvz commented 4 years ago

You could use ldb ./testdb --create --size.

https://github.com/heapwolf/ldb/blob/f289a716b4e403e335da908d696f031c4ece920c/ldb.cc#L110-L111