@nicia-ai/typegraph 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/postgres/index.cjs +167 -71
- package/dist/backend/postgres/index.cjs.map +1 -1
- package/dist/backend/postgres/index.d.cts +6 -8
- package/dist/backend/postgres/index.d.ts +6 -8
- package/dist/backend/postgres/index.js +119 -27
- package/dist/backend/postgres/index.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +16 -15
- package/dist/backend/sqlite/index.d.cts +11 -26
- package/dist/backend/sqlite/index.d.ts +11 -26
- package/dist/backend/sqlite/index.js +6 -5
- package/dist/backend/sqlite/libsql.cjs +9 -8
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +4 -3
- package/dist/backend/sqlite/libsql.d.ts +4 -3
- package/dist/backend/sqlite/libsql.js +6 -5
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +11 -10
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +4 -3
- package/dist/backend/sqlite/local.d.ts +4 -3
- package/dist/backend/sqlite/local.js +6 -5
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/{chunk-LVCSL6A3.js → chunk-3W6AIFT2.js} +11 -34
- package/dist/chunk-3W6AIFT2.js.map +1 -0
- package/dist/chunk-4FJVSF3K.cjs +12 -0
- package/dist/{chunk-D2GO3RBL.cjs.map → chunk-4FJVSF3K.cjs.map} +1 -1
- package/dist/{chunk-7W3KAMVQ.cjs → chunk-4TJI44WP.cjs} +94 -119
- package/dist/chunk-4TJI44WP.cjs.map +1 -0
- package/dist/chunk-5H3BAMTB.js +32 -0
- package/dist/chunk-5H3BAMTB.js.map +1 -0
- package/dist/{chunk-OJ6IQVZG.js → chunk-DDVA4QBA.js} +177 -37
- package/dist/chunk-DDVA4QBA.js.map +1 -0
- package/dist/{chunk-7CDXX3QZ.cjs → chunk-DN4RUDF3.cjs} +2 -2
- package/dist/chunk-DN4RUDF3.cjs.map +1 -0
- package/dist/{chunk-NHQWXSTS.js → chunk-E5ROA3MN.js} +3 -3
- package/dist/{chunk-NHQWXSTS.js.map → chunk-E5ROA3MN.js.map} +1 -1
- package/dist/{chunk-FPCOUJSL.js → chunk-ENXJLDRK.js} +2 -2
- package/dist/chunk-ENXJLDRK.js.map +1 -0
- package/dist/chunk-IUIWCFG3.cjs +36 -0
- package/dist/chunk-IUIWCFG3.cjs.map +1 -0
- package/dist/{chunk-EG6TJ3I5.js → chunk-OYLF3IC7.js} +3 -3
- package/dist/{chunk-EG6TJ3I5.js.map → chunk-OYLF3IC7.js.map} +1 -1
- package/dist/{chunk-JTI5WT4P.cjs → chunk-PN37HVAV.cjs} +32 -10
- package/dist/chunk-PN37HVAV.cjs.map +1 -0
- package/dist/{chunk-RCAJZG67.cjs → chunk-PYJOBZR3.cjs} +10 -10
- package/dist/{chunk-RCAJZG67.cjs.map → chunk-PYJOBZR3.cjs.map} +1 -1
- package/dist/{chunk-WI5VRP3X.js → chunk-RF5EUQWS.js} +371 -47
- package/dist/chunk-RF5EUQWS.js.map +1 -0
- package/dist/{chunk-ZEMNF3QK.cjs → chunk-RVT2N4RF.cjs} +209 -69
- package/dist/chunk-RVT2N4RF.cjs.map +1 -0
- package/dist/{chunk-4BOWVUGQ.js → chunk-TSGBRPNE.js} +3 -3
- package/dist/{chunk-4BOWVUGQ.js.map → chunk-TSGBRPNE.js.map} +1 -1
- package/dist/{chunk-O2P3KAUT.cjs → chunk-TVUARC7S.cjs} +445 -110
- package/dist/chunk-TVUARC7S.cjs.map +1 -0
- package/dist/{chunk-DOTEN2FG.js → chunk-U5ROKVRF.js} +26 -3
- package/dist/chunk-U5ROKVRF.js.map +1 -0
- package/dist/{chunk-E5JZSEGJ.cjs → chunk-WFUN6DCM.cjs} +8 -8
- package/dist/{chunk-E5JZSEGJ.cjs.map → chunk-WFUN6DCM.cjs.map} +1 -1
- package/dist/{chunk-W5MTHMTE.cjs → chunk-YEDQLNVE.cjs} +26 -2
- package/dist/chunk-YEDQLNVE.cjs.map +1 -0
- package/dist/{chunk-YZZBDCLV.js → chunk-ZTREJOGB.js} +32 -11
- package/dist/chunk-ZTREJOGB.js.map +1 -0
- package/dist/{ddl-B2jjLjpR.d.cts → ddl-9kw8UADK.d.ts} +697 -29
- package/dist/{ddl-DpaeAKPp.d.ts → ddl-Cw82BPM4.d.cts} +697 -29
- package/dist/{extension-types-D07e_NTw.d.cts → extension-types-B78CZfA5.d.cts} +1 -1
- package/dist/{extension-types-D07e_NTw.d.ts → extension-types-B78CZfA5.d.ts} +1 -1
- package/dist/graph-extension/index.cjs +18 -18
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +3 -3
- package/dist/{index-CT6nvtxL.d.cts → index-Bilw0pYm.d.cts} +34 -3
- package/dist/{index-DQheiVQV.d.ts → index-CWdBFWbI.d.ts} +34 -3
- package/dist/index.cjs +460 -361
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -11
- package/dist/index.d.ts +13 -11
- package/dist/index.js +131 -36
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +13 -13
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +1 -1
- package/dist/interchange/index.cjs +7 -7
- package/dist/interchange/index.d.cts +7 -5
- package/dist/interchange/index.d.ts +7 -5
- package/dist/interchange/index.js +2 -2
- package/dist/{manager-BpjBW1JK.d.cts → manager-Aqzmztkb.d.cts} +11 -3
- package/dist/{manager-BKaPQbns.d.ts → manager-C3LxzPcX.d.ts} +11 -3
- package/dist/{materialize-indexes-BB9N5uQl.d.cts → materialize-indexes-BQfaAZKA.d.cts} +1 -1
- package/dist/{materialize-indexes-BYpU2RKh.d.ts → materialize-indexes-DFavFQah.d.ts} +1 -1
- package/dist/profiler/index.d.cts +9 -7
- package/dist/profiler/index.d.ts +9 -7
- package/dist/schema/index.cjs +28 -27
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +9 -7
- package/dist/schema/index.d.ts +9 -7
- package/dist/schema/index.js +6 -5
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-Myo8e3Lr.d.cts → sqlite-BvSEbybu.d.cts} +320 -1
- package/dist/{sqlite-CU3j6rc7.d.ts → sqlite-GKvcDPVn.d.ts} +320 -1
- package/dist/{store-BAGuOHDh.d.cts → store-CiS_AGNH.d.ts} +112 -4
- package/dist/{store-De98Lod4.d.ts → store-DbQLsSor.d.cts} +112 -4
- package/dist/{types-CYga3lZp.d.cts → types-CF7nDH3q.d.cts} +2 -2
- package/dist/{types-BLmJq4wI.d.ts → types-Cars4JZ1.d.ts} +2 -2
- package/dist/{types--0EslBx5.d.cts → types-DZPBXZOK.d.cts} +275 -8
- package/dist/{types-BNWYZ-0-.d.ts → types-Dzkr0Eqi.d.ts} +275 -8
- package/dist/{where-m1uWsdua.d.cts → where-BmtjfWuS.d.cts} +2 -2
- package/dist/{where-CluR73rs.d.ts → where-kk1Zz2En.d.ts} +2 -2
- package/package.json +3 -1
- package/dist/chunk-7CDXX3QZ.cjs.map +0 -1
- package/dist/chunk-7W3KAMVQ.cjs.map +0 -1
- package/dist/chunk-D2GO3RBL.cjs +0 -12
- package/dist/chunk-DOTEN2FG.js.map +0 -1
- package/dist/chunk-FPCOUJSL.js.map +0 -1
- package/dist/chunk-JTI5WT4P.cjs.map +0 -1
- package/dist/chunk-LVCSL6A3.js.map +0 -1
- package/dist/chunk-O2P3KAUT.cjs.map +0 -1
- package/dist/chunk-OJ6IQVZG.js.map +0 -1
- package/dist/chunk-W5MTHMTE.cjs.map +0 -1
- package/dist/chunk-WI5VRP3X.js.map +0 -1
- package/dist/chunk-YZZBDCLV.js.map +0 -1
- package/dist/chunk-ZEMNF3QK.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkHTGDWIDE_cjs = require('./chunk-HTGDWIDE.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
6
|
-
var
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
var
|
|
4
|
+
var chunk4TJI44WP_cjs = require('./chunk-4TJI44WP.cjs');
|
|
5
|
+
var chunkWFUN6DCM_cjs = require('./chunk-WFUN6DCM.cjs');
|
|
6
|
+
var chunk4FJVSF3K_cjs = require('./chunk-4FJVSF3K.cjs');
|
|
7
|
+
var chunkPYJOBZR3_cjs = require('./chunk-PYJOBZR3.cjs');
|
|
8
|
+
var chunkDN4RUDF3_cjs = require('./chunk-DN4RUDF3.cjs');
|
|
9
|
+
var chunkIUIWCFG3_cjs = require('./chunk-IUIWCFG3.cjs');
|
|
10
|
+
var chunkPN37HVAV_cjs = require('./chunk-PN37HVAV.cjs');
|
|
10
11
|
var chunkCTHNVU6K_cjs = require('./chunk-CTHNVU6K.cjs');
|
|
11
12
|
var chunkEK6RJ373_cjs = require('./chunk-EK6RJ373.cjs');
|
|
12
13
|
var chunkX3244EKP_cjs = require('./chunk-X3244EKP.cjs');
|
|
13
|
-
var
|
|
14
|
+
var chunkYEDQLNVE_cjs = require('./chunk-YEDQLNVE.cjs');
|
|
14
15
|
var chunk7V335GHG_cjs = require('./chunk-7V335GHG.cjs');
|
|
15
16
|
var zod = require('zod');
|
|
16
17
|
var drizzleOrm = require('drizzle-orm');
|
|
@@ -27,7 +28,7 @@ function metaEdge(name, options = {}) {
|
|
|
27
28
|
description: options.description
|
|
28
29
|
};
|
|
29
30
|
return Object.freeze({
|
|
30
|
-
[
|
|
31
|
+
[chunk4TJI44WP_cjs.META_EDGE_BRAND]: true,
|
|
31
32
|
name,
|
|
32
33
|
properties
|
|
33
34
|
});
|
|
@@ -278,7 +279,7 @@ function createFulltextAccessor(alias, hasSearchableField) {
|
|
|
278
279
|
return {
|
|
279
280
|
matches: (query, k, options) => {
|
|
280
281
|
if (!hasSearchableField()) {
|
|
281
|
-
throw new
|
|
282
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
282
283
|
`Cannot call .$fulltext.matches() on alias "${alias}" \u2014 its node kind has no fields declared with searchable(). Add at least one: \`title: searchable({ language: "english" })\`.`
|
|
283
284
|
);
|
|
284
285
|
}
|
|
@@ -293,7 +294,7 @@ function createFulltextAccessor(alias, hasSearchableField) {
|
|
|
293
294
|
}
|
|
294
295
|
function fulltextMatch(field2, query, limit, options) {
|
|
295
296
|
if (!Number.isFinite(limit) || limit <= 0) {
|
|
296
|
-
throw new
|
|
297
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
297
298
|
`matches() limit must be a positive finite number, got ${String(limit)}`
|
|
298
299
|
);
|
|
299
300
|
}
|
|
@@ -560,7 +561,7 @@ function notInSubquery(field2, subquery) {
|
|
|
560
561
|
function assertSingleColumnSubquery(subquery) {
|
|
561
562
|
const columnCount = getSubqueryColumnCount(subquery);
|
|
562
563
|
if (columnCount === 1) return;
|
|
563
|
-
throw new
|
|
564
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
564
565
|
`IN/NOT IN subquery must project exactly 1 column, but got ${columnCount}`,
|
|
565
566
|
{ subqueryColumnCount: columnCount },
|
|
566
567
|
{
|
|
@@ -573,7 +574,7 @@ function assertCompatibleSubqueryValueTypes(field2, subquery) {
|
|
|
573
574
|
const subqueryValueType = getSingleSubqueryColumnValueType(subquery);
|
|
574
575
|
const resolvedValueType = fieldValueType ?? subqueryValueType;
|
|
575
576
|
if (isUnsupportedInSubqueryValueType(resolvedValueType)) {
|
|
576
|
-
throw new
|
|
577
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
577
578
|
`IN/NOT IN subquery does not support ${String(resolvedValueType)} values`,
|
|
578
579
|
{ valueType: resolvedValueType },
|
|
579
580
|
{
|
|
@@ -584,7 +585,7 @@ function assertCompatibleSubqueryValueTypes(field2, subquery) {
|
|
|
584
585
|
if (isInSubqueryTypeCompatible(fieldValueType, subqueryValueType)) {
|
|
585
586
|
return;
|
|
586
587
|
}
|
|
587
|
-
throw new
|
|
588
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
588
589
|
`IN/NOT IN type mismatch: field type "${String(fieldValueType)}" does not match subquery column type "${String(subqueryValueType)}"`,
|
|
589
590
|
{
|
|
590
591
|
fieldValueType,
|
|
@@ -710,7 +711,7 @@ function resolveLiteralValueTypes(literals) {
|
|
|
710
711
|
}
|
|
711
712
|
}
|
|
712
713
|
if (resolved.size > 1) {
|
|
713
|
-
throw new
|
|
714
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
714
715
|
"Mixed literal value types are not supported in predicates",
|
|
715
716
|
{ valueTypes: [...resolved] }
|
|
716
717
|
);
|
|
@@ -836,7 +837,7 @@ function compilePredicateExpression(expr, ctx) {
|
|
|
836
837
|
if (!upperIsParam) boundsForType.push(expr.upper);
|
|
837
838
|
const valueType = boundsForType.length > 0 ? resolveComparisonValueType(expr.field, boundsForType) : normalizeValueType2(expr.field.valueType);
|
|
838
839
|
if (valueType === "array" || valueType === "object") {
|
|
839
|
-
throw new
|
|
840
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
840
841
|
"Between comparisons are not supported for JSON arrays or objects"
|
|
841
842
|
);
|
|
842
843
|
}
|
|
@@ -903,7 +904,7 @@ function compileComparisonPredicate(expr, dialect, cteColumnPrefix) {
|
|
|
903
904
|
);
|
|
904
905
|
const opSql2 = COMPARISON_OP_SQL[expr.op];
|
|
905
906
|
if (!opSql2) {
|
|
906
|
-
throw new
|
|
907
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
907
908
|
`Comparison operation "${expr.op}" is not supported for parameterized predicates`
|
|
908
909
|
);
|
|
909
910
|
}
|
|
@@ -911,7 +912,7 @@ function compileComparisonPredicate(expr, dialect, cteColumnPrefix) {
|
|
|
911
912
|
}
|
|
912
913
|
const valueType = resolveComparisonValueType(expr.left, expr.right);
|
|
913
914
|
if (valueType === "array" || valueType === "object") {
|
|
914
|
-
throw new
|
|
915
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
915
916
|
`Comparison operation "${expr.op}" is not supported for ${valueType} values`
|
|
916
917
|
);
|
|
917
918
|
}
|
|
@@ -939,7 +940,7 @@ function compileComparisonPredicate(expr, dialect, cteColumnPrefix) {
|
|
|
939
940
|
const convertedRight = convertValueForSql(rightValue.value, dialect);
|
|
940
941
|
const opSql = COMPARISON_OP_SQL[expr.op];
|
|
941
942
|
if (!opSql) {
|
|
942
|
-
throw new
|
|
943
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
943
944
|
`Comparison operation "${expr.op}" is not supported`
|
|
944
945
|
);
|
|
945
946
|
}
|
|
@@ -1002,13 +1003,13 @@ function compileObjectPredicate(expr, dialect, cteColumnPrefix) {
|
|
|
1002
1003
|
}
|
|
1003
1004
|
case "pathEquals": {
|
|
1004
1005
|
if (!expr.value) {
|
|
1005
|
-
throw new
|
|
1006
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
1006
1007
|
"pathEquals requires a comparison value"
|
|
1007
1008
|
);
|
|
1008
1009
|
}
|
|
1009
1010
|
const valueType = resolvePredicateValueType(expr.valueType, expr.value);
|
|
1010
1011
|
if (valueType === "array" || valueType === "object") {
|
|
1011
|
-
throw new
|
|
1012
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
1012
1013
|
"pathEquals is not supported for JSON arrays or objects"
|
|
1013
1014
|
);
|
|
1014
1015
|
}
|
|
@@ -1024,7 +1025,7 @@ function compileObjectPredicate(expr, dialect, cteColumnPrefix) {
|
|
|
1024
1025
|
}
|
|
1025
1026
|
case "pathContains": {
|
|
1026
1027
|
if (!expr.value) {
|
|
1027
|
-
throw new
|
|
1028
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
1028
1029
|
"pathContains requires a comparison value"
|
|
1029
1030
|
);
|
|
1030
1031
|
}
|
|
@@ -1052,7 +1053,7 @@ function compileAggregatePredicate(expr, dialect) {
|
|
|
1052
1053
|
const aggregate = compileAggregateExpr(expr.aggregate, dialect);
|
|
1053
1054
|
const op = COMPARISON_OP_SQL[expr.op];
|
|
1054
1055
|
if (!op) {
|
|
1055
|
-
throw new
|
|
1056
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
1056
1057
|
`Comparison operation "${expr.op}" is not supported for aggregate predicates`
|
|
1057
1058
|
);
|
|
1058
1059
|
}
|
|
@@ -1087,7 +1088,7 @@ function compileAggregateExpr(expr, dialect) {
|
|
|
1087
1088
|
return drizzleOrm.sql`MAX(${field2})`;
|
|
1088
1089
|
}
|
|
1089
1090
|
default: {
|
|
1090
|
-
throw new
|
|
1091
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
1091
1092
|
`Unknown aggregate function: ${expr.function}`
|
|
1092
1093
|
);
|
|
1093
1094
|
}
|
|
@@ -1095,7 +1096,7 @@ function compileAggregateExpr(expr, dialect) {
|
|
|
1095
1096
|
}
|
|
1096
1097
|
function compileExistsSubquery(expr, ctx) {
|
|
1097
1098
|
if (expr.subquery.graphId === void 0) {
|
|
1098
|
-
throw new
|
|
1099
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError("EXISTS subquery must have a graphId");
|
|
1099
1100
|
}
|
|
1100
1101
|
const subSql = ctx.compileQuery(expr.subquery, expr.subquery.graphId);
|
|
1101
1102
|
return expr.negated ? drizzleOrm.sql`NOT EXISTS (${subSql})` : drizzleOrm.sql`EXISTS (${subSql})`;
|
|
@@ -1103,7 +1104,7 @@ function compileExistsSubquery(expr, ctx) {
|
|
|
1103
1104
|
function compileInSubquery(expr, ctx) {
|
|
1104
1105
|
const subqueryColumnCount = getSubqueryColumnCount(expr.subquery);
|
|
1105
1106
|
if (subqueryColumnCount !== 1) {
|
|
1106
|
-
throw new
|
|
1107
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
1107
1108
|
`IN/NOT IN subquery must project exactly 1 column, but got ${subqueryColumnCount}`,
|
|
1108
1109
|
{ subqueryColumnCount }
|
|
1109
1110
|
);
|
|
@@ -1112,13 +1113,13 @@ function compileInSubquery(expr, ctx) {
|
|
|
1112
1113
|
const subqueryValueType = getSingleSubqueryColumnValueType(expr.subquery);
|
|
1113
1114
|
const resolvedValueType = fieldValueType ?? subqueryValueType;
|
|
1114
1115
|
if (isUnsupportedInSubqueryValueType(resolvedValueType)) {
|
|
1115
|
-
throw new
|
|
1116
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
1116
1117
|
`IN/NOT IN subquery does not support ${String(resolvedValueType)} values`,
|
|
1117
1118
|
{ valueType: resolvedValueType }
|
|
1118
1119
|
);
|
|
1119
1120
|
}
|
|
1120
1121
|
if (!isInSubqueryTypeCompatible(fieldValueType, subqueryValueType)) {
|
|
1121
|
-
throw new
|
|
1122
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
1122
1123
|
`IN/NOT IN type mismatch: field type "${String(fieldValueType)}" does not match subquery column type "${String(subqueryValueType)}"`,
|
|
1123
1124
|
{
|
|
1124
1125
|
fieldValueType,
|
|
@@ -1128,7 +1129,7 @@ function compileInSubquery(expr, ctx) {
|
|
|
1128
1129
|
}
|
|
1129
1130
|
const valueType = fieldValueType ?? subqueryValueType;
|
|
1130
1131
|
if (expr.subquery.graphId === void 0) {
|
|
1131
|
-
throw new
|
|
1132
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
1132
1133
|
"IN/NOT IN subquery must have a graphId"
|
|
1133
1134
|
);
|
|
1134
1135
|
}
|
|
@@ -1148,7 +1149,7 @@ function extractStructuralPredicates(predicates, isMatch, rejectionMessage) {
|
|
|
1148
1149
|
function visit(expr, inDisallowedBranch) {
|
|
1149
1150
|
if (isMatch(expr)) {
|
|
1150
1151
|
if (inDisallowedBranch) {
|
|
1151
|
-
throw new
|
|
1152
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(rejectionMessage);
|
|
1152
1153
|
}
|
|
1153
1154
|
results.push(expr);
|
|
1154
1155
|
return;
|
|
@@ -1254,7 +1255,7 @@ function getNodeKindsForAlias(ast, alias) {
|
|
|
1254
1255
|
return traversal.nodeKinds;
|
|
1255
1256
|
}
|
|
1256
1257
|
}
|
|
1257
|
-
throw new
|
|
1258
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(`Unknown traversal source alias: ${alias}`);
|
|
1258
1259
|
}
|
|
1259
1260
|
function getHybridTargetAlias(vectorPredicate, fulltextPredicate) {
|
|
1260
1261
|
if (!vectorPredicate || !fulltextPredicate) return void 0;
|
|
@@ -1315,7 +1316,7 @@ function findUnaryNodeInProjectChain(rootNode, op) {
|
|
|
1315
1316
|
}
|
|
1316
1317
|
function inspectProjectPlan(logicalPlan) {
|
|
1317
1318
|
if (logicalPlan.root.op !== "project") {
|
|
1318
|
-
throw new
|
|
1319
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1319
1320
|
`SQL emitter expected logical plan root to be "project", got "${logicalPlan.root.op}"`,
|
|
1320
1321
|
{ component: "plan-inspector" }
|
|
1321
1322
|
);
|
|
@@ -1346,13 +1347,13 @@ function inspectProjectPlan(logicalPlan) {
|
|
|
1346
1347
|
function inspectStandardProjectPlan(logicalPlan) {
|
|
1347
1348
|
const shape = inspectProjectPlan(logicalPlan);
|
|
1348
1349
|
if (shape.hasSetOperation) {
|
|
1349
|
-
throw new
|
|
1350
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1350
1351
|
'Standard SQL emitter does not support plans containing "set_op" nodes',
|
|
1351
1352
|
{ component: "plan-inspector" }
|
|
1352
1353
|
);
|
|
1353
1354
|
}
|
|
1354
1355
|
if (shape.hasRecursiveExpand) {
|
|
1355
|
-
throw new
|
|
1356
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1356
1357
|
'Standard SQL emitter does not support plans containing "recursive_expand" nodes',
|
|
1357
1358
|
{ component: "plan-inspector" }
|
|
1358
1359
|
);
|
|
@@ -1362,13 +1363,13 @@ function inspectStandardProjectPlan(logicalPlan) {
|
|
|
1362
1363
|
function inspectRecursiveProjectPlan(logicalPlan) {
|
|
1363
1364
|
const shape = inspectProjectPlan(logicalPlan);
|
|
1364
1365
|
if (!shape.hasRecursiveExpand) {
|
|
1365
|
-
throw new
|
|
1366
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1366
1367
|
'Recursive SQL emitter expected logical plan to contain a "recursive_expand" node',
|
|
1367
1368
|
{ component: "plan-inspector" }
|
|
1368
1369
|
);
|
|
1369
1370
|
}
|
|
1370
1371
|
if (shape.hasSetOperation) {
|
|
1371
|
-
throw new
|
|
1372
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1372
1373
|
'Recursive SQL emitter does not support plans containing "set_op" nodes',
|
|
1373
1374
|
{ component: "plan-inspector" }
|
|
1374
1375
|
);
|
|
@@ -1429,7 +1430,7 @@ function inspectSetOperationPlan(logicalPlan) {
|
|
|
1429
1430
|
const operations = /* @__PURE__ */ new Set();
|
|
1430
1431
|
collectPlanOperations(logicalPlan.root, operations);
|
|
1431
1432
|
if (!operations.has("set_op")) {
|
|
1432
|
-
throw new
|
|
1433
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1433
1434
|
'Set-operation SQL emitter expected logical plan to contain a "set_op" node',
|
|
1434
1435
|
{ component: "plan-inspector" }
|
|
1435
1436
|
);
|
|
@@ -1447,25 +1448,25 @@ function inspectSetOperationPlan(logicalPlan) {
|
|
|
1447
1448
|
function assertRecursiveEmitterClauseAlignment(logicalPlan, input) {
|
|
1448
1449
|
const planShape = inspectRecursiveProjectPlan(logicalPlan);
|
|
1449
1450
|
if (planShape.hasSort && input.orderBy === void 0) {
|
|
1450
|
-
throw new
|
|
1451
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1451
1452
|
"Recursive SQL emitter expected ORDER BY clause for plan containing a sort node",
|
|
1452
1453
|
{ component: "recursive-emitter" }
|
|
1453
1454
|
);
|
|
1454
1455
|
}
|
|
1455
1456
|
if (!planShape.hasSort && input.orderBy !== void 0) {
|
|
1456
|
-
throw new
|
|
1457
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1457
1458
|
"Recursive SQL emitter received ORDER BY clause for a plan without sort nodes",
|
|
1458
1459
|
{ component: "recursive-emitter" }
|
|
1459
1460
|
);
|
|
1460
1461
|
}
|
|
1461
1462
|
if (planShape.hasLimitOffset && input.limitOffset === void 0) {
|
|
1462
|
-
throw new
|
|
1463
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1463
1464
|
"Recursive SQL emitter expected LIMIT/OFFSET clause for plan containing a limit_offset node",
|
|
1464
1465
|
{ component: "recursive-emitter" }
|
|
1465
1466
|
);
|
|
1466
1467
|
}
|
|
1467
1468
|
if (!planShape.hasLimitOffset && input.limitOffset !== void 0) {
|
|
1468
|
-
throw new
|
|
1469
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1469
1470
|
"Recursive SQL emitter received LIMIT/OFFSET clause for a plan without limit_offset nodes",
|
|
1470
1471
|
{ component: "recursive-emitter" }
|
|
1471
1472
|
);
|
|
@@ -1492,14 +1493,14 @@ function assertSetOperationEmitterClauseAlignment(logicalPlan, suffixClauses) {
|
|
|
1492
1493
|
const shape = inspectSetOperationPlan(logicalPlan);
|
|
1493
1494
|
const hasSuffixClauses = suffixClauses !== void 0 && suffixClauses.length > 0;
|
|
1494
1495
|
if (!shape.hasSort && !shape.hasLimitOffset && hasSuffixClauses) {
|
|
1495
|
-
throw new
|
|
1496
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1496
1497
|
"Set-operation SQL emitter received suffix clauses for a plan without top-level sort or limit_offset nodes",
|
|
1497
1498
|
{ component: "set-operation-emitter" }
|
|
1498
1499
|
);
|
|
1499
1500
|
}
|
|
1500
1501
|
if (!hasSuffixClauses) {
|
|
1501
1502
|
if (shape.hasSort || shape.hasLimitOffset) {
|
|
1502
|
-
throw new
|
|
1503
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1503
1504
|
"Set-operation SQL emitter expected suffix clauses for plan containing top-level sort or limit_offset nodes",
|
|
1504
1505
|
{ component: "set-operation-emitter" }
|
|
1505
1506
|
);
|
|
@@ -1509,7 +1510,7 @@ function assertSetOperationEmitterClauseAlignment(logicalPlan, suffixClauses) {
|
|
|
1509
1510
|
const limitOffsetClauseCount = shape.limitOffsetNode === void 0 ? 0 : (shape.limitOffsetNode.limit === void 0 ? 0 : 1) + (shape.limitOffsetNode.offset === void 0 ? 0 : 1);
|
|
1510
1511
|
const expectedClauseCount = (shape.sortNode === void 0 ? 0 : 1) + limitOffsetClauseCount;
|
|
1511
1512
|
if (suffixClauses.length !== expectedClauseCount) {
|
|
1512
|
-
throw new
|
|
1513
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1513
1514
|
`Set-operation SQL emitter expected ${String(expectedClauseCount)} top-level suffix clause(s) from logical plan, got ${String(suffixClauses.length)}`,
|
|
1514
1515
|
{ component: "set-operation-emitter" }
|
|
1515
1516
|
);
|
|
@@ -1533,38 +1534,38 @@ function emitSetOperationQuerySql(input) {
|
|
|
1533
1534
|
function assertStandardEmitterClauseAlignment(logicalPlan, input) {
|
|
1534
1535
|
const planShape = inspectStandardProjectPlan(logicalPlan);
|
|
1535
1536
|
if (input.groupBy !== void 0 && !planShape.hasAggregate) {
|
|
1536
|
-
throw new
|
|
1537
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1537
1538
|
"Standard SQL emitter received GROUP BY clause for a plan without aggregate nodes",
|
|
1538
1539
|
{ component: "standard-emitter" }
|
|
1539
1540
|
);
|
|
1540
1541
|
}
|
|
1541
1542
|
if (input.having !== void 0 && !planShape.hasAggregate) {
|
|
1542
|
-
throw new
|
|
1543
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1543
1544
|
"Standard SQL emitter received HAVING clause for a plan without aggregate nodes",
|
|
1544
1545
|
{ component: "standard-emitter" }
|
|
1545
1546
|
);
|
|
1546
1547
|
}
|
|
1547
1548
|
const expectsOrderBy = planShape.hasSort || planShape.hasVectorKnn || planShape.hasFulltextMatch;
|
|
1548
1549
|
if (expectsOrderBy && input.orderBy === void 0) {
|
|
1549
|
-
throw new
|
|
1550
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1550
1551
|
"Standard SQL emitter expected ORDER BY clause for plan containing a sort, vector_knn, or fulltext_match node",
|
|
1551
1552
|
{ component: "standard-emitter" }
|
|
1552
1553
|
);
|
|
1553
1554
|
}
|
|
1554
1555
|
if (!expectsOrderBy && input.orderBy !== void 0) {
|
|
1555
|
-
throw new
|
|
1556
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1556
1557
|
"Standard SQL emitter received ORDER BY clause for a plan without sort, vector_knn, or fulltext_match nodes",
|
|
1557
1558
|
{ component: "standard-emitter" }
|
|
1558
1559
|
);
|
|
1559
1560
|
}
|
|
1560
1561
|
if (planShape.hasLimitOffset && input.limitOffset === void 0) {
|
|
1561
|
-
throw new
|
|
1562
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1562
1563
|
"Standard SQL emitter expected LIMIT/OFFSET clause for plan containing a limit_offset node",
|
|
1563
1564
|
{ component: "standard-emitter" }
|
|
1564
1565
|
);
|
|
1565
1566
|
}
|
|
1566
1567
|
if (!planShape.hasLimitOffset && input.limitOffset !== void 0) {
|
|
1567
|
-
throw new
|
|
1568
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
1568
1569
|
"Standard SQL emitter received LIMIT/OFFSET clause for a plan without limit_offset nodes",
|
|
1569
1570
|
{ component: "standard-emitter" }
|
|
1570
1571
|
);
|
|
@@ -1613,15 +1614,15 @@ var DEFAULT_TABLE_NAMES = {
|
|
|
1613
1614
|
var VALID_IDENTIFIER_PATTERN = /^[a-z_][a-z0-9_$]*$/i;
|
|
1614
1615
|
function validateTableName(name, label) {
|
|
1615
1616
|
if (!name || name.length === 0) {
|
|
1616
|
-
throw new
|
|
1617
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(`${label} table name cannot be empty`);
|
|
1617
1618
|
}
|
|
1618
1619
|
if (name.length > chunkCTHNVU6K_cjs.MAX_PG_IDENTIFIER_LENGTH) {
|
|
1619
|
-
throw new
|
|
1620
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
1620
1621
|
`${label} table name exceeds maximum length of ${chunkCTHNVU6K_cjs.MAX_PG_IDENTIFIER_LENGTH} characters`
|
|
1621
1622
|
);
|
|
1622
1623
|
}
|
|
1623
1624
|
if (!VALID_IDENTIFIER_PATTERN.test(name)) {
|
|
1624
|
-
throw new
|
|
1625
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
1625
1626
|
`${label} table name "${name}" is not a valid SQL identifier. Table names must start with a letter or underscore and contain only letters, digits, underscores, or dollar signs.`
|
|
1626
1627
|
);
|
|
1627
1628
|
}
|
|
@@ -1926,7 +1927,7 @@ function compileAggregateExprFromSource(expr, dialect) {
|
|
|
1926
1927
|
return drizzleOrm.sql`${drizzleOrm.sql.raw(fn.toUpperCase())}(${column})`;
|
|
1927
1928
|
}
|
|
1928
1929
|
default: {
|
|
1929
|
-
throw new
|
|
1930
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
1930
1931
|
`Unknown aggregate function: ${String(fn)}`
|
|
1931
1932
|
);
|
|
1932
1933
|
}
|
|
@@ -2070,7 +2071,7 @@ function buildStandardOrderBy(input) {
|
|
|
2070
2071
|
for (const orderSpec of ast.orderBy) {
|
|
2071
2072
|
const valueType = orderSpec.field.valueType;
|
|
2072
2073
|
if (valueType === "array" || valueType === "object") {
|
|
2073
|
-
throw new
|
|
2074
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2074
2075
|
"Ordering by JSON arrays or objects is not supported"
|
|
2075
2076
|
);
|
|
2076
2077
|
}
|
|
@@ -2155,7 +2156,7 @@ function buildStandardEmbeddingsCte(input) {
|
|
|
2155
2156
|
const { field: field2, metric, minScore, queryEmbedding } = vectorPredicate;
|
|
2156
2157
|
const embeddingsTableName = ctx.schema.tables.embeddings;
|
|
2157
2158
|
if (nodeKinds.length === 0) {
|
|
2158
|
-
throw new
|
|
2159
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2159
2160
|
"Vector predicate must resolve to at least one node kind"
|
|
2160
2161
|
);
|
|
2161
2162
|
}
|
|
@@ -2238,7 +2239,7 @@ function buildStandardFulltextCte(input) {
|
|
|
2238
2239
|
const { dialect, schema } = ctx;
|
|
2239
2240
|
const { query, mode, language, limit, minScore } = fulltextPredicate;
|
|
2240
2241
|
if (nodeKinds.length === 0) {
|
|
2241
|
-
throw new
|
|
2242
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2242
2243
|
"Fulltext predicate must resolve to at least one node kind"
|
|
2243
2244
|
);
|
|
2244
2245
|
}
|
|
@@ -2246,7 +2247,7 @@ function buildStandardFulltextCte(input) {
|
|
|
2246
2247
|
const scopedNodes = buildScopedNodeIdsSubquery(fulltextPredicate.field.alias);
|
|
2247
2248
|
const fulltextStrategy = dialect.fulltext;
|
|
2248
2249
|
if (fulltextStrategy === void 0) {
|
|
2249
|
-
throw new
|
|
2250
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2250
2251
|
`Fulltext match predicates are not supported for dialect "${dialect.name}"`
|
|
2251
2252
|
);
|
|
2252
2253
|
}
|
|
@@ -2311,7 +2312,7 @@ function compileUserOrderBy(ast, dialect) {
|
|
|
2311
2312
|
for (const orderSpec of ast.orderBy) {
|
|
2312
2313
|
const valueType = orderSpec.field.valueType;
|
|
2313
2314
|
if (valueType === "array" || valueType === "object") {
|
|
2314
|
-
throw new
|
|
2315
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2315
2316
|
"Ordering by JSON arrays or objects is not supported"
|
|
2316
2317
|
);
|
|
2317
2318
|
}
|
|
@@ -2374,7 +2375,7 @@ function buildLimitOffsetClause(input) {
|
|
|
2374
2375
|
function runFulltextPredicatePass(ast, dialect) {
|
|
2375
2376
|
const fulltextPredicates = extractFulltextMatchPredicates(ast.predicates);
|
|
2376
2377
|
if (fulltextPredicates.length > 1) {
|
|
2377
|
-
throw new
|
|
2378
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2378
2379
|
"Multiple fulltext match predicates in a single query are not supported"
|
|
2379
2380
|
);
|
|
2380
2381
|
}
|
|
@@ -2383,29 +2384,29 @@ function runFulltextPredicatePass(ast, dialect) {
|
|
|
2383
2384
|
return { fulltextPredicate: void 0 };
|
|
2384
2385
|
}
|
|
2385
2386
|
if (!dialect.capabilities.supportsFulltext) {
|
|
2386
|
-
throw new
|
|
2387
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2387
2388
|
`Fulltext match predicates are not supported for dialect "${dialect.name}"`
|
|
2388
2389
|
);
|
|
2389
2390
|
}
|
|
2390
2391
|
const strategy = dialect.fulltext;
|
|
2391
2392
|
if (strategy === void 0) {
|
|
2392
|
-
throw new
|
|
2393
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2393
2394
|
`Dialect "${dialect.name}" advertises fulltext support but has no strategy configured`
|
|
2394
2395
|
);
|
|
2395
2396
|
}
|
|
2396
2397
|
if (!strategy.supportedModes.includes(fulltextPredicate.mode)) {
|
|
2397
|
-
throw new
|
|
2398
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2398
2399
|
`Fulltext query mode "${fulltextPredicate.mode}" is not supported by the "${strategy.name}" strategy. Supported modes: ${strategy.supportedModes.join(", ")}.`
|
|
2399
2400
|
);
|
|
2400
2401
|
}
|
|
2401
2402
|
if (!Number.isFinite(fulltextPredicate.limit) || fulltextPredicate.limit <= 0) {
|
|
2402
|
-
throw new
|
|
2403
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2403
2404
|
`Fulltext match limit must be a positive finite number, got ${String(fulltextPredicate.limit)}`
|
|
2404
2405
|
);
|
|
2405
2406
|
}
|
|
2406
2407
|
const { minScore } = fulltextPredicate;
|
|
2407
2408
|
if (minScore !== void 0 && !Number.isFinite(minScore)) {
|
|
2408
|
-
throw new
|
|
2409
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2409
2410
|
`Fulltext minScore must be a finite number, got ${String(minScore)}`
|
|
2410
2411
|
);
|
|
2411
2412
|
}
|
|
@@ -2426,12 +2427,12 @@ function runFusionConfigPass(ast, vectorPredicate, fulltextPredicate) {
|
|
|
2426
2427
|
const fusion = ast.fusion;
|
|
2427
2428
|
if (fusion === void 0) return { fusion: void 0 };
|
|
2428
2429
|
if (vectorPredicate === void 0 || fulltextPredicate === void 0) {
|
|
2429
|
-
throw new
|
|
2430
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2430
2431
|
`.fuseWith() requires both a .similarTo() and a .$fulltext.matches() predicate in the same query. Remove .fuseWith(), or add the missing predicate.`
|
|
2431
2432
|
);
|
|
2432
2433
|
}
|
|
2433
2434
|
if (vectorPredicate.field.alias !== fulltextPredicate.field.alias) {
|
|
2434
|
-
throw new
|
|
2435
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2435
2436
|
`.fuseWith() requires .similarTo() and .$fulltext.matches() to target the same node alias. Got vector=${vectorPredicate.field.alias}, fulltext=${fulltextPredicate.field.alias}.`
|
|
2436
2437
|
);
|
|
2437
2438
|
}
|
|
@@ -2444,10 +2445,10 @@ function runRecursiveTraversalSelectionPass(ast) {
|
|
|
2444
2445
|
(traversal) => traversal.variableLength !== void 0
|
|
2445
2446
|
);
|
|
2446
2447
|
if (variableLengthTraversal === void 0) {
|
|
2447
|
-
throw new
|
|
2448
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError("No variable-length traversal found");
|
|
2448
2449
|
}
|
|
2449
2450
|
if (ast.traversals.length > 1) {
|
|
2450
|
-
throw new
|
|
2451
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2451
2452
|
"Variable-length traversals with multiple traversals are not yet supported. Please use a single variable-length traversal."
|
|
2452
2453
|
);
|
|
2453
2454
|
}
|
|
@@ -2511,7 +2512,7 @@ function createTemporalFilterPass(ast, currentTimestamp) {
|
|
|
2511
2512
|
function runVectorPredicatePass(ast, dialect) {
|
|
2512
2513
|
const vectorPredicates = extractVectorSimilarityPredicates(ast.predicates);
|
|
2513
2514
|
if (vectorPredicates.length > 1) {
|
|
2514
|
-
throw new
|
|
2515
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2515
2516
|
"Multiple vector similarity predicates in a single query are not supported"
|
|
2516
2517
|
);
|
|
2517
2518
|
}
|
|
@@ -2521,29 +2522,29 @@ function runVectorPredicatePass(ast, dialect) {
|
|
|
2521
2522
|
}
|
|
2522
2523
|
const vectorStrategy = dialect.capabilities.vectorPredicateStrategy;
|
|
2523
2524
|
if (vectorStrategy === "unsupported" || !dialect.supportsVectors) {
|
|
2524
|
-
throw new
|
|
2525
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2525
2526
|
`Vector similarity predicates are not supported for dialect "${dialect.name}"`
|
|
2526
2527
|
);
|
|
2527
2528
|
}
|
|
2528
2529
|
if (!dialect.capabilities.vectorMetrics.includes(vectorPredicate.metric)) {
|
|
2529
|
-
throw new
|
|
2530
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2530
2531
|
`Vector metric "${vectorPredicate.metric}" is not supported for dialect "${dialect.name}"`
|
|
2531
2532
|
);
|
|
2532
2533
|
}
|
|
2533
2534
|
if (!Number.isFinite(vectorPredicate.limit) || vectorPredicate.limit <= 0) {
|
|
2534
|
-
throw new
|
|
2535
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2535
2536
|
`Vector predicate limit must be a positive finite number, got ${String(vectorPredicate.limit)}`
|
|
2536
2537
|
);
|
|
2537
2538
|
}
|
|
2538
2539
|
const { minScore } = vectorPredicate;
|
|
2539
2540
|
if (minScore !== void 0) {
|
|
2540
2541
|
if (!Number.isFinite(minScore)) {
|
|
2541
|
-
throw new
|
|
2542
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2542
2543
|
`Vector minScore must be a finite number, got ${String(minScore)}`
|
|
2543
2544
|
);
|
|
2544
2545
|
}
|
|
2545
2546
|
if (vectorPredicate.metric === "cosine" && (minScore < -1 || minScore > 1)) {
|
|
2546
|
-
throw new
|
|
2547
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
2547
2548
|
`Cosine minScore must be between -1 and 1, got ${String(minScore)}`
|
|
2548
2549
|
);
|
|
2549
2550
|
}
|
|
@@ -2637,7 +2638,7 @@ function appendAggregateSortLimitAndProjectNodes(currentNode, ast, nextPlanNodeI
|
|
|
2637
2638
|
} else if (hasOffset) {
|
|
2638
2639
|
node = { ...limitOffsetNodeBase, offset: ast.offset };
|
|
2639
2640
|
} else {
|
|
2640
|
-
throw new
|
|
2641
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
2641
2642
|
"limit_offset node requires limit or offset to be present"
|
|
2642
2643
|
);
|
|
2643
2644
|
}
|
|
@@ -2792,7 +2793,7 @@ function lowerComposableQueryToLogicalPlanNode(query, dialect, graphId, nextPlan
|
|
|
2792
2793
|
nextPlanNodeId
|
|
2793
2794
|
});
|
|
2794
2795
|
}
|
|
2795
|
-
const dialectAdapter =
|
|
2796
|
+
const dialectAdapter = chunkPN37HVAV_cjs.getDialect(dialect);
|
|
2796
2797
|
const vectorPredicate = runVectorPredicatePass(
|
|
2797
2798
|
query,
|
|
2798
2799
|
dialectAdapter
|
|
@@ -2951,7 +2952,7 @@ function runRecursiveQueryPassPipeline(ast, graphId, ctx) {
|
|
|
2951
2952
|
execute(currentState) {
|
|
2952
2953
|
const traversal = currentState.traversal;
|
|
2953
2954
|
if (traversal === void 0) {
|
|
2954
|
-
throw new
|
|
2955
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
2955
2956
|
"Recursive traversal pass did not select traversal"
|
|
2956
2957
|
);
|
|
2957
2958
|
}
|
|
@@ -3004,17 +3005,17 @@ function compileVariableLengthQueryWithRecursiveCteStrategy(ast, graphId, ctx) {
|
|
|
3004
3005
|
traversal: vlTraversal
|
|
3005
3006
|
} = passState;
|
|
3006
3007
|
if (temporalFilterPass === void 0) {
|
|
3007
|
-
throw new
|
|
3008
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
3008
3009
|
"Temporal filter pass did not initialize temporal state"
|
|
3009
3010
|
);
|
|
3010
3011
|
}
|
|
3011
3012
|
if (logicalPlan === void 0) {
|
|
3012
|
-
throw new
|
|
3013
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
3013
3014
|
"Logical plan pass did not initialize plan state"
|
|
3014
3015
|
);
|
|
3015
3016
|
}
|
|
3016
3017
|
if (vlTraversal === void 0) {
|
|
3017
|
-
throw new
|
|
3018
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
3018
3019
|
"Recursive traversal pass did not select traversal"
|
|
3019
3020
|
);
|
|
3020
3021
|
}
|
|
@@ -3106,7 +3107,7 @@ function compileRecursiveCte(ast, traversal, graphId, ctx, requiredColumnsByAlia
|
|
|
3106
3107
|
targetContext
|
|
3107
3108
|
);
|
|
3108
3109
|
if (vl.maxDepth > MAX_EXPLICIT_RECURSIVE_DEPTH) {
|
|
3109
|
-
throw new
|
|
3110
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
3110
3111
|
`Recursive traversal maxHops(${vl.maxDepth}) exceeds maximum explicit depth of ${MAX_EXPLICIT_RECURSIVE_DEPTH}`
|
|
3111
3112
|
);
|
|
3112
3113
|
}
|
|
@@ -3333,7 +3334,7 @@ function compileRecursiveSelectiveProjection(fields, ast, traversal, dialect) {
|
|
|
3333
3334
|
const allowedAliases = /* @__PURE__ */ new Set([ast.start.alias, traversal.nodeAlias]);
|
|
3334
3335
|
const columns = fields.map((field2) => {
|
|
3335
3336
|
if (!allowedAliases.has(field2.alias)) {
|
|
3336
|
-
throw new
|
|
3337
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
3337
3338
|
`Selective projection for recursive traversals does not support alias "${field2.alias}"`
|
|
3338
3339
|
);
|
|
3339
3340
|
}
|
|
@@ -3367,7 +3368,7 @@ function compileRecursiveOrderBy(ast, dialect) {
|
|
|
3367
3368
|
for (const orderSpec of ast.orderBy) {
|
|
3368
3369
|
const valueType = orderSpec.field.valueType;
|
|
3369
3370
|
if (valueType === "array" || valueType === "object") {
|
|
3370
|
-
throw new
|
|
3371
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
3371
3372
|
"Ordering by JSON arrays or objects is not supported"
|
|
3372
3373
|
);
|
|
3373
3374
|
}
|
|
@@ -3566,7 +3567,7 @@ function nullToUndefined2(value) {
|
|
|
3566
3567
|
}
|
|
3567
3568
|
function rowToNode(row) {
|
|
3568
3569
|
const rawProps = JSON.parse(row.props);
|
|
3569
|
-
const props =
|
|
3570
|
+
const props = chunkPYJOBZR3_cjs.filterReservedKeys(rawProps, chunkPYJOBZR3_cjs.RESERVED_NODE_KEYS);
|
|
3570
3571
|
return {
|
|
3571
3572
|
kind: row.kind,
|
|
3572
3573
|
id: row.id,
|
|
@@ -3586,7 +3587,7 @@ function rowToNodeMeta(row) {
|
|
|
3586
3587
|
}
|
|
3587
3588
|
function rowToEdge(row) {
|
|
3588
3589
|
const rawProps = JSON.parse(row.props);
|
|
3589
|
-
const props =
|
|
3590
|
+
const props = chunkPYJOBZR3_cjs.filterReservedKeys(rawProps, chunkPYJOBZR3_cjs.RESERVED_EDGE_KEYS);
|
|
3590
3591
|
return {
|
|
3591
3592
|
id: row.id,
|
|
3592
3593
|
kind: row.kind,
|
|
@@ -3750,7 +3751,7 @@ function buildKindProjectionPlan(kind, selection, resolveFieldType, entityPrefix
|
|
|
3750
3751
|
includeMeta = true;
|
|
3751
3752
|
continue;
|
|
3752
3753
|
}
|
|
3753
|
-
|
|
3754
|
+
chunkPYJOBZR3_cjs.validateProjectionField(field2, entityPrefix, kind);
|
|
3754
3755
|
if (!propertyFields.has(field2)) {
|
|
3755
3756
|
propertyFields.set(field2, {
|
|
3756
3757
|
field: field2,
|
|
@@ -3997,7 +3998,7 @@ function buildIncompatibleChangeError(classification, nonEmpty, graphId) {
|
|
|
3997
3998
|
}
|
|
3998
3999
|
const all = [...classification.incompatible, ...promoted];
|
|
3999
4000
|
if (all.length === 0) return void 0;
|
|
4000
|
-
return new
|
|
4001
|
+
return new chunkPYJOBZR3_cjs.IncompatibleChangeError(all, graphId);
|
|
4001
4002
|
}
|
|
4002
4003
|
function classifyNode(kind, existing, next, recorders) {
|
|
4003
4004
|
classifyProperties(kind, existing.properties, next.properties, recorders);
|
|
@@ -4280,7 +4281,7 @@ function classifyUnique(kind, existing, next, recorders) {
|
|
|
4280
4281
|
if (newOne === void 0) continue;
|
|
4281
4282
|
const { name: _existingName, ...existingShape } = constraint;
|
|
4282
4283
|
const { name: _nextName, ...nextShape } = newOne;
|
|
4283
|
-
if (!
|
|
4284
|
+
if (!chunkIUIWCFG3_cjs.canonicalEqual(existingShape, nextShape)) {
|
|
4284
4285
|
recorders.recordRequireEmpty({
|
|
4285
4286
|
kind,
|
|
4286
4287
|
type: "ADD_UNIQUE_ON_POPULATED",
|
|
@@ -4297,7 +4298,7 @@ function planRemovals(graph, names) {
|
|
|
4297
4298
|
if (namesSet.size === 0) {
|
|
4298
4299
|
return { document, removedNodeKinds: [], removedEdgeKinds: [] };
|
|
4299
4300
|
}
|
|
4300
|
-
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } =
|
|
4301
|
+
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunk4TJI44WP_cjs.extensionKindNames(document);
|
|
4301
4302
|
const compileTimeNodeNames = new Set(
|
|
4302
4303
|
Object.keys(graph.nodes).filter((name) => !runtimeNodeNames.has(name))
|
|
4303
4304
|
);
|
|
@@ -4306,10 +4307,10 @@ function planRemovals(graph, names) {
|
|
|
4306
4307
|
);
|
|
4307
4308
|
for (const name of namesSet) {
|
|
4308
4309
|
if (compileTimeNodeNames.has(name)) {
|
|
4309
|
-
throw new
|
|
4310
|
+
throw new chunkPYJOBZR3_cjs.RemoveCompileTimeKindError(name, "node", graph.id);
|
|
4310
4311
|
}
|
|
4311
4312
|
if (compileTimeEdgeNames.has(name)) {
|
|
4312
|
-
throw new
|
|
4313
|
+
throw new chunkPYJOBZR3_cjs.RemoveCompileTimeKindError(name, "edge", graph.id);
|
|
4313
4314
|
}
|
|
4314
4315
|
}
|
|
4315
4316
|
const removedNodeKinds = [...namesSet].filter(
|
|
@@ -4325,7 +4326,7 @@ function planRemovals(graph, names) {
|
|
|
4325
4326
|
for (const kindName of removedNodeKinds) {
|
|
4326
4327
|
const referents = referentsByKind.get(kindName);
|
|
4327
4328
|
if (referents !== void 0 && referents.length > 0) {
|
|
4328
|
-
throw new
|
|
4329
|
+
throw new chunkPYJOBZR3_cjs.KindHasReferentsError(kindName, referents, graph.id);
|
|
4329
4330
|
}
|
|
4330
4331
|
}
|
|
4331
4332
|
if (document === void 0) {
|
|
@@ -4397,8 +4398,8 @@ function planRemovals(graph, names) {
|
|
|
4397
4398
|
function stripGraphExtension(graph) {
|
|
4398
4399
|
const document = graph.extension;
|
|
4399
4400
|
if (document === void 0) return graph;
|
|
4400
|
-
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } =
|
|
4401
|
-
const runtimeOntologyKeys =
|
|
4401
|
+
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunk4TJI44WP_cjs.extensionKindNames(document);
|
|
4402
|
+
const runtimeOntologyKeys = chunk4TJI44WP_cjs.buildGraphExtensionOntologyKeySet(document);
|
|
4402
4403
|
const compileNodes = {};
|
|
4403
4404
|
for (const [name, registration] of Object.entries(graph.nodes)) {
|
|
4404
4405
|
if (runtimeNodeNames.has(name)) continue;
|
|
@@ -4410,7 +4411,7 @@ function stripGraphExtension(graph) {
|
|
|
4410
4411
|
compileEdges[name] = registration;
|
|
4411
4412
|
}
|
|
4412
4413
|
const compileOntology = graph.ontology.filter(
|
|
4413
|
-
(relation) => !runtimeOntologyKeys.has(
|
|
4414
|
+
(relation) => !runtimeOntologyKeys.has(chunk4TJI44WP_cjs.compileTimeOntologyKey(relation))
|
|
4414
4415
|
);
|
|
4415
4416
|
const compileIndexes = (graph.indexes ?? []).filter(
|
|
4416
4417
|
(index) => index.origin !== "runtime"
|
|
@@ -4450,13 +4451,13 @@ function buildCompileTimeReferentIndex(graph, runtimeEdgeNames) {
|
|
|
4450
4451
|
append(endpoint.kind, referent);
|
|
4451
4452
|
}
|
|
4452
4453
|
}
|
|
4453
|
-
const runtimeOntologyKeys =
|
|
4454
|
+
const runtimeOntologyKeys = chunk4TJI44WP_cjs.buildGraphExtensionOntologyKeySet(
|
|
4454
4455
|
graph.extension
|
|
4455
4456
|
);
|
|
4456
4457
|
for (const relation of graph.ontology) {
|
|
4457
|
-
if (runtimeOntologyKeys.has(
|
|
4458
|
-
const fromName =
|
|
4459
|
-
const toName =
|
|
4458
|
+
if (runtimeOntologyKeys.has(chunk4TJI44WP_cjs.compileTimeOntologyKey(relation))) continue;
|
|
4459
|
+
const fromName = chunk4TJI44WP_cjs.getTypeName(relation.from);
|
|
4460
|
+
const toName = chunk4TJI44WP_cjs.getTypeName(relation.to);
|
|
4460
4461
|
const referent = {
|
|
4461
4462
|
type: "compile-time-ontology",
|
|
4462
4463
|
name: `${relation.metaEdge.name}(${fromName}, ${toName})`
|
|
@@ -4524,7 +4525,7 @@ function compileSetOperation(op, graphId, dialect, schema, compileQuery2) {
|
|
|
4524
4525
|
const passState = runSetOperationPassPipeline(op, graphId, dialect);
|
|
4525
4526
|
const { logicalPlan } = passState;
|
|
4526
4527
|
if (logicalPlan === void 0) {
|
|
4527
|
-
throw new
|
|
4528
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
4528
4529
|
"Logical plan pass did not initialize plan state"
|
|
4529
4530
|
);
|
|
4530
4531
|
}
|
|
@@ -4588,7 +4589,7 @@ function compileSetOperationForSqlite(op, graphId, dialect, logicalPlan, schema)
|
|
|
4588
4589
|
dialect,
|
|
4589
4590
|
schema,
|
|
4590
4591
|
compileQuery: () => {
|
|
4591
|
-
throw new
|
|
4592
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
4592
4593
|
"compileQuery is not available in set-operation CTE compilation"
|
|
4593
4594
|
);
|
|
4594
4595
|
}
|
|
@@ -4643,7 +4644,7 @@ function validateSqliteSetOpLeaf(ast) {
|
|
|
4643
4644
|
unsupported.push("per-query OFFSET (use set operation's offset instead)");
|
|
4644
4645
|
}
|
|
4645
4646
|
if (unsupported.length > 0) {
|
|
4646
|
-
throw new
|
|
4647
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
4647
4648
|
`SQLite set operations (UNION/INTERSECT/EXCEPT) do not support: ${unsupported.join(", ")}. Use PostgreSQL for complex set operations, or refactor to separate queries.`
|
|
4648
4649
|
);
|
|
4649
4650
|
}
|
|
@@ -4835,7 +4836,7 @@ function compileFieldValueForSetOp(source, prefix, alias, dialect) {
|
|
|
4835
4836
|
return drizzleOrm.sql`${drizzleOrm.sql.raw(fn.toUpperCase())}(${column})`;
|
|
4836
4837
|
}
|
|
4837
4838
|
default: {
|
|
4838
|
-
throw new
|
|
4839
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
4839
4840
|
`Unknown aggregate function: ${String(fn)}`
|
|
4840
4841
|
);
|
|
4841
4842
|
}
|
|
@@ -4889,7 +4890,7 @@ function buildCompoundSelectRecursive(query, leaves, prefixToSelect) {
|
|
|
4889
4890
|
if (!("__type" in query)) {
|
|
4890
4891
|
const leaf = leaves.find((l) => l.ast === query);
|
|
4891
4892
|
if (!leaf) {
|
|
4892
|
-
throw new
|
|
4893
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError("Leaf query not found in leaves array");
|
|
4893
4894
|
}
|
|
4894
4895
|
return prefixToSelect.get(leaf.prefix);
|
|
4895
4896
|
}
|
|
@@ -4933,7 +4934,7 @@ function buildSetOperationSuffixClauses(op, dialect) {
|
|
|
4933
4934
|
if (op.orderBy && op.orderBy.length > 0) {
|
|
4934
4935
|
const projection = getLeftmostProjection(op);
|
|
4935
4936
|
if (projection.fields.length === 0) {
|
|
4936
|
-
throw new
|
|
4937
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
4937
4938
|
"Set operation ORDER BY requires explicit field projection. SELECT * does not provide stable output column names for ordering. Use .select() to specify which fields to project."
|
|
4938
4939
|
);
|
|
4939
4940
|
}
|
|
@@ -4943,7 +4944,7 @@ function buildSetOperationSuffixClauses(op, dialect) {
|
|
|
4943
4944
|
if (!projected) {
|
|
4944
4945
|
const fieldDesc = orderSpec.field.jsonPointer ? `${orderSpec.field.alias}.props${orderSpec.field.jsonPointer}` : `${orderSpec.field.alias}.${orderSpec.field.path.join(".")}`;
|
|
4945
4946
|
const availableFields = projection.fields.map((f) => f.outputName).join(", ");
|
|
4946
|
-
throw new
|
|
4947
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
4947
4948
|
`Set operation ORDER BY field "${fieldDesc}" is not in the projection. ORDER BY for UNION/INTERSECT/EXCEPT must reference projected columns. Available columns: ${availableFields}`
|
|
4948
4949
|
);
|
|
4949
4950
|
}
|
|
@@ -5396,7 +5397,7 @@ function compileSetOperation2(op, graphId, options = "sqlite") {
|
|
|
5396
5397
|
);
|
|
5397
5398
|
}
|
|
5398
5399
|
function resolveDialectAdapter(dialect, fulltextStrategy) {
|
|
5399
|
-
const baseAdapter =
|
|
5400
|
+
const baseAdapter = chunkPN37HVAV_cjs.getDialect(dialect);
|
|
5400
5401
|
if (fulltextStrategy === void 0 || fulltextStrategy === baseAdapter.fulltext) {
|
|
5401
5402
|
return baseAdapter;
|
|
5402
5403
|
}
|
|
@@ -5702,13 +5703,13 @@ function compileStandardQueryWithCteStrategy(ast, graphId, ctx) {
|
|
|
5702
5703
|
vectorPredicate
|
|
5703
5704
|
} = runStandardQueryPassPipeline(ast, graphId, ctx);
|
|
5704
5705
|
if (temporalFilterPass === void 0) {
|
|
5705
|
-
throw new
|
|
5706
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
5706
5707
|
"Temporal filter pass did not initialize temporal state",
|
|
5707
5708
|
{ phase: "standard-pass-pipeline" }
|
|
5708
5709
|
);
|
|
5709
5710
|
}
|
|
5710
5711
|
if (logicalPlan === void 0) {
|
|
5711
|
-
throw new
|
|
5712
|
+
throw new chunkYEDQLNVE_cjs.CompilerInvariantError(
|
|
5712
5713
|
"Logical plan pass did not initialize plan state",
|
|
5713
5714
|
{ phase: "standard-pass-pipeline" }
|
|
5714
5715
|
);
|
|
@@ -5835,7 +5836,7 @@ function decodeCursor(cursor) {
|
|
|
5835
5836
|
const json = atob(base64);
|
|
5836
5837
|
const raw = JSON.parse(json);
|
|
5837
5838
|
if (typeof raw.v !== "number" || raw.v > CURSOR_VERSION) {
|
|
5838
|
-
throw new
|
|
5839
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
5839
5840
|
`Unsupported cursor version: ${String(raw.v)}. Maximum supported: ${CURSOR_VERSION}`,
|
|
5840
5841
|
{
|
|
5841
5842
|
issues: [
|
|
@@ -5851,7 +5852,7 @@ function decodeCursor(cursor) {
|
|
|
5851
5852
|
);
|
|
5852
5853
|
}
|
|
5853
5854
|
if (raw.d !== "f" && raw.d !== "b") {
|
|
5854
|
-
throw new
|
|
5855
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(`Invalid cursor direction: ${String(raw.d)}`, {
|
|
5855
5856
|
issues: [
|
|
5856
5857
|
{
|
|
5857
5858
|
path: "cursor",
|
|
@@ -5861,7 +5862,7 @@ function decodeCursor(cursor) {
|
|
|
5861
5862
|
});
|
|
5862
5863
|
}
|
|
5863
5864
|
if (!Array.isArray(raw.vals) || !Array.isArray(raw.cols)) {
|
|
5864
|
-
throw new
|
|
5865
|
+
throw new chunkYEDQLNVE_cjs.ValidationError("Invalid cursor structure", {
|
|
5865
5866
|
issues: [
|
|
5866
5867
|
{
|
|
5867
5868
|
path: "cursor",
|
|
@@ -5871,7 +5872,7 @@ function decodeCursor(cursor) {
|
|
|
5871
5872
|
});
|
|
5872
5873
|
}
|
|
5873
5874
|
if (raw.vals.length !== raw.cols.length) {
|
|
5874
|
-
throw new
|
|
5875
|
+
throw new chunkYEDQLNVE_cjs.ValidationError("Cursor column count mismatch", {
|
|
5875
5876
|
issues: [
|
|
5876
5877
|
{
|
|
5877
5878
|
path: "cursor",
|
|
@@ -5887,10 +5888,10 @@ function decodeCursor(cursor) {
|
|
|
5887
5888
|
cols: raw.cols
|
|
5888
5889
|
};
|
|
5889
5890
|
} catch (error) {
|
|
5890
|
-
if (error instanceof
|
|
5891
|
+
if (error instanceof chunkYEDQLNVE_cjs.ValidationError) {
|
|
5891
5892
|
throw error;
|
|
5892
5893
|
}
|
|
5893
|
-
throw new
|
|
5894
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
5894
5895
|
"Invalid cursor format",
|
|
5895
5896
|
{
|
|
5896
5897
|
issues: [{ path: "cursor", message: "Failed to decode cursor" }]
|
|
@@ -5954,7 +5955,7 @@ function buildCursorFromRow(row, orderSpecs, direction) {
|
|
|
5954
5955
|
function validateCursorColumns(cursorData, orderSpecs) {
|
|
5955
5956
|
const expectedCols = orderSpecs.map((spec) => buildColumnId(spec));
|
|
5956
5957
|
if (cursorData.cols.length !== expectedCols.length) {
|
|
5957
|
-
throw new
|
|
5958
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
5958
5959
|
`Cursor has ${cursorData.cols.length} columns but query has ${expectedCols.length} ORDER BY columns`,
|
|
5959
5960
|
{
|
|
5960
5961
|
issues: [
|
|
@@ -5971,7 +5972,7 @@ function validateCursorColumns(cursorData, orderSpecs) {
|
|
|
5971
5972
|
}
|
|
5972
5973
|
for (const [index, expectedCol] of expectedCols.entries()) {
|
|
5973
5974
|
if (cursorData.cols[index] !== expectedCol) {
|
|
5974
|
-
throw new
|
|
5975
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
5975
5976
|
`Cursor column mismatch at position ${index}: expected "${expectedCol}", got "${cursorData.cols[index]}"`,
|
|
5976
5977
|
{
|
|
5977
5978
|
issues: [
|
|
@@ -6771,7 +6772,7 @@ var SQL_RESERVED_KEYWORDS = /* @__PURE__ */ new Set([
|
|
|
6771
6772
|
]);
|
|
6772
6773
|
function validateSqlIdentifier(alias) {
|
|
6773
6774
|
if (!SQL_IDENTIFIER_PATTERN.test(alias)) {
|
|
6774
|
-
throw new
|
|
6775
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
6775
6776
|
`Invalid alias "${alias}": must start with a letter or underscore, contain only letters, digits, and underscores, and be at most 63 characters`,
|
|
6776
6777
|
{
|
|
6777
6778
|
issues: [
|
|
@@ -6787,7 +6788,7 @@ function validateSqlIdentifier(alias) {
|
|
|
6787
6788
|
);
|
|
6788
6789
|
}
|
|
6789
6790
|
if (alias.toLowerCase().startsWith("cte_")) {
|
|
6790
|
-
throw new
|
|
6791
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
6791
6792
|
`Invalid alias "${alias}": aliases starting with "cte_" are reserved for internal use`,
|
|
6792
6793
|
{
|
|
6793
6794
|
issues: [
|
|
@@ -6803,7 +6804,7 @@ function validateSqlIdentifier(alias) {
|
|
|
6803
6804
|
);
|
|
6804
6805
|
}
|
|
6805
6806
|
if (SQL_RESERVED_KEYWORDS.has(alias.toLowerCase())) {
|
|
6806
|
-
throw new
|
|
6807
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
6807
6808
|
`Invalid alias "${alias}": "${alias}" is a reserved SQL keyword`,
|
|
6808
6809
|
{
|
|
6809
6810
|
issues: [
|
|
@@ -6872,7 +6873,7 @@ function validateStructuralPredicatePlacement(expression, matchType, buildError,
|
|
|
6872
6873
|
}
|
|
6873
6874
|
}
|
|
6874
6875
|
function throwInvalidVectorPredicatePlacement(path) {
|
|
6875
|
-
throw new
|
|
6876
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
6876
6877
|
"Vector similarity predicates cannot be nested under OR or NOT. Use top-level AND combinations instead.",
|
|
6877
6878
|
{
|
|
6878
6879
|
issues: [
|
|
@@ -6888,7 +6889,7 @@ function throwInvalidVectorPredicatePlacement(path) {
|
|
|
6888
6889
|
);
|
|
6889
6890
|
}
|
|
6890
6891
|
function throwInvalidFulltextPredicatePlacement(path) {
|
|
6891
|
-
throw new
|
|
6892
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
6892
6893
|
"Fulltext match predicates (.matches()) cannot be nested under OR or NOT. Use top-level AND combinations instead.",
|
|
6893
6894
|
{
|
|
6894
6895
|
issues: [
|
|
@@ -6928,13 +6929,13 @@ function validateFulltextPredicatePlacement(predicates) {
|
|
|
6928
6929
|
function validateHybridFusionOptions(options) {
|
|
6929
6930
|
const method = options.method;
|
|
6930
6931
|
if (method !== void 0 && method !== "rrf") {
|
|
6931
|
-
throw new
|
|
6932
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(`Unsupported fusion method: ${method}`, {
|
|
6932
6933
|
issues: [{ path: "fusion.method", message: `Only "rrf" is supported.` }]
|
|
6933
6934
|
});
|
|
6934
6935
|
}
|
|
6935
6936
|
const { k } = options;
|
|
6936
6937
|
if (k !== void 0 && (!Number.isFinite(k) || k <= 0)) {
|
|
6937
|
-
throw new
|
|
6938
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
6938
6939
|
`Fusion k must be a positive finite number, got: ${String(k)}`,
|
|
6939
6940
|
{
|
|
6940
6941
|
issues: [{ path: "fusion.k", message: "Must be a positive number." }]
|
|
@@ -6946,7 +6947,7 @@ function validateHybridFusionOptions(options) {
|
|
|
6946
6947
|
for (const key of ["vector", "fulltext"]) {
|
|
6947
6948
|
const weight = weights[key];
|
|
6948
6949
|
if (weight !== void 0 && (!Number.isFinite(weight) || weight < 0)) {
|
|
6949
|
-
throw new
|
|
6950
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
6950
6951
|
`Fusion weight for "${key}" must be a non-negative finite number, got: ${String(weight)}`,
|
|
6951
6952
|
{
|
|
6952
6953
|
issues: [
|
|
@@ -7005,7 +7006,7 @@ function buildCompileOptions(config) {
|
|
|
7005
7006
|
}
|
|
7006
7007
|
function toLiteral(value) {
|
|
7007
7008
|
if (value === null) {
|
|
7008
|
-
throw new
|
|
7009
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
7009
7010
|
"Parameter value must not be null (use undefined-based patterns instead)",
|
|
7010
7011
|
{ parameterName: "value", valueType: "null" }
|
|
7011
7012
|
);
|
|
@@ -7022,7 +7023,7 @@ function toLiteral(value) {
|
|
|
7022
7023
|
if (typeof value === "boolean") {
|
|
7023
7024
|
return { __type: "literal", value, valueType: "boolean" };
|
|
7024
7025
|
}
|
|
7025
|
-
throw new
|
|
7026
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
7026
7027
|
`Unsupported parameter value type: ${typeof value}`,
|
|
7027
7028
|
{ parameterName: "value", actualType: typeof value }
|
|
7028
7029
|
);
|
|
@@ -7033,7 +7034,7 @@ function substitutePredicateExpression(expr, bindings) {
|
|
|
7033
7034
|
if (isParameterRef(expr.right)) {
|
|
7034
7035
|
const value = bindings[expr.right.name];
|
|
7035
7036
|
if (value === void 0) {
|
|
7036
|
-
throw new
|
|
7037
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
7037
7038
|
`Missing binding for parameter "${expr.right.name}"`,
|
|
7038
7039
|
{ parameterName: expr.right.name }
|
|
7039
7040
|
);
|
|
@@ -7049,13 +7050,13 @@ function substitutePredicateExpression(expr, bindings) {
|
|
|
7049
7050
|
if (isParameterRef(expr.pattern)) {
|
|
7050
7051
|
const value = bindings[expr.pattern.name];
|
|
7051
7052
|
if (value === void 0) {
|
|
7052
|
-
throw new
|
|
7053
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
7053
7054
|
`Missing binding for parameter "${expr.pattern.name}"`,
|
|
7054
7055
|
{ parameterName: expr.pattern.name }
|
|
7055
7056
|
);
|
|
7056
7057
|
}
|
|
7057
7058
|
if (typeof value !== "string") {
|
|
7058
|
-
throw new
|
|
7059
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
7059
7060
|
`Parameter "${expr.pattern.name}" must be a string for string operations`,
|
|
7060
7061
|
{ parameterName: expr.pattern.name, actualType: typeof value }
|
|
7061
7062
|
);
|
|
@@ -7123,7 +7124,7 @@ function substitutePredicateExpression(expr, bindings) {
|
|
|
7123
7124
|
function resolveBinding(bindings, name) {
|
|
7124
7125
|
const value = bindings[name];
|
|
7125
7126
|
if (value === void 0) {
|
|
7126
|
-
throw new
|
|
7127
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(`Missing binding for parameter "${name}"`, {
|
|
7127
7128
|
parameterName: name
|
|
7128
7129
|
});
|
|
7129
7130
|
}
|
|
@@ -7142,13 +7143,13 @@ function substituteParameters(ast, bindings) {
|
|
|
7142
7143
|
};
|
|
7143
7144
|
}
|
|
7144
7145
|
function fillPlaceholders(params, bindings, dialect) {
|
|
7145
|
-
const adapter =
|
|
7146
|
+
const adapter = chunkPN37HVAV_cjs.getDialect(dialect);
|
|
7146
7147
|
return params.map((parameter) => {
|
|
7147
7148
|
if (parameter instanceof drizzleOrm.Placeholder) {
|
|
7148
7149
|
const name = parameter.name;
|
|
7149
7150
|
const value = bindings[name];
|
|
7150
7151
|
if (value === void 0) {
|
|
7151
|
-
throw new
|
|
7152
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
7152
7153
|
`Missing binding for parameter "${name}"`,
|
|
7153
7154
|
{ parameterName: name }
|
|
7154
7155
|
);
|
|
@@ -7215,7 +7216,7 @@ var PreparedQuery = class {
|
|
|
7215
7216
|
this.#selectFn
|
|
7216
7217
|
);
|
|
7217
7218
|
} catch (error) {
|
|
7218
|
-
if (error instanceof MissingSelectiveFieldError || error instanceof
|
|
7219
|
+
if (error instanceof MissingSelectiveFieldError || error instanceof chunkYEDQLNVE_cjs.UnsupportedPredicateError) {
|
|
7219
7220
|
return this.#executeUnoptimized(bindings);
|
|
7220
7221
|
}
|
|
7221
7222
|
throw error;
|
|
@@ -7386,7 +7387,7 @@ function validateBindings(bindings, metadata) {
|
|
|
7386
7387
|
}
|
|
7387
7388
|
}
|
|
7388
7389
|
if (missing.length > 0) {
|
|
7389
|
-
throw new
|
|
7390
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
7390
7391
|
`Missing bindings for parameter${missing.length === 1 ? "" : "s"}: ${missing.map((name) => `"${name}"`).join(", ")}`,
|
|
7391
7392
|
{ missingParameters: missing }
|
|
7392
7393
|
);
|
|
@@ -7395,7 +7396,7 @@ function validateBindings(bindings, metadata) {
|
|
|
7395
7396
|
(name) => !expectedNames.has(name)
|
|
7396
7397
|
);
|
|
7397
7398
|
if (unexpected.length > 0) {
|
|
7398
|
-
throw new
|
|
7399
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
7399
7400
|
`Unexpected bindings provided: ${unexpected.map((name) => `"${name}"`).join(", ")}`,
|
|
7400
7401
|
{ unexpectedParameters: unexpected }
|
|
7401
7402
|
);
|
|
@@ -7407,14 +7408,14 @@ function validateBindings(bindings, metadata) {
|
|
|
7407
7408
|
}
|
|
7408
7409
|
function validateBindingValue(name, value, isStringOp) {
|
|
7409
7410
|
if (value === null) {
|
|
7410
|
-
throw new
|
|
7411
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
7411
7412
|
"Parameter value must not be null (use undefined-based patterns instead)",
|
|
7412
7413
|
{ parameterName: name, valueType: "null" }
|
|
7413
7414
|
);
|
|
7414
7415
|
}
|
|
7415
7416
|
if (isStringOp) {
|
|
7416
7417
|
if (typeof value !== "string") {
|
|
7417
|
-
throw new
|
|
7418
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
7418
7419
|
`Parameter "${name}" must be a string for string operations`,
|
|
7419
7420
|
{ parameterName: name, actualType: typeof value }
|
|
7420
7421
|
);
|
|
@@ -7424,7 +7425,7 @@ function validateBindingValue(name, value, isStringOp) {
|
|
|
7424
7425
|
if (value instanceof Date || typeof value === "string" || typeof value === "number" || typeof value === "boolean") {
|
|
7425
7426
|
return;
|
|
7426
7427
|
}
|
|
7427
|
-
throw new
|
|
7428
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
7428
7429
|
`Unsupported parameter value type: ${typeof value}`,
|
|
7429
7430
|
{ parameterName: name, actualType: typeof value }
|
|
7430
7431
|
);
|
|
@@ -7830,7 +7831,7 @@ var ExecutableQuery = class _ExecutableQuery {
|
|
|
7830
7831
|
this.#cachedOptimizedCompiled = NOT_COMPUTED;
|
|
7831
7832
|
return void 0;
|
|
7832
7833
|
}
|
|
7833
|
-
if (error instanceof
|
|
7834
|
+
if (error instanceof chunkYEDQLNVE_cjs.UnsupportedPredicateError) {
|
|
7834
7835
|
this.#cachedSelectiveFieldsForExecute = void 0;
|
|
7835
7836
|
this.#cachedOptimizedCompiled = NOT_COMPUTED;
|
|
7836
7837
|
return void 0;
|
|
@@ -7880,7 +7881,7 @@ var ExecutableQuery = class _ExecutableQuery {
|
|
|
7880
7881
|
this.#cachedOptimizedCompiled = NOT_COMPUTED;
|
|
7881
7882
|
return void 0;
|
|
7882
7883
|
}
|
|
7883
|
-
if (error instanceof
|
|
7884
|
+
if (error instanceof chunkYEDQLNVE_cjs.UnsupportedPredicateError) {
|
|
7884
7885
|
this.#cachedSelectiveFieldsForExecute = void 0;
|
|
7885
7886
|
this.#cachedOptimizedCompiled = NOT_COMPUTED;
|
|
7886
7887
|
return void 0;
|
|
@@ -8014,7 +8015,7 @@ var ExecutableQuery = class _ExecutableQuery {
|
|
|
8014
8015
|
selectiveFields
|
|
8015
8016
|
});
|
|
8016
8017
|
} catch (error) {
|
|
8017
|
-
if (error instanceof
|
|
8018
|
+
if (error instanceof chunkYEDQLNVE_cjs.UnsupportedPredicateError) {
|
|
8018
8019
|
this.#cachedSelectiveFieldsForPagination = void 0;
|
|
8019
8020
|
return void 0;
|
|
8020
8021
|
}
|
|
@@ -8040,7 +8041,7 @@ var ExecutableQuery = class _ExecutableQuery {
|
|
|
8040
8041
|
this.#cachedSelectiveFieldsForPagination = void 0;
|
|
8041
8042
|
return void 0;
|
|
8042
8043
|
}
|
|
8043
|
-
if (error instanceof
|
|
8044
|
+
if (error instanceof chunkYEDQLNVE_cjs.UnsupportedPredicateError) {
|
|
8044
8045
|
this.#cachedSelectiveFieldsForPagination = void 0;
|
|
8045
8046
|
return void 0;
|
|
8046
8047
|
}
|
|
@@ -8065,7 +8066,7 @@ var ExecutableQuery = class _ExecutableQuery {
|
|
|
8065
8066
|
this.#cachedSelectiveFieldsForPagination = void 0;
|
|
8066
8067
|
return void 0;
|
|
8067
8068
|
}
|
|
8068
|
-
if (error instanceof
|
|
8069
|
+
if (error instanceof chunkYEDQLNVE_cjs.UnsupportedPredicateError) {
|
|
8069
8070
|
this.#cachedSelectiveFieldsForPagination = void 0;
|
|
8070
8071
|
return void 0;
|
|
8071
8072
|
}
|
|
@@ -8221,7 +8222,7 @@ var ExecutableQuery = class _ExecutableQuery {
|
|
|
8221
8222
|
);
|
|
8222
8223
|
}
|
|
8223
8224
|
if (this.#state.orderBy.length === 0) {
|
|
8224
|
-
throw new
|
|
8225
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
8225
8226
|
"Cursor pagination requires ORDER BY. Add .orderBy() before .paginate()",
|
|
8226
8227
|
{
|
|
8227
8228
|
issues: [
|
|
@@ -8297,7 +8298,7 @@ var ExecutableQuery = class _ExecutableQuery {
|
|
|
8297
8298
|
*/
|
|
8298
8299
|
stream(options) {
|
|
8299
8300
|
if (this.#state.orderBy.length === 0) {
|
|
8300
|
-
throw new
|
|
8301
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
8301
8302
|
"Streaming requires ORDER BY. Add .orderBy() before .stream()",
|
|
8302
8303
|
{
|
|
8303
8304
|
issues: [
|
|
@@ -8769,7 +8770,7 @@ var TraversalBuilder = class _TraversalBuilder {
|
|
|
8769
8770
|
toDynamic(kind, alias, options) {
|
|
8770
8771
|
validateSqlIdentifier(alias);
|
|
8771
8772
|
if (!this.#config.registry.hasNodeType(kind)) {
|
|
8772
|
-
throw new
|
|
8773
|
+
throw new chunkYEDQLNVE_cjs.KindNotFoundError(kind, "node", {
|
|
8773
8774
|
graphId: this.#config.graphId
|
|
8774
8775
|
});
|
|
8775
8776
|
}
|
|
@@ -8854,7 +8855,7 @@ var TraversalBuilder = class _TraversalBuilder {
|
|
|
8854
8855
|
for (const expected of expectedKinds) {
|
|
8855
8856
|
if (this.#config.registry.isAssignableTo(targetKind, expected)) return;
|
|
8856
8857
|
}
|
|
8857
|
-
throw new
|
|
8858
|
+
throw new chunkYEDQLNVE_cjs.EndpointError({
|
|
8858
8859
|
edgeKind: this.#edgeKinds[0] ?? "(unknown)",
|
|
8859
8860
|
endpoint: forwardSide,
|
|
8860
8861
|
actualKind: targetKind,
|
|
@@ -8987,7 +8988,7 @@ var QueryBuilder = class _QueryBuilder {
|
|
|
8987
8988
|
fromDynamic(kind, alias, options) {
|
|
8988
8989
|
validateSqlIdentifier(alias);
|
|
8989
8990
|
if (!this.#config.registry.hasNodeType(kind)) {
|
|
8990
|
-
throw new
|
|
8991
|
+
throw new chunkYEDQLNVE_cjs.KindNotFoundError(kind, "node", {
|
|
8991
8992
|
graphId: this.#config.graphId
|
|
8992
8993
|
});
|
|
8993
8994
|
}
|
|
@@ -9117,7 +9118,7 @@ var QueryBuilder = class _QueryBuilder {
|
|
|
9117
9118
|
#beginDynamicTraversal(edgeKind, edgeAlias, optional, options) {
|
|
9118
9119
|
validateSqlIdentifier(edgeAlias);
|
|
9119
9120
|
if (!this.#config.registry.hasEdgeType(edgeKind)) {
|
|
9120
|
-
throw new
|
|
9121
|
+
throw new chunkYEDQLNVE_cjs.KindNotFoundError(edgeKind, "edge", {
|
|
9121
9122
|
graphId: this.#config.graphId
|
|
9122
9123
|
});
|
|
9123
9124
|
}
|
|
@@ -9277,7 +9278,7 @@ var QueryBuilder = class _QueryBuilder {
|
|
|
9277
9278
|
*/
|
|
9278
9279
|
temporal(mode, asOf) {
|
|
9279
9280
|
if (mode === "asOf" && asOf === void 0) {
|
|
9280
|
-
throw new
|
|
9281
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
9281
9282
|
'Temporal mode "asOf" requires a timestamp',
|
|
9282
9283
|
{
|
|
9283
9284
|
issues: [
|
|
@@ -9995,12 +9996,12 @@ function createQueryBuilder(graphId, registry, options) {
|
|
|
9995
9996
|
function buildKindRegistry(graph) {
|
|
9996
9997
|
const nodeTypes = extractNodeTypes(graph);
|
|
9997
9998
|
const edgeTypes = extractEdgeTypes(graph);
|
|
9998
|
-
const closures = graph.ontology.length > 0 ?
|
|
9999
|
-
return new
|
|
9999
|
+
const closures = graph.ontology.length > 0 ? chunk4TJI44WP_cjs.computeClosuresFromOntology(graph.ontology) : chunk4TJI44WP_cjs.createEmptyClosures();
|
|
10000
|
+
return new chunk4TJI44WP_cjs.KindRegistry(nodeTypes, edgeTypes, closures);
|
|
10000
10001
|
}
|
|
10001
10002
|
function extractNodeTypes(graph) {
|
|
10002
10003
|
const result = /* @__PURE__ */ new Map();
|
|
10003
|
-
for (const typeName of
|
|
10004
|
+
for (const typeName of chunkWFUN6DCM_cjs.getNodeKinds(graph)) {
|
|
10004
10005
|
const registration = graph.nodes[typeName];
|
|
10005
10006
|
result.set(typeName, registration.type);
|
|
10006
10007
|
}
|
|
@@ -10008,7 +10009,7 @@ function extractNodeTypes(graph) {
|
|
|
10008
10009
|
}
|
|
10009
10010
|
function extractEdgeTypes(graph) {
|
|
10010
10011
|
const result = /* @__PURE__ */ new Map();
|
|
10011
|
-
for (const typeName of
|
|
10012
|
+
for (const typeName of chunkWFUN6DCM_cjs.getEdgeKinds(graph)) {
|
|
10012
10013
|
const registration = graph.edges[typeName];
|
|
10013
10014
|
result.set(typeName, registration.type);
|
|
10014
10015
|
}
|
|
@@ -10037,19 +10038,19 @@ function resolveTemporalFilter(ctx, options, tableAlias) {
|
|
|
10037
10038
|
function resolveMaxHops(rawMaxHops, fallback, optionName) {
|
|
10038
10039
|
const value = rawMaxHops ?? fallback;
|
|
10039
10040
|
if (!Number.isFinite(value) || !Number.isInteger(value)) {
|
|
10040
|
-
throw new
|
|
10041
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
10041
10042
|
`Graph algorithm ${optionName} must be a finite integer, got ${String(value)}.`,
|
|
10042
10043
|
{ option: optionName, value }
|
|
10043
10044
|
);
|
|
10044
10045
|
}
|
|
10045
10046
|
if (value < 1) {
|
|
10046
|
-
throw new
|
|
10047
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
10047
10048
|
`Graph algorithm ${optionName} must be at least 1, got ${value}.`,
|
|
10048
10049
|
{ option: optionName, value }
|
|
10049
10050
|
);
|
|
10050
10051
|
}
|
|
10051
10052
|
if (value > MAX_EXPLICIT_RECURSIVE_DEPTH) {
|
|
10052
|
-
throw new
|
|
10053
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
10053
10054
|
`Graph algorithm ${optionName} (${value}) exceeds the maximum of ${MAX_EXPLICIT_RECURSIVE_DEPTH}.`,
|
|
10054
10055
|
{ option: optionName, value, limit: MAX_EXPLICIT_RECURSIVE_DEPTH }
|
|
10055
10056
|
);
|
|
@@ -10058,7 +10059,7 @@ function resolveMaxHops(rawMaxHops, fallback, optionName) {
|
|
|
10058
10059
|
}
|
|
10059
10060
|
function assertEdgeKinds(edges) {
|
|
10060
10061
|
if (edges.length === 0) {
|
|
10061
|
-
throw new
|
|
10062
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
10062
10063
|
`Graph algorithms require at least one edge kind in 'edges'.`,
|
|
10063
10064
|
{ edges }
|
|
10064
10065
|
);
|
|
@@ -10222,7 +10223,7 @@ function createGraphAlgorithms(params) {
|
|
|
10222
10223
|
const ctx = {
|
|
10223
10224
|
graphId: params.graphId,
|
|
10224
10225
|
backend: params.backend,
|
|
10225
|
-
dialect:
|
|
10226
|
+
dialect: chunkPN37HVAV_cjs.getDialect(params.backend.dialect),
|
|
10226
10227
|
schema: params.schema ?? (params.backend.tableNames ? createSqlSchema(params.backend.tableNames) : createSqlSchema()),
|
|
10227
10228
|
defaultTemporalMode: params.defaultTemporalMode
|
|
10228
10229
|
};
|
|
@@ -10415,7 +10416,7 @@ function createEdgeCollection(config) {
|
|
|
10415
10416
|
async find(options) {
|
|
10416
10417
|
const untypedOptions = options;
|
|
10417
10418
|
if (untypedOptions?.where !== void 0) {
|
|
10418
|
-
throw new
|
|
10419
|
+
throw new chunkYEDQLNVE_cjs.UnsupportedPredicateError(
|
|
10419
10420
|
`store.edges.${kind}.find({ where }) is not supported. Use store.query().traverse(...).whereEdge(...) for edge property filters.`,
|
|
10420
10421
|
{ kind, operation: "find" }
|
|
10421
10422
|
);
|
|
@@ -10428,7 +10429,7 @@ function createEdgeCollection(config) {
|
|
|
10428
10429
|
temporalMode: mode
|
|
10429
10430
|
};
|
|
10430
10431
|
if (mode === "current" || mode === "asOf") {
|
|
10431
|
-
params.asOf = options?.asOf ??
|
|
10432
|
+
params.asOf = options?.asOf ?? chunkWFUN6DCM_cjs.nowIso();
|
|
10432
10433
|
}
|
|
10433
10434
|
if (options?.from?.kind !== void 0)
|
|
10434
10435
|
params.fromKind = options.from.kind;
|
|
@@ -10449,7 +10450,7 @@ function createEdgeCollection(config) {
|
|
|
10449
10450
|
temporalMode: mode
|
|
10450
10451
|
};
|
|
10451
10452
|
if (mode === "current" || mode === "asOf") {
|
|
10452
|
-
params.asOf = options?.asOf ??
|
|
10453
|
+
params.asOf = options?.asOf ?? chunkWFUN6DCM_cjs.nowIso();
|
|
10453
10454
|
}
|
|
10454
10455
|
if (options?.from?.kind !== void 0)
|
|
10455
10456
|
params.fromKind = options.from.kind;
|
|
@@ -10721,7 +10722,7 @@ function createNodeCollection(config) {
|
|
|
10721
10722
|
},
|
|
10722
10723
|
async find(options) {
|
|
10723
10724
|
if (options?.where !== void 0 && createQuery === void 0) {
|
|
10724
|
-
throw new
|
|
10725
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
10725
10726
|
`store.nodes.${kind}.find({ where }) requires a query-capable store`,
|
|
10726
10727
|
{ kind, operation: "find" }
|
|
10727
10728
|
);
|
|
@@ -10730,7 +10731,7 @@ function createNodeCollection(config) {
|
|
|
10730
10731
|
const mode2 = options.temporalMode ?? defaultTemporalMode;
|
|
10731
10732
|
let query = createQuery().from(kind, "_n").temporal(
|
|
10732
10733
|
mode2,
|
|
10733
|
-
mode2 === "asOf" ? options.asOf ??
|
|
10734
|
+
mode2 === "asOf" ? options.asOf ?? chunkWFUN6DCM_cjs.nowIso() : void 0
|
|
10734
10735
|
).whereNode("_n", options.where).select((ctx) => ctx._n);
|
|
10735
10736
|
if (options.limit !== void 0) query = query.limit(options.limit);
|
|
10736
10737
|
if (options.offset !== void 0) query = query.offset(options.offset);
|
|
@@ -10745,7 +10746,7 @@ function createNodeCollection(config) {
|
|
|
10745
10746
|
temporalMode: mode
|
|
10746
10747
|
};
|
|
10747
10748
|
if (mode === "current" || mode === "asOf") {
|
|
10748
|
-
params.asOf = options?.asOf ??
|
|
10749
|
+
params.asOf = options?.asOf ?? chunkWFUN6DCM_cjs.nowIso();
|
|
10749
10750
|
}
|
|
10750
10751
|
if (options?.limit !== void 0) params.limit = options.limit;
|
|
10751
10752
|
if (options?.offset !== void 0) params.offset = options.offset;
|
|
@@ -10761,7 +10762,7 @@ function createNodeCollection(config) {
|
|
|
10761
10762
|
temporalMode: mode
|
|
10762
10763
|
};
|
|
10763
10764
|
if (mode === "current" || mode === "asOf") {
|
|
10764
|
-
params.asOf = options?.asOf ??
|
|
10765
|
+
params.asOf = options?.asOf ?? chunkWFUN6DCM_cjs.nowIso();
|
|
10765
10766
|
}
|
|
10766
10767
|
return backend.countNodesByKind(params);
|
|
10767
10768
|
},
|
|
@@ -10948,7 +10949,7 @@ function createNodeCollectionsProxy(graph, graphId, registry, backend, operation
|
|
|
10948
10949
|
return new Proxy({}, {
|
|
10949
10950
|
get: (_, kind) => {
|
|
10950
10951
|
if (!Object.hasOwn(graph.nodes, kind)) {
|
|
10951
|
-
throw new
|
|
10952
|
+
throw new chunkYEDQLNVE_cjs.KindNotFoundError(kind, "node");
|
|
10952
10953
|
}
|
|
10953
10954
|
const cached = collectionCache.get(kind);
|
|
10954
10955
|
if (cached !== void 0) {
|
|
@@ -10970,7 +10971,7 @@ function createEdgeCollectionsProxy(graph, graphId, registry, backend, operation
|
|
|
10970
10971
|
return new Proxy({}, {
|
|
10971
10972
|
get: (_, kind) => {
|
|
10972
10973
|
if (!Object.hasOwn(graph.edges, kind)) {
|
|
10973
|
-
throw new
|
|
10974
|
+
throw new chunkYEDQLNVE_cjs.KindNotFoundError(kind, "edge");
|
|
10974
10975
|
}
|
|
10975
10976
|
const cached = collectionCache.get(kind);
|
|
10976
10977
|
if (cached !== void 0) {
|
|
@@ -10991,7 +10992,7 @@ function createEdgeCollectionsProxy(graph, graphId, registry, backend, operation
|
|
|
10991
10992
|
// src/store/introspect.ts
|
|
10992
10993
|
function introspectSchema(graph, context) {
|
|
10993
10994
|
const extension = graph.extension;
|
|
10994
|
-
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } =
|
|
10995
|
+
const { nodes: runtimeNodeNames, edges: runtimeEdgeNames } = chunk4TJI44WP_cjs.extensionKindNames(extension);
|
|
10995
10996
|
const deprecated = graph.deprecatedKinds;
|
|
10996
10997
|
const kinds = [];
|
|
10997
10998
|
for (const [name, registration] of Object.entries(graph.nodes)) {
|
|
@@ -11002,7 +11003,7 @@ function introspectSchema(graph, context) {
|
|
|
11002
11003
|
description: reg.type.description,
|
|
11003
11004
|
annotations: reg.type.annotations,
|
|
11004
11005
|
deprecated: deprecated.has(name),
|
|
11005
|
-
properties:
|
|
11006
|
+
properties: chunk4TJI44WP_cjs.serializeSchemaProperties(reg.type.schema),
|
|
11006
11007
|
unique: (reg.unique ?? []).map((constraint) => ({
|
|
11007
11008
|
name: constraint.name,
|
|
11008
11009
|
fields: [...constraint.fields],
|
|
@@ -11023,17 +11024,17 @@ function introspectSchema(graph, context) {
|
|
|
11023
11024
|
to: reg.to.map((entry2) => entry2.kind),
|
|
11024
11025
|
cardinality: reg.cardinality ?? "many",
|
|
11025
11026
|
endpointExistence: reg.endpointExistence ?? "notDeleted",
|
|
11026
|
-
properties:
|
|
11027
|
+
properties: chunk4TJI44WP_cjs.serializeSchemaProperties(edgeType.schema),
|
|
11027
11028
|
annotations: edgeType.annotations,
|
|
11028
11029
|
deprecated: deprecated.has(name)
|
|
11029
11030
|
});
|
|
11030
11031
|
}
|
|
11031
|
-
const runtimeOntologyKeys =
|
|
11032
|
+
const runtimeOntologyKeys = chunk4TJI44WP_cjs.buildGraphExtensionOntologyKeySet(extension);
|
|
11032
11033
|
const ontology = graph.ontology.map((relation) => ({
|
|
11033
11034
|
metaEdge: relation.metaEdge.name,
|
|
11034
|
-
from:
|
|
11035
|
-
to:
|
|
11036
|
-
origin: runtimeOntologyKeys.has(
|
|
11035
|
+
from: chunk4TJI44WP_cjs.getTypeName(relation.from),
|
|
11036
|
+
to: chunk4TJI44WP_cjs.getTypeName(relation.to),
|
|
11037
|
+
origin: runtimeOntologyKeys.has(chunk4TJI44WP_cjs.compileTimeOntologyKey(relation)) ? "runtime" : "compile-time"
|
|
11037
11038
|
}));
|
|
11038
11039
|
return {
|
|
11039
11040
|
graphId: context.graphId,
|
|
@@ -11072,13 +11073,13 @@ async function runMaterialization(items, options, runOne) {
|
|
|
11072
11073
|
async function materializeIndexes(context, options = {}) {
|
|
11073
11074
|
const { graph, graphId, backend, schemaVersion } = context;
|
|
11074
11075
|
if (backend.executeDdl === void 0) {
|
|
11075
|
-
throw new
|
|
11076
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
11076
11077
|
"store.materializeIndexes() requires a backend with `executeDdl` support. The bundled SQLite and Postgres backends provide it; a custom backend without `executeDdl` cannot run index DDL.",
|
|
11077
11078
|
{ code: "MATERIALIZE_BACKEND_UNSUPPORTED" }
|
|
11078
11079
|
);
|
|
11079
11080
|
}
|
|
11080
11081
|
if (backend.getIndexMaterialization === void 0 || backend.recordIndexMaterialization === void 0) {
|
|
11081
|
-
throw new
|
|
11082
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
11082
11083
|
"store.materializeIndexes() requires a backend with index materialization status primitives. The bundled SQLite and Postgres backends provide them; a custom backend must implement `getIndexMaterialization` and `recordIndexMaterialization`.",
|
|
11083
11084
|
{ code: "MATERIALIZE_BACKEND_UNSUPPORTED" }
|
|
11084
11085
|
);
|
|
@@ -11087,8 +11088,8 @@ async function materializeIndexes(context, options = {}) {
|
|
|
11087
11088
|
const kindFilter = options.kinds === void 0 ? void 0 : new Set(options.kinds);
|
|
11088
11089
|
if (kindFilter !== void 0) {
|
|
11089
11090
|
for (const name of kindFilter) {
|
|
11090
|
-
if (!
|
|
11091
|
-
throw new
|
|
11091
|
+
if (!chunkWFUN6DCM_cjs.isKnownKind(graph, name)) {
|
|
11092
|
+
throw new chunkYEDQLNVE_cjs.KindNotFoundError(
|
|
11092
11093
|
name,
|
|
11093
11094
|
Object.hasOwn(graph.edges, name) ? "edge" : "node",
|
|
11094
11095
|
{
|
|
@@ -11181,7 +11182,7 @@ function parallelBucketKey(declaration) {
|
|
|
11181
11182
|
return declaration.entity;
|
|
11182
11183
|
}
|
|
11183
11184
|
async function materializeRelationalIndex(declaration, backend, dialect, ddlOptions, graphId, schemaVersion, existingByStatusKey) {
|
|
11184
|
-
const ddl =
|
|
11185
|
+
const ddl = chunkPN37HVAV_cjs.generateIndexDDL(declaration, dialect, ddlOptions);
|
|
11185
11186
|
const targetTable = declaration.entity === "node" ? ddlOptions.nodesTableName ?? "typegraph_nodes" : ddlOptions.edgesTableName ?? "typegraph_edges";
|
|
11186
11187
|
const signature = await computeIndexSignature(
|
|
11187
11188
|
dialect,
|
|
@@ -11276,7 +11277,7 @@ async function materializeOne(declaration, backend, graphId, schemaVersion, acti
|
|
|
11276
11277
|
}
|
|
11277
11278
|
try {
|
|
11278
11279
|
await run();
|
|
11279
|
-
const attemptedAt =
|
|
11280
|
+
const attemptedAt = chunkWFUN6DCM_cjs.nowIso();
|
|
11280
11281
|
await recordIndexMaterialization(
|
|
11281
11282
|
buildAttempt({
|
|
11282
11283
|
declaration,
|
|
@@ -11353,14 +11354,14 @@ function buildAttempt(args) {
|
|
|
11353
11354
|
kind: args.declaration.kind,
|
|
11354
11355
|
signature: args.signature,
|
|
11355
11356
|
schemaVersion: args.schemaVersion,
|
|
11356
|
-
attemptedAt: args.attemptedAt ??
|
|
11357
|
+
attemptedAt: args.attemptedAt ?? chunkWFUN6DCM_cjs.nowIso(),
|
|
11357
11358
|
materializedAt: args.materializedAt,
|
|
11358
11359
|
error: args.error?.message
|
|
11359
11360
|
};
|
|
11360
11361
|
}
|
|
11361
11362
|
async function computeIndexSignature(dialect, targetTableName, declaration) {
|
|
11362
11363
|
const hashable = { dialect, targetTableName, declaration };
|
|
11363
|
-
const json = JSON.stringify(hashable,
|
|
11364
|
+
const json = JSON.stringify(hashable, chunkIUIWCFG3_cjs.sortedReplacer);
|
|
11364
11365
|
return chunkCTHNVU6K_cjs.sha256Hex(json, 16);
|
|
11365
11366
|
}
|
|
11366
11367
|
|
|
@@ -11372,7 +11373,7 @@ function buildPendingKindRemoval(args) {
|
|
|
11372
11373
|
async function materializeRemovals(context, options = {}) {
|
|
11373
11374
|
const { backend, graphId } = context;
|
|
11374
11375
|
if (backend.executeDdl === void 0 || backend.recordKindRemoval === void 0 || backend.getPendingKindRemovals === void 0) {
|
|
11375
|
-
throw new
|
|
11376
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
11376
11377
|
"store.materializeRemovals() requires a backend with kind-removal primitives (executeDdl, recordKindRemoval, getPendingKindRemovals). The bundled SQLite and Postgres backends provide them.",
|
|
11377
11378
|
{ code: "MATERIALIZE_REMOVALS_BACKEND_UNSUPPORTED" }
|
|
11378
11379
|
);
|
|
@@ -11428,14 +11429,14 @@ async function reconcilePendingRemovals(context) {
|
|
|
11428
11429
|
const reconciliations = [];
|
|
11429
11430
|
const stopAtVersion = marker ?? 1;
|
|
11430
11431
|
let currentRow = activeRow;
|
|
11431
|
-
let currentSchema =
|
|
11432
|
+
let currentSchema = chunk4TJI44WP_cjs.parseSerializedSchema(activeRow.schema_doc);
|
|
11432
11433
|
while (currentRow.version > stopAtVersion) {
|
|
11433
11434
|
const priorRow = await backend.getSchemaVersion(
|
|
11434
11435
|
graphId,
|
|
11435
11436
|
currentRow.version - 1
|
|
11436
11437
|
);
|
|
11437
11438
|
if (priorRow === void 0) break;
|
|
11438
|
-
const priorSchema =
|
|
11439
|
+
const priorSchema = chunk4TJI44WP_cjs.parseSerializedSchema(priorRow.schema_doc);
|
|
11439
11440
|
for (const entity of ENTITY_KINDS) {
|
|
11440
11441
|
const priorEntries = priorSchema[entity === "node" ? "nodes" : "edges"];
|
|
11441
11442
|
const currentEntries = currentSchema[entity === "node" ? "nodes" : "edges"];
|
|
@@ -11455,7 +11456,7 @@ async function reconcilePendingRemovals(context) {
|
|
|
11455
11456
|
currentSchema = priorSchema;
|
|
11456
11457
|
}
|
|
11457
11458
|
if (reconciliations.length > 0) {
|
|
11458
|
-
const attemptedAt =
|
|
11459
|
+
const attemptedAt = chunkWFUN6DCM_cjs.nowIso();
|
|
11459
11460
|
await Promise.all(
|
|
11460
11461
|
reconciliations.map(
|
|
11461
11462
|
(entry2) => recordKindRemoval(
|
|
@@ -11510,7 +11511,7 @@ async function materializeOne2(row, ctx) {
|
|
|
11510
11511
|
);
|
|
11511
11512
|
}
|
|
11512
11513
|
await Promise.all(deletes);
|
|
11513
|
-
const removedAt =
|
|
11514
|
+
const removedAt = chunkWFUN6DCM_cjs.nowIso();
|
|
11514
11515
|
await recordKindRemoval({
|
|
11515
11516
|
graphId: ctx.graphId,
|
|
11516
11517
|
kindName: row.kindName,
|
|
@@ -11532,7 +11533,7 @@ async function materializeOne2(row, ctx) {
|
|
|
11532
11533
|
kindName: row.kindName,
|
|
11533
11534
|
entity: row.entity,
|
|
11534
11535
|
schemaVersion: row.schemaVersion,
|
|
11535
|
-
attemptedAt:
|
|
11536
|
+
attemptedAt: chunkWFUN6DCM_cjs.nowIso(),
|
|
11536
11537
|
removedAt: void 0,
|
|
11537
11538
|
error: error.message
|
|
11538
11539
|
});
|
|
@@ -11632,7 +11633,7 @@ function checkCardinality(edgeKind, fromKind, fromId, cardinality, existingEdgeC
|
|
|
11632
11633
|
}
|
|
11633
11634
|
case "one": {
|
|
11634
11635
|
if (existingEdgeCount > 0) {
|
|
11635
|
-
return new
|
|
11636
|
+
return new chunkYEDQLNVE_cjs.CardinalityError({
|
|
11636
11637
|
edgeKind,
|
|
11637
11638
|
fromKind,
|
|
11638
11639
|
fromId,
|
|
@@ -11647,7 +11648,7 @@ function checkCardinality(edgeKind, fromKind, fromId, cardinality, existingEdgeC
|
|
|
11647
11648
|
}
|
|
11648
11649
|
case "oneActive": {
|
|
11649
11650
|
if (hasActiveEdge) {
|
|
11650
|
-
return new
|
|
11651
|
+
return new chunkYEDQLNVE_cjs.CardinalityError({
|
|
11651
11652
|
edgeKind,
|
|
11652
11653
|
fromKind,
|
|
11653
11654
|
fromId,
|
|
@@ -11661,7 +11662,7 @@ function checkCardinality(edgeKind, fromKind, fromId, cardinality, existingEdgeC
|
|
|
11661
11662
|
}
|
|
11662
11663
|
function checkUniqueEdge(edgeKind, fromKind, fromId, _toKind, _toId, existingCount) {
|
|
11663
11664
|
if (existingCount > 0) {
|
|
11664
|
-
return new
|
|
11665
|
+
return new chunkYEDQLNVE_cjs.CardinalityError({
|
|
11665
11666
|
edgeKind,
|
|
11666
11667
|
fromKind,
|
|
11667
11668
|
fromId,
|
|
@@ -11677,7 +11678,7 @@ function validateEdgeEndpoints(edgeKind, fromKind, toKind, registration, registr
|
|
|
11677
11678
|
(validKind) => registry.isAssignableTo(fromKind, validKind)
|
|
11678
11679
|
);
|
|
11679
11680
|
if (!fromValid) {
|
|
11680
|
-
return new
|
|
11681
|
+
return new chunkYEDQLNVE_cjs.EndpointError({
|
|
11681
11682
|
edgeKind,
|
|
11682
11683
|
endpoint: "from",
|
|
11683
11684
|
actualKind: fromKind,
|
|
@@ -11689,7 +11690,7 @@ function validateEdgeEndpoints(edgeKind, fromKind, toKind, registration, registr
|
|
|
11689
11690
|
(validKind) => registry.isAssignableTo(toKind, validKind)
|
|
11690
11691
|
);
|
|
11691
11692
|
if (!toValid) {
|
|
11692
|
-
return new
|
|
11693
|
+
return new chunkYEDQLNVE_cjs.EndpointError({
|
|
11693
11694
|
edgeKind,
|
|
11694
11695
|
endpoint: "to",
|
|
11695
11696
|
actualKind: toKind,
|
|
@@ -11701,7 +11702,7 @@ function validateEdgeEndpoints(edgeKind, fromKind, toKind, registration, registr
|
|
|
11701
11702
|
function checkDisjointness(nodeId, nodeKind, existingKinds, registry) {
|
|
11702
11703
|
for (const existingKind of existingKinds) {
|
|
11703
11704
|
if (registry.areDisjoint(nodeKind, existingKind)) {
|
|
11704
|
-
return new
|
|
11705
|
+
return new chunkYEDQLNVE_cjs.DisjointError({
|
|
11705
11706
|
nodeId,
|
|
11706
11707
|
attemptedKind: nodeKind,
|
|
11707
11708
|
conflictingKind: existingKind
|
|
@@ -11793,7 +11794,7 @@ async function checkCardinalityConstraint(ctx, edgeKind, cardinality, fromKind,
|
|
|
11793
11794
|
// src/store/operations/edge-operations.ts
|
|
11794
11795
|
function getEdgeRegistration(graph, kind) {
|
|
11795
11796
|
const registration = graph.edges[kind];
|
|
11796
|
-
if (registration === void 0) throw new
|
|
11797
|
+
if (registration === void 0) throw new chunkYEDQLNVE_cjs.KindNotFoundError(kind, "edge");
|
|
11797
11798
|
return registration;
|
|
11798
11799
|
}
|
|
11799
11800
|
function buildEdgeEndpointCacheKey(graphId, kind, id) {
|
|
@@ -11935,7 +11936,7 @@ async function validateAndPrepareEdgeCreate(ctx, input, id, backend) {
|
|
|
11935
11936
|
if (endpointError) throw endpointError;
|
|
11936
11937
|
const fromNode = await backend.getNode(ctx.graphId, fromKind, input.fromId);
|
|
11937
11938
|
if (!fromNode || fromNode.deleted_at) {
|
|
11938
|
-
throw new
|
|
11939
|
+
throw new chunkYEDQLNVE_cjs.EndpointNotFoundError({
|
|
11939
11940
|
edgeKind: kind,
|
|
11940
11941
|
endpoint: "from",
|
|
11941
11942
|
nodeKind: fromKind,
|
|
@@ -11944,19 +11945,19 @@ async function validateAndPrepareEdgeCreate(ctx, input, id, backend) {
|
|
|
11944
11945
|
}
|
|
11945
11946
|
const toNode = await backend.getNode(ctx.graphId, toKind, input.toId);
|
|
11946
11947
|
if (!toNode || toNode.deleted_at) {
|
|
11947
|
-
throw new
|
|
11948
|
+
throw new chunkYEDQLNVE_cjs.EndpointNotFoundError({
|
|
11948
11949
|
edgeKind: kind,
|
|
11949
11950
|
endpoint: "to",
|
|
11950
11951
|
nodeKind: toKind,
|
|
11951
11952
|
nodeId: input.toId
|
|
11952
11953
|
});
|
|
11953
11954
|
}
|
|
11954
|
-
const validatedProps =
|
|
11955
|
+
const validatedProps = chunk4TJI44WP_cjs.validateEdgeProps(edgeKind.schema, input.props, {
|
|
11955
11956
|
kind,
|
|
11956
11957
|
operation: "create"
|
|
11957
11958
|
});
|
|
11958
|
-
const validFrom =
|
|
11959
|
-
const validTo =
|
|
11959
|
+
const validFrom = chunkWFUN6DCM_cjs.validateOptionalIsoDate(input.validFrom, "validFrom");
|
|
11960
|
+
const validTo = chunkWFUN6DCM_cjs.validateOptionalIsoDate(input.validTo, "validTo");
|
|
11960
11961
|
const cardinality = registration.cardinality ?? "many";
|
|
11961
11962
|
const constraintContext = {
|
|
11962
11963
|
graphId: ctx.graphId,
|
|
@@ -12011,7 +12012,7 @@ async function executeEdgeCreateInternal(ctx, input, backend, options) {
|
|
|
12011
12012
|
async function executeEdgeCreate(ctx, input, backend) {
|
|
12012
12013
|
const result = await executeEdgeCreateInternal(ctx, input, backend);
|
|
12013
12014
|
if (!result) {
|
|
12014
|
-
throw new
|
|
12015
|
+
throw new chunkYEDQLNVE_cjs.DatabaseOperationError(
|
|
12015
12016
|
"Edge create failed: expected created edge row",
|
|
12016
12017
|
{ operation: "insert", entity: "edge" }
|
|
12017
12018
|
);
|
|
@@ -12088,7 +12089,7 @@ async function executeEdgeUpdate(ctx, input, backend) {
|
|
|
12088
12089
|
const id = input.id;
|
|
12089
12090
|
const existing = await backend.getEdge(ctx.graphId, id);
|
|
12090
12091
|
if (!existing || existing.deleted_at) {
|
|
12091
|
-
throw new
|
|
12092
|
+
throw new chunkYEDQLNVE_cjs.EdgeNotFoundError("unknown", id);
|
|
12092
12093
|
}
|
|
12093
12094
|
const opContext = ctx.createOperationContext(
|
|
12094
12095
|
"update",
|
|
@@ -12101,12 +12102,12 @@ async function executeEdgeUpdate(ctx, input, backend) {
|
|
|
12101
12102
|
const edgeKind = registration.type;
|
|
12102
12103
|
const existingProps = JSON.parse(existing.props);
|
|
12103
12104
|
const mergedProps = { ...existingProps, ...input.props };
|
|
12104
|
-
const validatedProps =
|
|
12105
|
+
const validatedProps = chunk4TJI44WP_cjs.validateEdgeProps(edgeKind.schema, mergedProps, {
|
|
12105
12106
|
kind: existing.kind,
|
|
12106
12107
|
operation: "update",
|
|
12107
12108
|
id
|
|
12108
12109
|
});
|
|
12109
|
-
const validTo =
|
|
12110
|
+
const validTo = chunkWFUN6DCM_cjs.validateOptionalIsoDate(input.validTo, "validTo");
|
|
12110
12111
|
const updateParams = {
|
|
12111
12112
|
graphId: ctx.graphId,
|
|
12112
12113
|
id,
|
|
@@ -12121,18 +12122,18 @@ async function executeEdgeUpsertUpdate(ctx, input, backend, options) {
|
|
|
12121
12122
|
const id = input.id;
|
|
12122
12123
|
const existing = await backend.getEdge(ctx.graphId, id);
|
|
12123
12124
|
if (!existing) {
|
|
12124
|
-
throw new
|
|
12125
|
+
throw new chunkYEDQLNVE_cjs.EdgeNotFoundError("unknown", id);
|
|
12125
12126
|
}
|
|
12126
12127
|
const registration = getEdgeRegistration(ctx.graph, existing.kind);
|
|
12127
12128
|
const edgeKind = registration.type;
|
|
12128
12129
|
const existingProps = JSON.parse(existing.props);
|
|
12129
12130
|
const mergedProps = { ...existingProps, ...input.props };
|
|
12130
|
-
const validatedProps =
|
|
12131
|
+
const validatedProps = chunk4TJI44WP_cjs.validateEdgeProps(edgeKind.schema, mergedProps, {
|
|
12131
12132
|
kind: existing.kind,
|
|
12132
12133
|
operation: "update",
|
|
12133
12134
|
id
|
|
12134
12135
|
});
|
|
12135
|
-
const validTo =
|
|
12136
|
+
const validTo = chunkWFUN6DCM_cjs.validateOptionalIsoDate(input.validTo, "validTo");
|
|
12136
12137
|
const updateParams = {
|
|
12137
12138
|
graphId: ctx.graphId,
|
|
12138
12139
|
id,
|
|
@@ -12186,7 +12187,7 @@ function validateMatchOnFields(schema, matchOn, edgeKind) {
|
|
|
12186
12187
|
if (matchOn.length === 0) return;
|
|
12187
12188
|
const shape = schema.shape;
|
|
12188
12189
|
if (shape === void 0) {
|
|
12189
|
-
throw new
|
|
12190
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
12190
12191
|
`Edge kind "${edgeKind}" has no schema shape to validate matchOn fields against`,
|
|
12191
12192
|
{
|
|
12192
12193
|
kind: edgeKind,
|
|
@@ -12200,7 +12201,7 @@ function validateMatchOnFields(schema, matchOn, edgeKind) {
|
|
|
12200
12201
|
}
|
|
12201
12202
|
const invalidFields = matchOn.filter((field2) => !(field2 in shape));
|
|
12202
12203
|
if (invalidFields.length > 0) {
|
|
12203
|
-
throw new
|
|
12204
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
12204
12205
|
`Invalid matchOn fields for edge kind "${edgeKind}": ${invalidFields.join(", ")}`,
|
|
12205
12206
|
{
|
|
12206
12207
|
kind: edgeKind,
|
|
@@ -12284,7 +12285,7 @@ async function executeEdgeGetOrCreateByEndpoints(ctx, kind, fromKind, fromId, to
|
|
|
12284
12285
|
const matchOn = options?.matchOn ?? [];
|
|
12285
12286
|
const registration = getEdgeRegistration(ctx.graph, kind);
|
|
12286
12287
|
const edgeKind = registration.type;
|
|
12287
|
-
const validatedProps =
|
|
12288
|
+
const validatedProps = chunk4TJI44WP_cjs.validateEdgeProps(edgeKind.schema, props, {
|
|
12288
12289
|
kind,
|
|
12289
12290
|
operation: "create"
|
|
12290
12291
|
});
|
|
@@ -12366,7 +12367,7 @@ async function executeEdgeBulkGetOrCreateByEndpoints(ctx, kind, items, backend,
|
|
|
12366
12367
|
validateMatchOnFields(edgeKind.schema, matchOn, kind);
|
|
12367
12368
|
const validated = [];
|
|
12368
12369
|
for (const item of items) {
|
|
12369
|
-
const validatedProps =
|
|
12370
|
+
const validatedProps = chunk4TJI44WP_cjs.validateEdgeProps(edgeKind.schema, item.props, {
|
|
12370
12371
|
kind,
|
|
12371
12372
|
operation: "create"
|
|
12372
12373
|
});
|
|
@@ -12742,7 +12743,7 @@ async function checkUniquenessConstraints(ctx, kind, id, props, constraints) {
|
|
|
12742
12743
|
key
|
|
12743
12744
|
});
|
|
12744
12745
|
if (existing && existing.node_id !== id) {
|
|
12745
|
-
throw new
|
|
12746
|
+
throw new chunkYEDQLNVE_cjs.UniquenessError({
|
|
12746
12747
|
constraintName: constraint.name,
|
|
12747
12748
|
kind: kindToCheck,
|
|
12748
12749
|
existingId: existing.node_id,
|
|
@@ -12825,7 +12826,7 @@ async function updateUniquenessEntries(ctx, kind, id, oldProps, newProps, constr
|
|
|
12825
12826
|
key: newKey
|
|
12826
12827
|
});
|
|
12827
12828
|
if (existing && existing.node_id !== id) {
|
|
12828
|
-
throw new
|
|
12829
|
+
throw new chunkYEDQLNVE_cjs.UniquenessError({
|
|
12829
12830
|
constraintName: constraint.name,
|
|
12830
12831
|
kind: kindToCheck,
|
|
12831
12832
|
existingId: existing.node_id,
|
|
@@ -12849,7 +12850,7 @@ async function updateUniquenessEntries(ctx, kind, id, oldProps, newProps, constr
|
|
|
12849
12850
|
// src/store/operations/node-operations.ts
|
|
12850
12851
|
function getNodeRegistration(graph, kind) {
|
|
12851
12852
|
const registration = graph.nodes[kind];
|
|
12852
|
-
if (registration === void 0) throw new
|
|
12853
|
+
if (registration === void 0) throw new chunkYEDQLNVE_cjs.KindNotFoundError(kind, "node");
|
|
12853
12854
|
return registration;
|
|
12854
12855
|
}
|
|
12855
12856
|
var CACHE_KEY_SEPARATOR = "\0";
|
|
@@ -12860,7 +12861,7 @@ function buildUniqueCacheKey(graphId, nodeKind, constraintName, key) {
|
|
|
12860
12861
|
return `${graphId}${CACHE_KEY_SEPARATOR}${nodeKind}${CACHE_KEY_SEPARATOR}${constraintName}${CACHE_KEY_SEPARATOR}${key}`;
|
|
12861
12862
|
}
|
|
12862
12863
|
function createNodeAlreadyExistsError(kind, id) {
|
|
12863
|
-
return new
|
|
12864
|
+
return new chunkYEDQLNVE_cjs.ValidationError(
|
|
12864
12865
|
`Node already exists: ${kind}/${id}`,
|
|
12865
12866
|
{
|
|
12866
12867
|
entityType: "node",
|
|
@@ -12901,7 +12902,7 @@ function resolveConstraint(graph, kind, constraintName) {
|
|
|
12901
12902
|
(candidate) => candidate.name === constraintName
|
|
12902
12903
|
);
|
|
12903
12904
|
if (constraint === void 0) {
|
|
12904
|
-
throw new
|
|
12905
|
+
throw new chunkYEDQLNVE_cjs.NodeConstraintNotFoundError(constraintName, kind);
|
|
12905
12906
|
}
|
|
12906
12907
|
return constraint;
|
|
12907
12908
|
}
|
|
@@ -13013,12 +13014,12 @@ async function validateAndPrepareNodeCreate(ctx, input, id, backend) {
|
|
|
13013
13014
|
const kind = input.kind;
|
|
13014
13015
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
13015
13016
|
const nodeKind = registration.type;
|
|
13016
|
-
const validatedProps =
|
|
13017
|
+
const validatedProps = chunk4TJI44WP_cjs.validateNodeProps(nodeKind.schema, input.props, {
|
|
13017
13018
|
kind,
|
|
13018
13019
|
operation: "create"
|
|
13019
13020
|
});
|
|
13020
|
-
const validFrom =
|
|
13021
|
-
const validTo =
|
|
13021
|
+
const validFrom = chunkWFUN6DCM_cjs.validateOptionalIsoDate(input.validFrom, "validFrom");
|
|
13022
|
+
const validTo = chunkWFUN6DCM_cjs.validateOptionalIsoDate(input.validTo, "validTo");
|
|
13022
13023
|
const existingNode = await backend.getNode(ctx.graphId, kind, id);
|
|
13023
13024
|
if (existingNode && !existingNode.deleted_at) {
|
|
13024
13025
|
throw createNodeAlreadyExistsError(kind, id);
|
|
@@ -13082,17 +13083,17 @@ async function performNodeUpdate(ctx, input, backend, options) {
|
|
|
13082
13083
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
13083
13084
|
const existing = await backend.getNode(ctx.graphId, kind, id);
|
|
13084
13085
|
if (!existing || existing.deleted_at && !options?.clearDeleted) {
|
|
13085
|
-
throw new
|
|
13086
|
+
throw new chunkYEDQLNVE_cjs.NodeNotFoundError(kind, id);
|
|
13086
13087
|
}
|
|
13087
13088
|
const existingProps = JSON.parse(existing.props);
|
|
13088
13089
|
const mergedProps = { ...existingProps, ...input.props };
|
|
13089
13090
|
const nodeKind = registration.type;
|
|
13090
|
-
const validatedProps =
|
|
13091
|
+
const validatedProps = chunk4TJI44WP_cjs.validateNodeProps(nodeKind.schema, mergedProps, {
|
|
13091
13092
|
kind,
|
|
13092
13093
|
operation: "update",
|
|
13093
13094
|
id
|
|
13094
13095
|
});
|
|
13095
|
-
const validTo =
|
|
13096
|
+
const validTo = chunkWFUN6DCM_cjs.validateOptionalIsoDate(input.validTo, "validTo");
|
|
13096
13097
|
await updateUniquenessEntries(
|
|
13097
13098
|
createUniquenessContext(ctx.graphId, ctx.registry, backend),
|
|
13098
13099
|
kind,
|
|
@@ -13134,7 +13135,7 @@ async function enforceDeleteBehavior(ctx, kind, id, mode, backend, registration)
|
|
|
13134
13135
|
switch (deleteBehavior) {
|
|
13135
13136
|
case "restrict": {
|
|
13136
13137
|
const edgeKinds = [...new Set(connectedEdges.map((edge) => edge.kind))];
|
|
13137
|
-
throw new
|
|
13138
|
+
throw new chunkYEDQLNVE_cjs.RestrictedDeleteError({
|
|
13138
13139
|
nodeKind: kind,
|
|
13139
13140
|
nodeId: id,
|
|
13140
13141
|
edgeCount: connectedEdges.length,
|
|
@@ -13255,7 +13256,7 @@ async function executeNodeCreateInternal(ctx, input, backend, options) {
|
|
|
13255
13256
|
async function executeNodeCreate(ctx, input, backend) {
|
|
13256
13257
|
const result = await executeNodeCreateInternal(ctx, input, backend);
|
|
13257
13258
|
if (!result) {
|
|
13258
|
-
throw new
|
|
13259
|
+
throw new chunkYEDQLNVE_cjs.DatabaseOperationError(
|
|
13259
13260
|
"Node create failed: expected created node row",
|
|
13260
13261
|
{ operation: "insert", entity: "node" }
|
|
13261
13262
|
);
|
|
@@ -13360,7 +13361,7 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
13360
13361
|
const ifExists = options?.ifExists ?? "return";
|
|
13361
13362
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
13362
13363
|
const nodeKind = registration.type;
|
|
13363
|
-
const validatedProps =
|
|
13364
|
+
const validatedProps = chunk4TJI44WP_cjs.validateNodeProps(nodeKind.schema, props, {
|
|
13364
13365
|
kind,
|
|
13365
13366
|
operation: "create"
|
|
13366
13367
|
});
|
|
@@ -13432,7 +13433,7 @@ async function executeNodeGetOrCreateByConstraint(ctx, kind, constraintName, pro
|
|
|
13432
13433
|
async function executeNodeFindByConstraint(ctx, kind, constraintName, props, backend) {
|
|
13433
13434
|
const registration = getNodeRegistration(ctx.graph, kind);
|
|
13434
13435
|
const nodeKind = registration.type;
|
|
13435
|
-
const validatedProps =
|
|
13436
|
+
const validatedProps = chunk4TJI44WP_cjs.validateNodeProps(nodeKind.schema, props, {
|
|
13436
13437
|
kind,
|
|
13437
13438
|
operation: "create"
|
|
13438
13439
|
});
|
|
@@ -13469,7 +13470,7 @@ async function executeNodeFindByConstraint(ctx, kind, constraintName, props, bac
|
|
|
13469
13470
|
function validateAndComputeKeys(nodeKind, kind, constraint, items) {
|
|
13470
13471
|
const validated = [];
|
|
13471
13472
|
for (const item of items) {
|
|
13472
|
-
const validatedProps =
|
|
13473
|
+
const validatedProps = chunk4TJI44WP_cjs.validateNodeProps(nodeKind.schema, item.props, {
|
|
13473
13474
|
kind,
|
|
13474
13475
|
operation: "create"
|
|
13475
13476
|
});
|
|
@@ -13653,7 +13654,7 @@ var DEFAULT_MAX_SKIPPED_IDS = 1e4;
|
|
|
13653
13654
|
function validatePageSize(value) {
|
|
13654
13655
|
if (value === void 0) return DEFAULT_PAGE_SIZE;
|
|
13655
13656
|
if (!Number.isInteger(value) || value <= 0) {
|
|
13656
|
-
throw new
|
|
13657
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
13657
13658
|
`pageSize must be a positive integer, got: ${String(value)}`,
|
|
13658
13659
|
{
|
|
13659
13660
|
issues: [{ path: "pageSize", message: "Must be a positive integer." }]
|
|
@@ -13665,7 +13666,7 @@ function validatePageSize(value) {
|
|
|
13665
13666
|
function validateMaxSkippedIds(value) {
|
|
13666
13667
|
if (value === void 0) return DEFAULT_MAX_SKIPPED_IDS;
|
|
13667
13668
|
if (!Number.isInteger(value) || value < 0) {
|
|
13668
|
-
throw new
|
|
13669
|
+
throw new chunkYEDQLNVE_cjs.ValidationError(
|
|
13669
13670
|
`maxSkippedIds must be a non-negative integer, got: ${String(value)}`,
|
|
13670
13671
|
{
|
|
13671
13672
|
issues: [
|
|
@@ -13685,7 +13686,7 @@ function isPropsObject(value) {
|
|
|
13685
13686
|
async function rebuildFulltextIndex(ctx, nodeKind, options) {
|
|
13686
13687
|
const { backend, registry } = ctx;
|
|
13687
13688
|
if (!backend.upsertFulltext || !backend.deleteFulltext) {
|
|
13688
|
-
throw new
|
|
13689
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
13689
13690
|
"Backend does not support fulltext; cannot rebuild index",
|
|
13690
13691
|
{ backend: backend.dialect, capability: "fulltext" }
|
|
13691
13692
|
);
|
|
@@ -13702,7 +13703,7 @@ async function rebuildFulltextIndex(ctx, nodeKind, options) {
|
|
|
13702
13703
|
for (const kind of targetKinds) {
|
|
13703
13704
|
const nodeType = registry.getNodeType(kind);
|
|
13704
13705
|
if (!nodeType) {
|
|
13705
|
-
throw new
|
|
13706
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(`Unknown node kind: ${kind}`, { kind });
|
|
13706
13707
|
}
|
|
13707
13708
|
if (getSearchableFields(nodeType.schema).length === 0) {
|
|
13708
13709
|
continue;
|
|
@@ -13763,7 +13764,7 @@ async function rebuildFulltextIndex(ctx, nodeKind, options) {
|
|
|
13763
13764
|
}
|
|
13764
13765
|
}
|
|
13765
13766
|
};
|
|
13766
|
-
await
|
|
13767
|
+
await chunkDN4RUDF3_cjs.runOptionallyInTransaction(backend, writePage);
|
|
13767
13768
|
processed += rows.length;
|
|
13768
13769
|
upserted += pageResult.toUpsert.length;
|
|
13769
13770
|
cleared += pageResult.toDelete.length;
|
|
@@ -13824,7 +13825,7 @@ function processPage(schema, rows) {
|
|
|
13824
13825
|
async function executeFulltextSearch(ctx, nodeKind, options) {
|
|
13825
13826
|
const { backend, graphId } = ctx;
|
|
13826
13827
|
if (!backend.fulltextSearch) {
|
|
13827
|
-
throw new
|
|
13828
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError("Backend does not support fulltext search", {
|
|
13828
13829
|
backend: backend.dialect,
|
|
13829
13830
|
capability: "fulltext"
|
|
13830
13831
|
});
|
|
@@ -13871,7 +13872,7 @@ async function executeFulltextSearch(ctx, nodeKind, options) {
|
|
|
13871
13872
|
async function executeVectorSearch(ctx, nodeKind, options) {
|
|
13872
13873
|
const { backend, graphId } = ctx;
|
|
13873
13874
|
if (!backend.vectorSearch) {
|
|
13874
|
-
throw new
|
|
13875
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError("Backend does not support vector search", {
|
|
13875
13876
|
backend: backend.dialect,
|
|
13876
13877
|
capability: "vector"
|
|
13877
13878
|
});
|
|
@@ -13906,13 +13907,13 @@ async function executeVectorSearch(ctx, nodeKind, options) {
|
|
|
13906
13907
|
async function executeHybridSearch(ctx, nodeKind, options) {
|
|
13907
13908
|
const { backend, graphId } = ctx;
|
|
13908
13909
|
if (!backend.vectorSearch) {
|
|
13909
|
-
throw new
|
|
13910
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError("Backend does not support vector search", {
|
|
13910
13911
|
backend: backend.dialect,
|
|
13911
13912
|
capability: "vector"
|
|
13912
13913
|
});
|
|
13913
13914
|
}
|
|
13914
13915
|
if (!backend.fulltextSearch) {
|
|
13915
|
-
throw new
|
|
13916
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError("Backend does not support fulltext search", {
|
|
13916
13917
|
backend: backend.dialect,
|
|
13917
13918
|
capability: "fulltext"
|
|
13918
13919
|
});
|
|
@@ -14044,7 +14045,7 @@ function validateFulltextCallOptions(backend, options) {
|
|
|
14044
14045
|
function validateFulltextMode(backend, strategy, capabilities, mode) {
|
|
14045
14046
|
if (strategy !== void 0) {
|
|
14046
14047
|
if (strategy.supportedModes.includes(mode)) return;
|
|
14047
|
-
throw new
|
|
14048
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
14048
14049
|
`Backend "${backend.dialect}" fulltext strategy "${strategy.name}" does not support mode "${mode}". Supported modes: ${strategy.supportedModes.join(", ")}`,
|
|
14049
14050
|
{
|
|
14050
14051
|
backend: backend.dialect,
|
|
@@ -14054,7 +14055,7 @@ function validateFulltextMode(backend, strategy, capabilities, mode) {
|
|
|
14054
14055
|
);
|
|
14055
14056
|
}
|
|
14056
14057
|
if (mode === "phrase" && capabilities && !capabilities.phraseQueries) {
|
|
14057
|
-
throw new
|
|
14058
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
14058
14059
|
`Backend "${backend.dialect}" does not support phrase queries`,
|
|
14059
14060
|
{ backend: backend.dialect, capability: "fulltext.phraseQueries" }
|
|
14060
14061
|
);
|
|
@@ -14063,14 +14064,14 @@ function validateFulltextMode(backend, strategy, capabilities, mode) {
|
|
|
14063
14064
|
function validateFulltextSnippets(backend, strategy, capabilities) {
|
|
14064
14065
|
const supportsSnippets = strategy === void 0 ? capabilities?.highlighting !== false : strategy.supportsSnippets;
|
|
14065
14066
|
if (supportsSnippets) return;
|
|
14066
|
-
throw new
|
|
14067
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
14067
14068
|
`Backend "${backend.dialect}" does not support snippet highlighting; drop includeSnippets or switch to a backend where highlighting is supported`,
|
|
14068
14069
|
{ backend: backend.dialect, capability: "fulltext.highlighting" }
|
|
14069
14070
|
);
|
|
14070
14071
|
}
|
|
14071
14072
|
function validateFulltextLanguageOption(backend, strategy, capabilities, language) {
|
|
14072
14073
|
if (strategy !== void 0 && !strategy.supportsLanguageOverride) {
|
|
14073
|
-
throw new
|
|
14074
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
14074
14075
|
`Backend "${backend.dialect}" fulltext strategy "${strategy.name}" does not honor a per-query \`language\` override (its tokenizer is fixed at table-create time). Drop the option, or pick a strategy that advertises \`supportsLanguageOverride: true\`.`,
|
|
14075
14076
|
{
|
|
14076
14077
|
backend: backend.dialect,
|
|
@@ -14202,7 +14203,7 @@ var StoreSearch = class {
|
|
|
14202
14203
|
}
|
|
14203
14204
|
#assertKindRegistered(kind) {
|
|
14204
14205
|
if (this.#context.registry.hasNodeType(kind)) return;
|
|
14205
|
-
throw new
|
|
14206
|
+
throw new chunkYEDQLNVE_cjs.KindNotFoundError(kind, "node", {
|
|
14206
14207
|
graphId: this.#context.graphId,
|
|
14207
14208
|
suggestion: "Compile-time kinds come from defineGraph; extension kinds appear after store.evolve() returns. Check store.introspect() for the registered set."
|
|
14208
14209
|
});
|
|
@@ -14388,7 +14389,7 @@ var Store = class _Store {
|
|
|
14388
14389
|
getNodeCollectionOrThrow(kind) {
|
|
14389
14390
|
const collection = this.getNodeCollection(kind);
|
|
14390
14391
|
if (collection === void 0) {
|
|
14391
|
-
throw new
|
|
14392
|
+
throw new chunkYEDQLNVE_cjs.KindNotFoundError(kind, "node", {
|
|
14392
14393
|
graphId: this.graphId
|
|
14393
14394
|
});
|
|
14394
14395
|
}
|
|
@@ -14412,7 +14413,7 @@ var Store = class _Store {
|
|
|
14412
14413
|
getEdgeCollectionOrThrow(kind) {
|
|
14413
14414
|
const collection = this.getEdgeCollection(kind);
|
|
14414
14415
|
if (collection === void 0) {
|
|
14415
|
-
throw new
|
|
14416
|
+
throw new chunkYEDQLNVE_cjs.KindNotFoundError(kind, "edge", {
|
|
14416
14417
|
graphId: this.graphId
|
|
14417
14418
|
});
|
|
14418
14419
|
}
|
|
@@ -14438,7 +14439,7 @@ var Store = class _Store {
|
|
|
14438
14439
|
getNodePropsSchemaOrThrow(kind) {
|
|
14439
14440
|
const schema = this.getNodePropsSchema(kind);
|
|
14440
14441
|
if (schema === void 0) {
|
|
14441
|
-
throw new
|
|
14442
|
+
throw new chunkYEDQLNVE_cjs.KindNotFoundError(kind, "node", {
|
|
14442
14443
|
graphId: this.graphId
|
|
14443
14444
|
});
|
|
14444
14445
|
}
|
|
@@ -14459,7 +14460,7 @@ var Store = class _Store {
|
|
|
14459
14460
|
getEdgePropsSchemaOrThrow(kind) {
|
|
14460
14461
|
const schema = this.getEdgePropsSchema(kind);
|
|
14461
14462
|
if (schema === void 0) {
|
|
14462
|
-
throw new
|
|
14463
|
+
throw new chunkYEDQLNVE_cjs.KindNotFoundError(kind, "edge", {
|
|
14463
14464
|
graphId: this.graphId
|
|
14464
14465
|
});
|
|
14465
14466
|
}
|
|
@@ -14675,7 +14676,7 @@ var Store = class _Store {
|
|
|
14675
14676
|
* @returns A tuple with per-query typed results, preserving input order
|
|
14676
14677
|
*/
|
|
14677
14678
|
async batch(...queries) {
|
|
14678
|
-
return
|
|
14679
|
+
return chunkDN4RUDF3_cjs.runOptionallyInTransaction(this.#backend, async (target) => {
|
|
14679
14680
|
const results = [];
|
|
14680
14681
|
for (const query of queries) {
|
|
14681
14682
|
const result = await query.executeOn(target);
|
|
@@ -14717,7 +14718,7 @@ var Store = class _Store {
|
|
|
14717
14718
|
graphId: this.graphId,
|
|
14718
14719
|
rootId,
|
|
14719
14720
|
backend: this.#backend,
|
|
14720
|
-
dialect:
|
|
14721
|
+
dialect: chunkPN37HVAV_cjs.getDialect(this.#backend.dialect),
|
|
14721
14722
|
schema: this.#schema,
|
|
14722
14723
|
options
|
|
14723
14724
|
});
|
|
@@ -14729,6 +14730,12 @@ var Store = class _Store {
|
|
|
14729
14730
|
* The transaction context provides the same collection API as the Store:
|
|
14730
14731
|
* - `tx.nodes.Person.create(...)` - Create a node
|
|
14731
14732
|
* - `tx.edges.worksAt.create(...)` - Create an edge
|
|
14733
|
+
* - `tx.sql` - the raw Drizzle handle **bound to this same
|
|
14734
|
+
* transaction**, for writing the caller's own relational tables in
|
|
14735
|
+
* the same atomic boundary (the graph-owned counterpart of
|
|
14736
|
+
* {@link Store.withTransaction}). See {@link TransactionContext}
|
|
14737
|
+
* for per-backend semantics; it is `undefined` only on the
|
|
14738
|
+
* non-transactional fallback.
|
|
14732
14739
|
*
|
|
14733
14740
|
* @example
|
|
14734
14741
|
* ```typescript
|
|
@@ -14743,6 +14750,16 @@ var Store = class _Store {
|
|
|
14743
14750
|
* });
|
|
14744
14751
|
* ```
|
|
14745
14752
|
*
|
|
14753
|
+
* @example Cross-store write via `tx.sql` (graph-owned boundary):
|
|
14754
|
+
* ```typescript
|
|
14755
|
+
* await store.transaction(async (tx) => {
|
|
14756
|
+
* await tx.nodes.Document.update(documentId, props);
|
|
14757
|
+
* // cast `tx.sql` to your concrete Drizzle database type
|
|
14758
|
+
* const sqlTx = tx.sql as NodePgDatabase;
|
|
14759
|
+
* await sqlTx.insert(documentVersions).values(versionRow);
|
|
14760
|
+
* });
|
|
14761
|
+
* ```
|
|
14762
|
+
*
|
|
14746
14763
|
* **Backends without transactions.** When `backend.capabilities.transactions`
|
|
14747
14764
|
* is `false` (Cloudflare D1, `drizzle-orm/neon-http`), this method runs the
|
|
14748
14765
|
* callback against the same backend used outside `transaction()` — writes
|
|
@@ -14762,31 +14779,108 @@ var Store = class _Store {
|
|
|
14762
14779
|
if (!this.#backend.capabilities.transactions) {
|
|
14763
14780
|
return fn({ nodes: this.nodes, edges: this.edges });
|
|
14764
14781
|
}
|
|
14765
|
-
return this.#backend.transaction(
|
|
14766
|
-
|
|
14767
|
-
|
|
14768
|
-
|
|
14769
|
-
|
|
14770
|
-
|
|
14771
|
-
|
|
14772
|
-
|
|
14773
|
-
|
|
14774
|
-
|
|
14775
|
-
|
|
14776
|
-
|
|
14777
|
-
|
|
14778
|
-
|
|
14779
|
-
|
|
14780
|
-
|
|
14781
|
-
|
|
14782
|
-
|
|
14783
|
-
|
|
14784
|
-
|
|
14785
|
-
|
|
14786
|
-
|
|
14782
|
+
return this.#backend.transaction(
|
|
14783
|
+
async (txBackend, sql17) => fn(this.#buildTransactionContext(txBackend, sql17))
|
|
14784
|
+
);
|
|
14785
|
+
}
|
|
14786
|
+
/**
|
|
14787
|
+
* Adopts a caller-owned, already-open Drizzle transaction so the graph
|
|
14788
|
+
* store and the caller's relational writes commit or roll back as one
|
|
14789
|
+
* Postgres/SQLite transaction (#134).
|
|
14790
|
+
*
|
|
14791
|
+
* Use this when the **relational layer owns the transaction**: the
|
|
14792
|
+
* caller has opened a transaction and needs TypeGraph writes enlisted
|
|
14793
|
+
* on the *same* connection. Unlike {@link transaction}, this opens no
|
|
14794
|
+
* transaction — the caller's transaction is the single commit/rollback
|
|
14795
|
+
* boundary.
|
|
14796
|
+
*
|
|
14797
|
+
* `withTransaction` is driver-agnostic; how the caller opens the
|
|
14798
|
+
* transaction is not. **Async drivers** (node-postgres,
|
|
14799
|
+
* `neon-serverless` Pool, libsql) use `db.transaction(async …)`.
|
|
14800
|
+
* **Synchronous `better-sqlite3`** cannot — its driver rejects an
|
|
14801
|
+
* `async` transaction callback (`Transaction function cannot return a
|
|
14802
|
+
* promise`) and the async continuation would run outside the
|
|
14803
|
+
* rolled-back transaction — so the caller opens the transaction with
|
|
14804
|
+
* explicit `BEGIN`/`COMMIT`/`ROLLBACK` on the single connection
|
|
14805
|
+
* instead. See the "Cross-Store Transactions" recipe for both shapes.
|
|
14806
|
+
*
|
|
14807
|
+
* The returned context reuses this store's already-resolved
|
|
14808
|
+
* schema/registry: it runs **no** schema bootstrap, `evolve`, or
|
|
14809
|
+
* migration, and emits **no DDL** inside the caller's transaction.
|
|
14810
|
+
* Fulltext operations assert the durable materialization marker (a
|
|
14811
|
+
* cached SELECT) and throw {@link StoreNotInitializedError} on a
|
|
14812
|
+
* missing/stale/failed marker rather than migrating mid-transaction —
|
|
14813
|
+
* so boot the parent store via `createStoreWithSchema` once at
|
|
14814
|
+
* startup.
|
|
14815
|
+
*
|
|
14816
|
+
* @example
|
|
14817
|
+
* ```typescript
|
|
14818
|
+
* // Async driver (Postgres / libsql):
|
|
14819
|
+
* await db.transaction(async (sqlTx) => {
|
|
14820
|
+
* const connector = await createConnectorRow(sqlTx, input); // Drizzle
|
|
14821
|
+
* const txStore = store.withTransaction(sqlTx);
|
|
14822
|
+
* await txStore.nodes.ArtifactSource.create({ // TypeGraph
|
|
14823
|
+
* connectorId: connector.id,
|
|
14824
|
+
* });
|
|
14825
|
+
* }); // one COMMIT / ROLLBACK across both layers
|
|
14826
|
+
* ```
|
|
14827
|
+
*
|
|
14828
|
+
* @throws {ConfigurationError} when the backend cannot adopt an
|
|
14829
|
+
* external transaction — either it is not a Drizzle Postgres/SQLite
|
|
14830
|
+
* backend, or `backend.capabilities.transactions` is `false`
|
|
14831
|
+
* (`drizzle-orm/neon-http`, Cloudflare D1, SQLite
|
|
14832
|
+
* `transactionMode: "none"`). A non-atomic fallback is deliberately
|
|
14833
|
+
* not offered here: the caller's relational write *would* still
|
|
14834
|
+
* commit, defeating the purpose of cross-store atomicity.
|
|
14835
|
+
* @throws {StoreNotInitializedError} at point of use, when a fulltext
|
|
14836
|
+
* operation on the returned context observes a missing/stale/failed
|
|
14837
|
+
* durable materialization marker (parent store not booted via
|
|
14838
|
+
* `createStoreWithSchema`). Rolls back the caller's transaction
|
|
14839
|
+
* without emitting any DDL.
|
|
14840
|
+
*/
|
|
14841
|
+
withTransaction(externalTx) {
|
|
14842
|
+
const adopt = this.#backend.adoptTransaction;
|
|
14843
|
+
if (!adopt) {
|
|
14844
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
14845
|
+
"This backend cannot adopt an external transaction for cross-store atomicity. adoptTransaction is provided only by the Drizzle Postgres/SQLite backends with transaction support. Check backend.capabilities.transactions, or run the relational and graph writes as separate transactions with manual compensation.",
|
|
14846
|
+
{ capability: "adoptTransaction" }
|
|
14787
14847
|
);
|
|
14788
|
-
|
|
14789
|
-
|
|
14848
|
+
}
|
|
14849
|
+
return this.#buildTransactionContext(adopt(externalTx), externalTx);
|
|
14850
|
+
}
|
|
14851
|
+
/**
|
|
14852
|
+
* Builds the `{ nodes, edges, sql }` projection bound to a
|
|
14853
|
+
* transaction-scoped backend. Shared verbatim by {@link transaction}
|
|
14854
|
+
* (TypeGraph opens the tx) and {@link withTransaction} (#134 — the
|
|
14855
|
+
* caller opened it) so both surfaces resolve collections, query
|
|
14856
|
+
* factories, and the reused graph/registry identically. `sql` is the
|
|
14857
|
+
* raw Drizzle handle bound to the same transaction (#140);
|
|
14858
|
+
* `undefined` only on the non-transactional fallback.
|
|
14859
|
+
*/
|
|
14860
|
+
#buildTransactionContext(txBackend, sql17) {
|
|
14861
|
+
const txNodeOperations = {
|
|
14862
|
+
...this.#nodeOperations,
|
|
14863
|
+
createQuery: () => this.#createQueryForBackend(txBackend)
|
|
14864
|
+
};
|
|
14865
|
+
const txEdgeOperations = {
|
|
14866
|
+
...this.#edgeOperations,
|
|
14867
|
+
createQuery: () => this.#createQueryForBackend(txBackend)
|
|
14868
|
+
};
|
|
14869
|
+
const nodes = createNodeCollectionsProxy(
|
|
14870
|
+
this.#graph,
|
|
14871
|
+
this.graphId,
|
|
14872
|
+
this.#registry,
|
|
14873
|
+
txBackend,
|
|
14874
|
+
txNodeOperations
|
|
14875
|
+
);
|
|
14876
|
+
const edges = createEdgeCollectionsProxy(
|
|
14877
|
+
this.#graph,
|
|
14878
|
+
this.graphId,
|
|
14879
|
+
this.#registry,
|
|
14880
|
+
txBackend,
|
|
14881
|
+
txEdgeOperations
|
|
14882
|
+
);
|
|
14883
|
+
return sql17 === void 0 ? { nodes, edges } : { nodes, edges, sql: sql17 };
|
|
14790
14884
|
}
|
|
14791
14885
|
// === Graph Lifecycle ===
|
|
14792
14886
|
/**
|
|
@@ -14888,7 +14982,7 @@ var Store = class _Store {
|
|
|
14888
14982
|
*/
|
|
14889
14983
|
async evolve(extension, options) {
|
|
14890
14984
|
const { activeRow, baseline } = await this.#loadCaughtUp("evolve");
|
|
14891
|
-
const merged =
|
|
14985
|
+
const merged = chunk4TJI44WP_cjs.mergeGraphExtension(baseline, extension);
|
|
14892
14986
|
if (merged === baseline) {
|
|
14893
14987
|
if (baseline === this.#graph) {
|
|
14894
14988
|
if (options?.ref !== void 0) options.ref.current = this;
|
|
@@ -14910,7 +15004,7 @@ var Store = class _Store {
|
|
|
14910
15004
|
const baselineDocument = baseline.extension ?? Object.freeze({});
|
|
14911
15005
|
const classification = classifyModifications(baselineDocument, extension);
|
|
14912
15006
|
if (classification.incompatible.length > 0) {
|
|
14913
|
-
throw new
|
|
15007
|
+
throw new chunkPYJOBZR3_cjs.IncompatibleChangeError(
|
|
14914
15008
|
classification.incompatible,
|
|
14915
15009
|
this.graphId
|
|
14916
15010
|
);
|
|
@@ -14924,7 +15018,7 @@ var Store = class _Store {
|
|
|
14924
15018
|
);
|
|
14925
15019
|
if (error !== void 0) throw error;
|
|
14926
15020
|
}
|
|
14927
|
-
const committed = await
|
|
15021
|
+
const committed = await chunk4TJI44WP_cjs.commitNewSchemaVersion(
|
|
14928
15022
|
this.#backend,
|
|
14929
15023
|
merged,
|
|
14930
15024
|
activeRow.version
|
|
@@ -14942,7 +15036,7 @@ var Store = class _Store {
|
|
|
14942
15036
|
async #runEagerOrThrow(store, eager) {
|
|
14943
15037
|
const result = await store.materializeIndexes(eager);
|
|
14944
15038
|
if (result.results.some((entry2) => entry2.status === "failed")) {
|
|
14945
|
-
throw new
|
|
15039
|
+
throw new chunkYEDQLNVE_cjs.EagerMaterializationError(result, this.graphId);
|
|
14946
15040
|
}
|
|
14947
15041
|
}
|
|
14948
15042
|
/**
|
|
@@ -15076,9 +15170,9 @@ var Store = class _Store {
|
|
|
15076
15170
|
);
|
|
15077
15171
|
}
|
|
15078
15172
|
const compileTimeGraph = stripGraphExtension(this.#graph);
|
|
15079
|
-
const merged = plan.document === void 0 ? compileTimeGraph :
|
|
15080
|
-
const finalGraph =
|
|
15081
|
-
const committedRow = await
|
|
15173
|
+
const merged = plan.document === void 0 ? compileTimeGraph : chunk4TJI44WP_cjs.mergeGraphExtension(compileTimeGraph, plan.document);
|
|
15174
|
+
const finalGraph = chunk4TJI44WP_cjs.applyDeprecatedKinds(merged, baseline.deprecatedKinds);
|
|
15175
|
+
const committedRow = await chunk4TJI44WP_cjs.commitNewSchemaVersion(
|
|
15082
15176
|
this.#backend,
|
|
15083
15177
|
finalGraph,
|
|
15084
15178
|
activeRow.version
|
|
@@ -15088,7 +15182,7 @@ var Store = class _Store {
|
|
|
15088
15182
|
if (this.#backend.ensureKindRemovalsTable !== void 0) {
|
|
15089
15183
|
await this.#backend.ensureKindRemovalsTable();
|
|
15090
15184
|
}
|
|
15091
|
-
const attemptedAt =
|
|
15185
|
+
const attemptedAt = chunkWFUN6DCM_cjs.nowIso();
|
|
15092
15186
|
const newSchemaVersion = committedRow.version;
|
|
15093
15187
|
const queue = (kindName, entity) => recordKindRemoval(
|
|
15094
15188
|
buildPendingKindRemoval({
|
|
@@ -15135,8 +15229,8 @@ var Store = class _Store {
|
|
|
15135
15229
|
const nextSet = new Set(baseline.deprecatedKinds);
|
|
15136
15230
|
if (direction === "add") {
|
|
15137
15231
|
for (const name of names) {
|
|
15138
|
-
if (!
|
|
15139
|
-
throw new
|
|
15232
|
+
if (!chunkWFUN6DCM_cjs.isKnownKind(baseline, name)) {
|
|
15233
|
+
throw new chunkYEDQLNVE_cjs.KindNotFoundError(
|
|
15140
15234
|
name,
|
|
15141
15235
|
isKnownEdgeKind(baseline, name) ? "edge" : "node",
|
|
15142
15236
|
{
|
|
@@ -15161,8 +15255,8 @@ var Store = class _Store {
|
|
|
15161
15255
|
schemaMetadataFromRow(activeRow)
|
|
15162
15256
|
);
|
|
15163
15257
|
}
|
|
15164
|
-
const merged =
|
|
15165
|
-
const result = await
|
|
15258
|
+
const merged = chunk4TJI44WP_cjs.applyDeprecatedKinds(baseline, nextSet);
|
|
15259
|
+
const result = await chunk4TJI44WP_cjs.ensureSchema(this.#backend, merged, {
|
|
15166
15260
|
preloaded: { activeRow, storedSchema },
|
|
15167
15261
|
autoMigrate: true
|
|
15168
15262
|
});
|
|
@@ -15171,8 +15265,8 @@ var Store = class _Store {
|
|
|
15171
15265
|
}
|
|
15172
15266
|
#catchUpToStored(storedSchema) {
|
|
15173
15267
|
const compileTimeGraph = stripGraphExtension(this.#graph);
|
|
15174
|
-
const withGraphExtension = storedSchema.extension === void 0 ? compileTimeGraph :
|
|
15175
|
-
return
|
|
15268
|
+
const withGraphExtension = storedSchema.extension === void 0 ? compileTimeGraph : chunk4TJI44WP_cjs.mergeGraphExtension(compileTimeGraph, storedSchema.extension);
|
|
15269
|
+
return chunk4TJI44WP_cjs.applyDeprecatedKinds(
|
|
15176
15270
|
withGraphExtension,
|
|
15177
15271
|
storedSchema.deprecatedKinds
|
|
15178
15272
|
);
|
|
@@ -15190,18 +15284,18 @@ var Store = class _Store {
|
|
|
15190
15284
|
* serializes the actual commit.
|
|
15191
15285
|
*/
|
|
15192
15286
|
async #loadCaughtUp(verb) {
|
|
15193
|
-
const activeRow = await
|
|
15287
|
+
const activeRow = await chunk4TJI44WP_cjs.loadActiveSchemaWithBootstrap(
|
|
15194
15288
|
this.#backend,
|
|
15195
15289
|
this.graphId
|
|
15196
15290
|
);
|
|
15197
15291
|
if (activeRow === void 0) {
|
|
15198
15292
|
const { phrase, code } = CAUGHT_UP_VERB_DETAILS[verb];
|
|
15199
|
-
throw new
|
|
15293
|
+
throw new chunkYEDQLNVE_cjs.ConfigurationError(
|
|
15200
15294
|
`Cannot ${phrase} graph "${this.graphId}": no schema has been initialized. Call createStoreWithSchema first.`,
|
|
15201
15295
|
{ code }
|
|
15202
15296
|
);
|
|
15203
15297
|
}
|
|
15204
|
-
const storedSchema =
|
|
15298
|
+
const storedSchema = chunk4TJI44WP_cjs.parseSerializedSchema(activeRow.schema_doc);
|
|
15205
15299
|
const baseline = this.#catchUpToStored(storedSchema);
|
|
15206
15300
|
return { activeRow, storedSchema, baseline };
|
|
15207
15301
|
}
|
|
@@ -15315,7 +15409,7 @@ var Store = class _Store {
|
|
|
15315
15409
|
// === Internal: Temporal Filtering ===
|
|
15316
15410
|
#matchesTemporalMode(row, options) {
|
|
15317
15411
|
const mode = options?.temporalMode ?? this.#graph.defaults.temporalMode;
|
|
15318
|
-
const asOf = options?.asOf ??
|
|
15412
|
+
const asOf = options?.asOf ?? chunkWFUN6DCM_cjs.nowIso();
|
|
15319
15413
|
switch (mode) {
|
|
15320
15414
|
case "current":
|
|
15321
15415
|
case "asOf": {
|
|
@@ -15372,11 +15466,12 @@ async function createStoreWithSchema(graph, backend, options) {
|
|
|
15372
15466
|
graph: merged,
|
|
15373
15467
|
activeRow,
|
|
15374
15468
|
storedSchema
|
|
15375
|
-
} = await
|
|
15376
|
-
const result = await
|
|
15469
|
+
} = await chunk4TJI44WP_cjs.loadAndMergeGraphExtensionDocument(backend, graph);
|
|
15470
|
+
const result = await chunk4TJI44WP_cjs.ensureSchema(backend, merged, {
|
|
15377
15471
|
...options,
|
|
15378
15472
|
preloaded: { activeRow, storedSchema }
|
|
15379
15473
|
});
|
|
15474
|
+
await backend.ensureRuntimeContributions?.(merged.id);
|
|
15380
15475
|
const store = new Store(
|
|
15381
15476
|
merged,
|
|
15382
15477
|
backend,
|
|
@@ -15388,163 +15483,163 @@ async function createStoreWithSchema(graph, backend, options) {
|
|
|
15388
15483
|
|
|
15389
15484
|
Object.defineProperty(exports, "broader", {
|
|
15390
15485
|
enumerable: true,
|
|
15391
|
-
get: function () { return
|
|
15486
|
+
get: function () { return chunk4TJI44WP_cjs.broader; }
|
|
15392
15487
|
});
|
|
15393
15488
|
Object.defineProperty(exports, "core", {
|
|
15394
15489
|
enumerable: true,
|
|
15395
|
-
get: function () { return
|
|
15490
|
+
get: function () { return chunk4TJI44WP_cjs.core; }
|
|
15396
15491
|
});
|
|
15397
15492
|
Object.defineProperty(exports, "defineEdge", {
|
|
15398
15493
|
enumerable: true,
|
|
15399
|
-
get: function () { return
|
|
15494
|
+
get: function () { return chunk4TJI44WP_cjs.defineEdge; }
|
|
15400
15495
|
});
|
|
15401
15496
|
Object.defineProperty(exports, "defineNode", {
|
|
15402
15497
|
enumerable: true,
|
|
15403
|
-
get: function () { return
|
|
15498
|
+
get: function () { return chunk4TJI44WP_cjs.defineNode; }
|
|
15404
15499
|
});
|
|
15405
15500
|
Object.defineProperty(exports, "differentFrom", {
|
|
15406
15501
|
enumerable: true,
|
|
15407
|
-
get: function () { return
|
|
15502
|
+
get: function () { return chunk4TJI44WP_cjs.differentFrom; }
|
|
15408
15503
|
});
|
|
15409
15504
|
Object.defineProperty(exports, "disjointWith", {
|
|
15410
15505
|
enumerable: true,
|
|
15411
|
-
get: function () { return
|
|
15506
|
+
get: function () { return chunk4TJI44WP_cjs.disjointWith; }
|
|
15412
15507
|
});
|
|
15413
15508
|
Object.defineProperty(exports, "equivalentTo", {
|
|
15414
15509
|
enumerable: true,
|
|
15415
|
-
get: function () { return
|
|
15510
|
+
get: function () { return chunk4TJI44WP_cjs.equivalentTo; }
|
|
15416
15511
|
});
|
|
15417
15512
|
Object.defineProperty(exports, "hasPart", {
|
|
15418
15513
|
enumerable: true,
|
|
15419
|
-
get: function () { return
|
|
15514
|
+
get: function () { return chunk4TJI44WP_cjs.hasPart; }
|
|
15420
15515
|
});
|
|
15421
15516
|
Object.defineProperty(exports, "implies", {
|
|
15422
15517
|
enumerable: true,
|
|
15423
|
-
get: function () { return
|
|
15518
|
+
get: function () { return chunk4TJI44WP_cjs.implies; }
|
|
15424
15519
|
});
|
|
15425
15520
|
Object.defineProperty(exports, "inverseOf", {
|
|
15426
15521
|
enumerable: true,
|
|
15427
|
-
get: function () { return
|
|
15522
|
+
get: function () { return chunk4TJI44WP_cjs.inverseOf; }
|
|
15428
15523
|
});
|
|
15429
15524
|
Object.defineProperty(exports, "isMetaEdge", {
|
|
15430
15525
|
enumerable: true,
|
|
15431
|
-
get: function () { return
|
|
15526
|
+
get: function () { return chunk4TJI44WP_cjs.isMetaEdge; }
|
|
15432
15527
|
});
|
|
15433
15528
|
Object.defineProperty(exports, "narrower", {
|
|
15434
15529
|
enumerable: true,
|
|
15435
|
-
get: function () { return
|
|
15530
|
+
get: function () { return chunk4TJI44WP_cjs.narrower; }
|
|
15436
15531
|
});
|
|
15437
15532
|
Object.defineProperty(exports, "partOf", {
|
|
15438
15533
|
enumerable: true,
|
|
15439
|
-
get: function () { return
|
|
15534
|
+
get: function () { return chunk4TJI44WP_cjs.partOf; }
|
|
15440
15535
|
});
|
|
15441
15536
|
Object.defineProperty(exports, "relatedTo", {
|
|
15442
15537
|
enumerable: true,
|
|
15443
|
-
get: function () { return
|
|
15538
|
+
get: function () { return chunk4TJI44WP_cjs.relatedTo; }
|
|
15444
15539
|
});
|
|
15445
15540
|
Object.defineProperty(exports, "sameAs", {
|
|
15446
15541
|
enumerable: true,
|
|
15447
|
-
get: function () { return
|
|
15542
|
+
get: function () { return chunk4TJI44WP_cjs.sameAs; }
|
|
15448
15543
|
});
|
|
15449
15544
|
Object.defineProperty(exports, "subClassOf", {
|
|
15450
15545
|
enumerable: true,
|
|
15451
|
-
get: function () { return
|
|
15546
|
+
get: function () { return chunk4TJI44WP_cjs.subClassOf; }
|
|
15452
15547
|
});
|
|
15453
15548
|
Object.defineProperty(exports, "defineGraph", {
|
|
15454
15549
|
enumerable: true,
|
|
15455
|
-
get: function () { return
|
|
15550
|
+
get: function () { return chunkWFUN6DCM_cjs.defineGraph; }
|
|
15456
15551
|
});
|
|
15457
15552
|
Object.defineProperty(exports, "getEdgeKinds", {
|
|
15458
15553
|
enumerable: true,
|
|
15459
|
-
get: function () { return
|
|
15554
|
+
get: function () { return chunkWFUN6DCM_cjs.getEdgeKinds; }
|
|
15460
15555
|
});
|
|
15461
15556
|
Object.defineProperty(exports, "getNodeKinds", {
|
|
15462
15557
|
enumerable: true,
|
|
15463
|
-
get: function () { return
|
|
15558
|
+
get: function () { return chunkWFUN6DCM_cjs.getNodeKinds; }
|
|
15464
15559
|
});
|
|
15465
15560
|
Object.defineProperty(exports, "isEdgeType", {
|
|
15466
15561
|
enumerable: true,
|
|
15467
|
-
get: function () { return
|
|
15562
|
+
get: function () { return chunkWFUN6DCM_cjs.isEdgeType; }
|
|
15468
15563
|
});
|
|
15469
15564
|
Object.defineProperty(exports, "isEdgeTypeWithEndpoints", {
|
|
15470
15565
|
enumerable: true,
|
|
15471
|
-
get: function () { return
|
|
15566
|
+
get: function () { return chunkWFUN6DCM_cjs.isEdgeTypeWithEndpoints; }
|
|
15472
15567
|
});
|
|
15473
15568
|
Object.defineProperty(exports, "isGraphDef", {
|
|
15474
15569
|
enumerable: true,
|
|
15475
|
-
get: function () { return
|
|
15570
|
+
get: function () { return chunkWFUN6DCM_cjs.isGraphDef; }
|
|
15476
15571
|
});
|
|
15477
15572
|
Object.defineProperty(exports, "isNodeType", {
|
|
15478
15573
|
enumerable: true,
|
|
15479
|
-
get: function () { return
|
|
15574
|
+
get: function () { return chunkWFUN6DCM_cjs.isNodeType; }
|
|
15480
15575
|
});
|
|
15481
15576
|
Object.defineProperty(exports, "defineGraphExtension", {
|
|
15482
15577
|
enumerable: true,
|
|
15483
|
-
get: function () { return
|
|
15578
|
+
get: function () { return chunk4FJVSF3K_cjs.defineGraphExtension; }
|
|
15484
15579
|
});
|
|
15485
15580
|
Object.defineProperty(exports, "CURRENT_GRAPH_EXTENSION_VERSION", {
|
|
15486
15581
|
enumerable: true,
|
|
15487
|
-
get: function () { return
|
|
15582
|
+
get: function () { return chunkPYJOBZR3_cjs.CURRENT_GRAPH_EXTENSION_VERSION; }
|
|
15488
15583
|
});
|
|
15489
15584
|
Object.defineProperty(exports, "GraphExtensionError", {
|
|
15490
15585
|
enumerable: true,
|
|
15491
|
-
get: function () { return
|
|
15586
|
+
get: function () { return chunkPYJOBZR3_cjs.GraphExtensionError; }
|
|
15492
15587
|
});
|
|
15493
15588
|
Object.defineProperty(exports, "GraphExtensionUnresolvedEndpointError", {
|
|
15494
15589
|
enumerable: true,
|
|
15495
|
-
get: function () { return
|
|
15590
|
+
get: function () { return chunkPYJOBZR3_cjs.GraphExtensionUnresolvedEndpointError; }
|
|
15496
15591
|
});
|
|
15497
15592
|
Object.defineProperty(exports, "GraphExtensionValidationError", {
|
|
15498
15593
|
enumerable: true,
|
|
15499
|
-
get: function () { return
|
|
15594
|
+
get: function () { return chunkPYJOBZR3_cjs.GraphExtensionValidationError; }
|
|
15500
15595
|
});
|
|
15501
15596
|
Object.defineProperty(exports, "GraphExtensionVersionUnsupportedError", {
|
|
15502
15597
|
enumerable: true,
|
|
15503
|
-
get: function () { return
|
|
15598
|
+
get: function () { return chunkPYJOBZR3_cjs.GraphExtensionVersionUnsupportedError; }
|
|
15504
15599
|
});
|
|
15505
15600
|
Object.defineProperty(exports, "IncompatibleChangeError", {
|
|
15506
15601
|
enumerable: true,
|
|
15507
|
-
get: function () { return
|
|
15602
|
+
get: function () { return chunkPYJOBZR3_cjs.IncompatibleChangeError; }
|
|
15508
15603
|
});
|
|
15509
15604
|
Object.defineProperty(exports, "KindCollisionError", {
|
|
15510
15605
|
enumerable: true,
|
|
15511
|
-
get: function () { return
|
|
15606
|
+
get: function () { return chunkPYJOBZR3_cjs.KindCollisionError; }
|
|
15512
15607
|
});
|
|
15513
15608
|
Object.defineProperty(exports, "KindHasReferentsError", {
|
|
15514
15609
|
enumerable: true,
|
|
15515
|
-
get: function () { return
|
|
15610
|
+
get: function () { return chunkPYJOBZR3_cjs.KindHasReferentsError; }
|
|
15516
15611
|
});
|
|
15517
15612
|
Object.defineProperty(exports, "LEGACY_GRAPH_EXTENSION_VERSION", {
|
|
15518
15613
|
enumerable: true,
|
|
15519
|
-
get: function () { return
|
|
15614
|
+
get: function () { return chunkPYJOBZR3_cjs.LEGACY_GRAPH_EXTENSION_VERSION; }
|
|
15520
15615
|
});
|
|
15521
15616
|
Object.defineProperty(exports, "RemoveCompileTimeKindError", {
|
|
15522
15617
|
enumerable: true,
|
|
15523
|
-
get: function () { return
|
|
15618
|
+
get: function () { return chunkPYJOBZR3_cjs.RemoveCompileTimeKindError; }
|
|
15524
15619
|
});
|
|
15525
15620
|
Object.defineProperty(exports, "validateGraphExtension", {
|
|
15526
15621
|
enumerable: true,
|
|
15527
|
-
get: function () { return
|
|
15622
|
+
get: function () { return chunkPYJOBZR3_cjs.validateGraphExtension; }
|
|
15528
15623
|
});
|
|
15529
15624
|
Object.defineProperty(exports, "andWhere", {
|
|
15530
15625
|
enumerable: true,
|
|
15531
|
-
get: function () { return
|
|
15626
|
+
get: function () { return chunkPN37HVAV_cjs.andWhere; }
|
|
15532
15627
|
});
|
|
15533
15628
|
Object.defineProperty(exports, "fts5Strategy", {
|
|
15534
15629
|
enumerable: true,
|
|
15535
|
-
get: function () { return
|
|
15630
|
+
get: function () { return chunkPN37HVAV_cjs.fts5Strategy; }
|
|
15536
15631
|
});
|
|
15537
15632
|
Object.defineProperty(exports, "notWhere", {
|
|
15538
15633
|
enumerable: true,
|
|
15539
|
-
get: function () { return
|
|
15634
|
+
get: function () { return chunkPN37HVAV_cjs.notWhere; }
|
|
15540
15635
|
});
|
|
15541
15636
|
Object.defineProperty(exports, "orWhere", {
|
|
15542
15637
|
enumerable: true,
|
|
15543
|
-
get: function () { return
|
|
15638
|
+
get: function () { return chunkPN37HVAV_cjs.orWhere; }
|
|
15544
15639
|
});
|
|
15545
15640
|
Object.defineProperty(exports, "tsvectorStrategy", {
|
|
15546
15641
|
enumerable: true,
|
|
15547
|
-
get: function () { return
|
|
15642
|
+
get: function () { return chunkPN37HVAV_cjs.tsvectorStrategy; }
|
|
15548
15643
|
});
|
|
15549
15644
|
Object.defineProperty(exports, "defineEdgeIndex", {
|
|
15550
15645
|
enumerable: true,
|
|
@@ -15584,115 +15679,119 @@ Object.defineProperty(exports, "isEmbeddingSchema", {
|
|
|
15584
15679
|
});
|
|
15585
15680
|
Object.defineProperty(exports, "BackendDisposedError", {
|
|
15586
15681
|
enumerable: true,
|
|
15587
|
-
get: function () { return
|
|
15682
|
+
get: function () { return chunkYEDQLNVE_cjs.BackendDisposedError; }
|
|
15588
15683
|
});
|
|
15589
15684
|
Object.defineProperty(exports, "CardinalityError", {
|
|
15590
15685
|
enumerable: true,
|
|
15591
|
-
get: function () { return
|
|
15686
|
+
get: function () { return chunkYEDQLNVE_cjs.CardinalityError; }
|
|
15592
15687
|
});
|
|
15593
15688
|
Object.defineProperty(exports, "CompilerInvariantError", {
|
|
15594
15689
|
enumerable: true,
|
|
15595
|
-
get: function () { return
|
|
15690
|
+
get: function () { return chunkYEDQLNVE_cjs.CompilerInvariantError; }
|
|
15596
15691
|
});
|
|
15597
15692
|
Object.defineProperty(exports, "ConfigurationError", {
|
|
15598
15693
|
enumerable: true,
|
|
15599
|
-
get: function () { return
|
|
15694
|
+
get: function () { return chunkYEDQLNVE_cjs.ConfigurationError; }
|
|
15600
15695
|
});
|
|
15601
15696
|
Object.defineProperty(exports, "DatabaseOperationError", {
|
|
15602
15697
|
enumerable: true,
|
|
15603
|
-
get: function () { return
|
|
15698
|
+
get: function () { return chunkYEDQLNVE_cjs.DatabaseOperationError; }
|
|
15604
15699
|
});
|
|
15605
15700
|
Object.defineProperty(exports, "DisjointError", {
|
|
15606
15701
|
enumerable: true,
|
|
15607
|
-
get: function () { return
|
|
15702
|
+
get: function () { return chunkYEDQLNVE_cjs.DisjointError; }
|
|
15608
15703
|
});
|
|
15609
15704
|
Object.defineProperty(exports, "EagerMaterializationError", {
|
|
15610
15705
|
enumerable: true,
|
|
15611
|
-
get: function () { return
|
|
15706
|
+
get: function () { return chunkYEDQLNVE_cjs.EagerMaterializationError; }
|
|
15612
15707
|
});
|
|
15613
15708
|
Object.defineProperty(exports, "EdgeNotFoundError", {
|
|
15614
15709
|
enumerable: true,
|
|
15615
|
-
get: function () { return
|
|
15710
|
+
get: function () { return chunkYEDQLNVE_cjs.EdgeNotFoundError; }
|
|
15616
15711
|
});
|
|
15617
15712
|
Object.defineProperty(exports, "EndpointError", {
|
|
15618
15713
|
enumerable: true,
|
|
15619
|
-
get: function () { return
|
|
15714
|
+
get: function () { return chunkYEDQLNVE_cjs.EndpointError; }
|
|
15620
15715
|
});
|
|
15621
15716
|
Object.defineProperty(exports, "EndpointNotFoundError", {
|
|
15622
15717
|
enumerable: true,
|
|
15623
|
-
get: function () { return
|
|
15718
|
+
get: function () { return chunkYEDQLNVE_cjs.EndpointNotFoundError; }
|
|
15624
15719
|
});
|
|
15625
15720
|
Object.defineProperty(exports, "KindNotFoundError", {
|
|
15626
15721
|
enumerable: true,
|
|
15627
|
-
get: function () { return
|
|
15722
|
+
get: function () { return chunkYEDQLNVE_cjs.KindNotFoundError; }
|
|
15628
15723
|
});
|
|
15629
15724
|
Object.defineProperty(exports, "MigrationError", {
|
|
15630
15725
|
enumerable: true,
|
|
15631
|
-
get: function () { return
|
|
15726
|
+
get: function () { return chunkYEDQLNVE_cjs.MigrationError; }
|
|
15632
15727
|
});
|
|
15633
15728
|
Object.defineProperty(exports, "NodeConstraintNotFoundError", {
|
|
15634
15729
|
enumerable: true,
|
|
15635
|
-
get: function () { return
|
|
15730
|
+
get: function () { return chunkYEDQLNVE_cjs.NodeConstraintNotFoundError; }
|
|
15636
15731
|
});
|
|
15637
15732
|
Object.defineProperty(exports, "NodeNotFoundError", {
|
|
15638
15733
|
enumerable: true,
|
|
15639
|
-
get: function () { return
|
|
15734
|
+
get: function () { return chunkYEDQLNVE_cjs.NodeNotFoundError; }
|
|
15640
15735
|
});
|
|
15641
15736
|
Object.defineProperty(exports, "RestrictedDeleteError", {
|
|
15642
15737
|
enumerable: true,
|
|
15643
|
-
get: function () { return
|
|
15738
|
+
get: function () { return chunkYEDQLNVE_cjs.RestrictedDeleteError; }
|
|
15644
15739
|
});
|
|
15645
15740
|
Object.defineProperty(exports, "SchemaContentConflictError", {
|
|
15646
15741
|
enumerable: true,
|
|
15647
|
-
get: function () { return
|
|
15742
|
+
get: function () { return chunkYEDQLNVE_cjs.SchemaContentConflictError; }
|
|
15648
15743
|
});
|
|
15649
15744
|
Object.defineProperty(exports, "SchemaMismatchError", {
|
|
15650
15745
|
enumerable: true,
|
|
15651
|
-
get: function () { return
|
|
15746
|
+
get: function () { return chunkYEDQLNVE_cjs.SchemaMismatchError; }
|
|
15652
15747
|
});
|
|
15653
15748
|
Object.defineProperty(exports, "StaleVersionError", {
|
|
15654
15749
|
enumerable: true,
|
|
15655
|
-
get: function () { return
|
|
15750
|
+
get: function () { return chunkYEDQLNVE_cjs.StaleVersionError; }
|
|
15751
|
+
});
|
|
15752
|
+
Object.defineProperty(exports, "StoreNotInitializedError", {
|
|
15753
|
+
enumerable: true,
|
|
15754
|
+
get: function () { return chunkYEDQLNVE_cjs.StoreNotInitializedError; }
|
|
15656
15755
|
});
|
|
15657
15756
|
Object.defineProperty(exports, "TypeGraphError", {
|
|
15658
15757
|
enumerable: true,
|
|
15659
|
-
get: function () { return
|
|
15758
|
+
get: function () { return chunkYEDQLNVE_cjs.TypeGraphError; }
|
|
15660
15759
|
});
|
|
15661
15760
|
Object.defineProperty(exports, "UniquenessError", {
|
|
15662
15761
|
enumerable: true,
|
|
15663
|
-
get: function () { return
|
|
15762
|
+
get: function () { return chunkYEDQLNVE_cjs.UniquenessError; }
|
|
15664
15763
|
});
|
|
15665
15764
|
Object.defineProperty(exports, "UnsupportedPredicateError", {
|
|
15666
15765
|
enumerable: true,
|
|
15667
|
-
get: function () { return
|
|
15766
|
+
get: function () { return chunkYEDQLNVE_cjs.UnsupportedPredicateError; }
|
|
15668
15767
|
});
|
|
15669
15768
|
Object.defineProperty(exports, "ValidationError", {
|
|
15670
15769
|
enumerable: true,
|
|
15671
|
-
get: function () { return
|
|
15770
|
+
get: function () { return chunkYEDQLNVE_cjs.ValidationError; }
|
|
15672
15771
|
});
|
|
15673
15772
|
Object.defineProperty(exports, "VersionConflictError", {
|
|
15674
15773
|
enumerable: true,
|
|
15675
|
-
get: function () { return
|
|
15774
|
+
get: function () { return chunkYEDQLNVE_cjs.VersionConflictError; }
|
|
15676
15775
|
});
|
|
15677
15776
|
Object.defineProperty(exports, "getErrorSuggestion", {
|
|
15678
15777
|
enumerable: true,
|
|
15679
|
-
get: function () { return
|
|
15778
|
+
get: function () { return chunkYEDQLNVE_cjs.getErrorSuggestion; }
|
|
15680
15779
|
});
|
|
15681
15780
|
Object.defineProperty(exports, "isConstraintError", {
|
|
15682
15781
|
enumerable: true,
|
|
15683
|
-
get: function () { return
|
|
15782
|
+
get: function () { return chunkYEDQLNVE_cjs.isConstraintError; }
|
|
15684
15783
|
});
|
|
15685
15784
|
Object.defineProperty(exports, "isSystemError", {
|
|
15686
15785
|
enumerable: true,
|
|
15687
|
-
get: function () { return
|
|
15786
|
+
get: function () { return chunkYEDQLNVE_cjs.isSystemError; }
|
|
15688
15787
|
});
|
|
15689
15788
|
Object.defineProperty(exports, "isTypeGraphError", {
|
|
15690
15789
|
enumerable: true,
|
|
15691
|
-
get: function () { return
|
|
15790
|
+
get: function () { return chunkYEDQLNVE_cjs.isTypeGraphError; }
|
|
15692
15791
|
});
|
|
15693
15792
|
Object.defineProperty(exports, "isUserRecoverable", {
|
|
15694
15793
|
enumerable: true,
|
|
15695
|
-
get: function () { return
|
|
15794
|
+
get: function () { return chunkYEDQLNVE_cjs.isUserRecoverable; }
|
|
15696
15795
|
});
|
|
15697
15796
|
Object.defineProperty(exports, "MAX_JSON_POINTER_DEPTH", {
|
|
15698
15797
|
enumerable: true,
|