[][src]Module transact::database

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

btree

An in-memory implementation of the database traits.

error

A common set of errors that can occur on database operations.

lmdb

An LMDB (Lightning Memory-Mapped DB) implementation of the database traits.

redis

An Redis-backed implementation of the database traits.

sqlite

An Sqlite-backed implementation of the database traits.

Traits

Database
DatabaseReader

A DatabaseReader provides read access to a database instance.

DatabaseReaderCursor
DatabaseWriter

A DatabaseReader provides read access to a database instance.

Type Definitions

DatabaseCursor