|
|
|
@ -495,7 +495,7 @@ impl BlockBasedOptions { |
|
|
|
|
/// incompatible with block-based filters.
|
|
|
|
|
pub fn set_partition_filters(&mut self, size: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_block_based_options_set_partition_filters(self.inner, size as c_uchar); |
|
|
|
|
ffi::rocksdb_block_based_options_set_partition_filters(self.inner, u8::from(size)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -557,7 +557,7 @@ impl BlockBasedOptions { |
|
|
|
|
/// Disable block cache
|
|
|
|
|
pub fn disable_cache(&mut self) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_block_based_options_set_no_block_cache(self.inner, true as c_uchar); |
|
|
|
|
ffi::rocksdb_block_based_options_set_no_block_cache(self.inner, u8::from(true)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -636,7 +636,10 @@ impl BlockBasedOptions { |
|
|
|
|
|
|
|
|
|
pub fn set_cache_index_and_filter_blocks(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_block_based_options_set_cache_index_and_filter_blocks(self.inner, v as u8); |
|
|
|
|
ffi::rocksdb_block_based_options_set_cache_index_and_filter_blocks( |
|
|
|
|
self.inner, |
|
|
|
|
u8::from(v), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -668,7 +671,7 @@ impl BlockBasedOptions { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_block_based_options_set_pin_l0_filter_and_index_blocks_in_cache( |
|
|
|
|
self.inner, |
|
|
|
|
v as c_uchar, |
|
|
|
|
u8::from(v), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -684,7 +687,7 @@ impl BlockBasedOptions { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_block_based_options_set_pin_top_level_index_and_filter( |
|
|
|
|
self.inner, |
|
|
|
|
v as c_uchar, |
|
|
|
|
u8::from(v), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -769,7 +772,7 @@ impl BlockBasedOptions { |
|
|
|
|
/// 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); |
|
|
|
|
ffi::rocksdb_block_based_options_set_whole_key_filtering(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -829,7 +832,7 @@ impl CuckooTableOptions { |
|
|
|
|
/// table property.
|
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_identity_as_first_hash(&mut self, flag: bool) { |
|
|
|
|
let v = flag as u8; |
|
|
|
|
let v = u8::from(flag); |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_cuckoo_options_set_identity_as_first_hash(self.inner, v); |
|
|
|
|
} |
|
|
|
@ -841,7 +844,7 @@ impl CuckooTableOptions { |
|
|
|
|
/// be power of two, and bit and is used to calculate hash, which is faster in general.
|
|
|
|
|
/// Default: true
|
|
|
|
|
pub fn set_use_module_hash(&mut self, flag: bool) { |
|
|
|
|
let v = flag as u8; |
|
|
|
|
let v = u8::from(flag); |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_cuckoo_options_set_use_module_hash(self.inner, v); |
|
|
|
|
} |
|
|
|
@ -954,7 +957,7 @@ impl Options { |
|
|
|
|
/// ```
|
|
|
|
|
pub fn create_if_missing(&mut self, create_if_missing: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_create_if_missing(self.inner, create_if_missing as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_create_if_missing(self.inner, u8::from(create_if_missing)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -975,7 +978,7 @@ impl Options { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_create_missing_column_families( |
|
|
|
|
self.inner, |
|
|
|
|
create_missing_cfs as c_uchar, |
|
|
|
|
u8::from(create_missing_cfs), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -985,7 +988,7 @@ impl Options { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_error_if_exists(&mut self, enabled: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_error_if_exists(self.inner, enabled as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_error_if_exists(self.inner, u8::from(enabled)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1003,7 +1006,7 @@ impl Options { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_paranoid_checks(&mut self, enabled: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_paranoid_checks(self.inner, enabled as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_paranoid_checks(self.inner, u8::from(enabled)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1204,7 +1207,7 @@ impl Options { |
|
|
|
|
level, |
|
|
|
|
strategy, |
|
|
|
|
max_dict_bytes, |
|
|
|
|
enabled as c_uchar, |
|
|
|
|
u8::from(enabled), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1236,7 +1239,7 @@ impl Options { |
|
|
|
|
ffi::rocksdb_options_set_bottommost_compression_options_zstd_max_train_bytes( |
|
|
|
|
self.inner, |
|
|
|
|
value, |
|
|
|
|
enabled as c_uchar, |
|
|
|
|
u8::from(enabled), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1265,7 +1268,7 @@ impl Options { |
|
|
|
|
/// Default: false.
|
|
|
|
|
pub fn set_level_compaction_dynamic_level_bytes(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_level_compaction_dynamic_level_bytes(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_level_compaction_dynamic_level_bytes(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1441,7 +1444,7 @@ impl Options { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_optimize_filters_for_hits( |
|
|
|
|
self.inner, |
|
|
|
|
optimize_for_hits as c_int, |
|
|
|
|
i32::from(optimize_for_hits), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1518,7 +1521,7 @@ impl Options { |
|
|
|
|
/// ```
|
|
|
|
|
pub fn set_use_fsync(&mut self, useit: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_use_fsync(self.inner, useit as c_int); |
|
|
|
|
ffi::rocksdb_options_set_use_fsync(self.inner, i32::from(useit)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1630,7 +1633,7 @@ impl Options { |
|
|
|
|
/// ```
|
|
|
|
|
pub fn set_allow_concurrent_memtable_write(&mut self, allow: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_allow_concurrent_memtable_write(self.inner, allow as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_allow_concurrent_memtable_write(self.inner, u8::from(allow)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1644,7 +1647,7 @@ impl Options { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_enable_write_thread_adaptive_yield( |
|
|
|
|
self.inner, |
|
|
|
|
enabled as c_uchar, |
|
|
|
|
u8::from(enabled), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1681,7 +1684,7 @@ impl Options { |
|
|
|
|
/// ```
|
|
|
|
|
pub fn set_use_direct_reads(&mut self, enabled: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_use_direct_reads(self.inner, enabled as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_use_direct_reads(self.inner, u8::from(enabled)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -1707,7 +1710,7 @@ impl Options { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_use_direct_io_for_flush_and_compaction( |
|
|
|
|
self.inner, |
|
|
|
|
enabled as c_uchar, |
|
|
|
|
u8::from(enabled), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -1717,7 +1720,7 @@ impl Options { |
|
|
|
|
/// Default: true
|
|
|
|
|
pub fn set_is_fd_close_on_exec(&mut self, enabled: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_is_fd_close_on_exec(self.inner, enabled as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_is_fd_close_on_exec(self.inner, u8::from(enabled)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2123,7 +2126,7 @@ impl Options { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_unordered_write(&mut self, unordered: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_unordered_write(self.inner, unordered as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_unordered_write(self.inner, u8::from(unordered)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2233,7 +2236,7 @@ impl Options { |
|
|
|
|
/// ```
|
|
|
|
|
pub fn set_disable_auto_compactions(&mut self, disable: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_disable_auto_compactions(self.inner, disable as c_int); |
|
|
|
|
ffi::rocksdb_options_set_disable_auto_compactions(self.inner, i32::from(disable)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2296,7 +2299,7 @@ impl Options { |
|
|
|
|
/// Default: false.
|
|
|
|
|
pub fn set_inplace_update_support(&mut self, enabled: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_inplace_update_support(self.inner, enabled as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_inplace_update_support(self.inner, u8::from(enabled)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2339,7 +2342,7 @@ impl Options { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_skip_checking_sst_file_sizes_on_db_open( |
|
|
|
|
self.inner, |
|
|
|
|
value as c_uchar, |
|
|
|
|
u8::from(value), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -2395,7 +2398,7 @@ impl Options { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_enable_pipelined_write(&mut self, value: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_enable_pipelined_write(self.inner, value as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_enable_pipelined_write(self.inner, u8::from(value)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2529,7 +2532,7 @@ impl Options { |
|
|
|
|
/// ```
|
|
|
|
|
pub fn set_report_bg_io_stats(&mut self, enable: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_report_bg_io_stats(self.inner, enable as c_int); |
|
|
|
|
ffi::rocksdb_options_set_report_bg_io_stats(self.inner, i32::from(enable)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2635,7 +2638,7 @@ impl Options { |
|
|
|
|
/// Default: `true`
|
|
|
|
|
pub fn set_advise_random_on_open(&mut self, advise: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_advise_random_on_open(self.inner, advise as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_advise_random_on_open(self.inner, u8::from(advise)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2659,7 +2662,7 @@ impl Options { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_use_adaptive_mutex(&mut self, enabled: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_use_adaptive_mutex(self.inner, enabled as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_use_adaptive_mutex(self.inner, u8::from(enabled)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2777,7 +2780,7 @@ impl Options { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_skip_stats_update_on_db_open(&mut self, skip: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_skip_stats_update_on_db_open(self.inner, skip as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_skip_stats_update_on_db_open(self.inner, u8::from(skip)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2813,7 +2816,7 @@ impl Options { |
|
|
|
|
/// ```
|
|
|
|
|
pub fn set_allow_mmap_writes(&mut self, is_enabled: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_allow_mmap_writes(self.inner, is_enabled as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_allow_mmap_writes(self.inner, u8::from(is_enabled)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2831,7 +2834,7 @@ impl Options { |
|
|
|
|
/// ```
|
|
|
|
|
pub fn set_allow_mmap_reads(&mut self, is_enabled: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_allow_mmap_reads(self.inner, is_enabled as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_allow_mmap_reads(self.inner, u8::from(is_enabled)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2851,7 +2854,7 @@ impl Options { |
|
|
|
|
/// ```
|
|
|
|
|
pub fn set_manual_wal_flush(&mut self, is_enabled: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_manual_wal_flush(self.inner, is_enabled as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_manual_wal_flush(self.inner, u8::from(is_enabled)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -2874,7 +2877,7 @@ impl Options { |
|
|
|
|
/// ```
|
|
|
|
|
pub fn set_atomic_flush(&mut self, atomic_flush: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_atomic_flush(self.inner, atomic_flush as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_atomic_flush(self.inner, u8::from(atomic_flush)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3012,7 +3015,7 @@ impl Options { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_dump_malloc_stats(&mut self, enabled: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_dump_malloc_stats(self.inner, enabled as c_uchar); |
|
|
|
|
ffi::rocksdb_options_set_dump_malloc_stats(self.inner, u8::from(enabled)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3027,7 +3030,7 @@ impl Options { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_memtable_whole_key_filtering( |
|
|
|
|
self.inner, |
|
|
|
|
whole_key_filter as c_uchar, |
|
|
|
|
u8::from(whole_key_filter), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3041,7 +3044,7 @@ impl Options { |
|
|
|
|
/// Dynamically changeable through SetOptions() API
|
|
|
|
|
pub fn set_enable_blob_files(&mut self, val: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_enable_blob_files(self.inner, val as _); |
|
|
|
|
ffi::rocksdb_options_set_enable_blob_files(self.inner, u8::from(val)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3080,7 +3083,7 @@ impl Options { |
|
|
|
|
/// Dynamically changeable through SetOptions() API
|
|
|
|
|
pub fn set_enable_blob_gc(&mut self, val: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_options_set_enable_blob_gc(self.inner, val as _); |
|
|
|
|
ffi::rocksdb_options_set_enable_blob_gc(self.inner, u8::from(val)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3149,7 +3152,7 @@ impl FlushOptions { |
|
|
|
|
/// ```
|
|
|
|
|
pub fn set_wait(&mut self, wait: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_flushoptions_set_wait(self.inner, wait as c_uchar); |
|
|
|
|
ffi::rocksdb_flushoptions_set_wait(self.inner, u8::from(wait)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3178,7 +3181,7 @@ impl WriteOptions { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_sync(&mut self, sync: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_writeoptions_set_sync(self.inner, sync as c_uchar); |
|
|
|
|
ffi::rocksdb_writeoptions_set_sync(self.inner, u8::from(sync)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3189,7 +3192,7 @@ impl WriteOptions { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn disable_wal(&mut self, disable: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_writeoptions_disable_WAL(self.inner, disable as c_int); |
|
|
|
|
ffi::rocksdb_writeoptions_disable_WAL(self.inner, i32::from(disable)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3202,7 +3205,7 @@ impl WriteOptions { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_writeoptions_set_ignore_missing_column_families( |
|
|
|
|
self.inner, |
|
|
|
|
ignore as c_uchar, |
|
|
|
|
u8::from(ignore), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3213,7 +3216,7 @@ impl WriteOptions { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_no_slowdown(&mut self, no_slowdown: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_writeoptions_set_no_slowdown(self.inner, no_slowdown as c_uchar); |
|
|
|
|
ffi::rocksdb_writeoptions_set_no_slowdown(self.inner, u8::from(no_slowdown)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3226,7 +3229,7 @@ impl WriteOptions { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_low_pri(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_writeoptions_set_low_pri(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_writeoptions_set_low_pri(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3239,7 +3242,7 @@ impl WriteOptions { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_memtable_insert_hint_per_batch(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_writeoptions_set_memtable_insert_hint_per_batch(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_writeoptions_set_memtable_insert_hint_per_batch(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3278,7 +3281,7 @@ impl ReadOptions { |
|
|
|
|
/// Default: true
|
|
|
|
|
pub fn fill_cache(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_readoptions_set_fill_cache(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_readoptions_set_fill_cache(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3347,7 +3350,7 @@ impl ReadOptions { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_prefix_same_as_start(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_readoptions_set_prefix_same_as_start(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_readoptions_set_prefix_same_as_start(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3360,7 +3363,7 @@ impl ReadOptions { |
|
|
|
|
/// changing implementation of prefix extractor.
|
|
|
|
|
pub fn set_total_order_seek(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_readoptions_set_total_order_seek(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_readoptions_set_total_order_seek(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3383,7 +3386,7 @@ impl ReadOptions { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_readoptions_set_background_purge_on_iterator_cleanup( |
|
|
|
|
self.inner, |
|
|
|
|
v as c_uchar, |
|
|
|
|
u8::from(v), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3395,7 +3398,7 @@ impl ReadOptions { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_ignore_range_deletions(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_readoptions_set_ignore_range_deletions(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_readoptions_set_ignore_range_deletions(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3405,7 +3408,7 @@ impl ReadOptions { |
|
|
|
|
/// Default: true
|
|
|
|
|
pub fn set_verify_checksums(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_readoptions_set_verify_checksums(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_readoptions_set_verify_checksums(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3431,7 +3434,7 @@ impl ReadOptions { |
|
|
|
|
/// or seek_to_last are not supported.
|
|
|
|
|
pub fn set_tailing(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_readoptions_set_tailing(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_readoptions_set_tailing(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3445,7 +3448,7 @@ impl ReadOptions { |
|
|
|
|
/// Default: false
|
|
|
|
|
pub fn set_pin_data(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_readoptions_set_pin_data(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_readoptions_set_pin_data(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3466,7 +3469,7 @@ impl IngestExternalFileOptions { |
|
|
|
|
/// Can be set to true to move the files instead of copying them.
|
|
|
|
|
pub fn set_move_files(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_move_files(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_move_files(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3476,7 +3479,7 @@ impl IngestExternalFileOptions { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_snapshot_consistency( |
|
|
|
|
self.inner, |
|
|
|
|
v as c_uchar, |
|
|
|
|
u8::from(v), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3485,7 +3488,7 @@ impl IngestExternalFileOptions { |
|
|
|
|
/// overlaps with existing keys or tombstones in the DB.
|
|
|
|
|
pub fn set_allow_global_seqno(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_allow_global_seqno(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_allow_global_seqno(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3495,7 +3498,7 @@ impl IngestExternalFileOptions { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_allow_blocking_flush( |
|
|
|
|
self.inner, |
|
|
|
|
v as c_uchar, |
|
|
|
|
u8::from(v), |
|
|
|
|
); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3509,7 +3512,7 @@ impl IngestExternalFileOptions { |
|
|
|
|
/// All files will be ingested at the bottommost level with seqno=0.
|
|
|
|
|
pub fn set_ingest_behind(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_ingest_behind(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_ingestexternalfileoptions_set_ingest_behind(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -3820,7 +3823,7 @@ impl CompactOptions { |
|
|
|
|
/// and wait for existing automatic compaction jobs to finish.
|
|
|
|
|
pub fn set_exclusive_manual_compaction(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_compactoptions_set_exclusive_manual_compaction(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_compactoptions_set_exclusive_manual_compaction(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -3835,7 +3838,7 @@ impl CompactOptions { |
|
|
|
|
/// of holding the data or given level (specified non-negative target_level).
|
|
|
|
|
pub fn set_change_level(&mut self, v: bool) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_compactoptions_set_change_level(self.inner, v as c_uchar); |
|
|
|
|
ffi::rocksdb_compactoptions_set_change_level(self.inner, u8::from(v)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|