Module transact::database

source ·
Expand description

Traits for reading and writing from databases.

Transact operates on key-value entries at the database level, where both keys and values are opaque bytes.

Readers and Writers

Both the DatabsaeReader and DatabaseWriter traits imply that the underlying database implementation maintains transactional consistency throughout their lifetimes. For example, while a cursor on a DatabaseReader is in use, any changes to the underlying data should not alter the iteration of the reader.

Changes to the underlying database are rendered via the DatabaseWriter’s commit method.

Re-exports

Modules

  • An in-memory implementation of the database traits.
  • A common set of errors that can occur on database operations.
  • An LMDB (Lightning Memory-Mapped DB) implementation of the database traits.

Traits

Type Aliases