import type { PreparedStatementParams, QueryArg } from './types.js'; export type SqlPlaceholderStyle = 'question' | 'postgres'; export type SqlNamedParameter = { kind: 'named'; parameter: string; name: string; start: number; end: number; }; export declare function bindSqlParamsToPositional(sql: string, params: PreparedStatementParams | null | undefined, placeholderStyle: SqlPlaceholderStyle): { sql: string; args: QueryArg[]; }; export type PreparedSqlParamsBinding = { bind(params: PreparedStatementParams | null | undefined): { sql: string; args: QueryArg[]; }; }; /** * Scan the SQL once and return a binder for repeated calls — the rewritten SQL * is a pure function of the input, so adapters that re-issue the same * statement (durable objects re-exec per call) can cache this instead of * rescanning every execution. Only the args extraction depends on `params`. */ export declare function prepareSqlParamsBinding(sql: string, placeholderStyle: SqlPlaceholderStyle): PreparedSqlParamsBinding; export declare function bindSqlParamsToPrefixedRecord(sql: string, params: PreparedStatementParams | null | undefined): QueryArg[] | Record | undefined; export declare function scanSqlNamedParameters(sql: string): SqlNamedParameter[];