add multi_get (multi_get_cf) for rocksdb
Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
parent
238c371ef4
commit
0db3a43d1f
2 changed files with 11 additions and 0 deletions
|
@ -30,6 +30,11 @@ pub(crate) trait KeyValueDatabaseEngine: Send + Sync {
|
|||
pub(crate) trait KvTree: Send + Sync {
|
||||
fn get(&self, key: &[u8]) -> Result<Option<Vec<u8>>>;
|
||||
|
||||
#[cfg(feature = "rocksdb")]
|
||||
fn multi_get(
|
||||
&self, iter: Vec<(&Arc<rust_rocksdb::BoundColumnFamily<'_>>, Vec<u8>)>,
|
||||
) -> Vec<std::result::Result<Option<Vec<u8>>, rust_rocksdb::Error>>;
|
||||
|
||||
fn insert(&self, key: &[u8], value: &[u8]) -> Result<()>;
|
||||
fn insert_batch(&self, iter: &mut dyn Iterator<Item = (Vec<u8>, Vec<u8>)>) -> Result<()>;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue