postgres

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2025 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Beginner

type Beginner interface {
	Begin() (*sql.Tx, error)
}

Beginner begins transactions.

type BeginnerExecutor

type BeginnerExecutor interface {
	BeginTx(context.Context, *sql.TxOptions) (*sql.Tx, error)

	ContextExecutor
}

BeginnerExecutor allows creation of context aware transactions with options.

func NewPool

func NewPool(
	ctx context.Context,
	url string,
	poolMaxOpenConns int,
	poolMaxIdleConns int,
	opts ...Option,
) (BeginnerExecutor, error)

NewPool opens a new DB connection pool, pings it and returns the pool

type ContextExecutor

type ContextExecutor interface {
	PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)
	ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
	QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
	QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row

	Executor
}

ContextExecutor can perform SQL queries with context

type ContextTransactor

type ContextTransactor interface {
	Commit() error
	Rollback() error

	ContextExecutor
}

ContextTransactor can commit and rollback, on top of being able to execute context-aware queries.

type Executor

type Executor interface {
	Prepare(query string) (*sql.Stmt, error)
	Exec(query string, args ...interface{}) (sql.Result, error)
	Query(query string, args ...interface{}) (*sql.Rows, error)
	QueryRow(query string, args ...interface{}) *sql.Row
}

Executor can perform SQL queries.

type MockBeginner

type MockBeginner struct {
	mock.Mock
}

MockBeginner is an autogenerated mock type for the Beginner type

func NewMockBeginner

func NewMockBeginner(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBeginner

NewMockBeginner creates a new instance of MockBeginner. 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 (*MockBeginner) Begin

func (_m *MockBeginner) Begin() (*sql.Tx, error)

Begin provides a mock function with no fields

func (*MockBeginner) EXPECT

func (_m *MockBeginner) EXPECT() *MockBeginner_Expecter

type MockBeginnerExecutor

type MockBeginnerExecutor struct {
	mock.Mock
}

MockBeginnerExecutor is an autogenerated mock type for the BeginnerExecutor type

func NewMockBeginnerExecutor

func NewMockBeginnerExecutor(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockBeginnerExecutor

NewMockBeginnerExecutor creates a new instance of MockBeginnerExecutor. 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 (*MockBeginnerExecutor) BeginTx

func (_m *MockBeginnerExecutor) BeginTx(_a0 context.Context, _a1 *sql.TxOptions) (*sql.Tx, error)

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

func (*MockBeginnerExecutor) EXPECT

func (*MockBeginnerExecutor) Exec

func (_m *MockBeginnerExecutor) Exec(query string, args ...interface{}) (sql.Result, error)

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

func (*MockBeginnerExecutor) ExecContext

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

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

func (*MockBeginnerExecutor) Prepare

func (_m *MockBeginnerExecutor) Prepare(query string) (*sql.Stmt, error)

Prepare provides a mock function with given fields: query

func (*MockBeginnerExecutor) PrepareContext

func (_m *MockBeginnerExecutor) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)

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

func (*MockBeginnerExecutor) Query

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

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

func (*MockBeginnerExecutor) QueryContext

func (_m *MockBeginnerExecutor) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

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

func (*MockBeginnerExecutor) QueryRow

func (_m *MockBeginnerExecutor) QueryRow(query string, args ...interface{}) *sql.Row

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

func (*MockBeginnerExecutor) QueryRowContext

func (_m *MockBeginnerExecutor) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row

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

type MockBeginnerExecutor_BeginTx_Call

type MockBeginnerExecutor_BeginTx_Call struct {
	*mock.Call
}

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

func (*MockBeginnerExecutor_BeginTx_Call) Return

func (*MockBeginnerExecutor_BeginTx_Call) Run

func (*MockBeginnerExecutor_BeginTx_Call) RunAndReturn

type MockBeginnerExecutor_ExecContext_Call

type MockBeginnerExecutor_ExecContext_Call struct {
	*mock.Call
}

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

func (*MockBeginnerExecutor_ExecContext_Call) Return

func (*MockBeginnerExecutor_ExecContext_Call) Run

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

func (*MockBeginnerExecutor_ExecContext_Call) RunAndReturn

type MockBeginnerExecutor_Exec_Call

type MockBeginnerExecutor_Exec_Call struct {
	*mock.Call
}

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

func (*MockBeginnerExecutor_Exec_Call) Return

func (*MockBeginnerExecutor_Exec_Call) Run

func (_c *MockBeginnerExecutor_Exec_Call) Run(run func(query string, args ...interface{})) *MockBeginnerExecutor_Exec_Call

func (*MockBeginnerExecutor_Exec_Call) RunAndReturn

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

type MockBeginnerExecutor_Expecter

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

func (*MockBeginnerExecutor_Expecter) BeginTx

func (_e *MockBeginnerExecutor_Expecter) BeginTx(_a0 interface{}, _a1 interface{}) *MockBeginnerExecutor_BeginTx_Call

BeginTx is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *sql.TxOptions

func (*MockBeginnerExecutor_Expecter) Exec

func (_e *MockBeginnerExecutor_Expecter) Exec(query interface{}, args ...interface{}) *MockBeginnerExecutor_Exec_Call

Exec is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockBeginnerExecutor_Expecter) ExecContext

func (_e *MockBeginnerExecutor_Expecter) ExecContext(ctx interface{}, query interface{}, args ...interface{}) *MockBeginnerExecutor_ExecContext_Call

ExecContext is a helper method to define mock.On call

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

func (*MockBeginnerExecutor_Expecter) Prepare

func (_e *MockBeginnerExecutor_Expecter) Prepare(query interface{}) *MockBeginnerExecutor_Prepare_Call

Prepare is a helper method to define mock.On call

  • query string

func (*MockBeginnerExecutor_Expecter) PrepareContext

func (_e *MockBeginnerExecutor_Expecter) PrepareContext(ctx interface{}, query interface{}) *MockBeginnerExecutor_PrepareContext_Call

PrepareContext is a helper method to define mock.On call

  • ctx context.Context
  • query string

func (*MockBeginnerExecutor_Expecter) Query

func (_e *MockBeginnerExecutor_Expecter) Query(query interface{}, args ...interface{}) *MockBeginnerExecutor_Query_Call

Query is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockBeginnerExecutor_Expecter) QueryContext

func (_e *MockBeginnerExecutor_Expecter) QueryContext(ctx interface{}, query interface{}, args ...interface{}) *MockBeginnerExecutor_QueryContext_Call

