Implement checked aggregation plans, native SQL, and bounded RPC capture

This commit is contained in:
Timothy J. Aveni
2026-09-17 18:23:16 -07:00
parent 13d2d0b1ee
commit b86dbe2dfa
11 changed files with 2190 additions and 28 deletions
+150 -1
View File
@@ -1,5 +1,5 @@
import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
import type { PersistencePlan, QuerySelection } from "./schema_pb.js";
import type { PersistencePlan, QueryRelationalPlan, QuerySelection } from "./schema_pb.js";
import type { Message } from "@bufbuild/protobuf";
/**
* Describes the file camino/api.proto.
@@ -928,6 +928,14 @@ export type QueryPendingField = Message<"camino.QueryPendingField"> & {
* @generated from field: string residual_field = 9;
*/
residualField: string;
/**
* @generated from field: optional uint32 relational_capture = 10;
*/
relationalCapture?: number | undefined;
/**
* @generated from field: uint32 captured_object = 11;
*/
capturedObject: number;
};
/**
* Describes the message camino.QueryPendingField.
@@ -966,6 +974,18 @@ export type QueryStats = Message<"camino.QueryStats"> & {
* @generated from field: double total_ms = 7;
*/
totalMs: number;
/**
* @generated from field: uint32 relational_stages = 8;
*/
relationalStages: number;
/**
* @generated from field: uint32 captured_candidates = 9;
*/
capturedCandidates: number;
/**
* @generated from field: double relational_ms = 10;
*/
relationalMs: number;
};
/**
* Describes the message camino.QueryStats.
@@ -1018,12 +1038,133 @@ export type QueryResponse = Message<"camino.QueryResponse"> & {
* @generated from field: string consistency = 9;
*/
consistency: string;
/**
* @generated from field: repeated camino.QueryRelationalCapture relational_captures = 10;
*/
relationalCaptures: QueryRelationalCapture[];
};
/**
* Describes the message camino.QueryResponse.
* Use `create(QueryResponseSchema)` to create a new message.
*/
export declare const QueryResponseSchema: GenMessage<QueryResponse>;
/**
* Private coordinator input, removed before publishing a result. Memberships
* and native facts share one snapshot; package reads are sampled afterwards.
*
* @generated from message camino.QueryCapturedMember
*/
export type QueryCapturedMember = Message<"camino.QueryCapturedMember"> & {
/**
* @generated from field: string object_id = 1;
*/
objectId: string;
/**
* @generated from field: string entry_id = 2;
*/
entryId: string;
/**
* @generated from field: camino.Value map_key = 3;
*/
mapKey?: Value | undefined;
};
/**
* Describes the message camino.QueryCapturedMember.
* Use `create(QueryCapturedMemberSchema)` to create a new message.
*/
export declare const QueryCapturedMemberSchema: GenMessage<QueryCapturedMember>;
/**
* @generated from message camino.QueryCapturedMembers
*/
export type QueryCapturedMembers = Message<"camino.QueryCapturedMembers"> & {
/**
* @generated from field: repeated camino.QueryCapturedMember entries = 1;
*/
entries: QueryCapturedMember[];
};
/**
* Describes the message camino.QueryCapturedMembers.
* Use `create(QueryCapturedMembersSchema)` to create a new message.
*/
export declare const QueryCapturedMembersSchema: GenMessage<QueryCapturedMembers>;
/**
* @generated from message camino.QueryCapturedObject
*/
export type QueryCapturedObject = Message<"camino.QueryCapturedObject"> & {
/**
* @generated from field: string object_id = 1;
*/
objectId: string;
/**
* @generated from field: map<string, camino.Value> fields = 2;
*/
fields: {
[key: string]: Value;
};
/**
* @generated from field: map<string, string> field_types = 3;
*/
fieldTypes: {
[key: string]: string;
};
/**
* @generated from field: map<string, camino.QueryCapturedMembers> relationships = 4;
*/
relationships: {
[key: string]: QueryCapturedMembers;
};
};
/**
* Describes the message camino.QueryCapturedObject.
* Use `create(QueryCapturedObjectSchema)` to create a new message.
*/
export declare const QueryCapturedObjectSchema: GenMessage<QueryCapturedObject>;
/**
* @generated from message camino.QueryRelationalCapture
*/
export type QueryRelationalCapture = Message<"camino.QueryRelationalCapture"> & {
/**
* @generated from field: repeated camino.QueryPathPart path = 1;
*/
path: QueryPathPart[];
/**
* @generated from field: camino.QueryRelationalPlan plan = 2;
*/
plan?: QueryRelationalPlan | undefined;
/**
* @generated from field: string root_object_id = 3;
*/
rootObjectId: string;
/**
* @generated from field: repeated camino.QueryCapturedObject objects = 4;
*/
objects: QueryCapturedObject[];
/**
* @generated from field: string variables_json = 5;
*/
variablesJson: string;
/**
* @generated from field: uint32 row_limit = 6;
*/
rowLimit: number;
/**
* @generated from field: uint32 candidate_limit = 7;
*/
candidateLimit: number;
/**
* @generated from field: optional uint32 residual_window = 8;
*/
residualWindow?: number | undefined;
/**
* @generated from field: repeated string result_path = 9;
*/
resultPath: string[];
};
/**
* Describes the message camino.QueryRelationalCapture.
* Use `create(QueryRelationalCaptureSchema)` to create a new message.
*/
export declare const QueryRelationalCaptureSchema: GenMessage<QueryRelationalCapture>;
/**
* @generated from message camino.QueryResidualRow
*/
@@ -1100,6 +1241,14 @@ export type QueryResidualWindow = Message<"camino.QueryResidualWindow"> & {
fieldTypes: {
[key: string]: string;
};
/**
* @generated from field: bool relational = 9;
*/
relational: boolean;
/**
* @generated from field: repeated string matched_entries = 10;
*/
matchedEntries: string[];
};
/**
* Describes the message camino.QueryResidualWindow.
+1 -1
View File
File diff suppressed because one or more lines are too long
+27 -7
View File
File diff suppressed because one or more lines are too long
+736
View File
@@ -364,12 +364,641 @@ export type QuerySelection = Message<"camino.QuerySelection"> & {
* @generated from field: repeated camino.QuerySelection selection = 8;
*/
selection: QuerySelection[];
/**
* @generated from field: camino.QueryRelationalPlan relational = 9;
*/
relational?: QueryRelationalPlan | undefined;
/**
* @generated from field: camino.QueryPredicate predicate = 10;
*/
predicate?: QueryPredicate | undefined;
};
/**
* Describes the message camino.QuerySelection.
* Use `create(QuerySelectionSchema)` to create a new message.
*/
export declare const QuerySelectionSchema: GenMessage<QuerySelection>;
/**
* Resolved IDs, not GraphQL names, determine execution. Response selections
* remain separate so aliases and fragments cannot change relational semantics.
*
* @generated from message camino.QueryPathStep
*/
export type QueryPathStep = Message<"camino.QueryPathStep"> & {
/**
* @generated from oneof camino.QueryPathStep.step
*/
step: {
/**
* @generated from field: bool source = 1;
*/
value: boolean;
case: "source";
} | {
/**
* @generated from field: bool target = 2;
*/
value: boolean;
case: "target";
} | {
/**
* @generated from field: camino.QueryRelationPath relation = 3;
*/
value: QueryRelationPath;
case: "relation";
} | {
case: undefined;
value?: undefined;
};
};
/**
* Describes the message camino.QueryPathStep.
* Use `create(QueryPathStepSchema)` to create a new message.
*/
export declare const QueryPathStepSchema: GenMessage<QueryPathStep>;
/**
* @generated from message camino.QueryRelationPath
*/
export type QueryRelationPath = Message<"camino.QueryRelationPath"> & {
/**
* @generated from field: string interface_revision_id = 1;
*/
interfaceRevisionId: string;
/**
* @generated from field: string member_id = 2;
*/
memberId: string;
/**
* @generated from field: string target_interface_revision_id = 3;
*/
targetInterfaceRevisionId: string;
/**
* @generated from field: bool optional = 4;
*/
optional: boolean;
};
/**
* Describes the message camino.QueryRelationPath.
* Use `create(QueryRelationPathSchema)` to create a new message.
*/
export declare const QueryRelationPathSchema: GenMessage<QueryRelationPath>;
/**
* @generated from message camino.QueryFieldOperand
*/
export type QueryFieldOperand = Message<"camino.QueryFieldOperand"> & {
/**
* @generated from field: string interface_revision_id = 1;
*/
interfaceRevisionId: string;
/**
* @generated from field: string member_id = 2;
*/
memberId: string;
};
/**
* Describes the message camino.QueryFieldOperand.
* Use `create(QueryFieldOperandSchema)` to create a new message.
*/
export declare const QueryFieldOperandSchema: GenMessage<QueryFieldOperand>;
/**
* @generated from message camino.QueryExpression
*/
export type QueryExpression = Message<"camino.QueryExpression"> & {
/**
* @generated from field: repeated camino.QueryPathStep path = 1;
*/
path: QueryPathStep[];
/**
* @generated from oneof camino.QueryExpression.leaf
*/
leaf: {
/**
* @generated from field: camino.QueryFieldOperand field = 2;
*/
value: QueryFieldOperand;
case: "field";
} | {
/**
* @generated from field: string ref = 3;
*/
value: string;
case: "ref";
} | {
/**
* @generated from field: bool entry = 4;
*/
value: boolean;
case: "entry";
} | {
/**
* @generated from field: bool map_key = 5;
*/
value: boolean;
case: "mapKey";
} | {
case: undefined;
value?: undefined;
};
/**
* @generated from field: string value_type_json = 6;
*/
valueTypeJson: string;
};
/**
* Describes the message camino.QueryExpression.
* Use `create(QueryExpressionSchema)` to create a new message.
*/
export declare const QueryExpressionSchema: GenMessage<QueryExpression>;
/**
* @generated from message camino.QueryReduction
*/
export type QueryReduction = Message<"camino.QueryReduction"> & {
/**
* @generated from field: camino.QueryAggregateOperator operator = 1;
*/
operator: QueryAggregateOperator;
/**
* @generated from field: camino.QueryExpression operand = 2;
*/
operand?: QueryExpression | undefined;
/**
* @generated from field: string value_type_json = 3;
*/
valueTypeJson: string;
};
/**
* Describes the message camino.QueryReduction.
* Use `create(QueryReductionSchema)` to create a new message.
*/
export declare const QueryReductionSchema: GenMessage<QueryReduction>;
/**
* @generated from message camino.QueryOperand
*/
export type QueryOperand = Message<"camino.QueryOperand"> & {
/**
* @generated from oneof camino.QueryOperand.operand
*/
operand: {
/**
* @generated from field: camino.QueryExpression expression = 1;
*/
value: QueryExpression;
case: "expression";
} | {
/**
* @generated from field: camino.QueryReduction reduction = 2;
*/
value: QueryReduction;
case: "reduction";
} | {
case: undefined;
value?: undefined;
};
};
/**
* Describes the message camino.QueryOperand.
* Use `create(QueryOperandSchema)` to create a new message.
*/
export declare const QueryOperandSchema: GenMessage<QueryOperand>;
/**
* @generated from message camino.QueryComparison
*/
export type QueryComparison = Message<"camino.QueryComparison"> & {
/**
* @generated from field: camino.QueryOperand operand = 1;
*/
operand?: QueryOperand | undefined;
/**
* @generated from field: camino.QueryComparisonOperator operator = 2;
*/
operator: QueryComparisonOperator;
/**
* @generated from field: camino.QueryArgument value = 3;
*/
value?: QueryArgument | undefined;
};
/**
* Describes the message camino.QueryComparison.
* Use `create(QueryComparisonSchema)` to create a new message.
*/
export declare const QueryComparisonSchema: GenMessage<QueryComparison>;
/**
* @generated from message camino.QueryPredicateList
*/
export type QueryPredicateList = Message<"camino.QueryPredicateList"> & {
/**
* @generated from field: repeated camino.QueryPredicate children = 1;
*/
children: QueryPredicate[];
};
/**
* Describes the message camino.QueryPredicateList.
* Use `create(QueryPredicateListSchema)` to create a new message.
*/
export declare const QueryPredicateListSchema: GenMessage<QueryPredicateList>;
/**
* @generated from message camino.QueryRelationPredicate
*/
export type QueryRelationPredicate = Message<"camino.QueryRelationPredicate"> & {
/**
* @generated from field: repeated camino.QueryPathStep path = 1;
*/
path: QueryPathStep[];
/**
* @generated from field: camino.QueryRelationPath relation = 2;
*/
relation?: QueryRelationPath | undefined;
/**
* @generated from field: camino.QueryRelationPredicateOperator operator = 3;
*/
operator: QueryRelationPredicateOperator;
/**
* @generated from field: camino.QueryPredicate predicate = 4;
*/
predicate?: QueryPredicate | undefined;
/**
* @generated from field: camino.QueryArgument value = 5;
*/
value?: QueryArgument | undefined;
};
/**
* Describes the message camino.QueryRelationPredicate.
* Use `create(QueryRelationPredicateSchema)` to create a new message.
*/
export declare const QueryRelationPredicateSchema: GenMessage<QueryRelationPredicate>;
/**
* @generated from message camino.QueryReductionPredicate
*/
export type QueryReductionPredicate = Message<"camino.QueryReductionPredicate"> & {
/**
* @generated from field: repeated camino.QueryPathStep path = 1;
*/
path: QueryPathStep[];
/**
* @generated from field: camino.QueryRelationPath relation = 2;
*/
relation?: QueryRelationPath | undefined;
/**
* @generated from field: camino.QueryPredicate where = 3;
*/
where?: QueryPredicate | undefined;
/**
* @generated from field: camino.QueryPredicate having = 4;
*/
having?: QueryPredicate | undefined;
};
/**
* Describes the message camino.QueryReductionPredicate.
* Use `create(QueryReductionPredicateSchema)` to create a new message.
*/
export declare const QueryReductionPredicateSchema: GenMessage<QueryReductionPredicate>;
/**
* @generated from message camino.QueryPredicate
*/
export type QueryPredicate = Message<"camino.QueryPredicate"> & {
/**
* @generated from oneof camino.QueryPredicate.predicate
*/
predicate: {
/**
* @generated from field: camino.QueryPredicateList and = 1;
*/
value: QueryPredicateList;
case: "and";
} | {
/**
* @generated from field: camino.QueryPredicateList or = 2;
*/
value: QueryPredicateList;
case: "or";
} | {
/**
* @generated from field: camino.QueryPredicate not = 3;
*/
value: QueryPredicate;
case: "not";
} | {
/**
* @generated from field: camino.QueryComparison compare = 4;
*/
value: QueryComparison;
case: "compare";
} | {
/**
* @generated from field: camino.QueryRelationPredicate relation = 5;
*/
value: QueryRelationPredicate;
case: "relation";
} | {
/**
* @generated from field: camino.QueryReductionPredicate reduce = 6;
*/
value: QueryReductionPredicate;
case: "reduce";
} | {
case: undefined;
value?: undefined;
};
};
/**
* Describes the message camino.QueryPredicate.
* Use `create(QueryPredicateSchema)` to create a new message.
*/
export declare const QueryPredicateSchema: GenMessage<QueryPredicate>;
/**
* @generated from message camino.QueryRow
*/
export type QueryRow = Message<"camino.QueryRow"> & {
/**
* @generated from oneof camino.QueryRow.row
*/
row: {
/**
* @generated from field: camino.QueryObjectRow object = 1;
*/
value: QueryObjectRow;
case: "object";
} | {
/**
* @generated from field: camino.QueryPairRow pair = 2;
*/
value: QueryPairRow;
case: "pair";
} | {
case: undefined;
value?: undefined;
};
};
/**
* Describes the message camino.QueryRow.
* Use `create(QueryRowSchema)` to create a new message.
*/
export declare const QueryRowSchema: GenMessage<QueryRow>;
/**
* @generated from message camino.QueryObjectRow
*/
export type QueryObjectRow = Message<"camino.QueryObjectRow"> & {
/**
* @generated from field: string interface_revision_id = 1;
*/
interfaceRevisionId: string;
/**
* @generated from field: bool membership = 2;
*/
membership: boolean;
/**
* @generated from field: string key_type = 3;
*/
keyType: string;
};
/**
* Describes the message camino.QueryObjectRow.
* Use `create(QueryObjectRowSchema)` to create a new message.
*/
export declare const QueryObjectRowSchema: GenMessage<QueryObjectRow>;
/**
* @generated from message camino.QueryPairRow
*/
export type QueryPairRow = Message<"camino.QueryPairRow"> & {
/**
* @generated from field: camino.QueryRow source = 1;
*/
source?: QueryRow | undefined;
/**
* @generated from field: camino.QueryRow target = 2;
*/
target?: QueryRow | undefined;
};
/**
* Describes the message camino.QueryPairRow.
* Use `create(QueryPairRowSchema)` to create a new message.
*/
export declare const QueryPairRowSchema: GenMessage<QueryPairRow>;
/**
* @generated from message camino.QueryKey
*/
export type QueryKey = Message<"camino.QueryKey"> & {
/**
* @generated from field: repeated string path = 1;
*/
path: string[];
/**
* @generated from field: camino.QueryExpression expression = 2;
*/
expression?: QueryExpression | undefined;
};
/**
* Describes the message camino.QueryKey.
* Use `create(QueryKeySchema)` to create a new message.
*/
export declare const QueryKeySchema: GenMessage<QueryKey>;
/**
* @generated from message camino.QueryDistinct
*/
export type QueryDistinct = Message<"camino.QueryDistinct"> & {
/**
* @generated from field: repeated camino.QueryKey keys = 1;
*/
keys: QueryKey[];
};
/**
* Describes the message camino.QueryDistinct.
* Use `create(QueryDistinctSchema)` to create a new message.
*/
export declare const QueryDistinctSchema: GenMessage<QueryDistinct>;
/**
* @generated from message camino.QueryExpansion
*/
export type QueryExpansion = Message<"camino.QueryExpansion"> & {
/**
* @generated from field: repeated camino.QueryPathStep path = 1;
*/
path: QueryPathStep[];
/**
* @generated from field: camino.QueryRelationPath relation = 2;
*/
relation?: QueryRelationPath | undefined;
};
/**
* Describes the message camino.QueryExpansion.
* Use `create(QueryExpansionSchema)` to create a new message.
*/
export declare const QueryExpansionSchema: GenMessage<QueryExpansion>;
/**
* @generated from message camino.QueryRelationalStage
*/
export type QueryRelationalStage = Message<"camino.QueryRelationalStage"> & {
/**
* @generated from field: uint32 id = 1;
*/
id: number;
/**
* @generated from field: optional uint32 input = 2;
*/
input?: number | undefined;
/**
* @generated from field: camino.QueryRow row = 3;
*/
row?: QueryRow | undefined;
/**
* @generated from oneof camino.QueryRelationalStage.operation
*/
operation: {
/**
* @generated from field: camino.QueryRelationPath source = 4;
*/
value: QueryRelationPath;
case: "source";
} | {
/**
* @generated from field: camino.QueryPredicate filter = 5;
*/
value: QueryPredicate;
case: "filter";
} | {
/**
* @generated from field: camino.QueryExpansion expand = 6;
*/
value: QueryExpansion;
case: "expand";
} | {
/**
* @generated from field: camino.QueryDistinct distinct = 7;
*/
value: QueryDistinct;
case: "distinct";
} | {
case: undefined;
value?: undefined;
};
};
/**
* Describes the message camino.QueryRelationalStage.
* Use `create(QueryRelationalStageSchema)` to create a new message.
*/
export declare const QueryRelationalStageSchema: GenMessage<QueryRelationalStage>;
/**
* @generated from message camino.QueryReductionProjection
*/
export type QueryReductionProjection = Message<"camino.QueryReductionProjection"> & {
/**
* @generated from field: repeated string path = 1;
*/
path: string[];
/**
* @generated from field: camino.QueryReduction reduction = 2;
*/
reduction?: QueryReduction | undefined;
};
/**
* Describes the message camino.QueryReductionProjection.
* Use `create(QueryReductionProjectionSchema)` to create a new message.
*/
export declare const QueryReductionProjectionSchema: GenMessage<QueryReductionProjection>;
/**
* @generated from message camino.QueryAggregateOrder
*/
export type QueryAggregateOrder = Message<"camino.QueryAggregateOrder"> & {
/**
* @generated from field: camino.QueryOperand operand = 1;
*/
operand?: QueryOperand | undefined;
/**
* @generated from field: bool descending = 2;
*/
descending: boolean;
};
/**
* Describes the message camino.QueryAggregateOrder.
* Use `create(QueryAggregateOrderSchema)` to create a new message.
*/
export declare const QueryAggregateOrderSchema: GenMessage<QueryAggregateOrder>;
/**
* @generated from message camino.QueryRelationalTerminal
*/
export type QueryRelationalTerminal = Message<"camino.QueryRelationalTerminal"> & {
/**
* @generated from field: uint32 stage = 1;
*/
stage: number;
/**
* @generated from field: repeated string path = 2;
*/
path: string[];
/**
* @generated from field: bool groups = 3;
*/
groups: boolean;
/**
* @generated from field: repeated camino.QueryKey keys = 4;
*/
keys: QueryKey[];
/**
* @generated from field: repeated camino.QueryReductionProjection reductions = 5;
*/
reductions: QueryReductionProjection[];
/**
* @generated from field: camino.QueryPredicate where = 6;
*/
where?: QueryPredicate | undefined;
/**
* @generated from field: camino.QueryPredicate having = 7;
*/
having?: QueryPredicate | undefined;
/**
* @generated from field: repeated camino.QueryAggregateOrder order = 8;
*/
order: QueryAggregateOrder[];
/**
* @generated from field: camino.QueryArgument first = 9;
*/
first?: QueryArgument | undefined;
/**
* @generated from field: camino.QueryArgument all = 10;
*/
all?: QueryArgument | undefined;
/**
* @generated from field: camino.QueryArgument after = 11;
*/
after?: QueryArgument | undefined;
/**
* @generated from field: repeated camino.QuerySelection selection = 12;
*/
selection: QuerySelection[];
/**
* @generated from field: bool residual = 13;
*/
residual: boolean;
/**
* Internal ordinary-relationship residual: yields ordered membership IDs.
*
* @generated from field: bool rows = 14;
*/
rows: boolean;
};
/**
* Describes the message camino.QueryRelationalTerminal.
* Use `create(QueryRelationalTerminalSchema)` to create a new message.
*/
export declare const QueryRelationalTerminalSchema: GenMessage<QueryRelationalTerminal>;
/**
* @generated from message camino.QueryRelationalPlan
*/
export type QueryRelationalPlan = Message<"camino.QueryRelationalPlan"> & {
/**
* @generated from field: repeated camino.QueryRelationalStage stages = 1;
*/
stages: QueryRelationalStage[];
/**
* @generated from field: repeated camino.QueryRelationalTerminal terminals = 2;
*/
terminals: QueryRelationalTerminal[];
};
/**
* Describes the message camino.QueryRelationalPlan.
* Use `create(QueryRelationalPlanSchema)` to create a new message.
*/
export declare const QueryRelationalPlanSchema: GenMessage<QueryRelationalPlan>;
/**
* @generated from message camino.QueryReadBinding
*/
@@ -567,4 +1196,111 @@ export declare enum Cardinality {
* Describes the enum camino.Cardinality.
*/
export declare const CardinalitySchema: GenEnum<Cardinality>;
/**
* @generated from enum camino.QueryAggregateOperator
*/
export declare enum QueryAggregateOperator {
/**
* @generated from enum value: QUERY_AGGREGATE_OPERATOR_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* @generated from enum value: QUERY_AGGREGATE_OPERATOR_COUNT = 1;
*/
COUNT = 1,
/**
* @generated from enum value: QUERY_AGGREGATE_OPERATOR_COUNT_PRESENT = 2;
*/
COUNT_PRESENT = 2,
/**
* @generated from enum value: QUERY_AGGREGATE_OPERATOR_SUM = 3;
*/
SUM = 3,
/**
* @generated from enum value: QUERY_AGGREGATE_OPERATOR_AVG = 4;
*/
AVG = 4,
/**
* @generated from enum value: QUERY_AGGREGATE_OPERATOR_MIN = 5;
*/
MIN = 5,
/**
* @generated from enum value: QUERY_AGGREGATE_OPERATOR_MAX = 6;
*/
MAX = 6
}
/**
* Describes the enum camino.QueryAggregateOperator.
*/
export declare const QueryAggregateOperatorSchema: GenEnum<QueryAggregateOperator>;
/**
* @generated from enum camino.QueryComparisonOperator
*/
export declare enum QueryComparisonOperator {
/**
* @generated from enum value: QUERY_COMPARISON_OPERATOR_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* @generated from enum value: QUERY_COMPARISON_OPERATOR_EQ = 1;
*/
EQ = 1,
/**
* @generated from enum value: QUERY_COMPARISON_OPERATOR_IN = 2;
*/
IN = 2,
/**
* @generated from enum value: QUERY_COMPARISON_OPERATOR_IS_NULL = 3;
*/
IS_NULL = 3,
/**
* @generated from enum value: QUERY_COMPARISON_OPERATOR_LT = 4;
*/
LT = 4,
/**
* @generated from enum value: QUERY_COMPARISON_OPERATOR_LTE = 5;
*/
LTE = 5,
/**
* @generated from enum value: QUERY_COMPARISON_OPERATOR_GT = 6;
*/
GT = 6,
/**
* @generated from enum value: QUERY_COMPARISON_OPERATOR_GTE = 7;
*/
GTE = 7
}
/**
* Describes the enum camino.QueryComparisonOperator.
*/
export declare const QueryComparisonOperatorSchema: GenEnum<QueryComparisonOperator>;
/**
* @generated from enum camino.QueryRelationPredicateOperator
*/
export declare enum QueryRelationPredicateOperator {
/**
* @generated from enum value: QUERY_RELATION_PREDICATE_OPERATOR_UNSPECIFIED = 0;
*/
UNSPECIFIED = 0,
/**
* @generated from enum value: QUERY_RELATION_PREDICATE_OPERATOR_SOME = 1;
*/
SOME = 1,
/**
* @generated from enum value: QUERY_RELATION_PREDICATE_OPERATOR_NONE = 2;
*/
NONE = 2,
/**
* @generated from enum value: QUERY_RELATION_PREDICATE_OPERATOR_IS = 3;
*/
IS = 3,
/**
* @generated from enum value: QUERY_RELATION_PREDICATE_OPERATOR_IS_NULL = 4;
*/
IS_NULL = 4
}
/**
* Describes the enum camino.QueryRelationPredicateOperator.
*/
export declare const QueryRelationPredicateOperatorSchema: GenEnum<QueryRelationPredicateOperator>;
//# sourceMappingURL=schema_pb.d.ts.map
+1 -1
View File
File diff suppressed because one or more lines are too long
+224 -4
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
import { decodeQxValue } from "./bindings.js";
export function decodeQuerySnapshot(response, output, runId, sequence) {
if (response.preparationToken || response.residualWindows.length)
if (response.preparationToken || response.residualWindows.length || response.relationalCaptures.length)
throw new Error("QUERY_RESULT_UNFINISHED: private preparation is not a query result");
const fields = [
...response.pending.map((field) => ({ path: field.path, status: "pending" })),
+184 -8
View File
File diff suppressed because one or more lines are too long
+857 -4
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -35,7 +35,7 @@ export function decodeQuerySnapshot<T>(
runId: string,
sequence: bigint,
): QxQuerySnapshot<T> {
if (response.preparationToken || response.residualWindows.length)
if (response.preparationToken || response.residualWindows.length || response.relationalCaptures.length)
throw new Error("QUERY_RESULT_UNFINISHED: private preparation is not a query result");
const fields = [
...response.pending.map((field) => ({ path: field.path, status: "pending" as const })),
+8
View File
@@ -5,6 +5,14 @@ import { QueryResponseSchema } from "../dist/camino/api_pb.js";
import { InjectedDependencySchema } from "../dist/quixos/refs_pb.js";
import { createRuntimeContext, decodeQuerySnapshot, jsToProtoValue, protoValueToJs } from "../dist/index.js";
test("private relational captures cannot be decoded as a completed public query", () => {
const response = create(QueryResponseSchema, { relationalCaptures: [{ rootObjectId: "obj:private" }] });
assert.throws(
() => decodeQuerySnapshot(response, { kind: "record", fields: {} }, "run", 1n),
/QUERY_RESULT_UNFINISHED/,
);
});
test("query ports carry only an injected query identity and root", async () => {
let seen;
const context = createRuntimeContext(