ouroboros-consensus
Safe HaskellNone
LanguageHaskell2010

Ouroboros.Consensus.Storage.LeiosDB.Impl.SQLite.Read

Description

Read operations of LeiosDB's SQLite backend.

Each lookup asks the volatile partition first and falls back to the immutable one for EBs that were copied evicted.

Synopsis

Documentation

sqlBatchRetrieveTxs ∷ Conn → EbHash → [Int] → IO [(Int, TxHash, Maybe ByteString)] Source #

Retrieve tx bytes for a batch of (ebHash, txOffset) points. Passes the offsets list as a JSON int array bound to a single parameter; SQLite's json_each virtual table joins it against ebTxs + txs.

No temp tables, no attached databases, no per-item INSERT round-trips. Works on strictly read-only connections.