Documentation
¶
Index ¶
- Variables
- type Executor
- func (m *Executor) EXPECT() *ExecutorExpecter
- func (m *Executor) Exec(ctx context.Context, sql string, arguments ...any) (pgconn.CommandTag, error)
- func (m *Executor) Query(ctx context.Context, sql string, arguments ...any) (pgx.Rows, error)
- func (m *Executor) QueryRow(ctx context.Context, sql string, arguments ...any) pgx.Row
- type ExecutorExecCall
- func (c *ExecutorExecCall) Once() *ExecutorExecCall
- func (c *ExecutorExecCall) Return(tag pgconn.CommandTag, err error) *ExecutorExecCall
- func (c *ExecutorExecCall) Run(run func(context.Context, string, ...any)) *ExecutorExecCall
- func (c *ExecutorExecCall) RunAndReturn(fn func(context.Context, string, ...any) (pgconn.CommandTag, error)) *ExecutorExecCall
- type ExecutorExpecter
- type ExecutorProvider
- type ExecutorProviderExpecter
- type ExecutorProviderGetExecutorCall
- func (c *ExecutorProviderGetExecutorCall) Once() *ExecutorProviderGetExecutorCall
- func (c *ExecutorProviderGetExecutorCall) Return(exec pgxtx.Executor) *ExecutorProviderGetExecutorCall
- func (c *ExecutorProviderGetExecutorCall) Run(run func(context.Context)) *ExecutorProviderGetExecutorCall
- func (c *ExecutorProviderGetExecutorCall) RunAndReturn(fn func(context.Context) pgxtx.Executor) *ExecutorProviderGetExecutorCall
- type ExecutorQueryCall
- func (c *ExecutorQueryCall) Once() *ExecutorQueryCall
- func (c *ExecutorQueryCall) Return(rows pgx.Rows, err error) *ExecutorQueryCall
- func (c *ExecutorQueryCall) Run(run func(context.Context, string, ...any)) *ExecutorQueryCall
- func (c *ExecutorQueryCall) RunAndReturn(fn func(context.Context, string, ...any) (pgx.Rows, error)) *ExecutorQueryCall
- type ExecutorQueryRowCall
- func (c *ExecutorQueryRowCall) Once() *ExecutorQueryRowCall
- func (c *ExecutorQueryRowCall) Return(row pgx.Row) *ExecutorQueryRowCall
- func (c *ExecutorQueryRowCall) Run(run func(context.Context, string, ...any)) *ExecutorQueryRowCall
- func (c *ExecutorQueryRowCall) RunAndReturn(fn func(context.Context, string, ...any) pgx.Row) *ExecutorQueryRowCall
- type Manager
- type ManagerExecInTxCall
- func (c *ManagerExecInTxCall) Once() *ManagerExecInTxCall
- func (c *ManagerExecInTxCall) Return(err error) *ManagerExecInTxCall
- func (c *ManagerExecInTxCall) Run(run func(context.Context, func(context.Context, pgxtx.Executor) error)) *ManagerExecInTxCall
- func (c *ManagerExecInTxCall) RunAndReturn(fn func(context.Context, func(context.Context, pgxtx.Executor) error) error) *ManagerExecInTxCall
- type ManagerExpecter
- type ManagerGetExecutorCall
- func (c *ManagerGetExecutorCall) Once() *ManagerGetExecutorCall
- func (c *ManagerGetExecutorCall) Return(exec pgxtx.Executor) *ManagerGetExecutorCall
- func (c *ManagerGetExecutorCall) Run(run func(context.Context)) *ManagerGetExecutorCall
- func (c *ManagerGetExecutorCall) RunAndReturn(fn func(context.Context) pgxtx.Executor) *ManagerGetExecutorCall
- type ManagerWithTxCall
- func (c *ManagerWithTxCall) Once() *ManagerWithTxCall
- func (c *ManagerWithTxCall) Return(err error) *ManagerWithTxCall
- func (c *ManagerWithTxCall) Run(run func(context.Context, pgxtx.TxFunc)) *ManagerWithTxCall
- func (c *ManagerWithTxCall) RunAndReturn(fn func(context.Context, pgxtx.TxFunc) error) *ManagerWithTxCall
- type Rows
- func (r *Rows) AddRow(values ...any) *Rows
- func (r *Rows) Close()
- func (r *Rows) CommandTag() pgconn.CommandTag
- func (r *Rows) Conn() *pgx.Conn
- func (r *Rows) Err() error
- func (r *Rows) FieldDescriptions() []pgconn.FieldDescription
- func (r *Rows) Next() bool
- func (r *Rows) RawValues() [][]byte
- func (r *Rows) Scan(dest ...any) error
- func (r *Rows) Values() ([]any, error)
- func (r *Rows) WithCommandTag(tag pgconn.CommandTag) *Rows
- func (r *Rows) WithError(err error) *Rows
- func (r *Rows) WithFieldDescriptions(fields []pgconn.FieldDescription) *Rows
- type TxRunner
- type TxRunnerExecInTxCall
- func (c *TxRunnerExecInTxCall) Once() *TxRunnerExecInTxCall
- func (c *TxRunnerExecInTxCall) Return(err error) *TxRunnerExecInTxCall
- func (c *TxRunnerExecInTxCall) Run(run func(context.Context, func(context.Context, pgxtx.Executor) error)) *TxRunnerExecInTxCall
- func (c *TxRunnerExecInTxCall) RunAndReturn(fn func(context.Context, func(context.Context, pgxtx.Executor) error) error) *TxRunnerExecInTxCall
- type TxRunnerExpecter
- type TxRunnerWithTxCall
- func (c *TxRunnerWithTxCall) Once() *TxRunnerWithTxCall
- func (c *TxRunnerWithTxCall) Return(err error) *TxRunnerWithTxCall
- func (c *TxRunnerWithTxCall) Run(run func(context.Context, pgxtx.TxFunc)) *TxRunnerWithTxCall
- func (c *TxRunnerWithTxCall) RunAndReturn(fn func(context.Context, pgxtx.TxFunc) error) *TxRunnerWithTxCall
Constants ¶
This section is empty.
Variables ¶
View Source
var Anything anythingMatcher
Anything matches any argument in EXPECT() calls.
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func NewExecutor ¶
func NewExecutor(t testingT) *Executor
func (*Executor) EXPECT ¶
func (m *Executor) EXPECT() *ExecutorExpecter
type ExecutorExecCall ¶
type ExecutorExecCall struct {
// contains filtered or unexported fields
}
func (*ExecutorExecCall) Once ¶
func (c *ExecutorExecCall) Once() *ExecutorExecCall
func (*ExecutorExecCall) Return ¶
func (c *ExecutorExecCall) Return(tag pgconn.CommandTag, err error) *ExecutorExecCall
func (*ExecutorExecCall) Run ¶
func (c *ExecutorExecCall) Run(run func(context.Context, string, ...any)) *ExecutorExecCall
func (*ExecutorExecCall) RunAndReturn ¶
func (c *ExecutorExecCall) RunAndReturn(fn func(context.Context, string, ...any) (pgconn.CommandTag, error)) *ExecutorExecCall
type ExecutorExpecter ¶
type ExecutorExpecter struct {
// contains filtered or unexported fields
}
func (*ExecutorExpecter) Exec ¶
func (e *ExecutorExpecter) Exec(ctx, sql any, arguments ...any) *ExecutorExecCall
func (*ExecutorExpecter) Query ¶
func (e *ExecutorExpecter) Query(ctx, sql any, arguments ...any) *ExecutorQueryCall
func (*ExecutorExpecter) QueryRow ¶
func (e *ExecutorExpecter) QueryRow(ctx, sql any, arguments ...any) *ExecutorQueryRowCall
type ExecutorProvider ¶
type ExecutorProvider struct {
// contains filtered or unexported fields
}
func NewExecutorProvider ¶
func NewExecutorProvider(t testingT) *ExecutorProvider
func (*ExecutorProvider) EXPECT ¶
func (m *ExecutorProvider) EXPECT() *ExecutorProviderExpecter
func (*ExecutorProvider) GetExecutor ¶
func (m *ExecutorProvider) GetExecutor(ctx context.Context) pgxtx.Executor
type ExecutorProviderExpecter ¶
type ExecutorProviderExpecter struct {
// contains filtered or unexported fields
}
func (*ExecutorProviderExpecter) GetExecutor ¶
func (e *ExecutorProviderExpecter) GetExecutor(ctx any) *ExecutorProviderGetExecutorCall
type ExecutorProviderGetExecutorCall ¶
type ExecutorProviderGetExecutorCall struct {
// contains filtered or unexported fields
}
func (*ExecutorProviderGetExecutorCall) Once ¶
func (c *ExecutorProviderGetExecutorCall) Once() *ExecutorProviderGetExecutorCall
func (*ExecutorProviderGetExecutorCall) Return ¶
func (c *ExecutorProviderGetExecutorCall) Return(exec pgxtx.Executor) *ExecutorProviderGetExecutorCall
func (*ExecutorProviderGetExecutorCall) Run ¶
func (c *ExecutorProviderGetExecutorCall) Run(run func(context.Context)) *ExecutorProviderGetExecutorCall
func (*ExecutorProviderGetExecutorCall) RunAndReturn ¶
func (c *ExecutorProviderGetExecutorCall) RunAndReturn(fn func(context.Context) pgxtx.Executor) *ExecutorProviderGetExecutorCall
type ExecutorQueryCall ¶
type ExecutorQueryCall struct {
// contains filtered or unexported fields
}
func (*ExecutorQueryCall) Once ¶
func (c *ExecutorQueryCall) Once() *ExecutorQueryCall
func (*ExecutorQueryCall) Return ¶
func (c *ExecutorQueryCall) Return(rows pgx.Rows, err error) *ExecutorQueryCall
func (*ExecutorQueryCall) Run ¶
func (c *ExecutorQueryCall) Run(run func(context.Context, string, ...any)) *ExecutorQueryCall
func (*ExecutorQueryCall) RunAndReturn ¶
func (c *ExecutorQueryCall) RunAndReturn(fn func(context.Context, string, ...any) (pgx.Rows, error)) *ExecutorQueryCall
type ExecutorQueryRowCall ¶
type ExecutorQueryRowCall struct {
// contains filtered or unexported fields
}
func (*ExecutorQueryRowCall) Once ¶
func (c *ExecutorQueryRowCall) Once() *ExecutorQueryRowCall
func (*ExecutorQueryRowCall) Return ¶
func (c *ExecutorQueryRowCall) Return(row pgx.Row) *ExecutorQueryRowCall
func (*ExecutorQueryRowCall) Run ¶
func (c *ExecutorQueryRowCall) Run(run func(context.Context, string, ...any)) *ExecutorQueryRowCall
func (*ExecutorQueryRowCall) RunAndReturn ¶
func (c *ExecutorQueryRowCall) RunAndReturn(fn func(context.Context, string, ...any) pgx.Row) *ExecutorQueryRowCall
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
func NewManager ¶
func NewManager(t testingT) *Manager
func (*Manager) EXPECT ¶
func (m *Manager) EXPECT() *ManagerExpecter
type ManagerExecInTxCall ¶
type ManagerExecInTxCall struct {
// contains filtered or unexported fields
}
func (*ManagerExecInTxCall) Once ¶
func (c *ManagerExecInTxCall) Once() *ManagerExecInTxCall
func (*ManagerExecInTxCall) Return ¶
func (c *ManagerExecInTxCall) Return(err error) *ManagerExecInTxCall
func (*ManagerExecInTxCall) Run ¶
func (c *ManagerExecInTxCall) Run(run func(context.Context, func(context.Context, pgxtx.Executor) error)) *ManagerExecInTxCall
func (*ManagerExecInTxCall) RunAndReturn ¶
func (c *ManagerExecInTxCall) RunAndReturn(fn func(context.Context, func(context.Context, pgxtx.Executor) error) error) *ManagerExecInTxCall
type ManagerExpecter ¶
type ManagerExpecter struct {
// contains filtered or unexported fields
}
func (*ManagerExpecter) ExecInTx ¶
func (e *ManagerExpecter) ExecInTx(ctx, fn any) *ManagerExecInTxCall
func (*ManagerExpecter) GetExecutor ¶
func (e *ManagerExpecter) GetExecutor(ctx any) *ManagerGetExecutorCall
func (*ManagerExpecter) WithTx ¶
func (e *ManagerExpecter) WithTx(ctx, fn any) *ManagerWithTxCall
type ManagerGetExecutorCall ¶
type ManagerGetExecutorCall struct {
// contains filtered or unexported fields
}
func (*ManagerGetExecutorCall) Once ¶
func (c *ManagerGetExecutorCall) Once() *ManagerGetExecutorCall
func (*ManagerGetExecutorCall) Return ¶
func (c *ManagerGetExecutorCall) Return(exec pgxtx.Executor) *ManagerGetExecutorCall
func (*ManagerGetExecutorCall) Run ¶
func (c *ManagerGetExecutorCall) Run(run func(context.Context)) *ManagerGetExecutorCall
func (*ManagerGetExecutorCall) RunAndReturn ¶
func (c *ManagerGetExecutorCall) RunAndReturn(fn func(context.Context) pgxtx.Executor) *ManagerGetExecutorCall
type ManagerWithTxCall ¶
type ManagerWithTxCall struct {
// contains filtered or unexported fields
}
func (*ManagerWithTxCall) Once ¶
func (c *ManagerWithTxCall) Once() *ManagerWithTxCall
func (*ManagerWithTxCall) Return ¶
func (c *ManagerWithTxCall) Return(err error) *ManagerWithTxCall
func (*ManagerWithTxCall) Run ¶
func (c *ManagerWithTxCall) Run(run func(context.Context, pgxtx.TxFunc)) *ManagerWithTxCall
func (*ManagerWithTxCall) RunAndReturn ¶
func (c *ManagerWithTxCall) RunAndReturn(fn func(context.Context, pgxtx.TxFunc) error) *ManagerWithTxCall
type Rows ¶ added in v0.3.0
type Rows struct {
// contains filtered or unexported fields
}
func (*Rows) CommandTag ¶ added in v0.3.0
func (r *Rows) CommandTag() pgconn.CommandTag
func (*Rows) FieldDescriptions ¶ added in v0.3.0
func (r *Rows) FieldDescriptions() []pgconn.FieldDescription
func (*Rows) WithCommandTag ¶ added in v0.3.0
func (r *Rows) WithCommandTag(tag pgconn.CommandTag) *Rows
func (*Rows) WithFieldDescriptions ¶ added in v0.3.0
func (r *Rows) WithFieldDescriptions(fields []pgconn.FieldDescription) *Rows
type TxRunner ¶
type TxRunner struct {
// contains filtered or unexported fields
}
func NewTxRunner ¶
func NewTxRunner(t testingT) *TxRunner
func (*TxRunner) EXPECT ¶
func (m *TxRunner) EXPECT() *TxRunnerExpecter
type TxRunnerExecInTxCall ¶
type TxRunnerExecInTxCall struct {
// contains filtered or unexported fields
}
func (*TxRunnerExecInTxCall) Once ¶
func (c *TxRunnerExecInTxCall) Once() *TxRunnerExecInTxCall
func (*TxRunnerExecInTxCall) Return ¶
func (c *TxRunnerExecInTxCall) Return(err error) *TxRunnerExecInTxCall
func (*TxRunnerExecInTxCall) Run ¶
func (c *TxRunnerExecInTxCall) Run(run func(context.Context, func(context.Context, pgxtx.Executor) error)) *TxRunnerExecInTxCall
func (*TxRunnerExecInTxCall) RunAndReturn ¶
func (c *TxRunnerExecInTxCall) RunAndReturn(fn func(context.Context, func(context.Context, pgxtx.Executor) error) error) *TxRunnerExecInTxCall
type TxRunnerExpecter ¶
type TxRunnerExpecter struct {
// contains filtered or unexported fields
}
func (*TxRunnerExpecter) ExecInTx ¶
func (e *TxRunnerExpecter) ExecInTx(ctx, fn any) *TxRunnerExecInTxCall
func (*TxRunnerExpecter) WithTx ¶
func (e *TxRunnerExpecter) WithTx(ctx, fn any) *TxRunnerWithTxCall
type TxRunnerWithTxCall ¶
type TxRunnerWithTxCall struct {
// contains filtered or unexported fields
}
func (*TxRunnerWithTxCall) Once ¶
func (c *TxRunnerWithTxCall) Once() *TxRunnerWithTxCall
func (*TxRunnerWithTxCall) Return ¶
func (c *TxRunnerWithTxCall) Return(err error) *TxRunnerWithTxCall
func (*TxRunnerWithTxCall) Run ¶
func (c *TxRunnerWithTxCall) Run(run func(context.Context, pgxtx.TxFunc)) *TxRunnerWithTxCall
func (*TxRunnerWithTxCall) RunAndReturn ¶
func (c *TxRunnerWithTxCall) RunAndReturn(fn func(context.Context, pgxtx.TxFunc) error) *TxRunnerWithTxCall
Click to show internal directories.
Click to hide internal directories.