import { PgDialect } from "./dialect.cjs";
import { entityKind } from "../entity.cjs";
import { PreparedQuery } from "../session.cjs";
import { Query, SQL } from "../sql/index.cjs";
import { WithCacheConfig } from "../cache/core/types.cjs";

//#region src/pg-core/session.d.ts
interface PreparedQueryConfig {
  execute: unknown;
}
declare abstract class PgBasePreparedQuery implements PreparedQuery {
  protected query: Query;
  static readonly [entityKind]: string;
  constructor(query: Query);
  getQuery(): Query;
  abstract execute(placeholderValues?: Record<string, unknown>): unknown;
}
type PgTransactionConfig = {
  isolationLevel?: 'read uncommitted' | 'read committed' | 'repeatable read' | 'serializable' | undefined;
  accessMode?: 'read only' | 'read write' | undefined;
  deferrable?: boolean | undefined; /** `snapshot` cannot be used with `isolationLevel: 'read uncommitted' | 'read committed'`  */
  snapshot?: undefined;
} | {
  /** `snapshot` cannot be used with `isolationLevel: 'read uncommitted' | 'read committed'`  */isolationLevel?: 'repeatable read' | 'serializable' | undefined;
  accessMode?: 'read only' | 'read write' | undefined;
  deferrable?: boolean | undefined;
  snapshot?: string | undefined;
};
declare abstract class PgSession {
  protected dialect: PgDialect;
  static readonly [entityKind]: string;
  constructor(dialect: PgDialect);
  abstract prepareQuery(query: Query, mode: 'arrays' | 'objects' | 'raw', name: string | boolean, mapper: ((rows: unknown[]) => any) | undefined, queryMetadata?: {
    type: 'select' | 'update' | 'delete' | 'insert';
    tables: string[];
  }, cacheConfig?: WithCacheConfig, /** Usef for driver-side mapping if supported by driver & compatible */

  driverShape?: unknown): PgBasePreparedQuery;
  abstract execute(query: SQL): unknown;
  abstract arrays(query: SQL): unknown;
  abstract objects(query: SQL): unknown;
}
interface PgQueryResultHKT {
  readonly $brand: 'PgQueryResultHKT';
  readonly row: unknown;
  readonly type: unknown;
}
type PgQueryResultKind<TKind extends PgQueryResultHKT, TRow> = (TKind & {
  readonly row: TRow;
})['type'];
//#endregion
export { PgBasePreparedQuery, PgQueryResultHKT, PgQueryResultKind, PgSession, PgTransactionConfig, PreparedQueryConfig };
//# sourceMappingURL=session.d.cts.map