Documentation ¶
Overview ¶
Package retrier provides a wrapper around pgxpool.Pool that retries the queries
Index ¶
- type Pool
- func (r *Pool) BeginTransaction(ctx context.Context) (pgx.Tx, error)
- func (r *Pool) Close()
- func (r *Pool) CopyFrom(ctx context.Context, tableName pgx.Identifier, columnNames []string, ...) (int64, error)
- func (r *Pool) Exec(ctx context.Context, sql string, args ...interface{}) (pgconn.CommandTag, error)
- func (r *Pool) Query(ctx context.Context, sql string, args ...interface{}) (pgx.Rows, error)
- func (r *Pool) QueryRowScan(ctx context.Context, sql string, queryParams, scanParams []interface{}) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Pool ¶
Pool is a pgxpoooooool that has a retrier.
func (*Pool) BeginTransaction ¶
BeginTransaction returns a transaction and an error. It'll retry till it works.
func (*Pool) CopyFrom ¶
func (r *Pool) CopyFrom( ctx context.Context, tableName pgx.Identifier, columnNames []string, rowSrc pgx.CopyFromSource, ) (int64, error)
CopyFrom executes a copy from. It is not recommended to retry a copy from.
func (*Pool) Exec ¶
func (r *Pool) Exec(ctx context.Context, sql string, args ...interface{}) (pgconn.CommandTag, error)
Exec executes a query.
Click to show internal directories.
Click to hide internal directories.