db

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	mock.Mock
}

Manager is an autogenerated mock type for the Manager type

func NewManager

func NewManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *Manager

NewManager creates a new instance of Manager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*Manager) Begin

func (_m *Manager) Begin(ctx context.Context, opts *sql.TxOptions) (*sqlx.Tx, error)

Begin provides a mock function with given fields: ctx, opts

func (*Manager) Connect

func (_m *Manager) Connect(ctx context.Context) error

Connect provides a mock function with given fields: ctx

func (*Manager) Driver

func (_m *Manager) Driver() db.SupportedDriver

Driver provides a mock function with given fields:

func (*Manager) EXPECT

func (_m *Manager) EXPECT() *Manager_Expecter

func (*Manager) Exec

func (_m *Manager) Exec(ctx context.Context, query string, args ...interface{}) (sql.Result, error)

Exec provides a mock function with given fields: ctx, query, args

func (*Manager) MustBegin

func (_m *Manager) MustBegin(ctx context.Context, opts *sql.TxOptions) *sqlx.Tx

MustBegin provides a mock function with given fields: ctx, opts

func (*Manager) MustConnect

func (_m *Manager) MustConnect(ctx context.Context) db.Manager

MustConnect provides a mock function with given fields: ctx

func (*Manager) MustExec

func (_m *Manager) MustExec(ctx context.Context, query string, args ...interface{}) sql.Result

MustExec provides a mock function with given fields: ctx, query, args

func (*Manager) NamedExec

func (_m *Manager) NamedExec(ctx context.Context, query string, arg interface{}) (sql.Result, error)

NamedExec provides a mock function with given fields: ctx, query, arg

func (*Manager) NamedQuery

func (_m *Manager) NamedQuery(ctx context.Context, query string, arg interface{}) (*sqlx.Rows, error)

NamedQuery provides a mock function with given fields: ctx, query, arg

func (*Manager) Ping

func (_m *Manager) Ping() error

Ping provides a mock function with given fields:

func (*Manager) Prepare

func (_m *Manager) Prepare(ctx context.Context, query string) (*sqlx.Stmt, error)

Prepare provides a mock function with given fields: ctx, query

func (*Manager) PrepareNamed

func (_m *Manager) PrepareNamed(ctx context.Context, query string) (*sqlx.NamedStmt, error)

PrepareNamed provides a mock function with given fields: ctx, query

func (*Manager) Query

func (_m *Manager) Query(ctx context.Context, query string, args ...interface{}) (*sqlx.Rows, error)

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

func (*Manager) QueryRow

func (_m *Manager) QueryRow(ctx context.Context, query string, args ...interface{}) *sqlx.Row

QueryRow provides a mock function with given fields: ctx, query, args

func (*Manager) Rebind

func (_m *Manager) Rebind(query string) string

Rebind provides a mock function with given fields: query

func (*Manager) SetTelemetry added in v0.3.0

func (_m *Manager) SetTelemetry(tm telemetry.Manager) db.Manager

SetTelemetry provides a mock function with given fields: tm

func (*Manager) SqlMock

func (_m *Manager) SqlMock() sqlmock.Sqlmock

SqlMock provides a mock function with given fields:

type Manager_Begin_Call

type Manager_Begin_Call struct {
	*mock.Call
}

Manager_Begin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Begin'

func (*Manager_Begin_Call) Return

func (_c *Manager_Begin_Call) Return(_a0 *sqlx.Tx, _a1 error) *Manager_Begin_Call

func (*Manager_Begin_Call) Run

func (_c *Manager_Begin_Call) Run(run func(ctx context.Context, opts *sql.TxOptions)) *Manager_Begin_Call

func (*Manager_Begin_Call) RunAndReturn

func (_c *Manager_Begin_Call) RunAndReturn(run func(context.Context, *sql.TxOptions) (*sqlx.Tx, error)) *Manager_Begin_Call

type Manager_Connect_Call

type Manager_Connect_Call struct {
	*mock.Call
}

Manager_Connect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Connect'

