diff options
author | Niklas Fiekas <niklas.fiekas@backscattering.de> | 2023-12-12 14:04:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-12 13:04:11 +0000 |
commit | 46f44c3be184c662f920213a1ab95e5f8d41b62d (patch) | |
tree | 25f1522a3503f8bcaf23d962b4531c965b8c8f35 | |
parent | dcf7ee05350a1ea366ea9188f7fd5191b7dc34ab (diff) |
feat: Expose set_auto_readahead_size (#842)
-rw-r--r-- | src/db_options.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/db_options.rs b/src/db_options.rs index a2900f3..60c4987 100644 --- a/src/db_options.rs +++ b/src/db_options.rs @@ -3538,6 +3538,15 @@ impl ReadOptions { } } + /// Automatically trim readahead size when iterating with an upper bound. + /// + /// Default: `false` + pub fn set_auto_readahead_size(&mut self, v: bool) { + unsafe { + ffi::rocksdb_readoptions_set_auto_readahead_size(self.inner, c_uchar::from(v)); + } + } + /// If true, create a tailing iterator. Note that tailing iterators /// only support moving in the forward direction. Iterating in reverse /// or seek_to_last are not supported. |