Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBConn ¶
type DBConn interface { Exec(ctx context.Context, sql string, arguments ...interface{}) (pgconn.CommandTag, error) Query(ctx context.Context, sql string, optionsAndArgs ...interface{}) (pgx.Rows, error) QueryRow(ctx context.Context, sql string, optionsAndArgs ...interface{}) pgx.Row }
DBConn Implemented by pgx.Conn and pgx.Tx.
type DBConnection ¶
type DBConnection struct { Conn DBConn // contains filtered or unexported fields }
func (*DBConnection) Cleanup ¶
func (d *DBConnection) Cleanup() error
func (*DBConnection) Close ¶
func (d *DBConnection) Close() error
func (*DBConnection) WithTransaction ¶
func (d *DBConnection) WithTransaction(f func(conn *DBConnection) error) error
type DatabaseRunner ¶ added in v0.3.0
type DatabaseRunner struct {
// contains filtered or unexported fields
}
func NewRunner ¶ added in v0.3.0
func NewRunner() *DatabaseRunner
func (*DatabaseRunner) Cleanup ¶ added in v0.3.0
func (r *DatabaseRunner) Cleanup(t *testing.T) func()
func (*DatabaseRunner) Connection ¶ added in v0.3.0
func (r *DatabaseRunner) Connection() *DBConnection
Click to show internal directories.
Click to hide internal directories.