mocks

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupAndMock added in v0.3.8

func SetupAndMock(driver string, t *testing.T) (*sqlx.DB, sqlmock.Sqlmock, func() error)

Types

type ConnX

type ConnX struct {
	mock.Mock
}

ConnX is an autogenerated mock type for the ConnX type

func NewConnX added in v0.3.24

func NewConnX(t mockConstructorTestingTNewConnX) *ConnX

NewConnX creates a new instance of ConnX. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*ConnX) Beginx

func (_m *ConnX) Beginx() (*sqlx.Tx, error)

Beginx provides a mock function with given fields:

func (*ConnX) BindNamed

func (_m *ConnX) BindNamed(_a0 string, _a1 interface{}) (string, []interface{}, error)

BindNamed provides a mock function with given fields: _a0, _a1

func (*ConnX) Exec added in v0.3.24

func (_m *ConnX) Exec(_a0 string, _a1 ...interface{}) (databasesql.Result, error)

Exec provides a mock function with given fields: _a0, _a1

func (*ConnX) Get

func (_m *ConnX) Get(_a0 interface{}, _a1 string, _a2 ...interface{}) error

Get provides a mock function with given fields: _a0, _a1, _a2

func (*ConnX) MapperFunc

func (_m *ConnX) MapperFunc(_a0 func(string) string)

MapperFunc provides a mock function with given fields: _a0

func (*ConnX) MustBegin

func (_m *ConnX) MustBegin() *sqlx.Tx

MustBegin provides a mock function with given fields:

func (*ConnX) MustExec

func (_m *ConnX) MustExec(_a0 string, _a1 ...interface{}) databasesql.Result

MustExec provides a mock function with given fields: _a0, _a1

func (*ConnX) NamedExec

func (_m *ConnX) NamedExec(_a0 string, _a1 interface{}) (databasesql.Result, error)

NamedExec provides a mock function with given fields: _a0, _a1

func (*ConnX) NamedQuery

func (_m *ConnX) NamedQuery(_a0 string, _a1 interface{}) (*sqlx.Rows, error)

NamedQuery provides a mock function with given fields: _a0, _a1

func (*ConnX) PrepareNamed

func (_m *ConnX) PrepareNamed(_a0 string) (*sqlx.NamedStmt, error)

PrepareNamed provides a mock function with given fields: _a0

func (*ConnX) Preparex

func (_m *ConnX) Preparex(_a0 string) (*sqlx.Stmt, error)

Preparex provides a mock function with given fields: _a0

func (*ConnX) Query

func (_m *ConnX) Query(query string, args ...interface{}) (*databasesql.Rows, error)

Query provides a mock function with given fields: query, args

func (*ConnX) QueryRowx

func (_m *ConnX) QueryRowx(query string, args ...interface{}) *sqlx.Row

QueryRowx provides a mock function with given fields: query, args

func (*ConnX) Queryx

func (_m *ConnX) Queryx(query string, args ...interface{}) (*sqlx.Rows, error)

Queryx provides a mock function with given fields: query, args

func (*ConnX) Rebind

func (_m *ConnX) Rebind(_a0 string) string

Rebind provides a mock function with given fields: _a0

func (*ConnX) Select

func (_m *ConnX) Select(_a0 interface{}, _a1 string, _a2 ...interface{}) error

Select provides a mock function with given fields: _a0, _a1, _a2

func (*ConnX) Unsafe

func (_m *ConnX) Unsafe() *sqlx.DB

Unsafe provides a mock function with given fields:

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL