Documentation
¶
Index ¶
- func Init(file string) (*sql.DB, error)
- type SQLDB
- func (self *SQLDB) Close()
- func (self *SQLDB) DB() *sql.DB
- func (self *SQLDB) DeleteBlock(block *types.Block)
- func (self *SQLDB) InsertBlock(block *types.Block)
- func (self *SQLDB) Refresh(chainManager pow.ChainManager)
- func (self *SQLDB) SelectTransactionsForAccounts(accounts []string) (trans SQL_Transactions, err error)
- type SQL_Transaction
- type SQL_Transactions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SQLDB ¶
type SQLDB struct {
// contains filtered or unexported fields
}
func NewSQLiteDatabase ¶
NewSQLiteDatabase returns a sqlite3 wrapped object. sqlite3 does not persist data by it self but requires a background poller which syncs every X. `Flush` should be called when data needs to be stored and written to disk.
func (*SQLDB) DeleteBlock ¶
func (*SQLDB) InsertBlock ¶
func (*SQLDB) Refresh ¶
func (self *SQLDB) Refresh(chainManager pow.ChainManager)
func (*SQLDB) SelectTransactionsForAccounts ¶
func (self *SQLDB) SelectTransactionsForAccounts(accounts []string) (trans SQL_Transactions, err error)
type SQL_Transaction ¶
func NewTransaction ¶
func NewTransaction(hash string, blocknumber uint64) *SQL_Transaction
func (*SQL_Transaction) MarshalJSON ¶
func (self *SQL_Transaction) MarshalJSON() ([]byte, error)
type SQL_Transactions ¶
type SQL_Transactions []*SQL_Transaction
Click to show internal directories.
Click to hide internal directories.