Documentation
¶
Index ¶
- type PgxDriver
- func (d *PgxDriver) Begin(ctx context.Context) (driver.Tx, error)
- func (d *PgxDriver) BeginTx(ctx context.Context, opts driver.TxOptions) (driver.Tx, error)
- func (d *PgxDriver) Close()
- func (d *PgxDriver) Exec(ctx context.Context, sql string, args ...any) (int64, error)
- func (d *PgxDriver) Query(ctx context.Context, sql string, args ...any) (driver.Rows, error)
- func (d *PgxDriver) QueryRow(ctx context.Context, sql string, args ...any) driver.Row
- func (d *PgxDriver) SendBatch(ctx context.Context, items []driver.BatchItem) (driver.BatchResults, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PgxDriver ¶
type PgxDriver struct {
// contains filtered or unexported fields
}
PgxDriver implements driver.Driver using a pgxpool connection pool.
func (*PgxDriver) SendBatch ¶ added in v0.3.0
func (d *PgxDriver) SendBatch(ctx context.Context, items []driver.BatchItem) (driver.BatchResults, error)
SendBatch sends all queued queries in a single pipelined round-trip using the pgx batch protocol. Results must be read in order via the returned BatchResults before it is closed.
Click to show internal directories.
Click to hide internal directories.