Struct rocksdb::ReadOptions[][src]

pub struct ReadOptions { /* fields omitted */ }

Implementations

impl ReadOptions[src]

pub fn fill_cache(&mut self, v: bool)[src]

Specify whether the “data block”/“index block”/“filter block” read for this iteration should be cached in memory? Callers may wish to set this field to false for bulk scans.

Default: true

pub fn set_iterate_upper_bound<K: Into<Vec<u8>>>(&mut self, key: K)[src]

Sets the upper bound for an iterator. The upper bound itself is not included on the iteration result.

pub fn set_iterate_lower_bound<K: Into<Vec<u8>>>(&mut self, key: K)[src]

Sets the lower bound for an iterator.

pub fn set_read_tier(&mut self, tier: ReadTier)[src]

Specify if this read request should process data that ALREADY resides on a particular cache. If the required data is not found at the specified cache, then Status::Incomplete is returned.

Default: ::All

pub fn set_prefix_same_as_start(&mut self, v: bool)[src]

Enforce that the iterator only iterates over the same prefix as the seek. This option is effective only for prefix seeks, i.e. prefix_extractor is non-null for the column family and total_order_seek is false. Unlike iterate_upper_bound, prefix_same_as_start only works within a prefix but in both directions.

Default: false

pub fn set_total_order_seek(&mut self, v: bool)[src]

Enable a total order seek regardless of index format (e.g. hash index) used in the table. Some table format (e.g. plain table) may not support this option.

If true when calling Get(), we also skip prefix bloom when reading from block based table. It provides a way to read existing data after changing implementation of prefix extractor.

pub fn set_max_skippable_internal_keys(&mut self, num: u64)[src]

Sets a threshold for the number of keys that can be skipped before failing an iterator seek as incomplete. The default value of 0 should be used to never fail a request as incomplete, even on skipping too many keys.

Default: 0

pub fn set_background_purge_on_interator_cleanup(&mut self, v: bool)[src]

If true, when PurgeObsoleteFile is called in CleanupIteratorState, we schedule a background job in the flush job queue and delete obsolete files in background.

Default: false

pub fn set_ignore_range_deletions(&mut self, v: bool)[src]

If true, keys deleted using the DeleteRange() API will be visible to readers until they are naturally deleted during compaction. This improves read performance in DBs with many range deletions.

Default: false

pub fn set_verify_checksums(&mut self, v: bool)[src]

If true, all data read from underlying storage will be verified against corresponding checksums.

Default: true

pub fn set_readahead_size(&mut self, v: usize)[src]

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_tailing(&mut self, v: bool)[src]

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.

pub fn set_pin_data(&mut self, v: bool)[src]

Specifies the value of “pin_data”. If true, it keeps the blocks loaded by the iterator pinned in memory as long as the iterator is not deleted, If used when reading from tables created with BlockBasedTableOptions::use_delta_encoding = false, Iterator’s property “rocksdb.iterator.is-key-pinned” is guaranteed to return 1.

Default: false

Trait Implementations

impl Default for ReadOptions[src]

impl Drop for ReadOptions[src]

impl Send for ReadOptions[src]

impl Sync for ReadOptions[src]

Auto Trait Implementations

impl RefUnwindSafe for ReadOptions

impl Unpin for ReadOptions

impl UnwindSafe for ReadOptions

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.