QueryContext is a helper method to define mock.On call

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

func (*MockBeginnerExecutor_Expecter) QueryRow

func (_e *MockBeginnerExecutor_Expecter) QueryRow(query interface{}, args ...interface{}) *MockBeginnerExecutor_QueryRow_Call

QueryRow is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockBeginnerExecutor_Expecter) QueryRowContext

func (_e *MockBeginnerExecutor_Expecter) QueryRowContext(ctx interface{}, query interface{}, args ...interface{}) *MockBeginnerExecutor_QueryRowContext_Call

QueryRowContext is a helper method to define mock.On call

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

type MockBeginnerExecutor_PrepareContext_Call

type MockBeginnerExecutor_PrepareContext_Call struct {
	*mock.Call
}

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

func (*MockBeginnerExecutor_PrepareContext_Call) Return

func (*MockBeginnerExecutor_PrepareContext_Call) Run

func (*MockBeginnerExecutor_PrepareContext_Call) RunAndReturn

type MockBeginnerExecutor_Prepare_Call

type MockBeginnerExecutor_Prepare_Call struct {
	*mock.Call
}

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

func (*MockBeginnerExecutor_Prepare_Call) Return

func (*MockBeginnerExecutor_Prepare_Call) Run

func (*MockBeginnerExecutor_Prepare_Call) RunAndReturn

type MockBeginnerExecutor_QueryContext_Call

type MockBeginnerExecutor_QueryContext_Call struct {
	*mock.Call
}

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

func (*MockBeginnerExecutor_QueryContext_Call) Return

func (*MockBeginnerExecutor_QueryContext_Call) Run

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

func (*MockBeginnerExecutor_QueryContext_Call) RunAndReturn

type MockBeginnerExecutor_QueryRowContext_Call

type MockBeginnerExecutor_QueryRowContext_Call struct {
	*mock.Call
}

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

func (*MockBeginnerExecutor_QueryRowContext_Call) Return

func (*MockBeginnerExecutor_QueryRowContext_Call) Run

func (*MockBeginnerExecutor_QueryRowContext_Call) RunAndReturn

type MockBeginnerExecutor_QueryRow_Call

type MockBeginnerExecutor_QueryRow_Call struct {
	*mock.Call
}

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

func (*MockBeginnerExecutor_QueryRow_Call) Return

func (*MockBeginnerExecutor_QueryRow_Call) Run

func (_c *MockBeginnerExecutor_QueryRow_Call) Run(run func(query string, args ...interface{})) *MockBeginnerExecutor_QueryRow_Call

func (*MockBeginnerExecutor_QueryRow_Call) RunAndReturn

func (_c *MockBeginnerExecutor_QueryRow_Call) RunAndReturn(run func(string, ...interface{}) *sql.Row) *MockBeginnerExecutor_QueryRow_Call

type MockBeginnerExecutor_Query_Call

type MockBeginnerExecutor_Query_Call struct {
	*mock.Call
}

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

func (*MockBeginnerExecutor_Query_Call) Return

func (*MockBeginnerExecutor_Query_Call) Run

func (_c *MockBeginnerExecutor_Query_Call) Run(run func(query string, args ...interface{})) *MockBeginnerExecutor_Query_Call

func (*MockBeginnerExecutor_Query_Call) RunAndReturn

func (_c *MockBeginnerExecutor_Query_Call) RunAndReturn(run func(string, ...interface{}) (*sql.Rows, error)) *MockBeginnerExecutor_Query_Call

type MockBeginner_Begin_Call

type MockBeginner_Begin_Call struct {
	*mock.Call
}

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

func (*MockBeginner_Begin_Call) Return

func (*MockBeginner_Begin_Call) Run

func (_c *MockBeginner_Begin_Call) Run(run func()) *MockBeginner_Begin_Call

func (*MockBeginner_Begin_Call) RunAndReturn

func (_c *MockBeginner_Begin_Call) RunAndReturn(run func() (*sql.Tx, error)) *MockBeginner_Begin_Call

type MockBeginner_Expecter

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

func (*MockBeginner_Expecter) Begin

Begin is a helper method to define mock.On call

type MockContextBeginner

type MockContextBeginner struct {
	mock.Mock
}

MockContextBeginner is an autogenerated mock type for the ContextBeginner type

func NewMockContextBeginner

func NewMockContextBeginner(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockContextBeginner

NewMockContextBeginner creates a new instance of MockContextBeginner. 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 (*MockContextBeginner) BeginTx

func (_m *MockContextBeginner) BeginTx(_a0 context.Context, _a1 *sql.TxOptions) (*sql.Tx, error)

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

func (*MockContextBeginner) EXPECT

func (*MockContextBeginner) Exec

func (_m *MockContextBeginner) Exec(query string, args ...interface{}) (sql.Result, error)

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

func (*MockContextBeginner) ExecContext

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

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

func (*MockContextBeginner) Prepare

func (_m *MockContextBeginner) Prepare(query string) (*sql.Stmt, error)

Prepare provides a mock function with given fields: query

func (*MockContextBeginner) PrepareContext

func (_m *MockContextBeginner) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)

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

func (*MockContextBeginner) Query

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

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

func (*MockContextBeginner) QueryContext

func (_m *MockContextBeginner) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

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

func (*MockContextBeginner) QueryRow

func (_m *MockContextBeginner) QueryRow(query string, args ...interface{}) *sql.Row

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

func (*MockContextBeginner) QueryRowContext

func (_m *MockContextBeginner) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row

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

type MockContextBeginner_BeginTx_Call

type MockContextBeginner_BeginTx_Call struct {
	*mock.Call
}

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

func (*MockContextBeginner_BeginTx_Call) Return

func (*MockContextBeginner_BeginTx_Call) Run

func (*MockContextBeginner_BeginTx_Call) RunAndReturn

type MockContextBeginner_ExecContext_Call

type MockContextBeginner_ExecContext_Call struct {
	*mock.Call
}

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

func (*MockContextBeginner_ExecContext_Call) Return

func (*MockContextBeginner_ExecContext_Call) Run

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

func (*MockContextBeginner_ExecContext_Call) RunAndReturn

type MockContextBeginner_Exec_Call

type MockContextBeginner_Exec_Call struct {
	*mock.Call
}

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

func (*MockContextBeginner_Exec_Call) Return

func (*MockContextBeginner_Exec_Call) Run

