[][src]Struct ckb_rocksdb::OptimisticTransaction

pub struct OptimisticTransaction { /* fields omitted */ }

Methods

impl OptimisticTransaction[src]

pub fn commit(&self) -> Result<(), Error>[src]

commits a transaction

pub fn rollback(&self) -> Result<(), Error>[src]

Transaction rollback

pub fn rollback_to_savepoint(&self) -> Result<(), Error>[src]

Transaction rollback to savepoint

pub fn set_savepoint(&self)[src]

Set savepoint for transaction

pub fn snapshot<'a>(&'a self) -> OptimisticTransactionSnapshot<'a>[src]

Get Snapshot

pub fn get_for_update<K: AsRef<[u8]>>(
    &self,
    key: K
) -> Result<Option<DBVector>, Error>
[src]

Get For Update ReadOptions: Default exclusive: true

pub fn get_for_update_opt<K: AsRef<[u8]>>(
    &self,
    key: K,
    readopts: &ReadOptions,
    exclusive: bool
) -> Result<Option<DBVector>, Error>
[src]

Get For Update with custom ReadOptions and exclusive

pub fn get_for_update_cf<K: AsRef<[u8]>>(
    &self,
    cf: &ColumnFamily,
    key: K
) -> Result<Option<DBVector>, Error>
[src]

pub fn get_for_update_cf_opt<K: AsRef<[u8]>>(
    &self,
    cf: &ColumnFamily,
    key: K,
    readopts: &ReadOptions,
    exclusive: bool
) -> Result<Option<DBVector>, Error>
[src]

Trait Implementations

impl DeleteCF<()> for OptimisticTransaction[src]

impl Drop for OptimisticTransaction[src]

impl GetCF<ReadOptions> for OptimisticTransaction[src]

impl Handle<rocksdb_transaction_t> for OptimisticTransaction[src]

impl Iterate for OptimisticTransaction[src]

impl IterateCF for OptimisticTransaction[src]

impl MergeCF<()> for OptimisticTransaction[src]

impl PutCF<()> for OptimisticTransaction[src]

impl Read for OptimisticTransaction[src]

impl Send for OptimisticTransaction[src]

impl Sync for OptimisticTransaction[src]

Auto Trait Implementations

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.