import type { CompiledTable } from './schema.js'; import type { AuthoritativeQueryValue } from './storage.js'; export interface PreparedAuthoritativeQuery { readonly sql: string; readonly params: readonly (AuthoritativeQueryValue | typeof PARTITION_BIND)[]; } export interface BoundAuthoritativeQuery { readonly sql: string; readonly params: readonly AuthoritativeQueryValue[]; } declare const PARTITION_BIND: unique symbol; /** * Turn generated local SQL into a partition-local authoritative statement. * Only relations declared by the generated descriptor are rewritten. Values * remain parameters; request data is never interpolated into SQL. */ export declare function prepareAuthoritativeQuery(sql: string, params: readonly AuthoritativeQueryValue[], declaredTables: readonly string[], tables: ReadonlyMap): PreparedAuthoritativeQuery; export declare function bindAuthoritativePartition(prepared: PreparedAuthoritativeQuery, partition: string): BoundAuthoritativeQuery; export declare function postgresPlaceholders(sql: string): string; export {};