func (_c *MockContextBeginner_Exec_Call) Run(run func(query string, args ...interface{})) *MockContextBeginner_Exec_Call

func (*MockContextBeginner_Exec_Call) RunAndReturn

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

type MockContextBeginner_Expecter

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

func (*MockContextBeginner_Expecter) BeginTx

func (_e *MockContextBeginner_Expecter) BeginTx(_a0 interface{}, _a1 interface{}) *MockContextBeginner_BeginTx_Call

BeginTx is a helper method to define mock.On call

  • _a0 context.Context
  • _a1 *sql.TxOptions

func (*MockContextBeginner_Expecter) Exec

func (_e *MockContextBeginner_Expecter) Exec(query interface{}, args ...interface{}) *MockContextBeginner_Exec_Call

Exec is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockContextBeginner_Expecter) ExecContext

func (_e *MockContextBeginner_Expecter) ExecContext(ctx interface{}, query interface{}, args ...interface{}) *MockContextBeginner_ExecContext_Call

ExecContext is a helper method to define mock.On call

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

func (*MockContextBeginner_Expecter) Prepare

func (_e *MockContextBeginner_Expecter) Prepare(query interface{}) *MockContextBeginner_Prepare_Call

Prepare is a helper method to define mock.On call

  • query string

func (*MockContextBeginner_Expecter) PrepareContext

func (_e *MockContextBeginner_Expecter) PrepareContext(ctx interface{}, query interface{}) *MockContextBeginner_PrepareContext_Call

PrepareContext is a helper method to define mock.On call

  • ctx context.Context
  • query string

func (*MockContextBeginner_Expecter) Query

func (_e *MockContextBeginner_Expecter) Query(query interface{}, args ...interface{}) *MockContextBeginner_Query_Call

Query is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockContextBeginner_Expecter) QueryContext

func (_e *MockContextBeginner_Expecter) QueryContext(ctx interface{}, query interface{}, args ...interface{}) *MockContextBeginner_QueryContext_Call

QueryContext is a helper method to define mock.On call

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

func (*MockContextBeginner_Expecter) QueryRow

func (_e *MockContextBeginner_Expecter) QueryRow(query interface{}, args ...interface{}) *MockContextBeginner_QueryRow_Call

QueryRow is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockContextBeginner_Expecter) QueryRowContext

func (_e *MockContextBeginner_Expecter) QueryRowContext(ctx interface{}, query interface{}, args ...interface{}) *MockContextBeginner_QueryRowContext_Call

QueryRowContext is a helper method to define mock.On call

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

type MockContextBeginner_PrepareContext_Call

type MockContextBeginner_PrepareContext_Call struct {
	*mock.Call
}

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

func (*MockContextBeginner_PrepareContext_Call) Return

func (*MockContextBeginner_PrepareContext_Call) Run

func (*MockContextBeginner_PrepareContext_Call) RunAndReturn

type MockContextBeginner_Prepare_Call

type MockContextBeginner_Prepare_Call struct {
	*mock.Call
}

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

func (*MockContextBeginner_Prepare_Call) Return

func (*MockContextBeginner_Prepare_Call) Run

func (*MockContextBeginner_Prepare_Call) RunAndReturn

type MockContextBeginner_QueryContext_Call

type MockContextBeginner_QueryContext_Call struct {
	*mock.Call
}

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

func (*MockContextBeginner_QueryContext_Call) Return

func (*MockContextBeginner_QueryContext_Call) Run

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

func (*MockContextBeginner_QueryContext_Call) RunAndReturn

type MockContextBeginner_QueryRowContext_Call

type MockContextBeginner_QueryRowContext_Call struct {
	*mock.Call
}

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

func (*MockContextBeginner_QueryRowContext_Call) Return

func (*MockContextBeginner_QueryRowContext_Call) Run

func (*MockContextBeginner_QueryRowContext_Call) RunAndReturn

type MockContextBeginner_QueryRow_Call

type MockContextBeginner_QueryRow_Call struct {
	*mock.Call
}

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

func (*MockContextBeginner_QueryRow_Call) Return

func (*MockContextBeginner_QueryRow_Call) Run

func (_c *MockContextBeginner_QueryRow_Call) Run(run func(query string, args ...interface{})) *MockContextBeginner_QueryRow_Call

func (*MockContextBeginner_QueryRow_Call) RunAndReturn

func (_c *MockContextBeginner_QueryRow_Call) RunAndReturn(run func(string, ...interface{}) *sql.Row) *MockContextBeginner_QueryRow_Call

type MockContextBeginner_Query_Call

type MockContextBeginner_Query_Call struct {
	*mock.Call
}

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

func (*MockContextBeginner_Query_Call) Return

func (*MockContextBeginner_Query_Call) Run

func (_c *MockContextBeginner_Query_Call) Run(run func(query string, args ...interface{})) *MockContextBeginner_Query_Call

func (*MockContextBeginner_Query_Call) RunAndReturn

func (_c *MockContextBeginner_Query_Call) RunAndReturn(run func(string, ...interface{}) (*sql.Rows, error)) *MockContextBeginner_Query_Call

type MockContextExecutor

type MockContextExecutor struct {
	mock.Mock
}

MockContextExecutor is an autogenerated mock type for the ContextExecutor type

func NewMockContextExecutor

func NewMockContextExecutor(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockContextExecutor

NewMockContextExecutor creates a new instance of MockContextExecutor. 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 (*MockContextExecutor) EXPECT

func (*MockContextExecutor) Exec

func (_m *MockContextExecutor) Exec(query string, args ...interface{}) (sql.Result, error)

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

func (*MockContextExecutor) ExecContext

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

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

func (*MockContextExecutor) Prepare

func (_m *MockContextExecutor) Prepare(query string) (*sql.Stmt, error)

Prepare provides a mock function with given fields: query

func (*MockContextExecutor) PrepareContext

func (_m *MockContextExecutor) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)

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

func (*MockContextExecutor) Query

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

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

func (*MockContextExecutor) QueryContext

func (_m *MockContextExecutor) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

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

func (*MockContextExecutor) QueryRow

func (_m *MockContextExecutor) QueryRow(query string, args ...interface{}) *sql.Row

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

func (*MockContextExecutor) QueryRowContext

func (_m *MockContextExecutor) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row

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

type MockContextExecutor_ExecContext_Call

type MockContextExecutor_ExecContext_Call struct {
	*mock.Call
}

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

func (*MockContextExecutor_ExecContext_Call) Return

func (*MockContextExecutor_ExecContext_Call) Run

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

func (*MockContextExecutor_ExecContext_Call) RunAndReturn

type MockContextExecutor_Exec_Call

type MockContextExecutor_Exec_Call struct {
	*mock.Call
}

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

func (*MockContextExecutor_Exec_Call) Return

func (*MockContextExecutor_Exec_Call) Run

func (_c *MockContextExecutor_Exec_Call) Run(run func(query string, args ...interface{})) *MockContextExecutor_Exec_Call

func (*MockContextExecutor_Exec_Call) RunAndReturn

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

type MockContextExecutor_Expecter

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

func (*MockContextExecutor_Expecter) Exec

func (_e *MockContextExecutor_Expecter) Exec(query interface{}, args ...interface{}) *MockContextExecutor_Exec_Call

Exec is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockContextExecutor_Expecter) ExecContext

func (_e *MockContextExecutor_Expecter) ExecContext(ctx interface{}, query interface{}, args ...interface{}) *MockContextExecutor_ExecContext_Call

ExecContext is a helper method to define mock.On call

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

func (*MockContextExecutor_Expecter) Prepare

func (_e *MockContextExecutor_Expecter) Prepare(query interface{}) *MockContextExecutor_Prepare_Call

Prepare is a helper method to define mock.On call

  • query string

func (*MockContextExecutor_Expecter) PrepareContext

func (_e *MockContextExecutor_Expecter) PrepareContext(ctx interface{}, query interface{}) *MockContextExecutor_PrepareContext_Call

PrepareContext is a helper method to define mock.On call

  • ctx context.Context
  • query string

func (*MockContextExecutor_Expecter) Query

func (_e *MockContextExecutor_Expecter) Query(query interface{}, args ...interface{}) *MockContextExecutor_Query_Call

Query is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockContextExecutor_Expecter) QueryContext

func (_e *MockContextExecutor_Expecter) QueryContext(ctx interface{}, query interface{}, args ...interface{}) *MockContextExecutor_QueryContext_Call

QueryContext is a helper method to define mock.On call

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

func (*MockContextExecutor_Expecter) QueryRow

func (_e *MockContextExecutor_Expecter) QueryRow(query interface{}, args ...interface{}) *MockContextExecutor_QueryRow_Call

QueryRow is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockContextExecutor_Expecter) QueryRowContext

func (_e *MockContextExecutor_Expecter) QueryRowContext(ctx interface{}, query interface{}, args ...interface{}) *MockContextExecutor_QueryRowContext_Call

QueryRowContext is a helper method to define mock.On call

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

type MockContextExecutor_PrepareContext_Call

type MockContextExecutor_PrepareContext_Call struct {
	*mock.Call
}

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

func (*MockContextExecutor_PrepareContext_Call) Return

func (*MockContextExecutor_PrepareContext_Call) Run

func (*MockContextExecutor_PrepareContext_Call) RunAndReturn

type MockContextExecutor_Prepare_Call

type MockContextExecutor_Prepare_Call struct {
	*mock.Call
}

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

func (*MockContextExecutor_Prepare_Call) Return

func (*MockContextExecutor_Prepare_Call) Run

func (*MockContextExecutor_Prepare_Call) RunAndReturn

type MockContextExecutor_QueryContext_Call

type MockContextExecutor_QueryContext_Call struct {
	*mock.Call
}

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

func (*MockContextExecutor_QueryContext_Call) Return

func (*MockContextExecutor_QueryContext_Call) Run

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

func (*MockContextExecutor_QueryContext_Call) RunAndReturn

type MockContextExecutor_QueryRowContext_Call

type MockContextExecutor_QueryRowContext_Call struct {
	*mock.Call
}

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

func (*MockContextExecutor_QueryRowContext_Call) Return

func (*MockContextExecutor_QueryRowContext_Call) Run

func (*MockContextExecutor_QueryRowContext_Call) RunAndReturn

type MockContextExecutor_QueryRow_Call

type MockContextExecutor_QueryRow_Call struct {
	*mock.Call
}

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

func (*MockContextExecutor_QueryRow_Call) Return

func (*MockContextExecutor_QueryRow_Call) Run

func (_c *MockContextExecutor_QueryRow_Call) Run(run func(query string, args ...interface{})) *MockContextExecutor_QueryRow_Call

func (*MockContextExecutor_QueryRow_Call) RunAndReturn

func (_c *MockContextExecutor_QueryRow_Call) RunAndReturn(run func(string, ...interface{}) *sql.Row) *MockContextExecutor_QueryRow_Call

type MockContextExecutor_Query_Call

type MockContextExecutor_Query_Call struct {
	*mock.Call
}

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

func (*MockContextExecutor_Query_Call) Return

func (*MockContextExecutor_Query_Call) Run

func (_c *MockContextExecutor_Query_Call) Run(run func(query string, args ...interface{})) *MockContextExecutor_Query_Call

func (*MockContextExecutor_Query_Call) RunAndReturn

func (_c *MockContextExecutor_Query_Call) RunAndReturn(run func(string, ...interface{}) (*sql.Rows, error)) *MockContextExecutor_Query_Call

type MockContextQueryExecutor

type MockContextQueryExecutor struct {
	mock.Mock
}

MockContextQueryExecutor is an autogenerated mock type for the ContextQueryExecutor type

func NewMockContextQueryExecutor

func NewMockContextQueryExecutor(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockContextQueryExecutor

NewMockContextQueryExecutor creates a new instance of MockContextQueryExecutor. 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 (*MockContextQueryExecutor) EXPECT

func (*MockContextQueryExecutor) Exec

func (_m *MockContextQueryExecutor) Exec(query string, args ...interface{}) (sql.Result, error)

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

func (*MockContextQueryExecutor) Prepare

func (_m *MockContextQueryExecutor) Prepare(query string) (*sql.Stmt, error)

Prepare provides a mock function with given fields: query

func (*MockContextQueryExecutor) PrepareContext

func (_m *MockContextQueryExecutor) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)

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

func (*MockContextQueryExecutor) Query

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

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

func (*MockContextQueryExecutor) QueryContext

func (_m *MockContextQueryExecutor) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

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

func (*MockContextQueryExecutor) QueryRow

func (_m *MockContextQueryExecutor) QueryRow(query string, args ...interface{}) *sql.Row

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

func (*MockContextQueryExecutor) QueryRowContext

func (_m *MockContextQueryExecutor) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row

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

type MockContextQueryExecutor_Exec_Call

type MockContextQueryExecutor_Exec_Call struct {
	*mock.Call
}

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

func (*MockContextQueryExecutor_Exec_Call) Return

func (*MockContextQueryExecutor_Exec_Call) Run

func (_c *MockContextQueryExecutor_Exec_Call) Run(run func(query string, args ...interface{})) *MockContextQueryExecutor_Exec_Call

func (*MockContextQueryExecutor_Exec_Call) RunAndReturn

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

type MockContextQueryExecutor_Expecter

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

func (*MockContextQueryExecutor_Expecter) Exec

func (_e *MockContextQueryExecutor_Expecter) Exec(query interface{}, args ...interface{}) *MockContextQueryExecutor_Exec_Call

Exec is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockContextQueryExecutor_Expecter) Prepare

Prepare is a helper method to define mock.On call

  • query string

func (*MockContextQueryExecutor_Expecter) PrepareContext

func (_e *MockContextQueryExecutor_Expecter) PrepareContext(ctx interface{}, query interface{}) *MockContextQueryExecutor_PrepareContext_Call

PrepareContext is a helper method to define mock.On call

  • ctx context.Context
  • query string

func (*MockContextQueryExecutor_Expecter) Query

func (_e *MockContextQueryExecutor_Expecter) Query(query interface{}, args ...interface{}) *MockContextQueryExecutor_Query_Call

Query is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockContextQueryExecutor_Expecter) QueryContext

func (_e *MockContextQueryExecutor_Expecter) QueryContext(ctx interface{}, query interface{}, args ...interface{}) *MockContextQueryExecutor_QueryContext_Call

QueryContext is a helper method to define mock.On call

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

func (*MockContextQueryExecutor_Expecter) QueryRow

func (_e *MockContextQueryExecutor_Expecter) QueryRow(query interface{}, args ...interface{}) *MockContextQueryExecutor_QueryRow_Call

QueryRow is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockContextQueryExecutor_Expecter) QueryRowContext

func (_e *MockContextQueryExecutor_Expecter) QueryRowContext(ctx interface{}, query interface{}, args ...interface{}) *MockContextQueryExecutor_QueryRowContext_Call

QueryRowContext is a helper method to define mock.On call

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

type MockContextQueryExecutor_PrepareContext_Call

type MockContextQueryExecutor_PrepareContext_Call struct {
	*mock.Call
}

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

func (*MockContextQueryExecutor_PrepareContext_Call) Return

func (*MockContextQueryExecutor_PrepareContext_Call) Run

func (*MockContextQueryExecutor_PrepareContext_Call) RunAndReturn

type MockContextQueryExecutor_Prepare_Call

type MockContextQueryExecutor_Prepare_Call struct {
	*mock.Call
}

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

func (*MockContextQueryExecutor_Prepare_Call) Return

func (*MockContextQueryExecutor_Prepare_Call) Run

func (*MockContextQueryExecutor_Prepare_Call) RunAndReturn

type MockContextQueryExecutor_QueryContext_Call

type MockContextQueryExecutor_QueryContext_Call struct {
	*mock.Call
}

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

func (*MockContextQueryExecutor_QueryContext_Call) Return

func (*MockContextQueryExecutor_QueryContext_Call) Run

func (*MockContextQueryExecutor_QueryContext_Call) RunAndReturn

type MockContextQueryExecutor_QueryRowContext_Call

type MockContextQueryExecutor_QueryRowContext_Call struct {
	*mock.Call
}

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

func (*MockContextQueryExecutor_QueryRowContext_Call) Return

func (*MockContextQueryExecutor_QueryRowContext_Call) Run

func (*MockContextQueryExecutor_QueryRowContext_Call) RunAndReturn

type MockContextQueryExecutor_QueryRow_Call

type MockContextQueryExecutor_QueryRow_Call struct {
	*mock.Call
}

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

func (*MockContextQueryExecutor_QueryRow_Call) Return

func (*MockContextQueryExecutor_QueryRow_Call) Run

func (_c *MockContextQueryExecutor_QueryRow_Call) Run(run func(query string, args ...interface{})) *MockContextQueryExecutor_QueryRow_Call

func (*MockContextQueryExecutor_QueryRow_Call) RunAndReturn

func (_c *MockContextQueryExecutor_QueryRow_Call) RunAndReturn(run func(string, ...interface{}) *sql.Row) *MockContextQueryExecutor_QueryRow_Call

type MockContextQueryExecutor_Query_Call

type MockContextQueryExecutor_Query_Call struct {
	*mock.Call
}

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

func (*MockContextQueryExecutor_Query_Call) Return

func (*MockContextQueryExecutor_Query_Call) Run

func (_c *MockContextQueryExecutor_Query_Call) Run(run func(query string, args ...interface{})) *MockContextQueryExecutor_Query_Call

func (*MockContextQueryExecutor_Query_Call) RunAndReturn

func (_c *MockContextQueryExecutor_Query_Call) RunAndReturn(run func(string, ...interface{}) (*sql.Rows, error)) *MockContextQueryExecutor_Query_Call

type MockContextTransactor

type MockContextTransactor struct {
	mock.Mock
}

MockContextTransactor is an autogenerated mock type for the ContextTransactor type

func NewMockContextTransactor

func NewMockContextTransactor(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockContextTransactor

NewMockContextTransactor creates a new instance of MockContextTransactor. 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 (*MockContextTransactor) Commit

func (_m *MockContextTransactor) Commit() error

Commit provides a mock function with no fields

func (*MockContextTransactor) EXPECT

func (*MockContextTransactor) Exec

func (_m *MockContextTransactor) Exec(query string, args ...interface{}) (sql.Result, error)

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

func (*MockContextTransactor) ExecContext

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

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

func (*MockContextTransactor) Prepare

func (_m *MockContextTransactor) Prepare(query string) (*sql.Stmt, error)

Prepare provides a mock function with given fields: query

func (*MockContextTransactor) PrepareContext

func (_m *MockContextTransactor) PrepareContext(ctx context.Context, query string) (*sql.Stmt, error)

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

func (*MockContextTransactor) Query

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

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

func (*MockContextTransactor) QueryContext

func (_m *MockContextTransactor) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)

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

func (*MockContextTransactor) QueryRow

func (_m *MockContextTransactor) QueryRow(query string, args ...interface{}) *sql.Row

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

