|
|
@ -496,7 +496,7 @@ impl BlockBasedOptions { |
|
|
|
/// incompatible with block-based filters.
|
|
|
|
/// incompatible with block-based filters.
|
|
|
|
pub fn set_partition_filters(&mut self, size: bool) { |
|
|
|
pub fn set_partition_filters(&mut self, size: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_block_based_options_set_partition_filters(self.inner, u8::from(size)); |
|
|
|
ffi::rocksdb_block_based_options_set_partition_filters(self.inner, c_uchar::from(size)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -558,7 +558,7 @@ impl BlockBasedOptions { |
|
|
|
/// Disable block cache
|
|
|
|
/// Disable block cache
|
|
|
|
pub fn disable_cache(&mut self) { |
|
|
|
pub fn disable_cache(&mut self) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_block_based_options_set_no_block_cache(self.inner, u8::from(true)); |
|
|
|
ffi::rocksdb_block_based_options_set_no_block_cache(self.inner, c_uchar::from(true)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -639,7 +639,7 @@ impl BlockBasedOptions { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_block_based_options_set_cache_index_and_filter_blocks( |
|
|
|
ffi::rocksdb_block_based_options_set_cache_index_and_filter_blocks( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
u8::from(v), |
|
|
|
c_uchar::from(v), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -672,7 +672,7 @@ impl BlockBasedOptions { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_block_based_options_set_pin_l0_filter_and_index_blocks_in_cache( |
|
|
|
ffi::rocksdb_block_based_options_set_pin_l0_filter_and_index_blocks_in_cache( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
u8::from(v), |
|
|
|
c_uchar::from(v), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -688,7 +688,7 @@ impl BlockBasedOptions { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_block_based_options_set_pin_top_level_index_and_filter( |
|
|
|
ffi::rocksdb_block_based_options_set_pin_top_level_index_and_filter( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
u8::from(v), |
|
|
|
c_uchar::from(v), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -773,7 +773,7 @@ impl BlockBasedOptions { |
|
|
|
/// Defaults to true.
|
|
|
|
/// Defaults to true.
|
|
|
|
pub fn set_whole_key_filtering(&mut self, v: bool) { |
|
|
|
pub fn set_whole_key_filtering(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_block_based_options_set_whole_key_filtering(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_block_based_options_set_whole_key_filtering(self.inner, c_uchar::from(v)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -833,9 +833,8 @@ impl CuckooTableOptions { |
|
|
|
/// table property.
|
|
|
|
/// table property.
|
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_identity_as_first_hash(&mut self, flag: bool) { |
|
|
|
pub fn set_identity_as_first_hash(&mut self, flag: bool) { |
|
|
|
let v = u8::from(flag); |
|
|
|
|
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_cuckoo_options_set_identity_as_first_hash(self.inner, v); |
|
|
|
ffi::rocksdb_cuckoo_options_set_identity_as_first_hash(self.inner, c_uchar::from(flag)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -845,9 +844,8 @@ impl CuckooTableOptions { |
|
|
|
/// be power of two, and bit and is used to calculate hash, which is faster in general.
|
|
|
|
/// be power of two, and bit and is used to calculate hash, which is faster in general.
|
|
|
|
/// Default: true
|
|
|
|
/// Default: true
|
|
|
|
pub fn set_use_module_hash(&mut self, flag: bool) { |
|
|
|
pub fn set_use_module_hash(&mut self, flag: bool) { |
|
|
|
let v = u8::from(flag); |
|
|
|
|
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_cuckoo_options_set_use_module_hash(self.inner, v); |
|
|
|
ffi::rocksdb_cuckoo_options_set_use_module_hash(self.inner, c_uchar::from(flag)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -958,7 +956,10 @@ impl Options { |
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
pub fn create_if_missing(&mut self, create_if_missing: bool) { |
|
|
|
pub fn create_if_missing(&mut self, create_if_missing: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_create_if_missing(self.inner, u8::from(create_if_missing)); |
|
|
|
ffi::rocksdb_options_set_create_if_missing( |
|
|
|
|
|
|
|
self.inner, |
|
|
|
|
|
|
|
c_uchar::from(create_if_missing), |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -979,7 +980,7 @@ impl Options { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_create_missing_column_families( |
|
|
|
ffi::rocksdb_options_set_create_missing_column_families( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
u8::from(create_missing_cfs), |
|
|
|
c_uchar::from(create_missing_cfs), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -989,7 +990,7 @@ impl Options { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_error_if_exists(&mut self, enabled: bool) { |
|
|
|
pub fn set_error_if_exists(&mut self, enabled: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_error_if_exists(self.inner, u8::from(enabled)); |
|
|
|
ffi::rocksdb_options_set_error_if_exists(self.inner, c_uchar::from(enabled)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1007,7 +1008,7 @@ impl Options { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_paranoid_checks(&mut self, enabled: bool) { |
|
|
|
pub fn set_paranoid_checks(&mut self, enabled: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_paranoid_checks(self.inner, u8::from(enabled)); |
|
|
|
ffi::rocksdb_options_set_paranoid_checks(self.inner, c_uchar::from(enabled)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1208,7 +1209,7 @@ impl Options { |
|
|
|
level, |
|
|
|
level, |
|
|
|
strategy, |
|
|
|
strategy, |
|
|
|
max_dict_bytes, |
|
|
|
max_dict_bytes, |
|
|
|
u8::from(enabled), |
|
|
|
c_uchar::from(enabled), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1240,7 +1241,7 @@ impl Options { |
|
|
|
ffi::rocksdb_options_set_bottommost_compression_options_zstd_max_train_bytes( |
|
|
|
ffi::rocksdb_options_set_bottommost_compression_options_zstd_max_train_bytes( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
value, |
|
|
|
value, |
|
|
|
u8::from(enabled), |
|
|
|
c_uchar::from(enabled), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1255,10 +1256,7 @@ impl Options { |
|
|
|
/// Default: `0`
|
|
|
|
/// Default: `0`
|
|
|
|
pub fn set_compaction_readahead_size(&mut self, compaction_readahead_size: usize) { |
|
|
|
pub fn set_compaction_readahead_size(&mut self, compaction_readahead_size: usize) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_compaction_readahead_size( |
|
|
|
ffi::rocksdb_options_compaction_readahead_size(self.inner, compaction_readahead_size); |
|
|
|
self.inner, |
|
|
|
|
|
|
|
compaction_readahead_size as usize, |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1269,7 +1267,10 @@ impl Options { |
|
|
|
/// Default: false.
|
|
|
|
/// Default: false.
|
|
|
|
pub fn set_level_compaction_dynamic_level_bytes(&mut self, v: bool) { |
|
|
|
pub fn set_level_compaction_dynamic_level_bytes(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_level_compaction_dynamic_level_bytes(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_options_set_level_compaction_dynamic_level_bytes( |
|
|
|
|
|
|
|
self.inner, |
|
|
|
|
|
|
|
c_uchar::from(v), |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1445,7 +1446,7 @@ impl Options { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_optimize_filters_for_hits( |
|
|
|
ffi::rocksdb_options_set_optimize_filters_for_hits( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
i32::from(optimize_for_hits), |
|
|
|
c_int::from(optimize_for_hits), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1522,7 +1523,7 @@ impl Options { |
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
pub fn set_use_fsync(&mut self, useit: bool) { |
|
|
|
pub fn set_use_fsync(&mut self, useit: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_use_fsync(self.inner, i32::from(useit)); |
|
|
|
ffi::rocksdb_options_set_use_fsync(self.inner, c_int::from(useit)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1634,7 +1635,10 @@ impl Options { |
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
pub fn set_allow_concurrent_memtable_write(&mut self, allow: bool) { |
|
|
|
pub fn set_allow_concurrent_memtable_write(&mut self, allow: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_allow_concurrent_memtable_write(self.inner, u8::from(allow)); |
|
|
|
ffi::rocksdb_options_set_allow_concurrent_memtable_write( |
|
|
|
|
|
|
|
self.inner, |
|
|
|
|
|
|
|
c_uchar::from(allow), |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1648,7 +1652,7 @@ impl Options { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_enable_write_thread_adaptive_yield( |
|
|
|
ffi::rocksdb_options_set_enable_write_thread_adaptive_yield( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
u8::from(enabled), |
|
|
|
c_uchar::from(enabled), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1685,7 +1689,7 @@ impl Options { |
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
pub fn set_use_direct_reads(&mut self, enabled: bool) { |
|
|
|
pub fn set_use_direct_reads(&mut self, enabled: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_use_direct_reads(self.inner, u8::from(enabled)); |
|
|
|
ffi::rocksdb_options_set_use_direct_reads(self.inner, c_uchar::from(enabled)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -1711,7 +1715,7 @@ impl Options { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_use_direct_io_for_flush_and_compaction( |
|
|
|
ffi::rocksdb_options_set_use_direct_io_for_flush_and_compaction( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
u8::from(enabled), |
|
|
|
c_uchar::from(enabled), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1721,7 +1725,7 @@ impl Options { |
|
|
|
/// Default: true
|
|
|
|
/// Default: true
|
|
|
|
pub fn set_is_fd_close_on_exec(&mut self, enabled: bool) { |
|
|
|
pub fn set_is_fd_close_on_exec(&mut self, enabled: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_is_fd_close_on_exec(self.inner, u8::from(enabled)); |
|
|
|
ffi::rocksdb_options_set_is_fd_close_on_exec(self.inner, c_uchar::from(enabled)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2127,7 +2131,7 @@ impl Options { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_unordered_write(&mut self, unordered: bool) { |
|
|
|
pub fn set_unordered_write(&mut self, unordered: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_unordered_write(self.inner, u8::from(unordered)); |
|
|
|
ffi::rocksdb_options_set_unordered_write(self.inner, c_uchar::from(unordered)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2237,7 +2241,7 @@ impl Options { |
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
pub fn set_disable_auto_compactions(&mut self, disable: bool) { |
|
|
|
pub fn set_disable_auto_compactions(&mut self, disable: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_disable_auto_compactions(self.inner, i32::from(disable)); |
|
|
|
ffi::rocksdb_options_set_disable_auto_compactions(self.inner, c_int::from(disable)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2300,7 +2304,7 @@ impl Options { |
|
|
|
/// Default: false.
|
|
|
|
/// Default: false.
|
|
|
|
pub fn set_inplace_update_support(&mut self, enabled: bool) { |
|
|
|
pub fn set_inplace_update_support(&mut self, enabled: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_inplace_update_support(self.inner, u8::from(enabled)); |
|
|
|
ffi::rocksdb_options_set_inplace_update_support(self.inner, c_uchar::from(enabled)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2343,7 +2347,7 @@ impl Options { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_skip_checking_sst_file_sizes_on_db_open( |
|
|
|
ffi::rocksdb_options_set_skip_checking_sst_file_sizes_on_db_open( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
u8::from(value), |
|
|
|
c_uchar::from(value), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -2399,7 +2403,7 @@ impl Options { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_enable_pipelined_write(&mut self, value: bool) { |
|
|
|
pub fn set_enable_pipelined_write(&mut self, value: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_enable_pipelined_write(self.inner, u8::from(value)); |
|
|
|
ffi::rocksdb_options_set_enable_pipelined_write(self.inner, c_uchar::from(value)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2533,7 +2537,7 @@ impl Options { |
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
pub fn set_report_bg_io_stats(&mut self, enable: bool) { |
|
|
|
pub fn set_report_bg_io_stats(&mut self, enable: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_report_bg_io_stats(self.inner, i32::from(enable)); |
|
|
|
ffi::rocksdb_options_set_report_bg_io_stats(self.inner, c_int::from(enable)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2639,7 +2643,7 @@ impl Options { |
|
|
|
/// Default: `true`
|
|
|
|
/// Default: `true`
|
|
|
|
pub fn set_advise_random_on_open(&mut self, advise: bool) { |
|
|
|
pub fn set_advise_random_on_open(&mut self, advise: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_advise_random_on_open(self.inner, u8::from(advise)); |
|
|
|
ffi::rocksdb_options_set_advise_random_on_open(self.inner, c_uchar::from(advise)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2663,7 +2667,7 @@ impl Options { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_use_adaptive_mutex(&mut self, enabled: bool) { |
|
|
|
pub fn set_use_adaptive_mutex(&mut self, enabled: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_use_adaptive_mutex(self.inner, u8::from(enabled)); |
|
|
|
ffi::rocksdb_options_set_use_adaptive_mutex(self.inner, c_uchar::from(enabled)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2781,7 +2785,7 @@ impl Options { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_skip_stats_update_on_db_open(&mut self, skip: bool) { |
|
|
|
pub fn set_skip_stats_update_on_db_open(&mut self, skip: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_skip_stats_update_on_db_open(self.inner, u8::from(skip)); |
|
|
|
ffi::rocksdb_options_set_skip_stats_update_on_db_open(self.inner, c_uchar::from(skip)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2817,7 +2821,7 @@ impl Options { |
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
pub fn set_allow_mmap_writes(&mut self, is_enabled: bool) { |
|
|
|
pub fn set_allow_mmap_writes(&mut self, is_enabled: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_allow_mmap_writes(self.inner, u8::from(is_enabled)); |
|
|
|
ffi::rocksdb_options_set_allow_mmap_writes(self.inner, c_uchar::from(is_enabled)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2835,7 +2839,7 @@ impl Options { |
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
pub fn set_allow_mmap_reads(&mut self, is_enabled: bool) { |
|
|
|
pub fn set_allow_mmap_reads(&mut self, is_enabled: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_allow_mmap_reads(self.inner, u8::from(is_enabled)); |
|
|
|
ffi::rocksdb_options_set_allow_mmap_reads(self.inner, c_uchar::from(is_enabled)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2855,7 +2859,7 @@ impl Options { |
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
pub fn set_manual_wal_flush(&mut self, is_enabled: bool) { |
|
|
|
pub fn set_manual_wal_flush(&mut self, is_enabled: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_manual_wal_flush(self.inner, u8::from(is_enabled)); |
|
|
|
ffi::rocksdb_options_set_manual_wal_flush(self.inner, c_uchar::from(is_enabled)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2878,7 +2882,7 @@ impl Options { |
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
pub fn set_atomic_flush(&mut self, atomic_flush: bool) { |
|
|
|
pub fn set_atomic_flush(&mut self, atomic_flush: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_atomic_flush(self.inner, u8::from(atomic_flush)); |
|
|
|
ffi::rocksdb_options_set_atomic_flush(self.inner, c_uchar::from(atomic_flush)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3016,7 +3020,7 @@ impl Options { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_dump_malloc_stats(&mut self, enabled: bool) { |
|
|
|
pub fn set_dump_malloc_stats(&mut self, enabled: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_dump_malloc_stats(self.inner, u8::from(enabled)); |
|
|
|
ffi::rocksdb_options_set_dump_malloc_stats(self.inner, c_uchar::from(enabled)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3031,7 +3035,7 @@ impl Options { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_options_set_memtable_whole_key_filtering( |
|
|
|
ffi::rocksdb_options_set_memtable_whole_key_filtering( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
u8::from(whole_key_filter), |
|
|
|
c_uchar::from(whole_key_filter), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3153,7 +3157,7 @@ impl FlushOptions { |
|
|
|
/// ```
|
|
|
|
/// ```
|
|
|
|
pub fn set_wait(&mut self, wait: bool) { |
|
|
|
pub fn set_wait(&mut self, wait: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_flushoptions_set_wait(self.inner, u8::from(wait)); |
|
|
|
ffi::rocksdb_flushoptions_set_wait(self.inner, c_uchar::from(wait)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3182,7 +3186,7 @@ impl WriteOptions { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_sync(&mut self, sync: bool) { |
|
|
|
pub fn set_sync(&mut self, sync: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_writeoptions_set_sync(self.inner, u8::from(sync)); |
|
|
|
ffi::rocksdb_writeoptions_set_sync(self.inner, c_uchar::from(sync)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3193,7 +3197,7 @@ impl WriteOptions { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn disable_wal(&mut self, disable: bool) { |
|
|
|
pub fn disable_wal(&mut self, disable: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_writeoptions_disable_WAL(self.inner, i32::from(disable)); |
|
|
|
ffi::rocksdb_writeoptions_disable_WAL(self.inner, c_int::from(disable)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3206,7 +3210,7 @@ impl WriteOptions { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_writeoptions_set_ignore_missing_column_families( |
|
|
|
ffi::rocksdb_writeoptions_set_ignore_missing_column_families( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
u8::from(ignore), |
|
|
|
c_uchar::from(ignore), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3217,7 +3221,7 @@ impl WriteOptions { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_no_slowdown(&mut self, no_slowdown: bool) { |
|
|
|
pub fn set_no_slowdown(&mut self, no_slowdown: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_writeoptions_set_no_slowdown(self.inner, u8::from(no_slowdown)); |
|
|
|
ffi::rocksdb_writeoptions_set_no_slowdown(self.inner, c_uchar::from(no_slowdown)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3230,7 +3234,7 @@ impl WriteOptions { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_low_pri(&mut self, v: bool) { |
|
|
|
pub fn set_low_pri(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_writeoptions_set_low_pri(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_writeoptions_set_low_pri(self.inner, c_uchar::from(v)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3243,7 +3247,10 @@ impl WriteOptions { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_memtable_insert_hint_per_batch(&mut self, v: bool) { |
|
|
|
pub fn set_memtable_insert_hint_per_batch(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_writeoptions_set_memtable_insert_hint_per_batch(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_writeoptions_set_memtable_insert_hint_per_batch( |
|
|
|
|
|
|
|
self.inner, |
|
|
|
|
|
|
|
c_uchar::from(v), |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3282,7 +3289,7 @@ impl ReadOptions { |
|
|
|
/// Default: true
|
|
|
|
/// Default: true
|
|
|
|
pub fn fill_cache(&mut self, v: bool) { |
|
|
|
pub fn fill_cache(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_readoptions_set_fill_cache(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_readoptions_set_fill_cache(self.inner, c_uchar::from(v)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3351,7 +3358,7 @@ impl ReadOptions { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_prefix_same_as_start(&mut self, v: bool) { |
|
|
|
pub fn set_prefix_same_as_start(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_readoptions_set_prefix_same_as_start(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_readoptions_set_prefix_same_as_start(self.inner, c_uchar::from(v)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3364,7 +3371,7 @@ impl ReadOptions { |
|
|
|
/// changing implementation of prefix extractor.
|
|
|
|
/// changing implementation of prefix extractor.
|
|
|
|
pub fn set_total_order_seek(&mut self, v: bool) { |
|
|
|
pub fn set_total_order_seek(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_readoptions_set_total_order_seek(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_readoptions_set_total_order_seek(self.inner, c_uchar::from(v)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3387,7 +3394,7 @@ impl ReadOptions { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_readoptions_set_background_purge_on_iterator_cleanup( |
|
|
|
ffi::rocksdb_readoptions_set_background_purge_on_iterator_cleanup( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
u8::from(v), |
|
|
|
c_uchar::from(v), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3399,7 +3406,7 @@ impl ReadOptions { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_ignore_range_deletions(&mut self, v: bool) { |
|
|
|
pub fn set_ignore_range_deletions(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_readoptions_set_ignore_range_deletions(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_readoptions_set_ignore_range_deletions(self.inner, c_uchar::from(v)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3409,7 +3416,7 @@ impl ReadOptions { |
|
|
|
/// Default: true
|
|
|
|
/// Default: true
|
|
|
|
pub fn set_verify_checksums(&mut self, v: bool) { |
|
|
|
pub fn set_verify_checksums(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_readoptions_set_verify_checksums(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_readoptions_set_verify_checksums(self.inner, c_uchar::from(v)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3435,7 +3442,7 @@ impl ReadOptions { |
|
|
|
/// or seek_to_last are not supported.
|
|
|
|
/// or seek_to_last are not supported.
|
|
|
|
pub fn set_tailing(&mut self, v: bool) { |
|
|
|
pub fn set_tailing(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_readoptions_set_tailing(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_readoptions_set_tailing(self.inner, c_uchar::from(v)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3449,7 +3456,7 @@ impl ReadOptions { |
|
|
|
/// Default: false
|
|
|
|
/// Default: false
|
|
|
|
pub fn set_pin_data(&mut self, v: bool) { |
|
|
|
pub fn set_pin_data(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_readoptions_set_pin_data(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_readoptions_set_pin_data(self.inner, c_uchar::from(v)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3470,7 +3477,7 @@ impl IngestExternalFileOptions { |
|
|
|
/// Can be set to true to move the files instead of copying them.
|
|
|
|
/// Can be set to true to move the files instead of copying them.
|
|
|
|
pub fn set_move_files(&mut self, v: bool) { |
|
|
|
pub fn set_move_files(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_move_files(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_move_files(self.inner, c_uchar::from(v)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3480,7 +3487,7 @@ impl IngestExternalFileOptions { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_snapshot_consistency( |
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_snapshot_consistency( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
u8::from(v), |
|
|
|
c_uchar::from(v), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3489,7 +3496,10 @@ impl IngestExternalFileOptions { |
|
|
|
/// overlaps with existing keys or tombstones in the DB.
|
|
|
|
/// overlaps with existing keys or tombstones in the DB.
|
|
|
|
pub fn set_allow_global_seqno(&mut self, v: bool) { |
|
|
|
pub fn set_allow_global_seqno(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_allow_global_seqno(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_allow_global_seqno( |
|
|
|
|
|
|
|
self.inner, |
|
|
|
|
|
|
|
c_uchar::from(v), |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3499,7 +3509,7 @@ impl IngestExternalFileOptions { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_allow_blocking_flush( |
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_allow_blocking_flush( |
|
|
|
self.inner, |
|
|
|
self.inner, |
|
|
|
u8::from(v), |
|
|
|
c_uchar::from(v), |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3513,7 +3523,7 @@ impl IngestExternalFileOptions { |
|
|
|
/// All files will be ingested at the bottommost level with seqno=0.
|
|
|
|
/// All files will be ingested at the bottommost level with seqno=0.
|
|
|
|
pub fn set_ingest_behind(&mut self, v: bool) { |
|
|
|
pub fn set_ingest_behind(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_ingest_behind(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_ingest_behind(self.inner, c_uchar::from(v)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -3824,7 +3834,10 @@ impl CompactOptions { |
|
|
|
/// and wait for existing automatic compaction jobs to finish.
|
|
|
|
/// and wait for existing automatic compaction jobs to finish.
|
|
|
|
pub fn set_exclusive_manual_compaction(&mut self, v: bool) { |
|
|
|
pub fn set_exclusive_manual_compaction(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_compactoptions_set_exclusive_manual_compaction(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_compactoptions_set_exclusive_manual_compaction( |
|
|
|
|
|
|
|
self.inner, |
|
|
|
|
|
|
|
c_uchar::from(v), |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -3839,7 +3852,7 @@ impl CompactOptions { |
|
|
|
/// of holding the data or given level (specified non-negative target_level).
|
|
|
|
/// of holding the data or given level (specified non-negative target_level).
|
|
|
|
pub fn set_change_level(&mut self, v: bool) { |
|
|
|
pub fn set_change_level(&mut self, v: bool) { |
|
|
|
unsafe { |
|
|
|
unsafe { |
|
|
|
ffi::rocksdb_compactoptions_set_change_level(self.inner, u8::from(v)); |
|
|
|
ffi::rocksdb_compactoptions_set_change_level(self.inner, c_uchar::from(v)); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|