func (*Manager_Connect_Call) Return

func (*Manager_Connect_Call) Run

func (_c *Manager_Connect_Call) Run(run func(ctx context.Context)) *Manager_Connect_Call

func (*Manager_Connect_Call) RunAndReturn

func (_c *Manager_Connect_Call) RunAndReturn(run func(context.Context) error) *Manager_Connect_Call

type Manager_Driver_Call

type Manager_Driver_Call struct {
	*mock.Call
}

Manager_Driver_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Driver'

func (*Manager_Driver_Call) Return

func (*Manager_Driver_Call) Run

func (_c *Manager_Driver_Call) Run(run func()) *Manager_Driver_Call

func (*Manager_Driver_Call) RunAndReturn

func (_c *Manager_Driver_Call) RunAndReturn(run func() db.SupportedDriver) *Manager_Driver_Call

type Manager_Exec_Call

type Manager_Exec_Call struct {
	*mock.Call
}

Manager_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'

func (*Manager_Exec_Call) Return

func (_c *Manager_Exec_Call) Return(_a0 sql.Result, _a1 error) *Manager_Exec_Call

func (*Manager_Exec_Call) Run

func (_c *Manager_Exec_Call) Run(run func(ctx context.Context, query string, args ...interface{})) *Manager_Exec_Call

func (*Manager_Exec_Call) RunAndReturn

func (_c *Manager_Exec_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (sql.Result, error)) *Manager_Exec_Call

type Manager_Expecter

type Manager_Expecter struct {
	// contains filtered or unexported fields
}

func (*Manager_Expecter) Begin

func (_e *Manager_Expecter) Begin(ctx interface{}, opts interface{}) *Manager_Begin_Call

Begin is a helper method to define mock.On call

  • ctx context.Context
  • opts *sql.TxOptions

func (*Manager_Expecter) Connect

func (_e *Manager_Expecter) Connect(ctx interface{}) *Manager_Connect_Call

Connect is a helper method to define mock.On call

  • ctx context.Context

func (*Manager_Expecter) Driver

func (_e *Manager_Expecter) Driver() *Manager_Driver_Call

Driver is a helper method to define mock.On call

func (*Manager_Expecter) Exec

func (_e *Manager_Expecter) Exec(ctx interface{}, query interface{}, args ...interface{}) *Manager_Exec_Call

Exec is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...interface{}

func (*Manager_Expecter) MustBegin

func (_e *Manager_Expecter) MustBegin(ctx interface{}, opts interface{}) *Manager_MustBegin_Call

MustBegin is a helper method to define mock.On call

  • ctx context.Context
  • opts *sql.TxOptions

func (*Manager_Expecter) MustConnect

func (_e *Manager_Expecter) MustConnect(ctx interface{}) *Manager_MustConnect_Call

MustConnect is a helper method to define mock.On call

  • ctx context.Context

func (*Manager_Expecter) MustExec

func (_e *Manager_Expecter) MustExec(ctx interface{}, query interface{}, args ...interface{}) *Manager_MustExec_Call

MustExec is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...interface{}

func (*Manager_Expecter) NamedExec

func (_e *Manager_Expecter) NamedExec(ctx interface{}, query interface{}, arg interface{}) *Manager_NamedExec_Call

NamedExec is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • arg interface{}

func (*Manager_Expecter) NamedQuery

func (_e *Manager_Expecter) NamedQuery(ctx interface{}, query interface{}, arg interface{}) *Manager_NamedQuery_Call

NamedQuery is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • arg interface{}

func (*Manager_Expecter) Ping

func (_e *Manager_Expecter) Ping() *Manager_Ping_Call

Ping is a helper method to define mock.On call

func (*Manager_Expecter) Prepare

func (_e *Manager_Expecter) Prepare(ctx interface{}, query interface{}) *Manager_Prepare_Call

Prepare is a helper method to define mock.On call

  • ctx context.Context
  • query string

func (*Manager_Expecter) PrepareNamed

func (_e *Manager_Expecter) PrepareNamed(ctx interface{}, query interface{}) *Manager_PrepareNamed_Call

