Trait tikv::storage::Snapshot [−][src]
A Snapshot is a consistent view of the underlying engine at a given point in time.
Note that this is not an MVCC snapshot, that is a higher level abstraction of a view of TiKV at a specific timestamp. This snapshot is lower-level, a view of the underlying storage.
Associated Types
Loading content...Required methods
pub fn get(&self, key: &Key) -> Result<Option<Vec<u8, Global>>, Error>
[src]
Get the value associated with key
in default column family
pub fn get_cf(
&self,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
[src]
&self,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
Get the value associated with key
in cf
column family
pub fn get_cf_opt(
&self,
opts: ReadOptions,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
[src]
&self,
opts: ReadOptions,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
Get the value associated with key
in cf
column family, with Options in opts
pub fn iter(&self, iter_opt: IterOptions) -> Result<Self::Iter, Error>
[src]
pub fn iter_cf(
&self,
cf: &'static str,
iter_opt: IterOptions
) -> Result<Self::Iter, Error>
[src]
&self,
cf: &'static str,
iter_opt: IterOptions
) -> Result<Self::Iter, Error>
Provided methods
pub fn lower_bound(&self) -> Option<&[u8]>
[src]
pub fn upper_bound(&self) -> Option<&[u8]>
[src]
pub fn get_data_version(&self) -> Option<u64>
[src]
Retrieves a version that represents the modification status of the underlying data. Version should be changed when underlying data is changed.
If the engine does not support data version, then None
is returned.
pub fn is_max_ts_synced(&self) -> bool
[src]
Implementations on Foreign Types
impl Snapshot for Arc<RocksSnapshot>
[src]
type Iter = RocksEngineIterator
pub fn get(&self, key: &Key) -> Result<Option<Vec<u8, Global>>, Error>
[src]
pub fn get_cf(
&self,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
[src]
&self,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
pub fn get_cf_opt(
&self,
opts: ReadOptions,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
[src]
&self,
opts: ReadOptions,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
pub fn iter(
&self,
iter_opt: IterOptions
) -> Result<<Arc<RocksSnapshot> as Snapshot>::Iter, Error>
[src]
&self,
iter_opt: IterOptions
) -> Result<<Arc<RocksSnapshot> as Snapshot>::Iter, Error>
pub fn iter_cf(
&self,
cf: &'static str,
iter_opt: IterOptions
) -> Result<<Arc<RocksSnapshot> as Snapshot>::Iter, Error>
[src]
&self,
cf: &'static str,
iter_opt: IterOptions
) -> Result<<Arc<RocksSnapshot> as Snapshot>::Iter, Error>
impl<S> Snapshot for RegionSnapshot<S> where
S: Snapshot,
[src]
S: Snapshot,
type Iter = RegionIterator<S>
pub fn get(&self, key: &Key) -> Result<Option<Vec<u8, Global>>, Error>
[src]
pub fn get_cf(
&self,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
[src]
&self,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
pub fn get_cf_opt(
&self,
opts: ReadOptions,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
[src]
&self,
opts: ReadOptions,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
pub fn iter(
&self,
iter_opt: IterOptions
) -> Result<<RegionSnapshot<S> as Snapshot>::Iter, Error>
[src]
&self,
iter_opt: IterOptions
) -> Result<<RegionSnapshot<S> as Snapshot>::Iter, Error>
pub fn iter_cf(
&self,
cf: &'static str,
iter_opt: IterOptions
) -> Result<<RegionSnapshot<S> as Snapshot>::Iter, Error>
[src]
&self,
cf: &'static str,
iter_opt: IterOptions
) -> Result<<RegionSnapshot<S> as Snapshot>::Iter, Error>
pub fn lower_bound(&self) -> Option<&[u8]>
[src]
pub fn upper_bound(&self) -> Option<&[u8]>
[src]
pub fn get_data_version(&self) -> Option<u64>
[src]
pub fn is_max_ts_synced(&self) -> bool
[src]
Implementors
impl Snapshot for BTreeEngineSnapshot
[src]
type Iter = BTreeEngineIterator
pub fn get(&self, key: &Key) -> Result<Option<Vec<u8, Global>>, Error>
[src]
pub fn get_cf(
&self,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
[src]
&self,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
pub fn get_cf_opt(
&self,
ReadOptions,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
[src]
&self,
ReadOptions,
cf: &'static str,
key: &Key
) -> Result<Option<Vec<u8, Global>>, Error>
pub fn iter(
&self,
iter_opt: IterOptions
) -> Result<<BTreeEngineSnapshot as Snapshot>::Iter, Error>
[src]
&self,
iter_opt: IterOptions
) -> Result<<BTreeEngineSnapshot as Snapshot>::Iter, Error>
pub fn iter_cf(
&self,
cf: &'static str,
iter_opt: IterOptions
) -> Result<<BTreeEngineSnapshot as Snapshot>::Iter, Error>
[src]
&self,
cf: &'static str,
iter_opt: IterOptions
) -> Result<<BTreeEngineSnapshot as Snapshot>::Iter, Error>
impl<S: Snapshot> Snapshot for TTLSnapshot<S>
[src]
type Iter = TTLIterator<S::Iter>
fn get(&self, key: &Key) -> Result<Option<Value>>
[src]
fn get_cf(&self, cf: CfName, key: &Key) -> Result<Option<Value>>
[src]
fn get_cf_opt(
&self,
opts: ReadOptions,
cf: CfName,
key: &Key
) -> Result<Option<Value>>
[src]
&self,
opts: ReadOptions,
cf: CfName,
key: &Key
) -> Result<Option<Value>>