import { ResolverAdapter } from "../resolver/types.mjs"; import { AnalysisQuerySource, AnalysisSourceKind, QueryRow, SourceCapabilities } from "./source-types.mjs"; interface CreateSqlQuerySourceOptions { /** Debug-only identifier surfaced on the source for error messages. */ name: string; /** Telemetry tag stamped onto analyzer result meta. */ kind?: AnalysisSourceKind; /** Dialect-specific adapter; compiles `BuilderState` → `{ sql, params }`. */ adapter: ResolverAdapter; /** Drives the underlying DB. Called for both typed queries and raw SQL. */ execute: (sql: string, params: unknown[]) => Promise; /** Tenant id for multi-tenant dialects; forwarded to `resolveToSQL`. */ siteId?: string | number; /** * Search-type scope for multi-tenant dialects; forwarded to `resolveToSQL`. * `number` = int-encoded code (`SEARCH_TYPE_INT`) for INT `search_type` * catalogs (bound bare so the int partition prunes); `string` otherwise. */ searchType?: string | number; /** Additional capability flags merged on top of `adapter.capabilities`. */ extraCapabilities?: Partial; } declare function createSqlQuerySource(options: CreateSqlQuerySourceOptions): AnalysisQuerySource; export { CreateSqlQuerySourceOptions, createSqlQuerySource };