Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Marconi.Core.Transformer.WithCatchup.SQLite
Synopsis
- createIndexTable :: Text -> Trace IO Text -> Connection -> String -> Query -> IO ()
Documentation
Arguments
:: Text | Pretty name of the indexer |
-> Trace IO Text | Trace for logging. |
-> Connection | SQLite database connection |
-> String | SQLite index name |
-> Query | SQL statement for creating the index table |
-> IO () |
Utility function for creating an SQLite database index.
Typically used with WithCatchup
as a way to create SQLite indexes when
fully synchronized. This function includes some logging so that the user is informed when the
creation of the SQLite indexes is done.
An example would look like:
let stdoutTrace = ... c = ... slotNoIndexName = "utxo_slotNo" createSlotNoIndexStatement = "CREATE INDEX IF NOT EXISTS " <> fromString slotNoIndexName <> " ON utxo (slotNo)" createIndexTable Utxo stdoutTrace c slotNoIndexName createSlotNoIndexStatement