Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { // Query is the query method of sql. Query(query string, args ...interface{}) ([]map[string]interface{}, error) // Exec is the exec method of sql. Exec(query string, args ...interface{}) (sql.Result, error) // QueryWithConnection is the query method with given connection of sql. QueryWithConnection(conn, query string, args ...interface{}) ([]map[string]interface{}, error) // ExecWithConnection is the exec method with given connection of sql. ExecWithConnection(conn, query string, args ...interface{}) (sql.Result, error) QueryWithTx(tx *sql.Tx, query string, args ...interface{}) ([]map[string]interface{}, error) ExecWithTx(tx *sql.Tx, query string, args ...interface{}) (sql.Result, error) BeginTxWithReadUncommitted() *sql.Tx BeginTxWithReadCommitted() *sql.Tx BeginTxWithRepeatableRead() *sql.Tx BeginTx() *sql.Tx BeginTxWithLevel(level sql.IsolationLevel) *sql.Tx BeginTxWithReadUncommittedAndConnection(conn string) *sql.Tx BeginTxWithReadCommittedAndConnection(conn string) *sql.Tx BeginTxWithRepeatableReadAndConnection(conn string) *sql.Tx BeginTxAndConnection(conn string) *sql.Tx BeginTxWithLevelAndConnection(conn string, level sql.IsolationLevel) *sql.Tx // InitDB initialize the database connections. InitDB(cfg storage.DatabaseList) Connection // GetName get the connection name. Name() string Close() []error // GetDelimiter get the default delimiter. GetDelimiter() string GetDB(key string) *sql.DB }
Connection is a connection handler of database.
Click to show internal directories.
Click to hide internal directories.