Add BlockBasedOptions::set_whole_key_filtering() (#594)

master
Niklas Fiekas 3 years ago committed by GitHub
parent daee3d636c
commit b05b0aa213
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      src/db_options.rs

@ -703,6 +703,15 @@ impl BlockBasedOptions {
ffi::rocksdb_block_based_options_set_data_block_hash_ratio(self.inner, ratio); ffi::rocksdb_block_based_options_set_data_block_hash_ratio(self.inner, ratio);
} }
} }
/// If false, place only prefixes in the filter, not whole keys.
///
/// Defaults to true.
pub fn set_whole_key_filtering(&mut self, v: bool) {
unsafe {
ffi::rocksdb_block_based_options_set_whole_key_filtering(self.inner, v as u8);
}
}
} }
impl Default for BlockBasedOptions { impl Default for BlockBasedOptions {

Loading…
Cancel
Save