Trait tikv_kv::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
fn get(&self, key: &Key) -> Result<Option<Value>>
[src]
Get the value associated with key
in default column family
fn get_cf(&self, cf: CfName, key: &Key) -> Result<Option<Value>>
[src]
Get the value associated with key
in cf
column family
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>>
Get the value associated with key
in cf
column family, with Options in opts
fn iter(&self, iter_opt: IterOptions) -> Result<Self::Iter>
[src]
fn iter_cf(&self, cf: CfName, iter_opt: IterOptions) -> Result<Self::Iter>
[src]
Provided methods
fn lower_bound(&self) -> Option<&[u8]>
[src]
fn upper_bound(&self) -> Option<&[u8]>
[src]
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.
fn is_max_ts_synced(&self) -> bool
[src]
Implementations on Foreign Types
impl<S: Snapshot> Snapshot for RegionSnapshot<S>
[src]
type Iter = RegionIterator<S>
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>>
fn iter(&self, iter_opt: IterOptions) -> Result<Self::Iter>
[src]
fn iter_cf(&self, cf: CfName, iter_opt: IterOptions) -> Result<Self::Iter>
[src]
fn lower_bound(&self) -> Option<&[u8]>
[src]
fn upper_bound(&self) -> Option<&[u8]>
[src]
fn get_data_version(&self) -> Option<u64>
[src]
fn is_max_ts_synced(&self) -> bool
[src]
impl Snapshot for Arc<RocksSnapshot>
[src]
type Iter = RocksEngineIterator
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>>
fn iter(&self, iter_opt: IterOptions) -> Result<Self::Iter>
[src]
fn iter_cf(&self, cf: CfName, iter_opt: IterOptions) -> Result<Self::Iter>
[src]
Implementors
impl Snapshot for BTreeEngineSnapshot
[src]
type Iter = BTreeEngineIterator
fn get(&self, key: &Key) -> EngineResult<Option<Value>>
[src]
fn get_cf(&self, cf: CfName, key: &Key) -> EngineResult<Option<Value>>
[src]
fn get_cf_opt(
&self,
_: ReadOptions,
cf: CfName,
key: &Key
) -> EngineResult<Option<Value>>
[src]
&self,
_: ReadOptions,
cf: CfName,
key: &Key
) -> EngineResult<Option<Value>>