Documentation ¶
Overview ¶
Package sqlmock provides functionalities for mocking a sql.DB connection.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var New = sqlmock.New
New creates sqlmock database connection and a mock to manage expectations.
View Source
var NewResult = sqlmock.NewResult
NewResult creates a new sql driver Result for Exec based query mocks.
View Source
var NewRows = sqlmock.NewRows
NewRows allows Rows to be created from a sql driver.Value slice or from the CSV string and to be used as sql driver.Rows.
Functions ¶
func DriverContext ¶
func DriverContext(mocks ...func(Sqlmock)) driver.DriverContext
DriverContext creates a new driver.DriverContext.
Types ¶
Click to show internal directories.
Click to hide internal directories.