Documentation ¶
Index ¶
- Variables
- func DefaultListenAndExecute(rcvr interface{}, rpcCallback func(*RpcTestEnv))
- func ExecuteInTx(txCallback func(*sql.Tx))
- func ExecuteOrFail(query string, args ...interface{}) sql.Result
- func ExecuteQueriesOrFailInTx(queries ...string)
- func HasDbEnvForMysqlOrSkip(c *C) bool
- func InitDb()
- func QueryForRow(rowCallback func(row *sql.Row), sqlQuery string, args ...interface{})
- func QueryForRows(rowsCallback func(row *sql.Rows), sqlQuery string, args ...interface{})
- func ReleaseDb()
- type RpcTestEnv
Constants ¶
This section is empty.
Variables ¶
View Source
var DbForTest *sql.DB
Functions ¶
func DefaultListenAndExecute ¶
func DefaultListenAndExecute( rcvr interface{}, rpcCallback func(*RpcTestEnv), )
func ExecuteQueriesOrFailInTx ¶
func ExecuteQueriesOrFailInTx(queries ...string)
IoC execution(in transaction)
func HasDbEnvForMysqlOrSkip ¶
func HasDbEnvForMysqlOrSkip(c *C) bool
Checks whether or not skipping testing by viable arguments
func QueryForRow ¶
IoC Callback for row This method would use sql.DB.QueryRow method to retrive data
func QueryForRows ¶
IoC Callback for rows This method would use sql.DB.Query method to retrive data
Types ¶
type RpcTestEnv ¶
func (*RpcTestEnv) ListenAndExecute ¶
func (rpcTestEnvInstance *RpcTestEnv) ListenAndExecute( rcvr interface{}, rpcCallback func(*RpcTestEnv), )
Click to show internal directories.
Click to hide internal directories.