Documentation
¶
Index ¶
- type MockTx
- func (_m *MockTx) Begin(ctx context.Context) (pgx.Tx, error)
- func (_m *MockTx) Commit(ctx context.Context) error
- func (_m *MockTx) Conn() *pgx.Conn
- func (_m *MockTx) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error)
- func (_m *MockTx) EXPECT() *MockTx_Expecter
- func (_m *MockTx) Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error)
- func (_m *MockTx) LargeObjects() pgx.LargeObjects
- func (_m *MockTx) Prepare(ctx context.Context, name string, sql string) (*pgconn.StatementDescription, error)
- func (_m *MockTx) Query(ctx context.Context, sql string, args ...any) (pgx.Rows, error)
- func (_m *MockTx) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row
- func (_m *MockTx) Rollback(ctx context.Context) error
- func (_m *MockTx) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults
- type MockTx_Begin_Call
- type MockTx_Commit_Call
- type MockTx_Conn_Call
- type MockTx_CopyFrom_Call
- type MockTx_Exec_Call
- func (_c *MockTx_Exec_Call) Return(commandTag pgconn.CommandTag, err error) *MockTx_Exec_Call
- func (_c *MockTx_Exec_Call) Run(run func(ctx context.Context, sql string, arguments ...any)) *MockTx_Exec_Call
- func (_c *MockTx_Exec_Call) RunAndReturn(run func(context.Context, string, ...any) (pgconn.CommandTag, error)) *MockTx_Exec_Call
- type MockTx_Expecter
- func (_e *MockTx_Expecter) Begin(ctx interface{}) *MockTx_Begin_Call
- func (_e *MockTx_Expecter) Commit(ctx interface{}) *MockTx_Commit_Call
- func (_e *MockTx_Expecter) Conn() *MockTx_Conn_Call
- func (_e *MockTx_Expecter) CopyFrom(ctx interface{}, tableName interface{}, columnNames interface{}, ...) *MockTx_CopyFrom_Call
- func (_e *MockTx_Expecter) Exec(ctx interface{}, sql interface{}, arguments ...interface{}) *MockTx_Exec_Call
- func (_e *MockTx_Expecter) LargeObjects() *MockTx_LargeObjects_Call
- func (_e *MockTx_Expecter) Prepare(ctx interface{}, name interface{}, sql interface{}) *MockTx_Prepare_Call
- func (_e *MockTx_Expecter) Query(ctx interface{}, sql interface{}, args ...interface{}) *MockTx_Query_Call
- func (_e *MockTx_Expecter) QueryRow(ctx interface{}, sql interface{}, args ...interface{}) *MockTx_QueryRow_Call
- func (_e *MockTx_Expecter) Rollback(ctx interface{}) *MockTx_Rollback_Call
- func (_e *MockTx_Expecter) SendBatch(ctx interface{}, b interface{}) *MockTx_SendBatch_Call
- type MockTx_LargeObjects_Call
- type MockTx_Prepare_Call
- type MockTx_QueryRow_Call
- func (_c *MockTx_QueryRow_Call) Return(_a0 pgx.Row) *MockTx_QueryRow_Call
- func (_c *MockTx_QueryRow_Call) Run(run func(ctx context.Context, sql string, args ...any)) *MockTx_QueryRow_Call
- func (_c *MockTx_QueryRow_Call) RunAndReturn(run func(context.Context, string, ...any) pgx.Row) *MockTx_QueryRow_Call
- type MockTx_Query_Call
- func (_c *MockTx_Query_Call) Return(_a0 pgx.Rows, _a1 error) *MockTx_Query_Call
- func (_c *MockTx_Query_Call) Run(run func(ctx context.Context, sql string, args ...any)) *MockTx_Query_Call
- func (_c *MockTx_Query_Call) RunAndReturn(run func(context.Context, string, ...any) (pgx.Rows, error)) *MockTx_Query_Call
- type MockTx_Rollback_Call
- type MockTx_SendBatch_Call
- func (_c *MockTx_SendBatch_Call) Return(_a0 pgx.BatchResults) *MockTx_SendBatch_Call
- func (_c *MockTx_SendBatch_Call) Run(run func(ctx context.Context, b *pgx.Batch)) *MockTx_SendBatch_Call
- func (_c *MockTx_SendBatch_Call) RunAndReturn(run func(context.Context, *pgx.Batch) pgx.BatchResults) *MockTx_SendBatch_Call
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockTx ¶
MockTx is an autogenerated mock type for the Tx type
func NewMockTx ¶
NewMockTx creates a new instance of MockTx. 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 (*MockTx) CopyFrom ¶
func (_m *MockTx) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource) (int64, error)
CopyFrom provides a mock function with given fields: ctx, tableName, columnNames, rowSrc
func (*MockTx) EXPECT ¶
func (_m *MockTx) EXPECT() *MockTx_Expecter
func (*MockTx) Exec ¶
func (_m *MockTx) Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error)
Exec provides a mock function with given fields: ctx, sql, arguments
func (*MockTx) LargeObjects ¶
func (_m *MockTx) LargeObjects() pgx.LargeObjects
LargeObjects provides a mock function with given fields:
func (*MockTx) Prepare ¶
func (_m *MockTx) Prepare(ctx context.Context, name string, sql string) (*pgconn.StatementDescription, error)
Prepare provides a mock function with given fields: ctx, name, sql
type MockTx_Begin_Call ¶
MockTx_Begin_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Begin'
func (*MockTx_Begin_Call) Return ¶
func (_c *MockTx_Begin_Call) Return(_a0 pgx.Tx, _a1 error) *MockTx_Begin_Call
func (*MockTx_Begin_Call) Run ¶
func (_c *MockTx_Begin_Call) Run(run func(ctx context.Context)) *MockTx_Begin_Call
func (*MockTx_Begin_Call) RunAndReturn ¶
func (_c *MockTx_Begin_Call) RunAndReturn(run func(context.Context) (pgx.Tx, error)) *MockTx_Begin_Call
type MockTx_Commit_Call ¶
MockTx_Commit_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Commit'
func (*MockTx_Commit_Call) Return ¶
func (_c *MockTx_Commit_Call) Return(_a0 error) *MockTx_Commit_Call
func (*MockTx_Commit_Call) Run ¶
func (_c *MockTx_Commit_Call) Run(run func(ctx context.Context)) *MockTx_Commit_Call
func (*MockTx_Commit_Call) RunAndReturn ¶
func (_c *MockTx_Commit_Call) RunAndReturn(run func(context.Context) error) *MockTx_Commit_Call
type MockTx_Conn_Call ¶
MockTx_Conn_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Conn'
func (*MockTx_Conn_Call) Return ¶
func (_c *MockTx_Conn_Call) Return(_a0 *pgx.Conn) *MockTx_Conn_Call
func (*MockTx_Conn_Call) Run ¶
func (_c *MockTx_Conn_Call) Run(run func()) *MockTx_Conn_Call
func (*MockTx_Conn_Call) RunAndReturn ¶
func (_c *MockTx_Conn_Call) RunAndReturn(run func() *pgx.Conn) *MockTx_Conn_Call
type MockTx_CopyFrom_Call ¶
MockTx_CopyFrom_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CopyFrom'
func (*MockTx_CopyFrom_Call) Return ¶
func (_c *MockTx_CopyFrom_Call) Return(_a0 int64, _a1 error) *MockTx_CopyFrom_Call
func (*MockTx_CopyFrom_Call) Run ¶
func (_c *MockTx_CopyFrom_Call) Run(run func(ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource)) *MockTx_CopyFrom_Call
func (*MockTx_CopyFrom_Call) RunAndReturn ¶
func (_c *MockTx_CopyFrom_Call) RunAndReturn(run func(context.Context, pgx.Identifier, []string, pgx.CopyFromSource) (int64, error)) *MockTx_CopyFrom_Call
type MockTx_Exec_Call ¶
MockTx_Exec_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Exec'
func (*MockTx_Exec_Call) Return ¶
func (_c *MockTx_Exec_Call) Return(commandTag pgconn.CommandTag, err error) *MockTx_Exec_Call
func (*MockTx_Exec_Call) Run ¶
func (_c *MockTx_Exec_Call) Run(run func(ctx context.Context, sql string, arguments ...any)) *MockTx_Exec_Call
func (*MockTx_Exec_Call) RunAndReturn ¶
func (_c *MockTx_Exec_Call) RunAndReturn(run func(context.Context, string, ...any) (pgconn.CommandTag, error)) *MockTx_Exec_Call
type MockTx_Expecter ¶
type MockTx_Expecter struct {
// contains filtered or unexported fields
}
func (*MockTx_Expecter) Begin ¶
func (_e *MockTx_Expecter) Begin(ctx interface{}) *MockTx_Begin_Call
Begin is a helper method to define mock.On call
- ctx context.Context
func (*MockTx_Expecter) Commit ¶
func (_e *MockTx_Expecter) Commit(ctx interface{}) *MockTx_Commit_Call
Commit is a helper method to define mock.On call
- ctx context.Context
func (*MockTx_Expecter) Conn ¶
func (_e *MockTx_Expecter) Conn() *MockTx_Conn_Call
Conn is a helper method to define mock.On call
func (*MockTx_Expecter) CopyFrom ¶
func (_e *MockTx_Expecter) CopyFrom(ctx interface{}, tableName interface{}, columnNames interface{}, rowSrc interface{}) *MockTx_CopyFrom_Call
CopyFrom is a helper method to define mock.On call
- ctx context.Context
- tableName pgx.Identifier
- columnNames []string
- rowSrc pgx.CopyFromSource
func (*MockTx_Expecter) Exec ¶
func (_e *MockTx_Expecter) Exec(ctx interface{}, sql interface{}, arguments ...interface{}) *MockTx_Exec_Call
Exec is a helper method to define mock.On call
- ctx context.Context
- sql string
- arguments ...any
func (*MockTx_Expecter) LargeObjects ¶
func (_e *MockTx_Expecter) LargeObjects() *MockTx_LargeObjects_Call
LargeObjects is a helper method to define mock.On call
func (*MockTx_Expecter) Prepare ¶
func (_e *MockTx_Expecter) Prepare(ctx interface{}, name interface{}, sql interface{}) *MockTx_Prepare_Call
Prepare is a helper method to define mock.On call
- ctx context.Context
- name string
- sql string
func (*MockTx_Expecter) Query ¶
func (_e *MockTx_Expecter) Query(ctx interface{}, sql interface{}, args ...interface{}) *MockTx_Query_Call
Query is a helper method to define mock.On call
- ctx context.Context
- sql string
- args ...any
func (*MockTx_Expecter) QueryRow ¶
func (_e *MockTx_Expecter) QueryRow(ctx interface{}, sql interface{}, args ...interface{}) *MockTx_QueryRow_Call
QueryRow is a helper method to define mock.On call
- ctx context.Context
- sql string
- args ...any
func (*MockTx_Expecter) Rollback ¶
func (_e *MockTx_Expecter) Rollback(ctx interface{}) *MockTx_Rollback_Call
Rollback is a helper method to define mock.On call
- ctx context.Context
func (*MockTx_Expecter) SendBatch ¶
func (_e *MockTx_Expecter) SendBatch(ctx interface{}, b interface{}) *MockTx_SendBatch_Call
SendBatch is a helper method to define mock.On call
- ctx context.Context
- b *pgx.Batch
type MockTx_LargeObjects_Call ¶
MockTx_LargeObjects_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LargeObjects'
func (*MockTx_LargeObjects_Call) Return ¶
func (_c *MockTx_LargeObjects_Call) Return(_a0 pgx.LargeObjects) *MockTx_LargeObjects_Call
func (*MockTx_LargeObjects_Call) Run ¶
func (_c *MockTx_LargeObjects_Call) Run(run func()) *MockTx_LargeObjects_Call
func (*MockTx_LargeObjects_Call) RunAndReturn ¶
func (_c *MockTx_LargeObjects_Call) RunAndReturn(run func() pgx.LargeObjects) *MockTx_LargeObjects_Call
type MockTx_Prepare_Call ¶
MockTx_Prepare_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Prepare'
func (*MockTx_Prepare_Call) Return ¶
func (_c *MockTx_Prepare_Call) Return(_a0 *pgconn.StatementDescription, _a1 error) *MockTx_Prepare_Call
func (*MockTx_Prepare_Call) Run ¶
func (_c *MockTx_Prepare_Call) Run(run func(ctx context.Context, name string, sql string)) *MockTx_Prepare_Call
func (*MockTx_Prepare_Call) RunAndReturn ¶
func (_c *MockTx_Prepare_Call) RunAndReturn(run func(context.Context, string, string) (*pgconn.StatementDescription, error)) *MockTx_Prepare_Call
type MockTx_QueryRow_Call ¶
MockTx_QueryRow_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'QueryRow'
func (*MockTx_QueryRow_Call) Return ¶
func (_c *MockTx_QueryRow_Call) Return(_a0 pgx.Row) *MockTx_QueryRow_Call
func (*MockTx_QueryRow_Call) Run ¶
func (_c *MockTx_QueryRow_Call) Run(run func(ctx context.Context, sql string, args ...any)) *MockTx_QueryRow_Call
func (*MockTx_QueryRow_Call) RunAndReturn ¶
func (_c *MockTx_QueryRow_Call) RunAndReturn(run func(context.Context, string, ...any) pgx.Row) *MockTx_QueryRow_Call
type MockTx_Query_Call ¶
MockTx_Query_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Query'
func (*MockTx_Query_Call) Return ¶
func (_c *MockTx_Query_Call) Return(_a0 pgx.Rows, _a1 error) *MockTx_Query_Call
func (*MockTx_Query_Call) Run ¶
func (_c *MockTx_Query_Call) Run(run func(ctx context.Context, sql string, args ...any)) *MockTx_Query_Call
func (*MockTx_Query_Call) RunAndReturn ¶
func (_c *MockTx_Query_Call) RunAndReturn(run func(context.Context, string, ...any) (pgx.Rows, error)) *MockTx_Query_Call
type MockTx_Rollback_Call ¶
MockTx_Rollback_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Rollback'
func (*MockTx_Rollback_Call) Return ¶
func (_c *MockTx_Rollback_Call) Return(_a0 error) *MockTx_Rollback_Call
func (*MockTx_Rollback_Call) Run ¶
func (_c *MockTx_Rollback_Call) Run(run func(ctx context.Context)) *MockTx_Rollback_Call
func (*MockTx_Rollback_Call) RunAndReturn ¶
func (_c *MockTx_Rollback_Call) RunAndReturn(run func(context.Context) error) *MockTx_Rollback_Call
type MockTx_SendBatch_Call ¶
MockTx_SendBatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SendBatch'
func (*MockTx_SendBatch_Call) Return ¶
func (_c *MockTx_SendBatch_Call) Return(_a0 pgx.BatchResults) *MockTx_SendBatch_Call
func (*MockTx_SendBatch_Call) Run ¶
func (_c *MockTx_SendBatch_Call) Run(run func(ctx context.Context, b *pgx.Batch)) *MockTx_SendBatch_Call
func (*MockTx_SendBatch_Call) RunAndReturn ¶
func (_c *MockTx_SendBatch_Call) RunAndReturn(run func(context.Context, *pgx.Batch) pgx.BatchResults) *MockTx_SendBatch_Call