Documentation ¶
Index ¶
- Variables
- func Exec(query string, args ...interface{}) (sql.Result, int64)
- func Query(query string, args ...interface{}) []map[string]interface{}
- func QueryWithConnection(con string, query string, args ...interface{}) []map[string]interface{}
- func SetColVarType(colVar *[]interface{}, i int, typeName string)
- func SetResultValue(result *map[string]interface{}, index string, colVar interface{}, ...)
- func WithTransaction(fn TxFn) (err error, res map[string]interface{})
- func WithTransactionByLevel(level sql.IsolationLevel, fn TxFn) (err error, res map[string]interface{})
- type SqlTxStruct
- type TxFn
Constants ¶
This section is empty.
Variables ¶
View Source
var (
SqlDB *sql.DB
)
Functions ¶
func QueryWithConnection ¶
func SetColVarType ¶
func SetResultValue ¶
func WithTransaction ¶
func WithTransactionByLevel ¶
func WithTransactionByLevel(level sql.IsolationLevel, fn TxFn) (err error, res map[string]interface{})
Types ¶
type SqlTxStruct ¶
func BeginTransactions ¶
func BeginTransactions() *SqlTxStruct
func BeginTransactionsWithLevel ¶
func BeginTransactionsWithLevel(level sql.IsolationLevel) *SqlTxStruct
func BeginTransactionsWithReadCommitted ¶
func BeginTransactionsWithReadCommitted() *SqlTxStruct
func BeginTransactionsWithReadUncommitted ¶
func BeginTransactionsWithReadUncommitted() *SqlTxStruct
func BeginTransactionsWithRepeatableRead ¶
func BeginTransactionsWithRepeatableRead() *SqlTxStruct
type TxFn ¶
type TxFn func(*SqlTxStruct) (error, map[string]interface{})
Click to show internal directories.
Click to hide internal directories.