import type { Registry } from '@juit/pgproxy-types'; import type { PGProviderResult } from './provider'; /** The result of a database query */ export interface PGResult = Record, Tuple extends readonly any[] = readonly any[]> { /** The SQL command that generated this result (`SELECT`, `INSERT`, ...) */ command: string; /** Result description describing column names and relative OIDs */ fields: { name: string; oid: number; }[]; /** * The number of rows affected by the query. * * This can be the number of lines returned in `rows` (for `SELECT` * statements, for example) or the number of lines _affected_ by the query * (the number of records inserted by an `INSERT` query). */ rowCount: number; /** The rows returned by the database query, keyed by the column name. */ rows: Row[]; /** The tuples returned by the database query, keyed by the column index. */ tuples: Tuple[]; } /** Constructor for {@link (PGResult:interface)} instances */ export interface PGResultConstructor { new = Record, Tuple extends readonly any[] = readonly any[]>(result: PGProviderResult, registry: Registry): PGResult; } /** The result of a database query */ export declare const PGResult: PGResultConstructor;