# 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.

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
⇤
  Move up in search results
⇥
  Move down in search results
⏎
  Go to active search result
+
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)