import { NodeDependencyAugmented, DependencyTree } from "../../runtime/runtimeTypes"; import { SqlOriginalRelation, SqlDerivedRelation } from "../../parser/sqlAstTypes"; import { RelationNameType, DbIdType, Column, CompositeSelection, Relation, RelationType, OriginalRelation, DielAst } from "../../parser/dielAstTypes"; import { DerivedRelation } from "../.."; export declare type SingleDistribution = { relationName: RelationNameType; from: DbIdType | null; to: DbIdType | null; forRelationName: RelationNameType; finalOutputName: RelationNameType; }; declare type RecursiveEvalResult = { relationName: RelationNameType; dbId: DbIdType; fromDbId: DbIdType; }; export declare function QueryDistributionRecursiveEval(distributions: SingleDistribution[], scope: { augmentedDep: Map; selectRelationEvalOwner: (dbIds: Set) => DbIdType; outputName: RelationNameType; relationTypeLookup: (rName: RelationNameType) => RelationType; }, relationId: RelationNameType): RecursiveEvalResult | null; /** * there might be corner cases where the view is not shipped e.g. here V1 might not be shipped? it is * V2 * / \ * V1 R * / \ * I R */ export declare function getShippingInfoFromDistributedEval(): void; export declare const EventTableColumns: Column[]; export declare const EventViewColumns: Column[]; /** * creates a new column with a new object (NOT copied over) * @param selection */ export declare function GetColumnsFromSelection(selection: CompositeSelection): Column[] | null; export declare function getEventViewCacheName(tableName: string): string; export declare function getEventViewCacheReferenceName(tableName: string): string; export declare type CacheTriplet = { cacheTable: SqlOriginalRelation; cacheDielTable: OriginalRelation; referenceTable: SqlOriginalRelation; referenceDielTable: OriginalRelation; view: SqlDerivedRelation; dielView: DerivedRelation; }; export declare function GetSqlOriginalRelationFromDielRelation(relation: Relation, addTimeColumns?: boolean): SqlOriginalRelation | null; export declare function isCachable(relation: DerivedRelation): void; /** * Obtains the internal representation of a cached event view, consisting * of three relations: a cache table, containing the data normally contained * by the event view; a reference table, which maps request timesteps to its * corresponding data in the cache table; and a view sharing the name of the * event view, which joins the previous two tables to represent the final * behavior. * * @param relation the event view to be cached * @param addTimeColumns whether to add time columns. * TODO: Ryan: Should always be true? */ export declare function GetCachedEventView(relation: DerivedRelation, addTimeColumns: boolean): CacheTriplet; /** * We need the relation, but also additional information about how it should be mapped. * @param relation */ export declare function GetSqlDerivedRelationFromDielRelation(relation: Relation): SqlDerivedRelation | null; export declare function findOutputDep(ast: DielAst, depTree: DependencyTree): Set; export {}; //# sourceMappingURL=distributeQueries.d.ts.map