Documentation ¶
Index ¶
- type StubExecer
- func (e StubExecer) BeginBatch() *pgx.Batch
- func (e StubExecer) Close() error
- func (e StubExecer) Commit(_ context.Context) error
- func (e StubExecer) Dialect() driver.Dialect
- func (e StubExecer) Exec(ctx context.Context, query string, args ...interface{}) (int64, error)
- func (e StubExecer) Insert(ctx context.Context, pk, query string, args ...interface{}) (int64, error)
- func (StubExecer) IsTx() bool
- func (e StubExecer) Logger() pgxapi.Logger
- func (e StubExecer) Ping(_ context.Context) error
- func (e StubExecer) Query(ctx context.Context, query string, args ...interface{}) (pgxapi.SqlRows, error)
- func (e StubExecer) QueryRow(ctx context.Context, query string, args ...interface{}) pgxapi.SqlRow
- func (e StubExecer) Rollback(_ context.Context) error
- func (e StubExecer) SingleConn(_ context.Context, fn func(ex pgxapi.Execer) error) error
- func (e StubExecer) Stats() pgxapi.DBStats
- func (e StubExecer) Transact(_ context.Context, txOptions *pgx.TxOptions, fn func(pgxapi.SqlTx) error) error
- func (e StubExecer) UserItem() interface{}
- func (e StubExecer) With(userItem interface{}) pgxapi.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 pgxapi.SqlRow Rows pgxapi.SqlRows Err error Lgr pgxapi.Logger Q quote.Quoter User interface{} }
StubExecer provides a non-functioning Execer for testing purposes.
func (StubExecer) BeginBatch ¶
func (e StubExecer) BeginBatch() *pgx.Batch
BeginBatch is not implemented
func (StubExecer) Close ¶
func (e StubExecer) Close() error
func (StubExecer) Dialect ¶
func (e StubExecer) Dialect() driver.Dialect
func (StubExecer) IsTx ¶
func (StubExecer) IsTx() bool
func (StubExecer) Logger ¶
func (e StubExecer) Logger() pgxapi.Logger
func (StubExecer) SingleConn ¶
func (StubExecer) Stats ¶
func (e StubExecer) Stats() pgxapi.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{}) pgxapi.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 ¶
type StubRows struct { I int Rows []StubRow Error error Fields []pgconn.FieldDescription ValueSlice []interface{} }
StubRow provides a non-functioning pgxapi.SqlRows for testing purposes.
func (*StubRows) FieldDescriptions ¶
func (r *StubRows) FieldDescriptions() []pgconn.FieldDescription
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.