Versions in this module Expand all Collapse all v0 v0.0.2 Aug 30, 2022 Changes in this version + func Builder(ctx *database.Context) (database.Database, error) + type Database struct + EncodingConfig *params.EncodingConfig + Logger logging.Logger + Sql *sql.DB + Sqlx *sqlx.DB + func (db *Database) Close() + func (db *Database) GetBlockHeightTimeDayAgo(now time.Time) (dbtypes.BlockRow, error) + func (db *Database) GetBlockHeightTimeHourAgo(now time.Time) (dbtypes.BlockRow, error) + func (db *Database) GetBlockHeightTimeMinuteAgo(now time.Time) (dbtypes.BlockRow, error) + func (db *Database) GetGenesis() (*types.Genesis, error) + func (db *Database) GetLastBlock() (*dbtypes.BlockRow, error) + func (db *Database) GetLastBlockHeight() (int64, error) + func (db *Database) GetLastPruned() (int64, error) + func (db *Database) GetTokensPriceID() ([]string, error) + func (db *Database) GetValidatorsDescription() ([]types.ValidatorDescription, error) + func (db *Database) HasBlock(height int64) (bool, error) + func (db *Database) Prune(height int64) error + func (db *Database) SaveAverageBlockTimeGenesis(averageTime float64, height int64) error + func (db *Database) SaveAverageBlockTimePerDay(averageTime float64, height int64) error + func (db *Database) SaveAverageBlockTimePerHour(averageTime float64, height int64) error + func (db *Database) SaveAverageBlockTimePerMin(averageTime float64, height int64) error + func (db *Database) SaveBlock(block *types.Block) error + func (db *Database) SaveCommitSignatures(signatures []*types.CommitSig) error + func (db *Database) SaveDoubleSignEvidence(evidence types.DoubleSignEvidence) error + func (db *Database) SaveGenesis(genesis *types.Genesis) error + func (db *Database) SaveIBCTransferParams(params *types.IBCTransferParams) error + func (db *Database) SaveInflation(inflation string, height int64) error + func (db *Database) SaveStakingPool(pool *types.StakingPool) error + func (db *Database) SaveSupply(coins sdk.Coins, height int64) error + func (db *Database) SaveToken(token types.Token) error + func (db *Database) SaveTokensPrice(prices []types.TokenPrice) error + func (db *Database) SaveTx(tx types.TxResponse) error + func (db *Database) SaveValidatorCommission(validatorsCommission []types.ValidatorCommission) error + func (db *Database) SaveValidatorDescription(description []types.ValidatorDescription) error + func (db *Database) SaveValidators(validators []types.Validator) error + func (db *Database) SaveValidatorsStatus(validatorsStatus []types.ValidatorStatus) error + func (db *Database) SaveValidatorsVotingPower(entries []types.ValidatorVotingPower) error + func (db *Database) StoreLastPruned(height int64) error