func (*MockContextTransactor) QueryRowContext

func (_m *MockContextTransactor) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row

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

func (*MockContextTransactor) Rollback

func (_m *MockContextTransactor) Rollback() error

Rollback provides a mock function with no fields

type MockContextTransactor_Commit_Call

type MockContextTransactor_Commit_Call struct {
	*mock.Call
}

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

func (*MockContextTransactor_Commit_Call) Return

func (*MockContextTransactor_Commit_Call) Run

func (*MockContextTransactor_Commit_Call) RunAndReturn

type MockContextTransactor_ExecContext_Call

type MockContextTransactor_ExecContext_Call struct {
	*mock.Call
}

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

func (*MockContextTransactor_ExecContext_Call) Return

func (*MockContextTransactor_ExecContext_Call) Run

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

func (*MockContextTransactor_ExecContext_Call) RunAndReturn

type MockContextTransactor_Exec_Call

type MockContextTransactor_Exec_Call struct {
	*mock.Call
}

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

func (*MockContextTransactor_Exec_Call) Return

func (*MockContextTransactor_Exec_Call) Run

func (_c *MockContextTransactor_Exec_Call) Run(run func(query string, args ...interface{})) *MockContextTransactor_Exec_Call

func (*MockContextTransactor_Exec_Call) RunAndReturn

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

type MockContextTransactor_Expecter

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

func (*MockContextTransactor_Expecter) Commit

Commit is a helper method to define mock.On call

func (*MockContextTransactor_Expecter) Exec

func (_e *MockContextTransactor_Expecter) Exec(query interface{}, args ...interface{}) *MockContextTransactor_Exec_Call

Exec is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockContextTransactor_Expecter) ExecContext

func (_e *MockContextTransactor_Expecter) ExecContext(ctx interface{}, query interface{}, args ...interface{}) *MockContextTransactor_ExecContext_Call

ExecContext is a helper method to define mock.On call

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

func (*MockContextTransactor_Expecter) Prepare

Prepare is a helper method to define mock.On call

  • query string

func (*MockContextTransactor_Expecter) PrepareContext

func (_e *MockContextTransactor_Expecter) PrepareContext(ctx interface{}, query interface{}) *MockContextTransactor_PrepareContext_Call

PrepareContext is a helper method to define mock.On call

  • ctx context.Context
  • query string

func (*MockContextTransactor_Expecter) Query

func (_e *MockContextTransactor_Expecter) Query(query interface{}, args ...interface{}) *MockContextTransactor_Query_Call

Query is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockContextTransactor_Expecter) QueryContext

func (_e *MockContextTransactor_Expecter) QueryContext(ctx interface{}, query interface{}, args ...interface{}) *MockContextTransactor_QueryContext_Call

QueryContext is a helper method to define mock.On call

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

func (*MockContextTransactor_Expecter) QueryRow

func (_e *MockContextTransactor_Expecter) QueryRow(query interface{}, args ...interface{}) *MockContextTransactor_QueryRow_Call

QueryRow is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockContextTransactor_Expecter) QueryRowContext

func (_e *MockContextTransactor_Expecter) QueryRowContext(ctx interface{}, query interface{}, args ...interface{}) *MockContextTransactor_QueryRowContext_Call

QueryRowContext is a helper method to define mock.On call

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

func (*MockContextTransactor_Expecter) Rollback

Rollback is a helper method to define mock.On call

type MockContextTransactor_PrepareContext_Call

type MockContextTransactor_PrepareContext_Call struct {
	*mock.Call
}

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

func (*MockContextTransactor_PrepareContext_Call) Return

func (*MockContextTransactor_PrepareContext_Call) Run

func (*MockContextTransactor_PrepareContext_Call) RunAndReturn

type MockContextTransactor_Prepare_Call

type MockContextTransactor_Prepare_Call struct {
	*mock.Call
}

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

func (*MockContextTransactor_Prepare_Call) Return

func (*MockContextTransactor_Prepare_Call) Run

func (*MockContextTransactor_Prepare_Call) RunAndReturn

type MockContextTransactor_QueryContext_Call

type MockContextTransactor_QueryContext_Call struct {
	*mock.Call
}

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

func (*MockContextTransactor_QueryContext_Call) Return

func (*MockContextTransactor_QueryContext_Call) Run

func (*MockContextTransactor_QueryContext_Call) RunAndReturn

type MockContextTransactor_QueryRowContext_Call

type MockContextTransactor_QueryRowContext_Call struct {
	*mock.Call
}

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

func (*MockContextTransactor_QueryRowContext_Call) Return

func (*MockContextTransactor_QueryRowContext_Call) Run

func (*MockContextTransactor_QueryRowContext_Call) RunAndReturn

type MockContextTransactor_QueryRow_Call

type MockContextTransactor_QueryRow_Call struct {
	*mock.Call
}

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

func (*MockContextTransactor_QueryRow_Call) Return

func (*MockContextTransactor_QueryRow_Call) Run

func (_c *MockContextTransactor_QueryRow_Call) Run(run func(query string, args ...interface{})) *MockContextTransactor_QueryRow_Call

func (*MockContextTransactor_QueryRow_Call) RunAndReturn

func (_c *MockContextTransactor_QueryRow_Call) RunAndReturn(run func(string, ...interface{}) *sql.Row) *MockContextTransactor_QueryRow_Call

type MockContextTransactor_Query_Call

type MockContextTransactor_Query_Call struct {
	*mock.Call
}

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

func (*MockContextTransactor_Query_Call) Return

func (*MockContextTransactor_Query_Call) Run

func (_c *MockContextTransactor_Query_Call) Run(run func(query string, args ...interface{})) *MockContextTransactor_Query_Call

func (*MockContextTransactor_Query_Call) RunAndReturn

func (_c *MockContextTransactor_Query_Call) RunAndReturn(run func(string, ...interface{}) (*sql.Rows, error)) *MockContextTransactor_Query_Call

type MockContextTransactor_Rollback_Call

type MockContextTransactor_Rollback_Call struct {
	*mock.Call
}

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

func (*MockContextTransactor_Rollback_Call) Return

func (*MockContextTransactor_Rollback_Call) Run

func (*MockContextTransactor_Rollback_Call) RunAndReturn

type MockExecutor

type MockExecutor struct {
	mock.Mock
}

MockExecutor is an autogenerated mock type for the Executor type

func NewMockExecutor

