|
|
|
@ -1721,6 +1721,23 @@ impl ReadOptions { |
|
|
|
|
pub fn set_total_order_seek(&mut self, v: bool) { |
|
|
|
|
unsafe { ffi::rocksdb_readoptions_set_total_order_seek(self.inner, v as c_uchar) } |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/// If non-zero, an iterator will create a new table reader which
|
|
|
|
|
/// performs reads of the given size. Using a large size (> 2MB) can
|
|
|
|
|
/// improve the performance of forward iteration on spinning disks.
|
|
|
|
|
/// Default: 0
|
|
|
|
|
///
|
|
|
|
|
/// ```
|
|
|
|
|
/// use rocksdb::{ReadOptions};
|
|
|
|
|
///
|
|
|
|
|
/// let mut opts = ReadOptions::default();
|
|
|
|
|
/// opts.set_readahead_size(4_194_304); // 4mb
|
|
|
|
|
/// ```
|
|
|
|
|
pub fn set_readahead_size(&mut self, v: usize) { |
|
|
|
|
unsafe { |
|
|
|
|
ffi::rocksdb_readoptions_set_readahead_size(self.inner, v as size_t); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
impl Default for ReadOptions { |
|
|
|
|