{"modulePath":"github.com/acoderup/goctl","version":"v1.1.7","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package mocksql\n\n## Variables\n\n```go\nvar (\n\t// ErrNotMatchDestination defines an error for mismatching case\n\tErrNotMatchDestination = errors.New(\"not matching destination to scan\")\n\t// ErrNotReadableValue defines an error for the value is not addressable or interfaceable\n\tErrNotReadableValue = errors.New(\"value not addressable or interfaceable\")\n\t// ErrNotSettable defines an error for the variable is not settable\n\tErrNotSettable = errors.New(\"passed in variable is not settable\")\n\t// ErrUnsupportedValueType deinfes an error for unsupported unmarshal type\n\tErrUnsupportedValueType = errors.New(\"unsupported unmarshal type\")\n)\n```\n\n```go\nvar ErrNotFound = sql.ErrNoRows\n```\nErrNotFound is the alias of sql.ErrNoRows\n\n## Types\n\n```go\ntype MockConn struct {\n\t// contains filtered or unexported fields\n}\n```\nMockConn defines a mock connection instance for mysql\n\n```go\nfunc NewMockConn(db *sql.DB) *MockConn\n```\nNewMockConn creates an instance for MockConn\n\n```go\nfunc (conn *MockConn) Exec(query string, args ...any) (sql.Result, error)\n```\nExec executes sql and returns the result\n\n```go\nfunc (conn *MockConn) ExecCtx(_ context.Context, query string, args ...any) (sql.Result, error)\n```\nExecCtx executes sql and returns the result\n\n```go\nfunc (conn *MockConn) Prepare(query string) (sqlx.StmtSession, error)\n```\nPrepare executes sql by sql.DB\n\n```go\nfunc (conn *MockConn) PrepareCtx(_ context.Context, query string) (sqlx.StmtSession, error)\n```\nPrepareCtx executes sql by sql.DB\n\n```go\nfunc (conn *MockConn) QueryRow(v any, q string, args ...any) error\n```\nQueryRow executes sql and returns a query row\n\n```go\nfunc (conn *MockConn) QueryRowCtx(_ context.Context, v any, query string, args ...any) error\n```\nQueryRowCtx executes sql and returns a query row\n\n```go\nfunc (conn *MockConn) QueryRowPartial(v any, q string, args ...any) error\n```\nQueryRowPartial executes sql and returns a partial query row\n\n```go\nfunc (conn *MockConn) QueryRowPartialCtx(_ context.Context, v any, query string, args ...any) error\n```\nQueryRowPartialCtx executes sql and returns a partial query row\n\n```go\nfunc (conn *MockConn) QueryRows(v any, q string, args ...any) error\n```\nQueryRows executes sql and returns  query rows\n\n```go\nfunc (conn *MockConn) QueryRowsCtx(_ context.Context, v any, query string, args ...any) error\n```\nQueryRowsCtx executes sql and returns  query rows\n\n```go\nfunc (conn *MockConn) QueryRowsPartial(v any, q string, args ...any) error\n```\nQueryRowsPartial executes sql and returns partial query rows\n\n```go\nfunc (conn *MockConn) QueryRowsPartialCtx(_ context.Context, v any, query string, args ...any) error\n```\nQueryRowsPartialCtx executes sql and returns partial query rows\n\n```go\nfunc (conn *MockConn) RawDB() (*sql.DB, error)\n```\nRawDB returns the underlying sql.DB.\n\n```go\nfunc (conn *MockConn) Transact(func(session sqlx.Session) error) error\n```\nTransact is the implementation of sqlx.SqlConn, nothing to do\n\n```go\nfunc (conn *MockConn) TransactCtx(ctx context.Context, fn func(context.Context, sqlx.Session) error) error\n```\nTransactCtx is the implementation of sqlx.SqlConn, nothing to do\n\n","path":"github.com/acoderup/goctl/model/sql/test","name":"mocksql","synopsis":"","isRedistributable":true}
