Documentation ¶
Index ¶
- type SQLDB
- func (db *SQLDB) CleanTables(chainID, burrowVersion string) error
- func (db *SQLDB) Close()
- func (db *SQLDB) GetBlock(height uint64) (types.EventData, error)
- func (db *SQLDB) GetLastBlockHeight() (uint64, error)
- func (db *SQLDB) Ping() error
- func (db *SQLDB) RestoreDB(time time.Time, prefix string) error
- func (db *SQLDB) SetBlock(eventTables types.EventTables, eventData types.EventData) error
- func (db *SQLDB) SynchronizeDB(eventTables types.EventTables) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SQLDB ¶
SQLDB implements the access to a sql database
func NewSQLDB ¶
func NewSQLDB(connection types.SQLConnection) (*SQLDB, error)
NewSQLDB delegates work to a specific database adapter implementation, opens database connection and create log tables
func (*SQLDB) CleanTables ¶
CleanTables, drop tables if stored chainID is different from the given one & store new chainID if the chainID is the same, do nothing
func (*SQLDB) GetLastBlockHeight ¶
GetLastBlockID returns last inserted blockId from log table
func (*SQLDB) SetBlock ¶
SetBlock inserts or updates multiple rows and stores log info in SQL tables
func (*SQLDB) SynchronizeDB ¶
func (db *SQLDB) SynchronizeDB(eventTables types.EventTables) error
SynchronizeDB synchronize db tables structures from given tables specifications
Click to show internal directories.
Click to hide internal directories.