| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ouroboros.Consensus.Storage.LeiosDB.Impl.SQLite.Statements
Description
Bundles of prepared statements used by LeiosDB's SQLite backend.
Statements are compiled SQL statements ready to be run on
an SQLite connection.
Consult SQLite documentation
for more details.
Synopsis
- data VolStmts = VolStmts {
- stScanEbPoints ∷ !Statement
- stInsertEbPoint ∷ !Statement
- stLookupEbBody ∷ !Statement
- stInsertEbTxsRow ∷ !Statement
- stInitMissingCount ∷ !Statement
- stInsertTx ∷ !Statement
- stDecrMissingCount ∷ !Statement
- stInsertMissingTxs ∷ !Statement
- stDeleteMissingTxs ∷ !Statement
- stFindCompleteEbs ∷ !Statement
- stMarkNotifiedEbs ∷ !Statement
- stMarkPointNotified ∷ !Statement
- stBatchRetrieveTxs ∷ !Statement
- stFilterMissingTxs ∷ !Statement
- stLookupEbClosure ∷ !Statement
- stScanCompleteEbsSince ∷ !Statement
- prepareVolStmts ∷ Database → IO VolStmts
- finalizeVolStmts ∷ VolStmts → IO ()
- data ImmStmts = ImmStmts {}
- prepareImmStmts ∷ HasCallStack ⇒ Database → IO ImmStmts
- finalizeImmStmts ∷ ImmStmts → IO ()
- data GcStmts = GcStmts {}
- prepareGcStmts ∷ HasCallStack ⇒ Database → IO GcStmts
- finalizeGcStmts ∷ GcStmts → IO ()
- data CopierStmts = CopierStmts {}
- prepareCopierStmts ∷ HasCallStack ⇒ Database → IO CopierStmts
- finalizeCopierStmts ∷ CopierStmts → IO ()
- data SweeperStmts = SweeperStmts {
- swPickMarked ∷ !Statement
- swEvictEbTxs ∷ !Statement
- swEvictMissingTxs ∷ !Statement
- swEvictEbs ∷ !Statement
- swAnyMarked ∷ !Statement
- swPickOrphans ∷ !Statement
- swOrphanTxs ∷ !Statement
- swPopOrphans ∷ !Statement
- swHasUnstagedGcCandidates ∷ !Statement
- swUnstagedGcCandidatesPage ∷ !Statement
- swInsertGcCandidates ∷ !Statement
- prepareSweeperStmts ∷ HasCallStack ⇒ Database → IO SweeperStmts
- finalizeSweeperStmts ∷ SweeperStmts → IO ()
Documentation
Compiled SQL statements for the Volatile partition.
Constructors
prepareVolStmts ∷ Database → IO VolStmts Source #
Prepare every statement VolStmts names. Order is not observable.
finalizeVolStmts ∷ VolStmts → IO () Source #
Finalise every statement in VolStmts. Called from close immediately
before sqlite3_close_v2, on the connection's owner thread.
Prepared statements of the fallback reads into the immutable partition.
The partitions share one schema, so these are the volatile SQL strings
prepared against the immutable connection (plus the presence probe).
Lifecycle mirrors VolStmts: prepared at open time, finalized in close
before their connection.
Constructors
| ImmStmts | |
finalizeImmStmts ∷ ImmStmts → IO () Source #
Same use-after-free discipline as finalizeVolStmts.
The GC tick's prepared statements, prepared once on the writer's volatile connection.
Constructors
| GcStmts | |
finalizeGcStmts ∷ GcStmts → IO () Source #
data CopierStmts Source #
The copy statements, prepared on the copier's immutable connection --
main is the immutable file, the volatile file is ATTACHed as vol.
prepareCopierStmts ∷ HasCallStack ⇒ Database → IO CopierStmts Source #
Prepare the copy statements on the copier's immutable connection, which
must already have the volatile partition ATTACHed as vol.
finalizeCopierStmts ∷ CopierStmts → IO () Source #
data SweeperStmts Source #
The sweep statements, prepared on the writer's volatile connection;
lifecycle mirrors CopierStmts.
Constructors
prepareSweeperStmts ∷ HasCallStack ⇒ Database → IO SweeperStmts Source #
Prepare the sweep statements on the writer's volatile connection.
finalizeSweeperStmts ∷ SweeperStmts → IO () Source #