문제

I like the look of LevelDB as a database for my application but there is one issue.

I would like to store data into the database but when I read the data sometimes I only need a particular section of the data. As well as leveldb_get(db, readOptions, key, keySize, &size, &err) I'd like something like leveldb_get_subsection(db, readOptions, key, keySize, offset, size, &err) but that does not exist.

I could, of-course, index the data into smaller sections but I was wondering if there was a good alternative to LevelDB that allows me to read a subsection of a record/value which makes much more sense. Are there any recommendations?

I require atomic operations which are synchronised safely to the disk, as data integrity is important. Also I need a C interface.

Thanks.

도움이 되었습니까?

해결책

The solution was to write my own key-value database code. What I've done so far is here: https://github.com/MatthewLM/cbitcoin/tree/master/dependencies/storage

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top