speedb-io / speedb

A RocksDB compliant high performance scalable embedded key-value store
https://www.speedb.io/
Apache License 2.0
919 stars 72 forks source link

Provide wrappers for WriteBatchWithIndex functions in the speedb rust interface #815

Open speedbmike opened 10 months ago

speedbmike commented 10 months ago

WriteBatchWithIndex is exposed in the RocksDB/Speedb C interface, but no wrappers are available in Rust. There is an issue in rust-rocksdb (836), but it doesn't seem to be active.

The C interface for WriteBatchWithIndex is available in c.h, but there isn't a test or usage example for many of the functions (some are available in c_test.c, others are only defined and never used anywhere).

So in the first stage this interface should be validated and then a wrapper should be written in rust-speedb project.

The full list of functions: rocksdb_writebatch_wi_destroy rocksdb_writebatch_wi_clear rocksdb_writebatch_wi_count rocksdb_writebatch_wi_put rocksdb_writebatch_wi_put_cf rocksdb_writebatch_wi_putv rocksdb_writebatch_wi_putv_cf rocksdb_writebatch_wi_merge rocksdb_writebatch_wi_merge_cf rocksdb_writebatch_wi_mergev rocksdb_writebatch_wi_mergev_cf rocksdb_writebatch_wi_delete rocksdb_writebatch_wi_singledelete rocksdb_writebatch_wi_delete_cf rocksdb_writebatch_wi_singledelete_cf rocksdb_writebatch_wi_deletev rocksdb_writebatch_wi_deletev_cf rocksdb_writebatch_wi_delete_range rocksdb_writebatch_wi_delete_range_cf rocksdb_writebatch_wi_delete_rangev rocksdb_writebatch_wi_delete_rangev_cf rocksdb_writebatch_wi_put_log_data rocksdb_writebatch_wi_iterate rocksdb_writebatch_wi_data rocksdb_writebatch_wi_set_save_point rocksdb_writebatch_wi_rollback_to_save_point rocksdb_writebatch_wi_get_from_batch rocksdb_writebatch_wi_get_from_batch_cf rocksdb_writebatch_wi_get_from_batch_and_db rocksdb_writebatch_wi_get_from_batch_and_db_cf