Adding set_readahead_size setter to ReadOptions...

master
Jordan Terrell 6 years ago
parent 47cd7ffe6b
commit 0a8aa1b636
  1. 12
      src/db.rs

@ -1721,6 +1721,18 @@ 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) }
}
/// ```
/// 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 {

Loading…
Cancel
Save