Struct kvdb::DBTransaction [−][src]
Write transaction. Batches a sequence of put/delete operations for efficiency.
Fields
ops: Vec<DBOp>
Database operations.
Methods
impl DBTransaction
[src]
impl DBTransaction
pub fn new() -> DBTransaction
[src]
pub fn new() -> DBTransaction
Create new transaction.
pub fn with_capacity(cap: usize) -> DBTransaction
[src]
pub fn with_capacity(cap: usize) -> DBTransaction
Create new transaction with capacity.
pub fn put(&mut self, col: Option<u32>, key: &[u8], value: &[u8])
[src]
pub fn put(&mut self, col: Option<u32>, key: &[u8], value: &[u8])
Insert a key-value pair in the transaction. Any existing value will be overwritten upon write.
pub fn put_vec(&mut self, col: Option<u32>, key: &[u8], value: Bytes)
[src]
pub fn put_vec(&mut self, col: Option<u32>, key: &[u8], value: Bytes)
Insert a key-value pair in the transaction. Any existing value will be overwritten upon write.
pub fn delete(&mut self, col: Option<u32>, key: &[u8])
[src]
pub fn delete(&mut self, col: Option<u32>, key: &[u8])
Delete value by key.
Trait Implementations
impl Default for DBTransaction
[src]
impl Default for DBTransaction
fn default() -> DBTransaction
[src]
fn default() -> DBTransaction
Returns the "default value" for a type. Read more
impl Clone for DBTransaction
[src]
impl Clone for DBTransaction
fn clone(&self) -> DBTransaction
[src]
fn clone(&self) -> DBTransaction
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for DBTransaction
[src]
impl PartialEq for DBTransaction
fn eq(&self, other: &DBTransaction) -> bool
[src]
fn eq(&self, other: &DBTransaction) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &DBTransaction) -> bool
[src]
fn ne(&self, other: &DBTransaction) -> bool
This method tests for !=
.
Auto Trait Implementations
impl Send for DBTransaction
impl Send for DBTransaction
impl Sync for DBTransaction
impl Sync for DBTransaction