Documentation ¶
Index ¶
- Variables
- func CreateTable(db *sql.DB, sql string)
- func Delete(db *sql.DB)
- func DeleteTable(db *sql.DB)
- func Insert(db *sql.DB, base58 string, wif string, balance_ont int, balance_wing int, ...)
- func InsertWingDisRes(db *sql.DB, market_name, user_addr, market_addr string, ...)
- func InsertWingDisRes4Borrow(db *gorm.DB, market_name, user_addr, market_addr string, ...)
- func InsertWingDisRes4Supply(db *sql.DB, market_name, user_addr, market_addr string, ...)
- func Query(db *sql.DB, start, end int) *sql.Rows
- func QueryAccountFromDb(start, end int) []*goSdk.Account
- func QueryAccountFromDbByBase58(address string) []*goSdk.Account
- func QueryByAddr(db *sql.DB, addr string) *sql.Rows
- func SetupConnect() *sql.DB
- func Update(db *sql.DB, wing_balance uint64, base58 string) (sql.Result, error)
- func UpdateStakingBalance(db *sql.DB, wing_balance uint64, base58 string) (sql.Result, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DELETE_DATA = `DELETE FROM student WHERE age>=30`
View Source
var DELETE_TABLE = `DROP TABLE student;`
View Source
var INSERT_DATA = `INSERT INTO account_info(base58,wif,balance_ont,balance_wing,staking_amount) VALUES(?,?,?,?,?);`
View Source
var INSERT_WING_DIS_RES = `INSERT INTO wing_dis_result_borrow VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?);`
View Source
var INSERT_WING_DIS_RES2 = `INSERT INTO wing_dis_result_supply VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,?);`
View Source
var QUERY_Addr = `SELECT * FROM account_info WHERE base58=?;`
View Source
var QUERY_DATA = `SELECT * FROM account_info limit ?,?;`
View Source
var UPDATE_DATA = `UPDATE account_info SET balance_wing=? WHERE base58=?;`
View Source
var UPDATE_Staking = `UPDATE account_info SET staking_amount=? WHERE base58=?;`
Functions ¶
func Insert ¶
func Insert(db *sql.DB, base58 string, wif string, balance_ont int, balance_wing int, staking_amount int)
插入数据
func InsertWingDisRes ¶
func InsertWingDisRes(db *sql.DB, market_name, user_addr, market_addr string, total_valid_borrow, user_valid_borrow, wing_speed, exp_res, rel_res *big.Int, start_time, end_time uint32, err_rate *big.Float)
插入数据
func InsertWingDisRes4Borrow ¶
func InsertWingDisRes4Supply ¶
func InsertWingDisRes4Supply(db *sql.DB, market_name, user_addr, market_addr string, total_valid_borrow, user_valid_borrow, wing_speed, exp_res, rel_res *big.Int, start_time, end_time uint32, err_rate *big.Float)
插入数据
func QueryAccountFromDb ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.