| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.Ledger.State.Query
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 #
insertUTxOState ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ UTxOState CurrentEra → ReaderT SqlBackend m (Key UtxoState) Source #
insertUTxO ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ UTxO CurrentEra → Key UtxoState → ReaderT SqlBackend m () Source #
insertDState ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ DState CurrentEra → ReaderT SqlBackend m DStateId Source #
insertLedgerState ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ EpochStateId → LedgerState CurrentEra → ReaderT SqlBackend m () Source #
insertSnapShot ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ Key EpochState → SnapShotType → SnapShot → ReaderT SqlBackend m () Source #
insertSnapShots ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ Key EpochState → SnapShots → ReaderT SqlBackend m () Source #
insertEpochState ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ EpochState CurrentEra → 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 #
getSnapShotNoSharingM ∷ ∀ (m ∷ Type → Type). MonadResource m ⇒ Key EpochState → SnapShotType → ReaderT SqlBackend m SnapShotM Source #
getSnapShotWithSharingM ∷ ∀ (m ∷ Type → Type). MonadResource m ⇒ [SnapShotM] → Key EpochState → SnapShotType → ReaderT SqlBackend m SnapShotM Source #
getSnapShotsWithSharingM ∷ ∀ (m ∷ Type → Type). MonadResource m ⇒ Entity EpochState → ReaderT SqlBackend m SnapShotsM 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 #
getSnapShotNoSharing ∷ ∀ (m ∷ Type → Type). MonadResource m ⇒ Key EpochState → SnapShotType → ReaderT SqlBackend m SnapShot Source #
getSnapShotsNoSharing ∷ ∀ (m ∷ Type → Type). MonadResource m ⇒ Entity EpochState → ReaderT SqlBackend m SnapShots Source #
getSnapShotsNoSharingM ∷ ∀ (m ∷ Type → Type). MonadResource m ⇒ Entity EpochState → ReaderT SqlBackend m SnapShotsM Source #
getSnapShotWithSharing ∷ ∀ (m ∷ Type → Type). MonadResource m ⇒ [SnapShot] → Key EpochState → SnapShotType → ReaderT SqlBackend m SnapShot Source #
getSnapShotsWithSharing ∷ ∀ (m ∷ Type → Type). MonadResource m ⇒ Entity EpochState → ReaderT SqlBackend m SnapShots Source #
sourceUTxO ∷ ∀ (m ∷ Type → Type). MonadResource m ⇒ ConduitM () (TxIn, TxOut CurrentEra) (ReaderT SqlBackend m) () Source #
sourceWithSharingUTxO ∷ ∀ (m ∷ Type → Type) a. MonadResource m ⇒ Map (Credential 'Staking) a → ConduitM () (TxIn, TxOut CurrentEra) (ReaderT SqlBackend m) () Source #
Arguments
| ∷ MonadUnliftIO m | |
| ⇒ (a → (TxIn, TxOut CurrentEra) → a) | Folding function |
| → a | Empty acc |
| → Text | Path to Sqlite db |
| → m a |
getLedgerState ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ UTxO CurrentEra → LedgerState → DState CurrentEra → ReaderT SqlBackend m (LedgerState CurrentEra) Source #
getDStateNoSharing ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ Key DState → ReaderT SqlBackend m (DState CurrentEra) Source #
getAccountsMap ∷ ∀ (m ∷ Type → Type) era (r' ∷ KeyRole). (MonadIO m, EraTest era) ⇒ DStateId → ReaderT SqlBackend m (Map (Credential r') (AccountState era)) Source #
getDStateWithSharing ∷ ∀ (m ∷ Type → Type). MonadIO m ⇒ Key DState → ReaderT SqlBackend m (DState CurrentEra) Source #
loadDStateNoSharing ∷ MonadUnliftIO m ⇒ Text → m (DState CurrentEra) Source #
loadUTxONoSharing ∷ MonadUnliftIO m ⇒ Text → m (UTxO CurrentEra) Source #
loadLedgerStateNoSharing ∷ MonadUnliftIO m ⇒ Text → m (LedgerState CurrentEra) Source #
loadLedgerStateDStateTxIxSharing ∷ MonadUnliftIO m ⇒ Text → m (LedgerState CurrentEra, IntMap (Map TxId (TxOut CurrentEra))) Source #
storeEpochState ∷ MonadUnliftIO m ⇒ Text → EpochState CurrentEra → m () Source #
esId ∷ Key EpochState Source #
loadEpochStateEntity ∷ MonadUnliftIO m ⇒ Text → m (Entity EpochState) Source #
getLedgerStateWithSharing ∷ ∀ (m ∷ Type → Type). (MonadUnliftIO m, MonadResource m) ⇒ Entity EpochState → ReaderT SqlBackend m (LedgerState CurrentEra) Source #
getLedgerStateNoSharing ∷ ∀ (m ∷ Type → Type). (MonadUnliftIO m, MonadResource m) ⇒ Entity EpochState → ReaderT SqlBackend m (LedgerState CurrentEra) Source #
loadEpochState ∷ MonadUnliftIO m ⇒ Text → m (EpochState CurrentEra) Source #
loadEpochStateWithSharing ∷ MonadUnliftIO m ⇒ Text → m (EpochState CurrentEra) Source #
loadSnapShotsNoSharing ∷ MonadUnliftIO m ⇒ Text → Entity EpochState → m SnapShots Source #
loadSnapShotsWithSharing ∷ MonadUnliftIO m ⇒ Text → Entity EpochState → m SnapShots Source #