UNPKG

@struktoai/mirage-core

Version:

A Unified Virtual Filesystem For AI Agents

32 lines • 1.59 kB
import type { PgDriver } from '../core/postgres/_driver.ts'; import type { resolvePostgresConfig } from '../vfs/postgres/config.ts'; import { Accessor } from './base.ts'; /** * The session every connection opens: read only, and the settings a date or * time type's text depends on, pinned so a value spells the same whatever the * server's defaults. Mirrors `SESSION` in `mirage/accessor/postgres.py`. */ export declare const SESSION: Readonly<Record<string, string>>; /** * The date and time types a row keeps as the text Postgres sends, each with * its OID and its array's, the text holding what a millisecond `Date` cannot: * a microsecond, a BC or five-digit year, infinity, 24:00:00, an interval's * months. Mirrors `TEXT_TYPES` in `mirage/accessor/postgres.py`. */ export declare const TEXT_TYPES: Readonly<Record<string, readonly [number, number]>>; /** * Type parsers, as pg-types and Neon's driver take them, that keep each of * `TEXT_TYPES` as its text, parse an array of it as `text[]` (OID 1009), and * leave every other type to `defaults`. Mirrors `read_as_text` in * `mirage/accessor/postgres.py`. */ export declare function readAsText(defaults: { getTypeParser: (oid: number, format?: 'text' | 'binary') => (value: string) => unknown; }): typeof defaults; export declare class PostgresAccessor extends Accessor { readonly driver: PgDriver; readonly config: ReturnType<typeof resolvePostgresConfig>; constructor(driver: PgDriver, config: ReturnType<typeof resolvePostgresConfig>); get store(): PgDriver; } //# sourceMappingURL=postgres.d.ts.map