Crate sp_database[][src]

The main database trait, allowing Substrate to store data persistently.

Modules

error

Structs

MemDb

This implements Database as an in-memory hash map. commit is not atomic.

Transaction

A series of changes to the database that can be committed atomically. They do not take effect until passed into Database::commit.

Enums

Change

An alteration to the database.

ChangeRef

An alteration to the database that references the data.

Traits

Database

Functions

as_database

Wrap RocksDb database into a trait object that implements sp_database::Database

with_get

Call f with the value previously stored against key and return the result, or None if key is not currently in the database.

with_lookup

Call f with the preimage stored for hash and return the result, or None if no preimage is currently stored.

Type Definitions

ColumnId

An identifier for a column.