import type { Row, RowList, Sql } from 'postgres'; import { type Cache } from '../cache/core/index.js'; import type { WithCacheConfig } from '../cache/core/types.js'; import { entityKind } from '../entity.js'; import type { Logger } from '../logger.js'; import type { PgDialect } from '../pg-core/dialect.js'; import { PgTransaction } from '../pg-core/index.js'; import type { SelectedFieldsOrdered } from '../pg-core/query-builders/select.types.js'; import type { PgQueryResultHKT, PgTransactionConfig, PreparedQueryConfig } from '../pg-core/session.js'; import { PgPreparedQuery, PgSession } from '../pg-core/session.js'; import type { RelationalSchemaConfig, TablesRelationalConfig } from '../relations.js'; import { type Query } from '../sql/sql.js'; import { type Assume } from '../utils.js'; export declare class PostgresJsPreparedQuery extends PgPreparedQuery { private client; private queryString; private params; private logger; private fields; private _isResponseInArrayMode; private customResultMapper?; static readonly [entityKind]: string; constructor(client: Sql, queryString: string, params: unknown[], logger: Logger, cache: Cache, queryMetadata: { type: 'select' | 'update' | 'delete' | 'insert'; tables: string[]; } | undefined, cacheConfig: WithCacheConfig | undefined, fields: SelectedFieldsOrdered | undefined, _isResponseInArrayMode: boolean, customResultMapper?: ((rows: unknown[][]) => T["execute"]) | undefined); execute(placeholderValues?: Record | undefined): Promise; all(placeholderValues?: Record | undefined): Promise; /** @internal */ isResponseInArrayMode(): boolean; } export interface PostgresJsSessionOptions { logger?: Logger | undefined; cache?: Cache | undefined; } export declare class PostgresJsSession, TSchema extends TablesRelationalConfig> extends PgSession { client: TSQL; private schema; /** @internal */ readonly options: PostgresJsSessionOptions; static readonly [entityKind]: string; logger: Logger; private cache; constructor(client: TSQL, dialect: PgDialect, schema: RelationalSchemaConfig | undefined, /** @internal */ options?: PostgresJsSessionOptions); prepareQuery(query: Query, fields: SelectedFieldsOrdered | undefined, name: string | undefined, isResponseInArrayMode: boolean, customResultMapper?: (rows: unknown[][]) => T['execute'], queryMetadata?: { type: 'select' | 'update' | 'delete' | 'insert'; tables: string[]; }, cacheConfig?: WithCacheConfig): PgPreparedQuery; query(query: string, params: unknown[]): Promise>; queryObjects(query: string, params: unknown[]): Promise>; transaction(transaction: (tx: PostgresJsTransaction) => Promise, config?: PgTransactionConfig): Promise; } export declare class PostgresJsTransaction, TSchema extends TablesRelationalConfig> extends PgTransaction { /** @internal */ readonly session: PostgresJsSession; static readonly [entityKind]: string; constructor(dialect: PgDialect, /** @internal */ session: PostgresJsSession, schema: RelationalSchemaConfig | undefined, nestedIndex?: number); transaction(transaction: (tx: PostgresJsTransaction) => Promise): Promise; } export interface PostgresJsQueryResultHKT extends PgQueryResultHKT { type: RowList[]>; } //# sourceMappingURL=session.d.ts.map