Struct ethcore_util::kvdb::DBTransaction
[−]
[src]
pub struct DBTransaction { /* fields omitted */ }
Write transaction. Batches a sequence of put/delete operations for efficiency.
Methods
impl DBTransaction
[src]
fn new(_db: &Database) -> DBTransaction
Create new transaction.
fn put(&mut self, col: Option<u32>, key: &[u8], value: &[u8])
Insert a key-value pair in the transaction. Any existing value value will be overwritten upon write.
fn put_vec(&mut self, col: Option<u32>, key: &[u8], value: Bytes)
Insert a key-value pair in the transaction. Any existing value value will be overwritten upon write.
fn put_compressed(&mut self, col: Option<u32>, key: &[u8], value: Bytes)
Insert a key-value pair in the transaction. Any existing value value will be overwritten upon write. Value will be RLP-compressed on flush
fn delete(&mut self, col: Option<u32>, key: &[u8])
Delete value by key.