Documentation ¶
Index ¶
- func Str2Big(num string) *big.Int
- type DBCreator
- type DataManager
- func (m *DataManager) AddTransaction(data *define.TransactionData) (uint64, error)
- func (m *DataManager) AddTransactionStmt(stmt *sql.Stmt, data *define.TransactionData) (err error)
- func (m *DataManager) Close()
- func (m *DataManager) PrepareTransaction() (*sql.Stmt, error)
- func (m *DataManager) QTxBegin() error
- func (m *DataManager) QTxCommit() error
- func (m *DataManager) QTxRollback() error
- func (m *DataManager) QueryAccountTxs(accid *ethcmn.Address, direction uint8, cursor, limit uint64, order string) ([]define.TransactionData, error)
- func (m *DataManager) QueryAllTxs(cursor, limit uint64, order string) ([]define.TransactionData, error)
- func (m *DataManager) QuerySingleTx(txhash *ethcmn.Hash) (*define.TransactionData, error)
- func (m *DataManager) QueryTxByHash(txhash *ethcmn.Hash) ([]define.TransactionData, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type DataManager ¶
type DataManager struct {
// contains filtered or unexported fields
}
DataManager data access between app and database
func NewDataManager ¶
NewDataManager create data manager
func (*DataManager) AddTransaction ¶
func (m *DataManager) AddTransaction(data *define.TransactionData) (uint64, error)
AddTransaction insert a tx record
func (*DataManager) AddTransactionStmt ¶
func (m *DataManager) AddTransactionStmt(stmt *sql.Stmt, data *define.TransactionData) (err error)
func (*DataManager) PrepareTransaction ¶
func (m *DataManager) PrepareTransaction() (*sql.Stmt, error)
func (*DataManager) QTxBegin ¶
func (m *DataManager) QTxBegin() error
QTxBegin start database transaction of qdb
func (*DataManager) QTxCommit ¶
func (m *DataManager) QTxCommit() error
QTxCommit commit database transaction of qdb
func (*DataManager) QTxRollback ¶
func (m *DataManager) QTxRollback() error
QTxRollback rollback database transaction of qdb
func (*DataManager) QueryAccountTxs ¶
func (m *DataManager) QueryAccountTxs(accid *ethcmn.Address, direction uint8, cursor, limit uint64, order string) ([]define.TransactionData, error)
QueryAccountTxs query account's tx records
func (*DataManager) QueryAllTxs ¶
func (m *DataManager) QueryAllTxs(cursor, limit uint64, order string) ([]define.TransactionData, error)
QueryAllTxs query all tx records
func (*DataManager) QuerySingleTx ¶
func (m *DataManager) QuerySingleTx(txhash *ethcmn.Hash) (*define.TransactionData, error)
QuerySingleTx query single tx record
func (*DataManager) QueryTxByHash ¶
func (m *DataManager) QueryTxByHash(txhash *ethcmn.Hash) ([]define.TransactionData, error)
Click to show internal directories.
Click to hide internal directories.