Versions in this module Expand all Collapse all v0 v0.19.9 Oct 25, 2021 Changes in this version + const EngineTypeMysql + const EngineTypeSqlite + func DeleteDB(dbPath string) + type DealDataSource struct + type IKline1MDataSource interface + type MergeResultDataSource struct + Orm *ORM + type ORM struct + func MockSqlite3ORM() (*ORM, string) + func New(enableLog bool, engineInfo *OrmEngineInfo, logger *log.Logger) (m *ORM, err error) + func NewSqlite3ORM(enableLog bool, baseDir string, dbName string, logger *log.Logger) (orm *ORM, e error) + func (o *ORM) GetMaxBlockTimestamp() int64 + func (o *ORM) SetMaxBlockTimestamp(maxBlockTimestamp int64) + func (orm *ORM) AddClaimInfo(claimInfos []*types.ClaimInfo) (addedCnt int, err error) + func (orm *ORM) AddDeals(deals []*types.Deal) (addedCnt int, err error) + func (orm *ORM) AddFeeDetails(feeDetails []*token.FeeDetail) (addedCnt int, err error) + func (orm *ORM) AddMatchResults(results []*types.MatchResult) (addedCnt int, err error) + func (orm *ORM) AddOrders(orders []*types.Order) (addedCnt int, err error) + func (orm *ORM) AddSwapInfo(swapInfos []*types.SwapInfo) (addedCnt int, err error) + func (orm *ORM) AddSwapWhitelist(swapWhitelists []*types.SwapWhitelist) (addedCnt int, err error) + func (orm *ORM) AddTransactions(transactions []*types.Transaction) (addedCnt int, err error) + func (orm *ORM) BatchInsertOrUpdate(newOrders []*types.Order, updatedOrders []*types.Order, deals []*types.Deal, ...) (resultMap map[string]int, err error) + func (orm *ORM) Close() error + func (orm *ORM) CommitKlines(klines ...[]interface{}) + func (orm *ORM) CreateKline1M(startTS, endTS int64, dataSource IKline1MDataSource) (anchorEndTS int64, newProductCnt int, newKlineInfo map[string][]types.KlineM1, ...) + func (orm *ORM) Debug(msg string) + func (orm *ORM) DeleteKlineBefore(unixTS int64, kline interface{}) error + func (orm *ORM) Error(msg string) + func (orm *ORM) GetAccountClaimInfos(address string) []types.ClaimInfo + func (orm *ORM) GetAccountClaimedByPool(address string, poolName string) []types.ClaimInfo + func (orm *ORM) GetAccountOrders(address string, startTS, endTS int64, offset, limit int) ([]types.Order, int) + func (orm *ORM) GetDeals(address, product, side string, startTime, endTime int64, offset, limit int) ([]types.Deal, int) + func (orm *ORM) GetDealsV2(address, product, side string, after string, before string, limit int) []types.Deal + func (orm *ORM) GetDexFees(dexHandlingAddr, product string, offset, limit int) ([]types.DexFees, int) + func (orm *ORM) GetFeeDetails(address string, offset, limit int) ([]token.FeeDetail, int) + func (orm *ORM) GetFeeDetailsV2(address string, after string, before string, limit int) []token.FeeDetail + func (orm *ORM) GetLatestKlinesByProduct(product string, limit int, anchorTS int64, klines interface{}) error + func (orm *ORM) GetMatchResults(product string, startTime, endTime int64, offset, limit int) ([]types.MatchResult, int) + func (orm *ORM) GetMatchResultsV2(instrumentID string, after string, before string, limit int) []types.MatchResult + func (orm *ORM) GetOrderByID(orderID string) *types.Order + func (orm *ORM) GetOrderList(address, product, side string, open bool, offset, limit int, ...) ([]types.Order, int) + func (orm *ORM) GetOrderListV2(instrumentID string, address string, side string, open bool, after string, ...) []types.Order + func (orm *ORM) GetSwapInfo(startTime int64) []types.SwapInfo + func (orm *ORM) GetSwapWhitelist() []types.SwapWhitelist + func (orm *ORM) GetTransactionList(address string, txType, startTime, endTime int64, offset, limit int) ([]types.Transaction, int) + func (orm *ORM) GetTransactionListV2(address string, txType int, after string, before string, limit int) []types.Transaction + func (orm *ORM) MergeKlineM1(startTS, endTS int64, destKline types.IKline) (anchorEndTS int64, newKlineTypeCnt int, newKlines map[string][]interface{}, ...) + func (orm *ORM) RefreshTickers(startTS, endTS int64, productList []string) (m map[string]*types.Ticker, err error) + func (orm *ORM) UpdateOrders(orders []*types.Order) (addedCnt int, err error) + type OrmEngineInfo = okexchaincfg.BackendOrmEngineInfo