Skip to main content

Module sql

Module sql 

Source
Expand description

Persistence backed by a SQL database, with one module per backend.

postgres and sqlite compile the same code against their own database. sql::Options::embedded_db picks one, and the options are shared by both.

Modules§

options 🔒
postgres
Persistence on a Postgres server.
sqlite
Persistence on an embedded SQLite file.

Structs§

ConsensusPruningOptions
Pruning parameters for ephemeral consensus storage.
Options
Options for database-backed persistence, supporting both Postgres and SQLite.
PostgresOptions
Options for Postgres-backed persistence.
PruningOptions
Pruning parameters.
SerializableRetryOptions
Configuration for retrying transactions aborted by PostgreSQL serialization conflicts (error 40001). Under SERIALIZABLE isolation these aborts are expected and safe to retry from scratch.
SqliteOptions

Enums§

SqlBackendOptions
Options wrapped for the backend Options::embedded_db selects.

Constants§

DEFAULT_ARCHIVE_STATE_MIN_RETENTION
A few days of heights at mainnet rates, and what binds whenever the light client’s history is shorter than that.

Functions§

build_sqlite_path
The path of the SQLite database under the base directory path.