postgrejs
Version:
Professional PostgreSQL client NodeJS
27 lines (26 loc) • 1.26 kB
TypeScript
import type { QueryOptions } from '../interfaces/query-options.js';
import type { QueryResult } from '../interfaces/query-result.js';
import type { StatementPrepareOptions } from '../interfaces/statement-prepare-options.js';
import { SafeEventEmitter } from '../safe-event-emitter.js';
import type { Maybe, OID } from '../types.js';
import type { Connection } from './connection.js';
export declare class PreparedStatement extends SafeEventEmitter implements AsyncDisposable {
private readonly _connection;
private readonly _sql;
private readonly _name;
private readonly _paramTypes;
protected _onErrorSavePoint: string;
private _refCount;
constructor(connection: Connection, sql: string, paramTypes?: OID[]);
static prepare(connection: Connection, sql: string, options?: StatementPrepareOptions): Promise<PreparedStatement>;
get connection(): Connection;
get name(): Maybe<string>;
get sql(): string;
get paramTypes(): Maybe<Maybe<OID>[]>;
execute(options?: QueryOptions): Promise<QueryResult>;
close(): Promise<void>;
cancel(): Promise<void>;
protected _execute(options?: QueryOptions): Promise<QueryResult>;
protected _close(): Promise<void>;
[Symbol.asyncDispose](): Promise<void>;
}