Module transact::database[][src]

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

pub use crate::database::error::DatabaseError;

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.

An Redis-backed implementation of the database traits.

An Sqlite-backed implementation of the database traits.

Traits

A DatabaseReader provides read access to a database instance.

A DatabaseReader provides read access to a database instance.

Type Definitions