Skip to content
# Class: PostgresTestkitClient<RowType\>

Defined in: node_modules/.pnpm/@rawsql-ts+testkit-postgres@0.16.0/node_modules/@rawsql-ts/testkit-postgres/dist/client/PostgresTestkitClient.d.ts:10

The driver-agnostic Postgres testkit client that rewrites SQL using fixtures and delegates to a QueryExecutor.

Type Parameters

RowType

RowType extends Row = Row

Constructors

Constructor

new PostgresTestkitClient<RowType&gt;(options, scopedRows?, context?): PostgresTestkitClient<RowType&gt;

Defined in: node_modules/.pnpm/@rawsql-ts+testkit-postgres@0.16.0/node_modules/@rawsql-ts/testkit-postgres/dist/client/PostgresTestkitClient.d.ts:17

Parameters

options

CreatePostgresTestkitClientOptions<RowType&gt;

scopedRows?

TableRowsFixture[]

context?

ExecutionContext<RowType&gt;

Returns

PostgresTestkitClient<RowType&gt;

Methods

query()

query(textOrConfig, values?): Promise<CountableResult<RowType&gt;>

Defined in: node_modules/.pnpm/@rawsql-ts+testkit-postgres@0.16.0/node_modules/@rawsql-ts/testkit-postgres/dist/client/PostgresTestkitClient.d.ts:18

Parameters

textOrConfig

string | PostgresQueryInput

values?

unknown[]

Returns

Promise<CountableResult<RowType&gt;>


withFixtures()

withFixtures(fixtures): PostgresTestkitClient<RowType&gt;

Defined in: node_modules/.pnpm/@rawsql-ts+testkit-postgres@0.16.0/node_modules/@rawsql-ts/testkit-postgres/dist/client/PostgresTestkitClient.d.ts:19

Parameters

fixtures

TableRowsFixture[]

Returns

PostgresTestkitClient<RowType&gt;


close()

close(): Promise<void&gt;

Defined in: node_modules/.pnpm/@rawsql-ts+testkit-postgres@0.16.0/node_modules/@rawsql-ts/testkit-postgres/dist/client/PostgresTestkitClient.d.ts:20

Returns

Promise<void&gt;

Released under the MIT License.