func NewMockExecutor(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockExecutor

NewMockExecutor creates a new instance of MockExecutor. 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 (*MockExecutor) EXPECT

func (_m *MockExecutor) EXPECT() *MockExecutor_Expecter

func (*MockExecutor) Exec

func (_m *MockExecutor) Exec(query string, args ...interface{}) (sql.Result, error)

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

func (*MockExecutor) Prepare

func (_m *MockExecutor) Prepare(query string) (*sql.Stmt, error)

Prepare provides a mock function with given fields: query

func (*MockExecutor) Query

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

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

func (*MockExecutor) QueryRow

func (_m *MockExecutor) QueryRow(query string, args ...interface{}) *sql.Row

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

type MockExecutor_Exec_Call

type MockExecutor_Exec_Call struct {
	*mock.Call
}

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

func (*MockExecutor_Exec_Call) Return

func (*MockExecutor_Exec_Call) Run

func (_c *MockExecutor_Exec_Call) Run(run func(query string, args ...interface{})) *MockExecutor_Exec_Call

func (*MockExecutor_Exec_Call) RunAndReturn

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

type MockExecutor_Expecter

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

func (*MockExecutor_Expecter) Exec

func (_e *MockExecutor_Expecter) Exec(query interface{}, args ...interface{}) *MockExecutor_Exec_Call

Exec is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockExecutor_Expecter) Prepare

func (_e *MockExecutor_Expecter) Prepare(query interface{}) *MockExecutor_Prepare_Call

Prepare is a helper method to define mock.On call

  • query string

func (*MockExecutor_Expecter) Query

func (_e *MockExecutor_Expecter) Query(query interface{}, args ...interface{}) *MockExecutor_Query_Call

Query is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockExecutor_Expecter) QueryRow

func (_e *MockExecutor_Expecter) QueryRow(query interface{}, args ...interface{}) *MockExecutor_QueryRow_Call

QueryRow is a helper method to define mock.On call

  • query string
  • args ...interface{}

type MockExecutor_Prepare_Call

type MockExecutor_Prepare_Call struct {
	*mock.Call
}

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

func (*MockExecutor_Prepare_Call) Return

func (*MockExecutor_Prepare_Call) Run

func (*MockExecutor_Prepare_Call) RunAndReturn

func (_c *MockExecutor_Prepare_Call) RunAndReturn(run func(string) (*sql.Stmt, error)) *MockExecutor_Prepare_Call

type MockExecutor_QueryRow_Call

type MockExecutor_QueryRow_Call struct {
	*mock.Call
}

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

func (*MockExecutor_QueryRow_Call) Return

func (*MockExecutor_QueryRow_Call) Run

func (_c *MockExecutor_QueryRow_Call) Run(run func(query string, args ...interface{})) *MockExecutor_QueryRow_Call

func (*MockExecutor_QueryRow_Call) RunAndReturn

func (_c *MockExecutor_QueryRow_Call) RunAndReturn(run func(string, ...interface{}) *sql.Row) *MockExecutor_QueryRow_Call

type MockExecutor_Query_Call

type MockExecutor_Query_Call struct {
	*mock.Call
}

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

func (*MockExecutor_Query_Call) Return

func (*MockExecutor_Query_Call) Run

func (_c *MockExecutor_Query_Call) Run(run func(query string, args ...interface{})) *MockExecutor_Query_Call

func (*MockExecutor_Query_Call) RunAndReturn

func (_c *MockExecutor_Query_Call) RunAndReturn(run func(string, ...interface{}) (*sql.Rows, error)) *MockExecutor_Query_Call

type MockOption

type MockOption struct {
	mock.Mock
}

MockOption is an autogenerated mock type for the Option type

func NewMockOption

