Expand description
SQLite-backed persistence for IOU envelopes.
The iou_envelope table is keyed by receipt_id so a finalized
receipt maps to exactly one row. Re-processing the same finalized
receipt is idempotent: a byte-identical envelope returns Ok(false);
a different envelope returns IouEnvelopeStoreError::Conflict.
The migration is CREATE TABLE IF NOT EXISTS plus
CREATE INDEX IF NOT EXISTS, so it can run repeatedly against a
receipt-store database that already holds other tables.
Structs§
- Sqlite
IouEnvelope Store - SQLite-backed
IouEnvelopeStoreimplementation. Wraps an existing connection pool fromcrate::SqliteReceiptStoreso IOU writes share the same SQLite database and journal mode.
Constants§
- IOU_
ENVELOPE_ MIGRATION - SQL migration applied by
SqliteIouEnvelopeStore::open_with_poolto create theiou_envelopetable.