PrepareNamed is a helper method to define mock.On call

  • ctx context.Context
  • query string

func (*Manager_Expecter) Query

func (_e *Manager_Expecter) Query(ctx interface{}, query interface{}, args ...interface{}) *Manager_Query_Call

Query is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...interface{}

func (*Manager_Expecter) QueryRow

func (_e *Manager_Expecter) QueryRow(ctx interface{}, query interface{}, args ...interface{}) *Manager_QueryRow_Call

QueryRow is a helper method to define mock.On call

  • ctx context.Context
  • query string
  • args ...interface{}

func (*Manager_Expecter) Rebind

func (_e *Manager_Expecter) Rebind(query interface{}) *Manager_Rebind_Call

Rebind is a helper method to define mock.On call

  • query string

func (*Manager_Expecter) SetTelemetry added in v0.3.0

func (_e *Manager_Expecter) SetTelemetry(tm interface{}) *Manager_SetTelemetry_Call

SetTelemetry is a helper method to define mock.On call

  • tm telemetry.Manager

func (*Manager_Expecter) SqlMock

func (_e *Manager_Expecter) SqlMock() *Manager_SqlMock_Call

SqlMock is a helper method to define mock.On call

type Manager_MustBegin_Call

type Manager_MustBegin_Call struct {
	*mock.Call
}

Manager_MustBegin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MustBegin'

func (*Manager_MustBegin_Call) Return

func (*Manager_MustBegin_Call) Run

func (*Manager_MustBegin_Call) RunAndReturn

type Manager_MustConnect_Call

type Manager_MustConnect_Call struct {
	*mock.Call
}

Manager_MustConnect_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MustConnect'

func (*Manager_MustConnect_Call) Return

func (*Manager_MustConnect_Call) Run

func (*Manager_MustConnect_Call) RunAndReturn

type Manager_MustExec_Call

type Manager_MustExec_Call struct {
	*mock.Call
}

Manager_MustExec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MustExec'

func (*Manager_MustExec_Call) Return

func (*Manager_MustExec_Call) Run

func (_c *Manager_MustExec_Call) Run(run func(ctx context.Context, query string, args ...interface{})) *Manager_MustExec_Call

func (*Manager_MustExec_Call) RunAndReturn

func (_c *Manager_MustExec_Call) RunAndReturn(run func(context.Context, string, ...interface{}) sql.Result) *Manager_MustExec_Call

type Manager_NamedExec_Call

type Manager_NamedExec_Call struct {
	*mock.Call
}

Manager_NamedExec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NamedExec'

func (*Manager_NamedExec_Call) Return

func (*Manager_NamedExec_Call) Run

func (_c *Manager_NamedExec_Call) Run(run func(ctx context.Context, query string, arg interface{})) *Manager_NamedExec_Call

func (*Manager_NamedExec_Call) RunAndReturn

func (_c *Manager_NamedExec_Call) RunAndReturn(run func(context.Context, string, interface{}) (sql.Result, error)) *Manager_NamedExec_Call

type Manager_NamedQuery_Call

type Manager_NamedQuery_Call struct {
	*mock.Call
}

Manager_NamedQuery_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'NamedQuery'

func (*Manager_NamedQuery_Call) Return

func (*Manager_NamedQuery_Call) Run

func (_c *Manager_NamedQuery_Call) Run(run func(ctx context.Context, query string, arg interface{})) *Manager_NamedQuery_Call

func (*Manager_NamedQuery_Call) RunAndReturn

func (_c *Manager_NamedQuery_Call) RunAndReturn(run func(context.Context, string, interface{}) (*sqlx.Rows, error)) *Manager_NamedQuery_Call

type Manager_Ping_Call

type Manager_Ping_Call struct {
	*mock.Call
}

Manager_Ping_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ping'

func (*Manager_Ping_Call) Return

func (_c *Manager_Ping_Call) Return(_a0 error) *Manager_Ping_Call

func (*Manager_Ping_Call) Run

