| 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, EndorserBlockHash)]
- sqlScanCompleteEbPointsSince ∷ Conn → SlotNo → IO [LeiosPoint]
- sqlLookupEbBody ∷ Conn → EndorserBlockHash → IO [(TxHash, BytesSize)]
- sqlBatchRetrieveTxs ∷ Conn → EndorserBlockHash → [Int] → IO [(Int, TxHash, Maybe ByteString)]
- sqlLookupEbClosure ∷ Conn → EndorserBlockHash → IO (Maybe [(TxHash, ByteString)])
Documentation
sqlScanEbPoints ∷ Conn → IO [(SlotNo, EndorserBlockHash)] Source #
sqlLookupEbBody ∷ Conn → EndorserBlockHash → IO [(TxHash, BytesSize)] Source #
sqlBatchRetrieveTxs ∷ Conn → EndorserBlockHash → [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 + ebTxBytes.
No temp tables, no attached databases, no per-item INSERT round-trips. Works on strictly read-only connections.
sqlLookupEbClosure ∷ Conn → EndorserBlockHash → IO (Maybe [(TxHash, ByteString)]) Source #