Documentation ¶
Index ¶
- func AddDataSource(name string, dbPool *pool.DbPool)
- func Commit(id uint64) error
- func GetConnection(name string) (*pool.Connection, error)
- func GetTx(id uint64, dataSourceName string) (*sql.Tx, error)
- func Rollback(id uint64) error
- func SelectList(connection *sql.DB, sql string, params []interface{}) ([]map[string]string, error)
- func Transaction() (uint64, error)
- func Update(connection *sql.DB, sql string, params []interface{}) (sql.Result, error)
- func UpdateByTx(tx *sql.Tx, sql string, params []interface{}) (sql.Result, error)
- type TxData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddDataSource ¶
AddDataSource Add DbPool as a data source
func GetConnection ¶
func GetConnection(name string) (*pool.Connection, error)
GetConnection Obtaining a connection from a specified data source
func SelectList ¶
SelectList Query list based on sql and parameters
Types ¶
Click to show internal directories.
Click to hide internal directories.