Versions in this module Expand all Collapse all v0 v0.16.3 Nov 29, 2024 Changes in this version + type DB struct + AllowAll bool + Handler QueryHandler + func New(t *testing.T) *DB + func (db *DB) AddExpectedExecuteFetch(entry ExpectedExecuteFetch) + func (db *DB) AddExpectedExecuteFetchAtIndex(index int, entry ExpectedExecuteFetch) + func (db *DB) AddExpectedQuery(query string, err error) + func (db *DB) AddExpectedQueryAtIndex(index int, query string, err error) + func (db *DB) AddQuery(query string, expectedResult *sqltypes.Result) *ExpectedResult + func (db *DB) AddQueryPattern(queryPattern string, expectedResult *sqltypes.Result) + func (db *DB) AddRejectedQuery(query string, err error) + func (db *DB) Close() + func (db *DB) CloseAllConnections() + func (db *DB) ComInitDB(c *mysql.Conn, schemaName string) + func (db *DB) ComPrepare(c *mysql.Conn, query string) ([]*querypb.Field, error) + func (db *DB) ComQuery(c *mysql.Conn, query string, callback func(*sqltypes.Result) error) error + func (db *DB) ComResetConnection(c *mysql.Conn) + func (db *DB) ComStmtExecute(c *mysql.Conn, prepare *mysql.PrepareData, ...) error + func (db *DB) ConnParams() dbconfigs.Connector + func (db *DB) ConnParamsWithUname(uname string) dbconfigs.Connector + func (db *DB) ConnectionClosed(c *mysql.Conn) + func (db *DB) DeleteAllEntries() + func (db *DB) DeleteAllEntriesAfterIndex(index int) + func (db *DB) DeleteQuery(query string) + func (db *DB) DeleteRejectedQuery(query string) + func (db *DB) DisableConnFail() + func (db *DB) EnableConnFail() + func (db *DB) EnableInfinite() + func (db *DB) EnableShouldClose() + func (db *DB) GetEntry(index int) *ExpectedExecuteFetch + func (db *DB) GetQueryCalledNum(query string) int + func (db *DB) HandleQuery(c *mysql.Conn, query string, callback func(*sqltypes.Result) error) error + func (db *DB) NewConnection(c *mysql.Conn) + func (db *DB) OrderMatters() *DB + func (db *DB) SetBeforeFunc(query string, f func()) + func (db *DB) SetConnDelay(d time.Duration) + func (db *DB) SetName(name string) *DB + func (db *DB) VerifyAllExecutedOrFail() + func (db *DB) WaitForClose(timeout time.Duration) error + func (db *DB) WarningCount(c *mysql.Conn) uint16 + type ExpectedExecuteFetch struct + AfterFunc func() + Error error + Query string + QueryResult *sqltypes.Result + type ExpectedResult struct + BeforeFunc func() + type QueryHandler interface + HandleQuery func(*mysql.Conn, string, func(*sqltypes.Result) error) error