QueryRow acquires a connection and executes a query that is expected to return at most one row ([pgx.Row]). Errors are deferred until [pgx.Row]'s Scan method is called. If the query selects no rows, [pgx.Row]'s Scan will return [pgx.ErrNoRows]. Otherwise, [pgx.Row]'s Scan scans the first selected ro
(ctx context.Context, sql string, args ...any)
| 772 | // [pgx.QueryResultFormatsByOID] may be used as the first args to control exactly how the query is executed. This is rarely |
| 773 | // needed. See the documentation for those types for details. |
| 774 | func (p *Pool) QueryRow(ctx context.Context, sql string, args ...any) pgx.Row { |
| 775 | c, err := p.Acquire(ctx) |
| 776 | if err != nil { |
| 777 | return errRow{err: err} |
| 778 | } |
| 779 | |
| 780 | row := c.QueryRow(ctx, sql, args...) |
| 781 | return c.getPoolRow(row) |
| 782 | } |
| 783 | |
| 784 | func (p *Pool) SendBatch(ctx context.Context, b *pgx.Batch) pgx.BatchResults { |
| 785 | c, err := p.Acquire(ctx) |
nothing calls this directly
no test coverage detected