func (_c *Manager_Ping_Call) Run(run func()) *Manager_Ping_Call

func (*Manager_Ping_Call) RunAndReturn

func (_c *Manager_Ping_Call) RunAndReturn(run func() error) *Manager_Ping_Call

type Manager_PrepareNamed_Call

type Manager_PrepareNamed_Call struct {
	*mock.Call
}

Manager_PrepareNamed_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PrepareNamed'

func (*Manager_PrepareNamed_Call) Return

func (*Manager_PrepareNamed_Call) Run

func (*Manager_PrepareNamed_Call) RunAndReturn

type Manager_Prepare_Call

type Manager_Prepare_Call struct {
	*mock.Call
}

Manager_Prepare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Prepare'

func (*Manager_Prepare_Call) Return

func (_c *Manager_Prepare_Call) Return(_a0 *sqlx.Stmt, _a1 error) *Manager_Prepare_Call

func (*Manager_Prepare_Call) Run

func (_c *Manager_Prepare_Call) Run(run func(ctx context.Context, query string)) *Manager_Prepare_Call

func (*Manager_Prepare_Call) RunAndReturn

func (_c *Manager_Prepare_Call) RunAndReturn(run func(context.Context, string) (*sqlx.Stmt, error)) *Manager_Prepare_Call

type Manager_QueryRow_Call

type Manager_QueryRow_Call struct {
	*mock.Call
}

Manager_QueryRow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRow'

func (*Manager_QueryRow_Call) Return

func (*Manager_QueryRow_Call) Run

func (_c *Manager_QueryRow_Call) Run(run func(ctx context.Context, query string, args ...interface{})) *Manager_QueryRow_Call

func (*Manager_QueryRow_Call) RunAndReturn

func (_c *Manager_QueryRow_Call) RunAndReturn(run func(context.Context, string, ...interface{}) *sqlx.Row) *Manager_QueryRow_Call

type Manager_Query_Call

type Manager_Query_Call struct {
	*mock.Call
}

Manager_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'

func (*Manager_Query_Call) Return

func (_c *Manager_Query_Call) Return(_a0 *sqlx.Rows, _a1 error) *Manager_Query_Call

func (*Manager_Query_Call) Run

func (_c *Manager_Query_Call) Run(run func(ctx context.Context, query string, args ...interface{})) *Manager_Query_Call

func (*Manager_Query_Call) RunAndReturn

func (_c *Manager_Query_Call) RunAndReturn(run func(context.Context, string, ...interface{}) (*sqlx.Rows, error)) *Manager_Query_Call

type Manager_Rebind_Call

type Manager_Rebind_Call struct {
	*mock.Call
}

Manager_Rebind_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Rebind'

func (*Manager_Rebind_Call) Return

func (*Manager_Rebind_Call) Run

func (_c *Manager_Rebind_Call) Run(run func(query string)) *Manager_Rebind_Call

func (*Manager_Rebind_Call) RunAndReturn

func (_c *Manager_Rebind_Call) RunAndReturn(run func(string) string) *Manager_Rebind_Call

type Manager_SetTelemetry_Call added in v0.3.0

type Manager_SetTelemetry_Call struct {
	*mock.Call
}

Manager_SetTelemetry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SetTelemetry'

func (*Manager_SetTelemetry_Call) Return added in v0.3.0

func (*Manager_SetTelemetry_Call) Run added in v0.3.0

func (*Manager_SetTelemetry_Call) RunAndReturn added in v0.3.0

type Manager_SqlMock_Call

type Manager_SqlMock_Call struct {
	*mock.Call
}

Manager_SqlMock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SqlMock'

func (*Manager_SqlMock_Call) Return

func (*Manager_SqlMock_Call) Run

func (_c *Manager_SqlMock_Call) Run(run func()) *Manager_SqlMock_Call

func (*Manager_SqlMock_Call) RunAndReturn

func (_c *Manager_SqlMock_Call) RunAndReturn(run func() sqlmock.Sqlmock) *Manager_SqlMock_Call

Jump to

Keyboard shortcuts

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