leveldb abstraction