SqlRunner.query() method
Run a statement, on the open transaction if there is one.
Signature:
query<Row = unknown>(sql: string | SqlFragment, values?: readonly unknown[]): Promise<Row[]>;
Parameters
|
Parameter |
Type |
Description |
|---|---|---|
|
sql |
string | SqlFragment |
The statement, as text or as a fragment. |
|
values |
readonly unknown[] |
(Optional) Bound parameters, where the statement is text. |
Returns:
Promise<Row[]>
The result rows.
Remarks
The rows, not the driver's envelope: a raw read is asked for its rows, and every call site would otherwise reach through .rows to get them.
A fragment carries its own values, so it is passed on its own; text takes them as a second argument, the way the driver does.
Read this page as plain markdown — no HTML, no navigation. For pasting into an LLM, or for an agent to fetch.