| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
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
- sqlScanEbPoints ∷ Conn → IO [(SlotNo, EbHash)]
- sqlScanCompleteEbPointsSince ∷ Conn → SlotNo → IO [LeiosPoint]
- sqlLookupEbBody ∷ Conn → EbHash → IO [(TxHash, BytesSize)]
- sqlBatchRetrieveTxs ∷ Conn → EbHash → [Int] → IO [(Int, TxHash, Maybe ByteString)]
- sqlLookupEbClosure ∷ Conn → EbHash → IO (Maybe [(TxHash, ByteString)])
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.
sqlLookupEbClosure ∷ Conn → EbHash → IO (Maybe [(TxHash, ByteString)]) Source #