MCPcopy
hub / github.com/jackc/pgx / QueryRow

Method QueryRow

conn.go:931–934  ·  view source on GitHub ↗

QueryRow is a convenience wrapper over Query. Any error that occurs while querying is deferred until calling Scan on the returned Row. That Row will error with ErrNoRows if no rows are returned.

(ctx context.Context, sql string, args ...any)

Source from the content-addressed store, hash-verified

929// querying is deferred until calling Scan on the returned Row. That Row will
930// error with ErrNoRows if no rows are returned.
931func (c *Conn) QueryRow(ctx context.Context, sql string, args ...any) Row {
932 rows, _ := c.Query(ctx, sql, args...)
933 return (*connRow)(rows.(*baseRows))
934}
935
936// SendBatch sends all queued queries to the server at once. All queries are run in an implicit transaction unless
937// explicit transaction control statements are executed. The returned [BatchResults] must be closed before the connection

Callers 5

LoadTypeMethod · 0.95
getArrayElementOIDMethod · 0.95
getRangeElementOIDMethod · 0.95
getCompositeFieldsMethod · 0.95

Calls 1

QueryMethod · 0.95

Tested by

no test coverage detected