Enum kv::Txn [] [src]

pub enum Txn<'env> {
    ReadOnly(RoTransaction<'env>),
    ReadWrite(RwTransaction<'env>),
}

Access to the database

Variants

Readonly access

Read-write access

Methods

impl<'env> Txn<'env>
[src]

[src]

Returns true when the transaction is ReadOnly

[src]

Ends the transaction, saving all changes

[src]

Ends the transaction, discarding all changes

[src]

Gets the value associated with the given key

[src]

Sets the value associated with the given key

[src]

Sets the value associated with the given key if it doesn't already exist

[src]

Deletes the key and value associated with key from the database

[src]

Reserve a buffer

[src]

Reserve a buffer with a unique key

[src]

Open a new readonly cursor

[src]

Open a new writable cursor

[src]

Open a nested transaction NOTE: you must alread be in a read/write transaction otherwise an error will be returned

Trait Implementations

Auto Trait Implementations

impl<'env> !Send for Txn<'env>

impl<'env> !Sync for Txn<'env>