Struct kvdb::DBTransaction [−][src]
Write transaction. Batches a sequence of put/delete operations for efficiency.
Fields
ops: Vec<DBOp>Database operations.
Implementations
impl DBTransaction[src]
impl DBTransaction[src]pub fn new() -> DBTransaction[src]
Create new transaction.
pub fn with_capacity(cap: usize) -> DBTransaction[src]
Create new transaction with capacity.
pub fn put(&mut self, col: u32, key: &[u8], value: &[u8])[src]
Insert a key-value pair in the transaction. Any existing value will be overwritten upon write.
pub fn put_vec(&mut self, col: u32, key: &[u8], value: Vec<u8>)[src]
Insert a key-value pair in the transaction. Any existing value will be overwritten upon write.
pub fn delete(&mut self, col: u32, key: &[u8])[src]
Delete value by key.
pub fn delete_prefix(&mut self, col: u32, prefix: &[u8])[src]
Delete all values with the given key prefix. Using an empty prefix here will remove all keys (all keys start with the empty prefix).
Trait Implementations
impl Clone for DBTransaction[src]
impl Clone for DBTransaction[src]fn clone(&self) -> DBTransaction[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Default for DBTransaction[src]
impl Default for DBTransaction[src]fn default() -> DBTransaction[src]
impl PartialEq<DBTransaction> for DBTransaction[src]
impl PartialEq<DBTransaction> for DBTransaction[src]