Documentation
¶
Index ¶
- type StubExecer
- func (e StubExecer) Close() error
- func (e StubExecer) Commit() error
- func (e StubExecer) Dialect() dialect.Dialect
- func (e StubExecer) ExecContext(ctx context.Context, query string, args ...interface{}) (int64, error)
- func (e StubExecer) InsertContext(ctx context.Context, pk, query string, args ...interface{}) (int64, error)
- func (StubExecer) IsTx() bool
- func (e StubExecer) Logger() sqlapi.Logger
- func (e StubExecer) PingContext(_ context.Context) error
- func (e StubExecer) PrepareContext(ctx context.Context, name, query string) (sqlapi.SqlStmt, error)
- func (e StubExecer) QueryContext(ctx context.Context, query string, args ...interface{}) (sqlapi.SqlRows, error)
- func (e StubExecer) QueryRowContext(ctx context.Context, query string, args ...interface{}) sqlapi.SqlRow
- func (e StubExecer) Rollback() error
- func (e StubExecer) SingleConn(_ context.Context, fn func(ex sqlapi.Execer) error) error
- func (e StubExecer) Stats() sqlapi.DBStats
- func (e StubExecer) Transact(_ context.Context, txOptions *sql.TxOptions, fn func(sqlapi.SqlTx) error) error
- func (e StubExecer) UserItem() interface{}
- func (e StubExecer) With(userItem interface{}) sqlapi.SqlDB
- type StubLogger
- type StubRow
- type StubRows
- type TestingLogger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StubExecer ¶
type StubExecer struct { N int64 Row sqlapi.SqlRow Rows sqlapi.SqlRows Err error Lgr sqlapi.Logger Di dialect.Dialect User interface{} }
StubExecer provides a non-functioning Execer for testing purposes.
func (StubExecer) Close ¶
func (e StubExecer) Close() error
func (StubExecer) Commit ¶
func (e StubExecer) Commit() error
func (StubExecer) Dialect ¶
func (e StubExecer) Dialect() dialect.Dialect
func (StubExecer) ExecContext ¶
func (StubExecer) InsertContext ¶
func (StubExecer) IsTx ¶
func (StubExecer) IsTx() bool
func (StubExecer) Logger ¶
func (e StubExecer) Logger() sqlapi.Logger
func (StubExecer) PingContext ¶
func (e StubExecer) PingContext(_ context.Context) error
func (StubExecer) PrepareContext ¶
func (StubExecer) QueryContext ¶
func (StubExecer) QueryRowContext ¶
func (StubExecer) Rollback ¶
func (e StubExecer) Rollback() error
func (StubExecer) SingleConn ¶
func (StubExecer) Stats ¶
func (e StubExecer) Stats() sqlapi.DBStats
func (StubExecer) UserItem ¶ added in v0.53.0
func (e StubExecer) UserItem() interface{}
func (StubExecer) With ¶ added in v0.53.0
func (e StubExecer) With(userItem interface{}) sqlapi.SqlDB
type StubLogger ¶
type StubLogger struct { Testing TestingLogger Logged []string }
StubLogger provides a testingadapter.TestingLogger that captures logged information and optionally plays it through a child logger too.
type StubRow ¶
type StubRow []interface{}
StubRow provides a non-functioning pgxapi.SqlRow for testing purposes.
type StubRows ¶
StubRow provides a non-functioning pgxapi.SqlRows for testing purposes.
func (*StubRows) ColumnTypes ¶
func (r *StubRows) ColumnTypes() ([]*sql.ColumnType, error)
type TestingLogger ¶ added in v0.54.0
type TestingLogger interface {
Log(args ...interface{})
}
TestingLogger interface defines the subset of testing.TB methods used by this adapter.
Click to show internal directories.
Click to hide internal directories.