Implement checked aggregation plans, native SQL, and bounded RPC capture
This commit is contained in:
@@ -10,6 +10,7 @@ import {
|
||||
import type { LinkedQuery } from "./link.js";
|
||||
import type { QueryArgument, QuerySelection } from "./types.js";
|
||||
import type { WorkspaceRevision } from "../capability-model/types.js";
|
||||
import { relationalWire } from "./relational-proto.js";
|
||||
|
||||
const argument = (entry: QueryArgument): WireArgument => {
|
||||
switch (entry.kind) {
|
||||
@@ -34,8 +35,12 @@ const selection = (entry: QuerySelection): import("../gen/camino/schema_pb.js").
|
||||
conditions: entry.conditions.map((condition) => ({ include: condition.include, value: argument(condition.value) })),
|
||||
arguments: Object.fromEntries(Object.entries(entry.arguments).map(([k, v]) => [k, argument(v)])),
|
||||
selection: entry.selection.map(selection),
|
||||
relational: entry.relational && relationalWire(argument, selection).plan(entry.relational),
|
||||
predicate: entry.predicate && relationalWire(argument, selection).predicate(entry.predicate),
|
||||
});
|
||||
|
||||
export const querySelectionToWire = selection;
|
||||
|
||||
export const queryRuntimePlan = (linked: LinkedQuery, workspace: WorkspaceRevision) =>
|
||||
toJson(
|
||||
InstalledQuerySchema,
|
||||
|
||||
Reference in New Issue
Block a user