API index and search · Build metadata
Supporting declarations
packages/query-compiler/src/index.ts. These declarations explain referenced types. Only package-page symbols are package exports.
DialectName
/** Which SQL dialect to emit. Both are product targets: `postgres` for the BYO-PG backend,
* `sqlite` for the daemon backend's session reads (and the offline oracle, §9). */
export type DialectName = "postgres" | "sqlite";CompileOptions
export interface CompileOptions {
dialect: DialectName;
}CompiledQuery
/**
* A compiled query: one SQL `SELECT` plus its positional bound parameters. `sql` returns a
* single row with a single column `"rindle_result"` — the whole nested result as JSON
* (`jsonb` on Postgres, `json` text on SQLite). No runtime value is ever interpolated into
* `sql`; every filter/paging value is a bound parameter (Invariant 4).
*/
export interface CompiledQuery {
sql: string;
/** In order: `$1..$n` for Postgres, `?` for SQLite. */
params: unknown[];
}compile
/**
* Compile `ast` against `catalog` into `{ sql, params }` (§4). A pure function of its
* inputs — no database access (Invariant 2). The root is **singular** when `ast.one` is set
* (a single JSON object or `null`), else **plural** (a JSON array).
*/
export declare function compile(ast: Ast, catalog: Catalog, opts: CompileOptions): CompiledQuery;