Documentation ¶
Index ¶
- type DB
- type Instance
- func (ins *Instance) Begin(ctx context.Context) (pgx.Tx, error)
- func (ins *Instance) BeginTx(ctx context.Context, opts pgx.TxOptions) (pgx.Tx, error)
- func (ins *Instance) Exec(ctx context.Context, query string, args ...interface{}) (pgconn.CommandTag, error)
- func (ins *Instance) Query(ctx context.Context, query string, args ...interface{}) (pgx.Rows, error)
- func (ins *Instance) QueryRow(ctx context.Context, query string, args ...interface{}) pgx.Row
- func (ins *Instance) Transactional(ctx context.Context, fn func(ctx context.Context) error) (out error)
- type Pool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB interface { Begin(ctx context.Context) (pgx.Tx, error) Query(ctx context.Context, query string, args ...interface{}) (pgx.Rows, error) QueryRow(ctx context.Context, query string, args ...interface{}) pgx.Row Exec(ctx context.Context, query string, args ...interface{}) (pgconn.CommandTag, error) }
type Instance ¶
type Instance struct {
// contains filtered or unexported fields
}
type Pool ¶
type Pool interface { BeginTx(ctx context.Context, opts pgx.TxOptions) (pgx.Tx, error) Begin(ctx context.Context) (pgx.Tx, error) Query(ctx context.Context, query string, args ...interface{}) (pgx.Rows, error) QueryRow(ctx context.Context, query string, args ...interface{}) pgx.Row Exec(ctx context.Context, query string, args ...interface{}) (pgconn.CommandTag, error) }
Click to show internal directories.
Click to hide internal directories.