Support checked keyed relationships across portable operations and queries

This commit is contained in:
Timothy J. Aveni
2026-09-25 12:02:05 -07:00
parent e0e8563224
commit 1bc3c69de3
23 changed files with 1203 additions and 949 deletions
+3 -2
View File
@@ -53,11 +53,11 @@ export function compileKernelProgram(plan: ExecutionPlan): unknown {
});
} else {
const endpoints = storage.endpoints.map((endpoint) => {
if (endpoint.ordered || endpoint.keyType || endpoint.retainOther)
if (endpoint.ordered || (endpoint.keyType && endpoint.keyType !== "string") || endpoint.retainOther)
throw new ExecutionPlanError(
"UNSUPPORTED_GRAPH_FEATURE",
storage.id,
"Ordered/keyed relations and automatic retention are not implemented",
"Ordered relations, non-string keys and automatic retention are not implemented",
);
return {
projection: endpoint.projectionId,
@@ -69,6 +69,7 @@ export function compileKernelProgram(plan: ExecutionPlan): unknown {
: endpoint.constraint.interfaceRevisionId,
},
cardinality: endpoint.cardinality,
...(endpoint.keyType ? { keyType: endpoint.keyType } : {}),
...(endpoint.onDelete ? { onDelete: endpoint.onDelete } : {}),
};
});