marconi-cardano-indexers-1.2.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Marconi.Cardano.Indexers.BlockInfo

Description

An Indexer that stores BlockInfo

Synopsis

Event

data BlockInfo #

Constructors

BlockInfo !BlockNo !Word64 !EpochNo 

Instances

Instances details
FromJSON BlockInfo # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

Methods

parseJSON :: Value -> Parser BlockInfo

parseJSONList :: Value -> Parser [BlockInfo]

ToJSON BlockInfo # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

Methods

toJSON :: BlockInfo -> Value

toEncoding :: BlockInfo -> Encoding

toJSONList :: [BlockInfo] -> Value

toEncodingList :: [BlockInfo] -> Encoding

Generic BlockInfo # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

Associated Types

type Rep BlockInfo :: Type -> Type Source #

Show BlockInfo # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

Eq BlockInfo # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

Ord BlockInfo # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

FromRow BlockInfo # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

Methods

fromRow :: RowParser BlockInfo

ToRow BlockInfo # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

Methods

toRow :: BlockInfo -> [SQLData] #

(MonadIO m, MonadError (QueryError (BlockInfoBySlotNoQuery BlockInfo)) m) => Queryable m BlockInfo (BlockInfoBySlotNoQuery BlockInfo) SQLiteIndexer # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

(MonadIO m, MonadError (QueryError (EventAtQuery BlockInfo)) m) => Queryable m BlockInfo (EventAtQuery BlockInfo) SQLiteIndexer # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

(MonadIO m, MonadError (QueryError (EventsMatchingQuery BlockInfo)) m) => Queryable m BlockInfo (EventsMatchingQuery BlockInfo) SQLiteIndexer # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

(MonadIO m, MonadError (QueryError (LatestEventsQuery BlockInfo)) m) => Queryable m BlockInfo (LatestEventsQuery BlockInfo) SQLiteIndexer # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

FromRow (Timed ChainPoint BlockInfo) # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

Methods

fromRow :: RowParser (Timed ChainPoint BlockInfo)

ToRow (Timed ChainPoint BlockInfo) # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

Methods

toRow :: Timed ChainPoint BlockInfo -> [SQLData] #

type Rep BlockInfo # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

type Rep BlockInfo = D1 ('MetaData "BlockInfo" "Marconi.Cardano.Indexers.BlockInfo" "marconi-cardano-indexers-1.2.0.0-inplace" 'False) (C1 ('MetaCons "BlockInfo" 'PrefixI 'True) (S1 ('MetaSel ('Just "_blockNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 BlockNo) :*: (S1 ('MetaSel ('Just "_timestamp") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64) :*: S1 ('MetaSel ('Just "_epochNo") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 EpochNo))))
type Point BlockInfo # 
Instance details

Defined in Marconi.Cardano.Indexers.BlockInfo

Indexer and worker

type BlockInfoIndexer = SQLiteIndexer BlockInfo #

A raw SQLite indexer for BlackInfo

mkBlockInfoIndexer #

Arguments

:: (MonadIO m, MonadError IndexerError m) 
=> SQLiteDBLocation

SQL connection to database

-> m (SQLiteIndexer BlockInfo) 

A smart constructor for BlockInfoIndexer

blockInfoWorker #

Arguments

:: (MonadIO n, MonadError IndexerError n, MonadIO m) 
=> StandardWorkerConfig m input BlockInfo

General indexer configuration

-> SQLiteDBLocation

SQLite database location

-> n (StandardWorker m input BlockInfo SQLiteIndexer) 

Create a worker for BlockInfoIndexer with catchup

blockInfoBuilder :: (MonadIO n, MonadError IndexerError n) => SecurityParam -> CatchupConfig -> Trace IO Text -> FilePath -> n (StandardWorker IO BlockEvent BlockInfo SQLiteIndexer) #

Convenience wrapper around blockInfoWorker with some defaults for creating StandardWorkerConfig, including a preprocessor.

type StandardBlockInfoIndexer m = StandardSQLiteIndexer m BlockInfo #

A SQLite BlockInfo indexer with Catchup

catchupConfigEventHook :: Text -> Trace IO Text -> FilePath -> CatchupEvent -> IO () #

Extractor

fromBlockEratoBlockInfo :: Block era -> EpochNo -> POSIXTime -> BlockInfo #

Query

SQL helpers