Documentation ¶
Index ¶
- func Builder(cfg types.DatabaseConfig, encodingConfig *params.EncodingConfig) (db.Database, error)
- type Database
- func (db *Database) Close()
- func (db *Database) GetLastPruned() (int64, error)
- func (db *Database) HasBlock(height int64) (bool, error)
- func (db *Database) HasValidator(addr string) (bool, error)
- func (db *Database) LastBlockHeight() (int64, error)
- func (db *Database) Prune(height int64) error
- func (db *Database) SaveBlock(block []types.Block) error
- func (db *Database) SaveCollection(collection []types.Collection) error
- func (db *Database) SaveCommitSignatures(signatures []*types.CommitSig) error
- func (db *Database) SaveEvents(events []types.Event) error
- func (db *Database) SaveTransactionResult(transactionResult []types.TransactionResult, height uint64) error
- func (db *Database) SaveTxs(transaction types.Txs) error
- func (db *Database) SaveValidators(validators []*types.Validator) error
- func (db *Database) StoreLastPruned(height int64) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Builder ¶
func Builder(cfg types.DatabaseConfig, encodingConfig *params.EncodingConfig) (db.Database, error)
Builder creates a database connection with the given database connection info from config. It returns a database connection handle or an error if the connection fails.
Types ¶
type Database ¶
Database defines a wrapper around a SQL database and implements functionality for data aggregation and exporting.
func (*Database) GetLastPruned ¶
GetLastPruned implements db.PruningDb
func (*Database) HasValidator ¶
HasValidator implements db.Database
func (*Database) LastBlockHeight ¶
LastBlockHeight implements db.Database
func (*Database) SaveCollection ¶
func (db *Database) SaveCollection(collection []types.Collection) error
func (*Database) SaveCommitSignatures ¶
SaveCommitSignatures implements db.Database
func (*Database) SaveTransactionResult ¶
func (db *Database) SaveTransactionResult(transactionResult []types.TransactionResult, height uint64) error
func (*Database) SaveValidators ¶
SaveValidators implements db.Database
func (*Database) StoreLastPruned ¶
StoreLastPruned implements db.PruningDb
Click to show internal directories.
Click to hide internal directories.