Skip to content
# Type Alias: TypedQueryExecutor<RowType\>

TypedQueryExecutor<RowType&gt; = (sql, params) => Promise<QueryExecutionResult | RowType[]&gt;

Defined in: node_modules/.pnpm/@rawsql-ts+testkit-postgres@0.16.0/node_modules/@rawsql-ts/testkit-postgres/dist/types.d.ts:25

Typed variant of QueryExecutor that preserves the caller-provided row shape.

Type Parameters

RowType

RowType extends Row = Row

The concrete shape of rows returned by the executor.

Parameters

sql

string

SQL to execute.

params

readonly unknown[]

Parameters supplied to the SQL statement.

Returns

Promise<QueryExecutionResult | RowType[]&gt;

Resolved rows typed as RowType[], or { rows, rowCount }.

Released under the MIT License.