Module linera_views::batch
source · Expand description
The definition of the batches for writing in the database. A set of functionalities for building batches to be written into the database. A batch can contain three kinds of operations on a key/value store:
- Insertion of a key with an associated value
- Deletion of a specific key
- Deletion of all keys which contain a specified prefix
The deletion using prefixes is generally but not always faster than deleting keys one by one. The only purpose of the batch is to write some transactions into the database.
Note that normal users should not have to manipulate batches. The functionality is public because some other libraries require it. But the users using views should not have to deal with batches.
Structs§
- A batch of write operations.
- A batch of deletions and insertions that operate on disjoint keys, thus can be executed in any order.
- The iterator that corresponds to a
SimpleUnorderedBatch
- An unordered batch of deletions and insertions, together with a set of key-prefixes to delete. Key-prefix deletions must happen before the insertions and the deletions.
- The iterator that corresponds to a
SimpleUnorderedBatch
Enums§
- A write operation as requested by a view when it needs to persist staged changes. There are 3 possibilities for the batch:
Traits§
- An iterator-like object that can write values one by one to a batch while updating the total size of the batch.
- A trait to expand
DeletePrefix
operations. - A trait to expand
DeletePrefix
operations. - A notion of batch useful for certain computations (notably journaling).