ledger-state-9.9.9.9
Safe HaskellNone
LanguageHaskell2010

Cardano.Ledger.State.Query

Synopsis

Documentation

insertGetKey ∷ ∀ (m ∷ Type → Type) backend record. (MonadIO m, PersistUniqueWrite backend, PersistRecordBackend record backend, AtLeastOneUniqueKey record, SafeToInsert record) ⇒ record → ReaderT backend m (Key record) Source #

insertUTxO ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ UTxO CurrentEra → Key UtxoState → ReaderT SqlBackend m () Source #

insertSnapShot ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ SnapShot → SnapShot → ReaderT SqlBackend m () Source #

Insert a snapshot row together with the stake, delegation and pool rows shared by every phase. The phase-specific inserters build the row (with its Leios committee inputs) and delegate here for the common contents.

insertGoSnapShot ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ Key EpochState → GoSnapShot → ReaderT SqlBackend m () Source #

The go snapshot carries no Leios committee inputs of its own.

insertSnapShots ∷ ∀ (m ∷ Type → Type) era. MonadIO m ⇒ Key EpochState → SnapShots era → ReaderT SqlBackend m () Source #

selectVMap ∷ ∀ k record (kv ∷ Type → Type) (vv ∷ Type → Type) v (m ∷ Type → Type). (Ord k, PersistEntity record, PersistEntityBackend record ~ SqlBackend, Vector kv k, Vector vv v, MonadResource m) ⇒ [Filter record] → (record → ReaderT SqlBackend m (k, v)) → ReaderT SqlBackend m (VMap kv vv k v) Source #

selectMap ∷ ∀ (m ∷ Type → Type) k record a. (MonadResource m, Ord k, PersistEntity record, PersistEntityBackend record ~ SqlBackend) ⇒ [Filter record] → (record → ReaderT SqlBackend m (k, a)) → ReaderT SqlBackend m (Map k a) Source #

foldDbUTxO Source #

Arguments

∷ MonadUnliftIO m 
⇒ (a → (TxIn, TxOut CurrentEra) → a)

Folding function

→ a

Empty acc

→ Text

Path to Sqlite db

→ m a 

getAccountsMap ∷ ∀ (m ∷ Type → Type) era (r' ∷ KeyRole). (MonadIO m, EraTest era) ⇒ DStateId → ReaderT SqlBackend m (Map (Credential r') (AccountState era)) Source #

loadDbUTxO ∷ UTxOFold a → Text → IO a Source #