/** * Canonical cache keys for semantic queries. * * A signature captures everything that changes a query's result set: the * target (dataset or metric), selected dimensions/measures, filters, ordering, * pagination, time grain, the effective tenant scope, and any explicit cache * scope (see `SemanticCacheRuntime.scope`). Two calls with the * same signature are guaranteed to produce the same rows against the same * underlying data, so the signature is safe to use as a result-cache key. * * Keys are readable canonical strings rather than hashes so stores can inspect * them and tests can assert on them; stores are free to hash internally. */ import type { AnyDatasetInstance, DatasetQuery, ExecutionContext, GrainedMetricRef, MetricQuery, MetricRef } from '../types.js'; import { stableStringify } from '../utils/canonical-json.js'; export { stableStringify }; export declare function buildDatasetQuerySignature(ds: AnyDatasetInstance, query: DatasetQuery, context?: ExecutionContext): string; export declare function buildMetricQuerySignature(metric: MetricRef | GrainedMetricRef, query: MetricQuery, context?: ExecutionContext): string; //# sourceMappingURL=query-signature.d.ts.map