func NewMockOption(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockOption

NewMockOption creates a new instance of MockOption. 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 (*MockOption) EXPECT

func (_m *MockOption) EXPECT() *MockOption_Expecter

func (*MockOption) Execute

func (_m *MockOption) Execute(_a0 *config)

Execute provides a mock function with given fields: _a0

type MockOption_Execute_Call

type MockOption_Execute_Call struct {
	*mock.Call
}

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

func (*MockOption_Execute_Call) Return

func (*MockOption_Execute_Call) Run

func (_c *MockOption_Execute_Call) Run(run func(_a0 *config)) *MockOption_Execute_Call

func (*MockOption_Execute_Call) RunAndReturn

func (_c *MockOption_Execute_Call) RunAndReturn(run func(*config)) *MockOption_Execute_Call

type MockOption_Expecter

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

func (*MockOption_Expecter) Execute

func (_e *MockOption_Expecter) Execute(_a0 interface{}) *MockOption_Execute_Call

Execute is a helper method to define mock.On call

  • _a0 *config

type MockQueryExecutor

type MockQueryExecutor struct {
	mock.Mock
}

MockQueryExecutor is an autogenerated mock type for the QueryExecutor type

func NewMockQueryExecutor

func NewMockQueryExecutor(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockQueryExecutor

NewMockQueryExecutor creates a new instance of MockQueryExecutor. 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 (*MockQueryExecutor) EXPECT

func (*MockQueryExecutor) Prepare

func (_m *MockQueryExecutor) Prepare(query string) (*sql.Stmt, error)

Prepare provides a mock function with given fields: query

func (*MockQueryExecutor) Query

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

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

func (*MockQueryExecutor) QueryRow

func (_m *MockQueryExecutor) QueryRow(query string, args ...interface{}) *sql.Row

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

type MockQueryExecutor_Expecter

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

func (*MockQueryExecutor_Expecter) Prepare

func (_e *MockQueryExecutor_Expecter) Prepare(query interface{}) *MockQueryExecutor_Prepare_Call

Prepare is a helper method to define mock.On call

  • query string

func (*MockQueryExecutor_Expecter) Query

func (_e *MockQueryExecutor_Expecter) Query(query interface{}, args ...interface{}) *MockQueryExecutor_Query_Call

Query is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockQueryExecutor_Expecter) QueryRow

func (_e *MockQueryExecutor_Expecter) QueryRow(query interface{}, args ...interface{}) *MockQueryExecutor_QueryRow_Call

QueryRow is a helper method to define mock.On call

  • query string
  • args ...interface{}

type MockQueryExecutor_Prepare_Call

type MockQueryExecutor_Prepare_Call struct {
	*mock.Call
}

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

func (*MockQueryExecutor_Prepare_Call) Return

func (*MockQueryExecutor_Prepare_Call) Run

func (*MockQueryExecutor_Prepare_Call) RunAndReturn

type MockQueryExecutor_QueryRow_Call

type MockQueryExecutor_QueryRow_Call struct {
	*mock.Call
}

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

func (*MockQueryExecutor_QueryRow_Call) Return

func (*MockQueryExecutor_QueryRow_Call) Run

func (_c *MockQueryExecutor_QueryRow_Call) Run(run func(query string, args ...interface{})) *MockQueryExecutor_QueryRow_Call

func (*MockQueryExecutor_QueryRow_Call) RunAndReturn

func (_c *MockQueryExecutor_QueryRow_Call) RunAndReturn(run func(string, ...interface{}) *sql.Row) *MockQueryExecutor_QueryRow_Call

type MockQueryExecutor_Query_Call

type MockQueryExecutor_Query_Call struct {
	*mock.Call
}

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

func (*MockQueryExecutor_Query_Call) Return

func (*MockQueryExecutor_Query_Call) Run

func (_c *MockQueryExecutor_Query_Call) Run(run func(query string, args ...interface{})) *MockQueryExecutor_Query_Call

func (*MockQueryExecutor_Query_Call) RunAndReturn

func (_c *MockQueryExecutor_Query_Call) RunAndReturn(run func(string, ...interface{}) (*sql.Rows, error)) *MockQueryExecutor_Query_Call

type MockTransactor

type MockTransactor struct {
	mock.Mock
}

MockTransactor is an autogenerated mock type for the Transactor type

func NewMockTransactor

func NewMockTransactor(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockTransactor

NewMockTransactor creates a new instance of MockTransactor. 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 (*MockTransactor) Commit

func (_m *MockTransactor) Commit() error

Commit provides a mock function with no fields

func (*MockTransactor) EXPECT

func (*MockTransactor) Exec

func (_m *MockTransactor) Exec(query string, args ...interface{}) (sql.Result, error)

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

func (*MockTransactor) Prepare

func (_m *MockTransactor) Prepare(query string) (*sql.Stmt, error)

Prepare provides a mock function with given fields: query

func (*MockTransactor) Query

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

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

func (*MockTransactor) QueryRow

func (_m *MockTransactor) QueryRow(query string, args ...interface{}) *sql.Row

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

func (*MockTransactor) Rollback

func (_m *MockTransactor) Rollback() error

Rollback provides a mock function with no fields

type MockTransactor_Commit_Call

type MockTransactor_Commit_Call struct {
	*mock.Call
}

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

func (*MockTransactor_Commit_Call) Return

func (*MockTransactor_Commit_Call) Run

func (*MockTransactor_Commit_Call) RunAndReturn

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

type MockTransactor_Exec_Call

type MockTransactor_Exec_Call struct {
	*mock.Call
}

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

func (*MockTransactor_Exec_Call) Return

func (*MockTransactor_Exec_Call) Run

func (_c *MockTransactor_Exec_Call) Run(run func(query string, args ...interface{})) *MockTransactor_Exec_Call

func (*MockTransactor_Exec_Call) RunAndReturn

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

type MockTransactor_Expecter

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

func (*MockTransactor_Expecter) Commit

Commit is a helper method to define mock.On call

func (*MockTransactor_Expecter) Exec

func (_e *MockTransactor_Expecter) Exec(query interface{}, args ...interface{}) *MockTransactor_Exec_Call

Exec is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockTransactor_Expecter) Prepare

func (_e *MockTransactor_Expecter) Prepare(query interface{}) *MockTransactor_Prepare_Call

Prepare is a helper method to define mock.On call

  • query string

func (*MockTransactor_Expecter) Query

func (_e *MockTransactor_Expecter) Query(query interface{}, args ...interface{}) *MockTransactor_Query_Call

Query is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockTransactor_Expecter) QueryRow

func (_e *MockTransactor_Expecter) QueryRow(query interface{}, args ...interface{}) *MockTransactor_QueryRow_Call

QueryRow is a helper method to define mock.On call

  • query string
  • args ...interface{}

func (*MockTransactor_Expecter) Rollback

Rollback is a helper method to define mock.On call

type MockTransactor_Prepare_Call

type MockTransactor_Prepare_Call struct {
	*mock.Call
}

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

func (*MockTransactor_Prepare_Call) Return

func (*MockTransactor_Prepare_Call) Run

func (*MockTransactor_Prepare_Call) RunAndReturn

type MockTransactor_QueryRow_Call

type MockTransactor_QueryRow_Call struct {
	*mock.Call
}

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

func (*MockTransactor_QueryRow_Call) Return

func (*MockTransactor_QueryRow_Call) Run

func (_c *MockTransactor_QueryRow_Call) Run(run func(query string, args ...interface{})) *MockTransactor_QueryRow_Call

func (*MockTransactor_QueryRow_Call) RunAndReturn

func (_c *MockTransactor_QueryRow_Call) RunAndReturn(run func(string, ...interface{}) *sql.Row) *MockTransactor_QueryRow_Call

type MockTransactor_Query_Call

type MockTransactor_Query_Call struct {
	*mock.Call
}

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

func (*MockTransactor_Query_Call) Return

func (*MockTransactor_Query_Call) Run

func (_c *MockTransactor_Query_Call) Run(run func(query string, args ...interface{})) *MockTransactor_Query_Call

func (*MockTransactor_Query_Call) RunAndReturn

func (_c *MockTransactor_Query_Call) RunAndReturn(run func(string, ...interface{}) (*sql.Rows, error)) *MockTransactor_Query_Call

type MockTransactor_Rollback_Call

type MockTransactor_Rollback_Call struct {
	*mock.Call
}

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

func (*MockTransactor_Rollback_Call) Return

func (*MockTransactor_Rollback_Call) Run

func (*MockTransactor_Rollback_Call) RunAndReturn

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

type Option

type Option func(*config)

Option is an optional config used to modify the client's behaviour

func AttemptPingUponStartup

func AttemptPingUponStartup() Option

AttemptPingUponStartup will ping the DB upon startup. If this fails, NewClient will return error

func PoolMaxConnLifetime

func PoolMaxConnLifetime(v time.Duration) Option

PoolMaxConnLifetime sets the max duration a connection should be kept alive in the pool

type Transactor

type Transactor interface {
	Commit() error
	Rollback() error

	Executor
}

Transactor can commit and rollback, on top of being able to execute queries.

Jump to

Keyboard shortcuts

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