[][src]Trait sanakirja::Transaction

pub trait Transaction: LoadPage + Sized {
    pub fn iter<'a, K: Representable, V: Representable>(
        &'a self,
        db: &'a Db<K, V>,
        key: Option<(K, Option<V>)>
    ) -> DbIterator<'a, Self, K, V>

Notable traits for DbIterator<'a, T, K, V>

impl<'a, T: Transaction + 'a, K: Representable, V: Representable> Iterator for DbIterator<'a, T, K, V> type Item = (K, V);
{ ... }
pub fn rev_iter<'a, K: Representable, V: Representable>(
        &'a self,
        db: &'a Db<K, V>,
        key: Option<(K, Option<V>)>
    ) -> RevDbIterator<'a, Self, K, V>

Notable traits for RevDbIterator<'a, T, K, V>

impl<'a, T: Transaction + 'a, K: Representable, V: Representable> Iterator for RevDbIterator<'a, T, K, V> type Item = (K, V);
{ ... }
pub fn set_cursors<K: Representable, V: Representable>(
        &self,
        root: &Db<K, V>,
        key: Option<(K, Option<V>)>
    ) -> (Cursor, bool) { ... }
pub fn set_cursors_last<K: Representable, V: Representable>(
        &self,
        root: &Db<K, V>
    ) -> Cursor { ... }
pub fn root<K: Representable, V: Representable>(
        &self,
        root: usize
    ) -> Option<Db<K, V>> { ... }
pub fn get<'a, K: Representable, V: Representable>(
        &'a self,
        root: &Db<K, V>,
        key: K,
        value: Option<V>
    ) -> Option<V> { ... } }

Trait for operations common to mutable and immutable transactions.

Provided methods

pub fn iter<'a, K: Representable, V: Representable>(
    &'a self,
    db: &'a Db<K, V>,
    key: Option<(K, Option<V>)>
) -> DbIterator<'a, Self, K, V>

Notable traits for DbIterator<'a, T, K, V>

impl<'a, T: Transaction + 'a, K: Representable, V: Representable> Iterator for DbIterator<'a, T, K, V> type Item = (K, V);

Iterate over a database, starting at the first value larger than or equal to (key, value) (and at the smallest key, or smallest value if one or both of them is None).

pub fn rev_iter<'a, K: Representable, V: Representable>(
    &'a self,
    db: &'a Db<K, V>,
    key: Option<(K, Option<V>)>
) -> RevDbIterator<'a, Self, K, V>

Notable traits for RevDbIterator<'a, T, K, V>

impl<'a, T: Transaction + 'a, K: Representable, V: Representable> Iterator for RevDbIterator<'a, T, K, V> type Item = (K, V);

Iterate over a database in the reverse order, starting from the last binding strictly before k (or from the last binding in the table if k.is_none()).

pub fn set_cursors<K: Representable, V: Representable>(
    &self,
    root: &Db<K, V>,
    key: Option<(K, Option<V>)>
) -> (Cursor, bool)

Create a cursor positionned just on the largest (key, value) that is strictly smaller than key (at the beginning if key.is_none()).

pub fn set_cursors_last<K: Representable, V: Representable>(
    &self,
    root: &Db<K, V>
) -> Cursor

Create a cursor positionned just on the largest (key, value) that is strictly smaller than key (at the beginning if key.is_none()).

pub fn root<K: Representable, V: Representable>(
    &self,
    root: usize
) -> Option<Db<K, V>>

Gets the specified root. At most 508 different roots are allowed.

pub fn get<'a, K: Representable, V: Representable>(
    &'a self,
    root: &Db<K, V>,
    key: K,
    value: Option<V>
) -> Option<V>

Get the smallest value associated to key, or returns the given binding if value is Some(..) and is associated to key in the given database.

Loading content...

Implementors

impl<E: Borrow<Env<Exclusive>>, T> Transaction for MutTxn<E, T>[src]

impl<L, E: Borrow<Env<L>>> Transaction for Txn<L, E>[src]

Loading content...