import { SearchType as SearchType$1, StorageEngine, TenantCtx } from "../storage.mjs"; import { AnalysisParams, AnalysisResult } from "../analysis-types.mjs"; import { AnalysisQuerySource, AnalysisSourceKind, ExecuteSqlOptions, FileSet, QueryRow, SourceCapabilities } from "./source-types.mjs"; import { AnalyzerRegistry } from "../analyzer/registry.mjs"; import { AttachedTableMissingError, AttachedTableRunner, AttachedTableSourceOptions, createAttachedTableSource } from "./attached-table.mjs"; import { CreateSqlQuerySourceOptions, createSqlQuerySource } from "./create-sql-query-source.mjs"; import { PlannerCapabilities } from "gscdump/query/plan"; import { BuilderState } from "gscdump/query"; /** * Capabilities the engine query path honors. Matches what the DuckDB compiler * passes to `buildLogicalPlan`: regex pushes down; comparison joins and * multi-dataset queries belong to the analyzer dispatcher, not the engine's * builder-state query path. */ declare const ENGINE_QUERY_CAPABILITIES: PlannerCapabilities; interface EngineQuerySourceOptions { engine: StorageEngine; ctx: TenantCtx; /** * Restrict every manifest lookup the source performs to a single search-type * slice. Threads into `engine.query` and `engine.runSQL` so the wrapped * source returns rows from one cohort instead of unioning web + non-web * parquet. Undefined preserves legacy cross-type behaviour for web-only * tenants and admin paths. */ searchType?: SearchType$1; } /** * Wraps a storage engine as an `AnalysisQuerySource` with SQL execution. * `queryRows` runs typed builder-state queries; `executeSql` delegates to * `engine.runSQL` and requires `opts.fileSets` (with a `FILES` entry so the * target table can be resolved for partition lookup). */ declare function createEngineQuerySource(options: EngineQuerySourceOptions): AnalysisQuerySource; /** * Convenience: wrap a storage engine + tenant ctx in a source and dispatch. * Equivalent to wrapping `createEngineQuerySource`, with omitted searchType * defaulted to web at this public helper boundary. */ declare function runAnalyzerWithEngine(deps: { engine: StorageEngine; }, ctx: TenantCtx, params: AnalysisParams, registry: AnalyzerRegistry): Promise; declare function queryRows(source: AnalysisQuerySource, state: BuilderState): Promise; export { type AnalysisQuerySource, type AnalysisSourceKind, AttachedTableMissingError, type AttachedTableRunner, type AttachedTableSourceOptions, type CreateSqlQuerySourceOptions, ENGINE_QUERY_CAPABILITIES, EngineQuerySourceOptions, type ExecuteSqlOptions, type FileSet, type QueryRow, type SourceCapabilities, createAttachedTableSource, createEngineQuerySource, createSqlQuerySource, queryRows, runAnalyzerWithEngine };