@nicia-ai/typegraph 0.24.1 → 0.25.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 +178 -55
- package/dist/backend/postgres/index.cjs.map +1 -1
- package/dist/backend/postgres/index.d.cts +6 -7
- package/dist/backend/postgres/index.d.ts +6 -7
- package/dist/backend/postgres/index.js +151 -28
- package/dist/backend/postgres/index.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +19 -17
- package/dist/backend/sqlite/index.d.cts +6 -7
- package/dist/backend/sqlite/index.d.ts +6 -7
- package/dist/backend/sqlite/index.js +9 -7
- package/dist/backend/sqlite/libsql.cjs +12 -10
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +4 -5
- package/dist/backend/sqlite/libsql.d.ts +4 -5
- package/dist/backend/sqlite/libsql.js +9 -7
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +14 -12
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +4 -5
- package/dist/backend/sqlite/local.d.ts +4 -5
- package/dist/backend/sqlite/local.js +9 -7
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/chunk-4BOWVUGQ.js +2029 -0
- package/dist/chunk-4BOWVUGQ.js.map +1 -0
- package/dist/{chunk-SUHW2UYL.cjs → chunk-7CDXX3QZ.cjs} +2 -2
- package/dist/chunk-7CDXX3QZ.cjs.map +1 -0
- package/dist/chunk-7V335GHG.cjs +112 -0
- package/dist/chunk-7V335GHG.cjs.map +1 -0
- package/dist/chunk-7W3KAMVQ.cjs +2678 -0
- package/dist/chunk-7W3KAMVQ.cjs.map +1 -0
- package/dist/chunk-CTHNVU6K.cjs +551 -0
- package/dist/chunk-CTHNVU6K.cjs.map +1 -0
- package/dist/chunk-D2GO3RBL.cjs +12 -0
- package/dist/chunk-D2GO3RBL.cjs.map +1 -0
- package/dist/{chunk-WFMTAEEN.js → chunk-DOTEN2FG.js} +81 -7
- package/dist/chunk-DOTEN2FG.js.map +1 -0
- package/dist/chunk-E5JZSEGJ.cjs +301 -0
- package/dist/chunk-E5JZSEGJ.cjs.map +1 -0
- package/dist/chunk-EG6TJ3I5.js +286 -0
- package/dist/chunk-EG6TJ3I5.js.map +1 -0
- package/dist/chunk-EJCDOA37.js +537 -0
- package/dist/chunk-EJCDOA37.js.map +1 -0
- package/dist/{chunk-UVZHTBZ5.cjs → chunk-EK6RJ373.cjs} +7 -150
- package/dist/chunk-EK6RJ373.cjs.map +1 -0
- package/dist/{chunk-GUTQTMOV.js → chunk-FPCOUJSL.js} +2 -2
- package/dist/chunk-FPCOUJSL.js.map +1 -0
- package/dist/{chunk-3JK66E3I.cjs → chunk-JTI5WT4P.cjs} +630 -59
- package/dist/chunk-JTI5WT4P.cjs.map +1 -0
- package/dist/chunk-LVCSL6A3.js +2626 -0
- package/dist/chunk-LVCSL6A3.js.map +1 -0
- package/dist/chunk-NHQWXSTS.js +10 -0
- package/dist/chunk-NHQWXSTS.js.map +1 -0
- package/dist/chunk-NZ5PMBTG.js +105 -0
- package/dist/chunk-NZ5PMBTG.js.map +1 -0
- package/dist/{chunk-5HVDOPZU.cjs → chunk-O2P3KAUT.cjs} +416 -93
- package/dist/chunk-O2P3KAUT.cjs.map +1 -0
- package/dist/{chunk-QOLTW7OZ.js → chunk-OJ6IQVZG.js} +151 -13
- package/dist/chunk-OJ6IQVZG.js.map +1 -0
- package/dist/{chunk-EYELZHKY.js → chunk-OOS2RKRH.js} +5 -140
- package/dist/chunk-OOS2RKRH.js.map +1 -0
- package/dist/chunk-RCAJZG67.cjs +2069 -0
- package/dist/chunk-RCAJZG67.cjs.map +1 -0
- package/dist/{chunk-O5PST6TB.cjs → chunk-W5MTHMTE.cjs} +83 -6
- package/dist/chunk-W5MTHMTE.cjs.map +1 -0
- package/dist/{chunk-EY4LBX3F.js → chunk-WI5VRP3X.js} +337 -26
- package/dist/chunk-WI5VRP3X.js.map +1 -0
- package/dist/chunk-WVQXAFP3.js +79 -0
- package/dist/chunk-WVQXAFP3.js.map +1 -0
- package/dist/chunk-X3244EKP.cjs +84 -0
- package/dist/chunk-X3244EKP.cjs.map +1 -0
- package/dist/{chunk-753F33CV.js → chunk-YZZBDCLV.js} +617 -44
- package/dist/chunk-YZZBDCLV.js.map +1 -0
- package/dist/{chunk-OVJ2BE5Q.cjs → chunk-ZEMNF3QK.cjs} +171 -33
- package/dist/chunk-ZEMNF3QK.cjs.map +1 -0
- package/dist/{ddl-B_H8JM-E.d.cts → ddl-B2jjLjpR.d.cts} +762 -99
- package/dist/{ddl-1tFIvt9V.d.ts → ddl-DpaeAKPp.d.ts} +762 -99
- package/dist/extension-types-D07e_NTw.d.cts +543 -0
- package/dist/extension-types-D07e_NTw.d.ts +543 -0
- package/dist/graph-extension/index.cjs +71 -0
- package/dist/graph-extension/index.cjs.map +1 -0
- package/dist/graph-extension/index.d.cts +278 -0
- package/dist/graph-extension/index.d.ts +278 -0
- package/dist/graph-extension/index.js +6 -0
- package/dist/graph-extension/index.js.map +1 -0
- package/dist/{index-DXkEXpNz.d.ts → index-CT6nvtxL.d.cts} +114 -5
- package/dist/{index-DXkEXpNz.d.cts → index-DQheiVQV.d.ts} +114 -5
- package/dist/index.cjs +2672 -901
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +29 -10
- package/dist/index.d.ts +29 -10
- package/dist/index.js +2248 -598
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +25 -23
- package/dist/indexes/index.d.cts +40 -22
- package/dist/indexes/index.d.ts +40 -22
- package/dist/indexes/index.js +5 -3
- package/dist/interchange/index.cjs +8 -7
- package/dist/interchange/index.cjs.map +1 -1
- package/dist/interchange/index.d.cts +5 -4
- package/dist/interchange/index.d.ts +5 -4
- package/dist/interchange/index.js +3 -2
- package/dist/interchange/index.js.map +1 -1
- package/dist/{manager-nIhmttD-.d.ts → manager-BKaPQbns.d.ts} +189 -6
- package/dist/{manager-Vkz28eAC.d.cts → manager-BpjBW1JK.d.cts} +189 -6
- package/dist/materialize-indexes-BB9N5uQl.d.cts +68 -0
- package/dist/materialize-indexes-BYpU2RKh.d.ts +68 -0
- package/dist/profiler/index.cjs +10 -8
- package/dist/profiler/index.cjs.map +1 -1
- package/dist/profiler/index.d.cts +8 -7
- package/dist/profiler/index.d.ts +8 -7
- package/dist/profiler/index.js +3 -1
- package/dist/profiler/index.js.map +1 -1
- package/dist/schema/index.cjs +43 -22
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +17 -8
- package/dist/schema/index.d.ts +17 -8
- package/dist/schema/index.js +9 -4
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-D0aceIe0.d.cts → sqlite-CU3j6rc7.d.ts} +837 -120
- package/dist/{sqlite-SUxbZqfy.d.ts → sqlite-Myo8e3Lr.d.cts} +837 -120
- package/dist/{store-U3i2tUch.d.ts → store-BAGuOHDh.d.cts} +659 -23
- package/dist/{store-CpvwTMxV.d.cts → store-De98Lod4.d.ts} +659 -23
- package/dist/types--0EslBx5.d.cts +2123 -0
- package/dist/{types-qYFZ9SqD.d.ts → types-BLmJq4wI.d.ts} +3 -2
- package/dist/types-BNWYZ-0-.d.ts +2123 -0
- package/dist/{types-yH4_p0XB.d.cts → types-CYga3lZp.d.cts} +3 -2
- package/dist/where-CluR73rs.d.ts +11 -0
- package/dist/where-m1uWsdua.d.cts +11 -0
- package/package.json +33 -73
- package/dist/ast-C8S37w1A.d.ts +0 -497
- package/dist/ast-dgLhLOg0.d.cts +0 -497
- package/dist/chunk-3JK66E3I.cjs.map +0 -1
- package/dist/chunk-3PPEHLGK.js +0 -1116
- package/dist/chunk-3PPEHLGK.js.map +0 -1
- package/dist/chunk-5HVDOPZU.cjs.map +0 -1
- package/dist/chunk-753F33CV.js.map +0 -1
- package/dist/chunk-EY4LBX3F.js.map +0 -1
- package/dist/chunk-EYELZHKY.js.map +0 -1
- package/dist/chunk-GFGVREHH.js +0 -1381
- package/dist/chunk-GFGVREHH.js.map +0 -1
- package/dist/chunk-GUTQTMOV.js.map +0 -1
- package/dist/chunk-LBORRUNJ.js +0 -135
- package/dist/chunk-LBORRUNJ.js.map +0 -1
- package/dist/chunk-O5PST6TB.cjs.map +0 -1
- package/dist/chunk-OLROXS2S.cjs +0 -147
- package/dist/chunk-OLROXS2S.cjs.map +0 -1
- package/dist/chunk-OVJ2BE5Q.cjs.map +0 -1
- package/dist/chunk-PAUN562Y.cjs +0 -1417
- package/dist/chunk-PAUN562Y.cjs.map +0 -1
- package/dist/chunk-PEE4EWXZ.cjs +0 -1131
- package/dist/chunk-PEE4EWXZ.cjs.map +0 -1
- package/dist/chunk-QOLTW7OZ.js.map +0 -1
- package/dist/chunk-SUHW2UYL.cjs.map +0 -1
- package/dist/chunk-UVZHTBZ5.cjs.map +0 -1
- package/dist/chunk-WFMTAEEN.js.map +0 -1
- package/dist/types-C-zfYDJB.d.ts +0 -159
- package/dist/types-CQx4iW5Y.d.cts +0 -159
- package/dist/types-Qk2l3IkQ.d.cts +0 -1254
- package/dist/types-Qk2l3IkQ.d.ts +0 -1254
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7V335GHG_cjs = require('./chunk-7V335GHG.cjs');
|
|
4
4
|
var drizzleOrm = require('drizzle-orm');
|
|
5
|
+
var casing = require('drizzle-orm/casing');
|
|
6
|
+
var pgCore = require('drizzle-orm/pg-core');
|
|
7
|
+
var sqliteCore = require('drizzle-orm/sqlite-core');
|
|
5
8
|
|
|
6
9
|
function sqlNull(value) {
|
|
7
10
|
return value ?? drizzleOrm.sql.raw("NULL");
|
|
@@ -360,21 +363,6 @@ var fts5Strategy = {
|
|
|
360
363
|
return stmt === void 0 ? [] : [stmt];
|
|
361
364
|
}
|
|
362
365
|
};
|
|
363
|
-
|
|
364
|
-
// src/constants.ts
|
|
365
|
-
var MAX_PG_IDENTIFIER_LENGTH = 63;
|
|
366
|
-
var TRUNCATED_IDENTIFIER_MAX_LENGTH = 54;
|
|
367
|
-
var IDENTIFIER_COMPONENT_MAX_LENGTH = 20;
|
|
368
|
-
var FNV1A_OFFSET_BASIS = 2166136261;
|
|
369
|
-
var FNV1A_PRIME = 16777619;
|
|
370
|
-
var DEFAULT_PAGINATION_LIMIT = 20;
|
|
371
|
-
var DEFAULT_STREAM_BATCH_SIZE = 1e3;
|
|
372
|
-
var NODE_INDEX_TYPE_MARKER = "typegraph_node_index";
|
|
373
|
-
var EDGE_INDEX_TYPE_MARKER = "typegraph_edge_index";
|
|
374
|
-
var SQLITE_PATH_DELIMITER = "|";
|
|
375
|
-
var PG_PATH_ELEMENT_SEPARATOR = ",";
|
|
376
|
-
var PG_ARRAY_START = "{";
|
|
377
|
-
var PG_ARRAY_END = "}";
|
|
378
366
|
function escapePostgresLiteral(value) {
|
|
379
367
|
return `'${value.replaceAll("'", "''")}'`;
|
|
380
368
|
}
|
|
@@ -382,7 +370,7 @@ function toPostgresPath(pointer) {
|
|
|
382
370
|
if (!pointer || pointer === "" || pointer === "/") {
|
|
383
371
|
return drizzleOrm.sql.raw("ARRAY[]::text[]");
|
|
384
372
|
}
|
|
385
|
-
const segments =
|
|
373
|
+
const segments = chunk7V335GHG_cjs.parseJsonPointer(pointer);
|
|
386
374
|
if (segments.length === 0) {
|
|
387
375
|
return drizzleOrm.sql.raw("ARRAY[]::text[]");
|
|
388
376
|
}
|
|
@@ -554,7 +542,7 @@ function toSqlitePath(pointer) {
|
|
|
554
542
|
if (!pointer || pointer === "" || pointer === "/") {
|
|
555
543
|
return "$";
|
|
556
544
|
}
|
|
557
|
-
const segments =
|
|
545
|
+
const segments = chunk7V335GHG_cjs.parseJsonPointer(pointer);
|
|
558
546
|
const parts = ["$"];
|
|
559
547
|
for (const segment of segments) {
|
|
560
548
|
if (isArrayIndex(segment)) {
|
|
@@ -742,58 +730,641 @@ var DIALECT_ADAPTERS = {
|
|
|
742
730
|
function getDialect(dialect) {
|
|
743
731
|
return DIALECT_ADAPTERS[dialect];
|
|
744
732
|
}
|
|
733
|
+
function compileNodeIndexKeys(index, dialect, propsColumn, systemColumn) {
|
|
734
|
+
const adapter = getDialect(dialect);
|
|
735
|
+
const keys = [];
|
|
736
|
+
for (const column of getNodeScopeColumns(index.scope)) {
|
|
737
|
+
keys.push(systemColumn(column));
|
|
738
|
+
}
|
|
739
|
+
const allPointers = [...index.fields, ...index.coveringFields];
|
|
740
|
+
const allValueTypes = [
|
|
741
|
+
...index.fieldValueTypes,
|
|
742
|
+
...index.coveringFieldValueTypes
|
|
743
|
+
];
|
|
744
|
+
for (const [pointerIndex, pointer] of allPointers.entries()) {
|
|
745
|
+
const valueType = allValueTypes[pointerIndex];
|
|
746
|
+
const extracted = compileIndexKeyValue(
|
|
747
|
+
adapter,
|
|
748
|
+
propsColumn,
|
|
749
|
+
pointer,
|
|
750
|
+
valueType
|
|
751
|
+
);
|
|
752
|
+
keys.push(drizzleOrm.sql`(${extracted})`);
|
|
753
|
+
}
|
|
754
|
+
return { keys };
|
|
755
|
+
}
|
|
756
|
+
function compileEdgeIndexKeys(index, dialect, propsColumn, systemColumn) {
|
|
757
|
+
const adapter = getDialect(dialect);
|
|
758
|
+
const keys = [];
|
|
759
|
+
for (const column of getEdgeScopeColumns(index.scope, index.direction)) {
|
|
760
|
+
keys.push(systemColumn(column));
|
|
761
|
+
}
|
|
762
|
+
const allPointers = [...index.fields, ...index.coveringFields];
|
|
763
|
+
const allValueTypes = [
|
|
764
|
+
...index.fieldValueTypes,
|
|
765
|
+
...index.coveringFieldValueTypes
|
|
766
|
+
];
|
|
767
|
+
for (const [pointerIndex, pointer] of allPointers.entries()) {
|
|
768
|
+
const valueType = allValueTypes[pointerIndex];
|
|
769
|
+
const extracted = compileIndexKeyValue(
|
|
770
|
+
adapter,
|
|
771
|
+
propsColumn,
|
|
772
|
+
pointer,
|
|
773
|
+
valueType
|
|
774
|
+
);
|
|
775
|
+
keys.push(drizzleOrm.sql`(${extracted})`);
|
|
776
|
+
}
|
|
777
|
+
return { keys };
|
|
778
|
+
}
|
|
779
|
+
function compileIndexKeyValue(dialect, propsColumn, pointer, valueType) {
|
|
780
|
+
switch (valueType) {
|
|
781
|
+
case "number": {
|
|
782
|
+
return dialect.jsonExtractNumber(propsColumn, pointer);
|
|
783
|
+
}
|
|
784
|
+
case "boolean": {
|
|
785
|
+
return dialect.jsonExtractBoolean(propsColumn, pointer);
|
|
786
|
+
}
|
|
787
|
+
case "date": {
|
|
788
|
+
return dialect.jsonExtractDate(propsColumn, pointer);
|
|
789
|
+
}
|
|
790
|
+
case "string":
|
|
791
|
+
case "unknown":
|
|
792
|
+
case void 0: {
|
|
793
|
+
return dialect.jsonExtractText(propsColumn, pointer);
|
|
794
|
+
}
|
|
795
|
+
case "array":
|
|
796
|
+
case "object":
|
|
797
|
+
case "embedding": {
|
|
798
|
+
return dialect.jsonExtract(propsColumn, pointer);
|
|
799
|
+
}
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
function getNodeScopeColumns(scope) {
|
|
803
|
+
switch (scope) {
|
|
804
|
+
case "graphAndKind": {
|
|
805
|
+
return ["graph_id", "kind"];
|
|
806
|
+
}
|
|
807
|
+
case "graph": {
|
|
808
|
+
return ["graph_id"];
|
|
809
|
+
}
|
|
810
|
+
case "none": {
|
|
811
|
+
return [];
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
function getEdgeScopeColumns(scope, direction) {
|
|
816
|
+
const base = scope === "graphAndKind" ? ["graph_id", "kind"] : scope === "graph" ? ["graph_id"] : [];
|
|
817
|
+
if (direction === "out") {
|
|
818
|
+
return [...base, "from_id"];
|
|
819
|
+
}
|
|
820
|
+
if (direction === "in") {
|
|
821
|
+
return [...base, "to_id"];
|
|
822
|
+
}
|
|
823
|
+
return [...base];
|
|
824
|
+
}
|
|
825
|
+
function isIndexWhereLiteralList(value) {
|
|
826
|
+
return Array.isArray(value);
|
|
827
|
+
}
|
|
828
|
+
function compileIndexWhere(ctx, expression) {
|
|
829
|
+
switch (expression.__type) {
|
|
830
|
+
case "index_where_and": {
|
|
831
|
+
return drizzleOrm.sql`(${drizzleOrm.sql.join(
|
|
832
|
+
expression.predicates.map((p) => compileIndexWhere(ctx, p)),
|
|
833
|
+
drizzleOrm.sql` AND `
|
|
834
|
+
)})`;
|
|
835
|
+
}
|
|
836
|
+
case "index_where_or": {
|
|
837
|
+
return drizzleOrm.sql`(${drizzleOrm.sql.join(
|
|
838
|
+
expression.predicates.map((p) => compileIndexWhere(ctx, p)),
|
|
839
|
+
drizzleOrm.sql` OR `
|
|
840
|
+
)})`;
|
|
841
|
+
}
|
|
842
|
+
case "index_where_not": {
|
|
843
|
+
return drizzleOrm.sql`(NOT ${compileIndexWhere(ctx, expression.predicate)})`;
|
|
844
|
+
}
|
|
845
|
+
case "index_where_null_check": {
|
|
846
|
+
const operand = compileIndexWhereOperand(ctx, expression.operand);
|
|
847
|
+
return expression.op === "isNull" ? drizzleOrm.sql`${operand} IS NULL` : drizzleOrm.sql`${operand} IS NOT NULL`;
|
|
848
|
+
}
|
|
849
|
+
case "index_where_comparison": {
|
|
850
|
+
const left = compileIndexWhereOperand(ctx, expression.left);
|
|
851
|
+
const right = expression.right;
|
|
852
|
+
if (isIndexWhereLiteralList(right)) {
|
|
853
|
+
if (expression.op !== "in" && expression.op !== "notIn") {
|
|
854
|
+
throw new Error(
|
|
855
|
+
`Operator "${expression.op}" does not support list comparison in index WHERE clause`
|
|
856
|
+
);
|
|
857
|
+
}
|
|
858
|
+
const values = right.map(
|
|
859
|
+
(literal) => compileIndexWhereLiteral(ctx.dialect, literal)
|
|
860
|
+
);
|
|
861
|
+
const operator = expression.op === "in" ? drizzleOrm.sql`IN` : drizzleOrm.sql`NOT IN`;
|
|
862
|
+
return drizzleOrm.sql`${left} ${operator} (${drizzleOrm.sql.join(values, drizzleOrm.sql`, `)})`;
|
|
863
|
+
}
|
|
864
|
+
if (expression.op === "in" || expression.op === "notIn") {
|
|
865
|
+
throw new Error(
|
|
866
|
+
`Operator "${expression.op}" requires a list of values in index WHERE clause`
|
|
867
|
+
);
|
|
868
|
+
}
|
|
869
|
+
const rightLiteral = compileIndexWhereLiteral(ctx.dialect, right);
|
|
870
|
+
const opSql = compileComparisonOperator(expression.op);
|
|
871
|
+
return drizzleOrm.sql`${left} ${opSql} ${rightLiteral}`;
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
function compileIndexWhereOperand(ctx, operand) {
|
|
876
|
+
if (operand.__type === "index_operand_system") {
|
|
877
|
+
return ctx.systemColumn(operand.column);
|
|
878
|
+
}
|
|
879
|
+
const adapter = getDialect(ctx.dialect);
|
|
880
|
+
const pointer = chunk7V335GHG_cjs.jsonPointer([operand.field]);
|
|
881
|
+
switch (operand.valueType) {
|
|
882
|
+
case "number": {
|
|
883
|
+
return adapter.jsonExtractNumber(ctx.propsColumn, pointer);
|
|
884
|
+
}
|
|
885
|
+
case "boolean": {
|
|
886
|
+
return adapter.jsonExtractBoolean(ctx.propsColumn, pointer);
|
|
887
|
+
}
|
|
888
|
+
case "date": {
|
|
889
|
+
return adapter.jsonExtractDate(ctx.propsColumn, pointer);
|
|
890
|
+
}
|
|
891
|
+
case "array":
|
|
892
|
+
case "object":
|
|
893
|
+
case "embedding": {
|
|
894
|
+
return adapter.jsonExtract(ctx.propsColumn, pointer);
|
|
895
|
+
}
|
|
896
|
+
case "string":
|
|
897
|
+
case "unknown":
|
|
898
|
+
case void 0: {
|
|
899
|
+
return adapter.jsonExtractText(ctx.propsColumn, pointer);
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
function compileIndexWhereLiteral(dialect, literal) {
|
|
904
|
+
switch (literal.valueType) {
|
|
905
|
+
case "string":
|
|
906
|
+
case "date": {
|
|
907
|
+
return drizzleOrm.sql.raw(escapeStringLiteral(literal.value.toString()));
|
|
908
|
+
}
|
|
909
|
+
case "number": {
|
|
910
|
+
return drizzleOrm.sql.raw(literal.value.toString());
|
|
911
|
+
}
|
|
912
|
+
case "boolean": {
|
|
913
|
+
return getDialect(dialect).booleanLiteral(literal.value);
|
|
914
|
+
}
|
|
915
|
+
case "array":
|
|
916
|
+
case "object":
|
|
917
|
+
case "embedding":
|
|
918
|
+
case "unknown": {
|
|
919
|
+
return drizzleOrm.sql.raw(escapeStringLiteral(literal.value.toString()));
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
function compileComparisonOperator(op) {
|
|
924
|
+
switch (op) {
|
|
925
|
+
case "eq": {
|
|
926
|
+
return drizzleOrm.sql`=`;
|
|
927
|
+
}
|
|
928
|
+
case "neq": {
|
|
929
|
+
return drizzleOrm.sql`<>`;
|
|
930
|
+
}
|
|
931
|
+
case "gt": {
|
|
932
|
+
return drizzleOrm.sql`>`;
|
|
933
|
+
}
|
|
934
|
+
case "gte": {
|
|
935
|
+
return drizzleOrm.sql`>=`;
|
|
936
|
+
}
|
|
937
|
+
case "lt": {
|
|
938
|
+
return drizzleOrm.sql`<`;
|
|
939
|
+
}
|
|
940
|
+
case "lte": {
|
|
941
|
+
return drizzleOrm.sql`<=`;
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
function escapeStringLiteral(value) {
|
|
946
|
+
return `'${value.replaceAll("'", "''")}'`;
|
|
947
|
+
}
|
|
745
948
|
|
|
746
|
-
// src/
|
|
747
|
-
function
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
949
|
+
// src/indexes/ddl.ts
|
|
950
|
+
function generateIndexDDL(index, dialect, options = {}) {
|
|
951
|
+
if (index.entity === "node") {
|
|
952
|
+
return generateNodeIndexDDL(index, dialect, options);
|
|
953
|
+
}
|
|
954
|
+
return generateEdgeIndexDDL(index, dialect, options);
|
|
955
|
+
}
|
|
956
|
+
function generateNodeIndexDDL(index, dialect, options = {}) {
|
|
957
|
+
const tableName = options.nodesTableName ?? "typegraph_nodes";
|
|
958
|
+
return generateTableIndexDDL(index, dialect, tableName, options);
|
|
959
|
+
}
|
|
960
|
+
function generateEdgeIndexDDL(index, dialect, options = {}) {
|
|
961
|
+
const tableName = options.edgesTableName ?? "typegraph_edges";
|
|
962
|
+
return generateTableIndexDDL(index, dialect, tableName, options);
|
|
963
|
+
}
|
|
964
|
+
function generateTableIndexDDL(index, dialect, tableName, options) {
|
|
965
|
+
const ifNotExists = options.ifNotExists ?? true;
|
|
966
|
+
const propsColumn = drizzleOrm.sql.raw('"props"');
|
|
967
|
+
const systemColumn = (column) => drizzleOrm.sql.raw(quoteIdentifier2(column));
|
|
968
|
+
const keys = index.entity === "node" ? compileNodeIndexKeys(index, dialect, propsColumn, systemColumn).keys : compileEdgeIndexKeys(index, dialect, propsColumn, systemColumn).keys;
|
|
969
|
+
const whereSql = index.where ? sqlToInlineString(
|
|
970
|
+
compileIndexWhere(
|
|
971
|
+
{
|
|
972
|
+
dialect,
|
|
973
|
+
propsColumn,
|
|
974
|
+
systemColumn
|
|
975
|
+
},
|
|
976
|
+
index.where
|
|
977
|
+
),
|
|
978
|
+
dialect
|
|
979
|
+
) : void 0;
|
|
980
|
+
const keySql = keys.map((k) => sqlToInlineString(k, dialect)).join(", ");
|
|
981
|
+
const unique = index.unique ? "UNIQUE " : "";
|
|
982
|
+
const concurrent = options.concurrent === true && dialect === "postgres" ? "CONCURRENTLY " : "";
|
|
983
|
+
const ifNotExistsSql = ifNotExists ? "IF NOT EXISTS " : "";
|
|
984
|
+
const whereClause = whereSql ? ` WHERE ${whereSql}` : "";
|
|
985
|
+
return `CREATE ${unique}INDEX ${concurrent}${ifNotExistsSql}${quoteIdentifier2(index.name)} ON ${quoteIdentifier2(tableName)} (${keySql})${whereClause};`;
|
|
986
|
+
}
|
|
987
|
+
function quoteIdentifier2(identifier) {
|
|
988
|
+
return `"${identifier.replaceAll('"', '""')}"`;
|
|
989
|
+
}
|
|
990
|
+
function sqlToInlineString(object, dialect) {
|
|
991
|
+
const query = object.toQuery({
|
|
992
|
+
casing: new casing.CasingCache(),
|
|
993
|
+
escapeName: (name) => name,
|
|
994
|
+
escapeParam: (_number, value) => inlineParam(value, dialect),
|
|
995
|
+
escapeString: (value) => escapeStringLiteral2(value),
|
|
996
|
+
inlineParams: true,
|
|
997
|
+
invokeSource: "indexes"
|
|
998
|
+
});
|
|
999
|
+
if (query.params.length > 0) {
|
|
1000
|
+
throw new Error(
|
|
1001
|
+
"Index DDL generation produced parameters; expected fully inlined SQL"
|
|
1002
|
+
);
|
|
1003
|
+
}
|
|
1004
|
+
return query.sql;
|
|
1005
|
+
}
|
|
1006
|
+
function inlineParam(value, dialect) {
|
|
1007
|
+
if (value === null || value === void 0) {
|
|
1008
|
+
return "NULL";
|
|
1009
|
+
}
|
|
1010
|
+
if (value instanceof Date) {
|
|
1011
|
+
return escapeStringLiteral2(value.toISOString());
|
|
1012
|
+
}
|
|
1013
|
+
if (typeof value === "string") {
|
|
1014
|
+
return escapeStringLiteral2(value);
|
|
1015
|
+
}
|
|
1016
|
+
if (typeof value === "number") {
|
|
1017
|
+
return value.toString();
|
|
1018
|
+
}
|
|
1019
|
+
if (typeof value === "boolean") {
|
|
1020
|
+
return getDialect(dialect).booleanLiteralString(value);
|
|
1021
|
+
}
|
|
1022
|
+
if (typeof value === "bigint") {
|
|
1023
|
+
return value.toString();
|
|
1024
|
+
}
|
|
1025
|
+
throw new TypeError(
|
|
1026
|
+
"Index DDL generation received an unsupported SQL parameter value"
|
|
1027
|
+
);
|
|
1028
|
+
}
|
|
1029
|
+
function escapeStringLiteral2(value) {
|
|
1030
|
+
return `'${value.replaceAll("'", "''")}'`;
|
|
1031
|
+
}
|
|
1032
|
+
function buildPostgresNodeIndexBuilders(table, indexes) {
|
|
1033
|
+
const nodeIndexes = indexes.filter(
|
|
1034
|
+
(index) => index.entity === "node"
|
|
1035
|
+
);
|
|
1036
|
+
return nodeIndexes.map((index) => {
|
|
1037
|
+
const propsColumn = drizzleOrm.sql`${table.props}`;
|
|
1038
|
+
const systemColumn = (column) => drizzleOrm.sql`${getPostgresNodeSystemColumn(table, column)}`;
|
|
1039
|
+
const { keys } = compileNodeIndexKeys(
|
|
1040
|
+
index,
|
|
1041
|
+
"postgres",
|
|
1042
|
+
propsColumn,
|
|
1043
|
+
systemColumn
|
|
1044
|
+
);
|
|
1045
|
+
assertNonEmpty(keys, `node index "${index.name}"`);
|
|
1046
|
+
const base = index.unique ? pgCore.uniqueIndex(index.name) : pgCore.index(index.name);
|
|
1047
|
+
const builder = base.on(...keys);
|
|
1048
|
+
if (index.where) {
|
|
1049
|
+
const ctx = {
|
|
1050
|
+
dialect: "postgres",
|
|
1051
|
+
propsColumn,
|
|
1052
|
+
systemColumn
|
|
1053
|
+
};
|
|
1054
|
+
builder.where(compileIndexWhere(ctx, index.where));
|
|
1055
|
+
}
|
|
1056
|
+
return builder;
|
|
1057
|
+
});
|
|
1058
|
+
}
|
|
1059
|
+
function buildPostgresEdgeIndexBuilders(table, indexes) {
|
|
1060
|
+
const edgeIndexes = indexes.filter(
|
|
1061
|
+
(index) => index.entity === "edge"
|
|
1062
|
+
);
|
|
1063
|
+
return edgeIndexes.map((index) => {
|
|
1064
|
+
const propsColumn = drizzleOrm.sql`${table.props}`;
|
|
1065
|
+
const systemColumn = (column) => drizzleOrm.sql`${getPostgresEdgeSystemColumn(table, column)}`;
|
|
1066
|
+
const { keys } = compileEdgeIndexKeys(
|
|
1067
|
+
index,
|
|
1068
|
+
"postgres",
|
|
1069
|
+
propsColumn,
|
|
1070
|
+
systemColumn
|
|
1071
|
+
);
|
|
1072
|
+
assertNonEmpty(keys, `edge index "${index.name}"`);
|
|
1073
|
+
const base = index.unique ? pgCore.uniqueIndex(index.name) : pgCore.index(index.name);
|
|
1074
|
+
const builder = base.on(...keys);
|
|
1075
|
+
if (index.where) {
|
|
1076
|
+
const ctx = {
|
|
1077
|
+
dialect: "postgres",
|
|
1078
|
+
propsColumn,
|
|
1079
|
+
systemColumn
|
|
1080
|
+
};
|
|
1081
|
+
builder.where(compileIndexWhere(ctx, index.where));
|
|
1082
|
+
}
|
|
1083
|
+
return builder;
|
|
1084
|
+
});
|
|
1085
|
+
}
|
|
1086
|
+
function getPostgresNodeSystemColumn(table, column) {
|
|
1087
|
+
switch (column) {
|
|
1088
|
+
case "graph_id": {
|
|
1089
|
+
return table.graphId;
|
|
1090
|
+
}
|
|
1091
|
+
case "kind": {
|
|
1092
|
+
return table.kind;
|
|
1093
|
+
}
|
|
1094
|
+
case "id": {
|
|
1095
|
+
return table.id;
|
|
1096
|
+
}
|
|
1097
|
+
case "from_kind":
|
|
1098
|
+
case "from_id":
|
|
1099
|
+
case "to_kind":
|
|
1100
|
+
case "to_id": {
|
|
1101
|
+
throw new Error(`Unsupported node system column for indexes: ${column}`);
|
|
1102
|
+
}
|
|
1103
|
+
case "deleted_at": {
|
|
1104
|
+
return table.deletedAt;
|
|
1105
|
+
}
|
|
1106
|
+
case "valid_from": {
|
|
1107
|
+
return table.validFrom;
|
|
1108
|
+
}
|
|
1109
|
+
case "valid_to": {
|
|
1110
|
+
return table.validTo;
|
|
1111
|
+
}
|
|
1112
|
+
case "created_at": {
|
|
1113
|
+
return table.createdAt;
|
|
1114
|
+
}
|
|
1115
|
+
case "updated_at": {
|
|
1116
|
+
return table.updatedAt;
|
|
1117
|
+
}
|
|
1118
|
+
case "version": {
|
|
1119
|
+
return table.version;
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
function getPostgresEdgeSystemColumn(table, column) {
|
|
1124
|
+
switch (column) {
|
|
1125
|
+
case "graph_id": {
|
|
1126
|
+
return table.graphId;
|
|
1127
|
+
}
|
|
1128
|
+
case "kind": {
|
|
1129
|
+
return table.kind;
|
|
1130
|
+
}
|
|
1131
|
+
case "id": {
|
|
1132
|
+
return table.id;
|
|
1133
|
+
}
|
|
1134
|
+
case "from_kind": {
|
|
1135
|
+
return table.fromKind;
|
|
1136
|
+
}
|
|
1137
|
+
case "from_id": {
|
|
1138
|
+
return table.fromId;
|
|
1139
|
+
}
|
|
1140
|
+
case "to_kind": {
|
|
1141
|
+
return table.toKind;
|
|
1142
|
+
}
|
|
1143
|
+
case "to_id": {
|
|
1144
|
+
return table.toId;
|
|
1145
|
+
}
|
|
1146
|
+
case "deleted_at": {
|
|
1147
|
+
return table.deletedAt;
|
|
1148
|
+
}
|
|
1149
|
+
case "valid_from": {
|
|
1150
|
+
return table.validFrom;
|
|
1151
|
+
}
|
|
1152
|
+
case "valid_to": {
|
|
1153
|
+
return table.validTo;
|
|
1154
|
+
}
|
|
1155
|
+
case "created_at": {
|
|
1156
|
+
return table.createdAt;
|
|
1157
|
+
}
|
|
1158
|
+
case "updated_at": {
|
|
1159
|
+
return table.updatedAt;
|
|
1160
|
+
}
|
|
1161
|
+
case "version": {
|
|
1162
|
+
throw new Error(`Unsupported edge system column for indexes: ${column}`);
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
}
|
|
1166
|
+
function buildSqliteNodeIndexBuilders(table, indexes) {
|
|
1167
|
+
const nodeIndexes = indexes.filter(
|
|
1168
|
+
(index) => index.entity === "node"
|
|
1169
|
+
);
|
|
1170
|
+
return nodeIndexes.map((index) => {
|
|
1171
|
+
const propsColumn = drizzleOrm.sql`${table.props}`;
|
|
1172
|
+
const systemColumn = (column) => drizzleOrm.sql`${getSqliteNodeSystemColumn(table, column)}`;
|
|
1173
|
+
const { keys } = compileNodeIndexKeys(
|
|
1174
|
+
index,
|
|
1175
|
+
"sqlite",
|
|
1176
|
+
propsColumn,
|
|
1177
|
+
systemColumn
|
|
1178
|
+
);
|
|
1179
|
+
assertNonEmpty(keys, `node index "${index.name}"`);
|
|
1180
|
+
const base = index.unique ? sqliteCore.uniqueIndex(index.name) : sqliteCore.index(index.name);
|
|
1181
|
+
const builder = base.on(...keys);
|
|
1182
|
+
if (index.where) {
|
|
1183
|
+
const ctx = {
|
|
1184
|
+
dialect: "sqlite",
|
|
1185
|
+
propsColumn,
|
|
1186
|
+
systemColumn
|
|
1187
|
+
};
|
|
1188
|
+
builder.where(compileIndexWhere(ctx, index.where));
|
|
1189
|
+
}
|
|
1190
|
+
return builder;
|
|
1191
|
+
});
|
|
1192
|
+
}
|
|
1193
|
+
function buildSqliteEdgeIndexBuilders(table, indexes) {
|
|
1194
|
+
const edgeIndexes = indexes.filter(
|
|
1195
|
+
(index) => index.entity === "edge"
|
|
1196
|
+
);
|
|
1197
|
+
return edgeIndexes.map((index) => {
|
|
1198
|
+
const propsColumn = drizzleOrm.sql`${table.props}`;
|
|
1199
|
+
const systemColumn = (column) => drizzleOrm.sql`${getSqliteEdgeSystemColumn(table, column)}`;
|
|
1200
|
+
const { keys } = compileEdgeIndexKeys(
|
|
1201
|
+
index,
|
|
1202
|
+
"sqlite",
|
|
1203
|
+
propsColumn,
|
|
1204
|
+
systemColumn
|
|
1205
|
+
);
|
|
1206
|
+
assertNonEmpty(keys, `edge index "${index.name}"`);
|
|
1207
|
+
const base = index.unique ? sqliteCore.uniqueIndex(index.name) : sqliteCore.index(index.name);
|
|
1208
|
+
const builder = base.on(...keys);
|
|
1209
|
+
if (index.where) {
|
|
1210
|
+
const ctx = {
|
|
1211
|
+
dialect: "sqlite",
|
|
1212
|
+
propsColumn,
|
|
1213
|
+
systemColumn
|
|
1214
|
+
};
|
|
1215
|
+
builder.where(compileIndexWhere(ctx, index.where));
|
|
1216
|
+
}
|
|
1217
|
+
return builder;
|
|
1218
|
+
});
|
|
1219
|
+
}
|
|
1220
|
+
function getSqliteNodeSystemColumn(table, column) {
|
|
1221
|
+
switch (column) {
|
|
1222
|
+
case "graph_id": {
|
|
1223
|
+
return table.graphId;
|
|
1224
|
+
}
|
|
1225
|
+
case "kind": {
|
|
1226
|
+
return table.kind;
|
|
1227
|
+
}
|
|
1228
|
+
case "id": {
|
|
1229
|
+
return table.id;
|
|
1230
|
+
}
|
|
1231
|
+
case "from_kind":
|
|
1232
|
+
case "from_id":
|
|
1233
|
+
case "to_kind":
|
|
1234
|
+
case "to_id": {
|
|
1235
|
+
throw new Error(`Unsupported node system column for indexes: ${column}`);
|
|
1236
|
+
}
|
|
1237
|
+
case "deleted_at": {
|
|
1238
|
+
return table.deletedAt;
|
|
1239
|
+
}
|
|
1240
|
+
case "valid_from": {
|
|
1241
|
+
return table.validFrom;
|
|
1242
|
+
}
|
|
1243
|
+
case "valid_to": {
|
|
1244
|
+
return table.validTo;
|
|
1245
|
+
}
|
|
1246
|
+
case "created_at": {
|
|
1247
|
+
return table.createdAt;
|
|
1248
|
+
}
|
|
1249
|
+
case "updated_at": {
|
|
1250
|
+
return table.updatedAt;
|
|
1251
|
+
}
|
|
1252
|
+
case "version": {
|
|
1253
|
+
return table.version;
|
|
1254
|
+
}
|
|
1255
|
+
}
|
|
1256
|
+
}
|
|
1257
|
+
function getSqliteEdgeSystemColumn(table, column) {
|
|
1258
|
+
switch (column) {
|
|
1259
|
+
case "graph_id": {
|
|
1260
|
+
return table.graphId;
|
|
1261
|
+
}
|
|
1262
|
+
case "kind": {
|
|
1263
|
+
return table.kind;
|
|
1264
|
+
}
|
|
1265
|
+
case "id": {
|
|
1266
|
+
return table.id;
|
|
1267
|
+
}
|
|
1268
|
+
case "from_kind": {
|
|
1269
|
+
return table.fromKind;
|
|
1270
|
+
}
|
|
1271
|
+
case "from_id": {
|
|
1272
|
+
return table.fromId;
|
|
1273
|
+
}
|
|
1274
|
+
case "to_kind": {
|
|
1275
|
+
return table.toKind;
|
|
1276
|
+
}
|
|
1277
|
+
case "to_id": {
|
|
1278
|
+
return table.toId;
|
|
1279
|
+
}
|
|
1280
|
+
case "deleted_at": {
|
|
1281
|
+
return table.deletedAt;
|
|
1282
|
+
}
|
|
1283
|
+
case "valid_from": {
|
|
1284
|
+
return table.validFrom;
|
|
1285
|
+
}
|
|
1286
|
+
case "valid_to": {
|
|
1287
|
+
return table.validTo;
|
|
1288
|
+
}
|
|
1289
|
+
case "created_at": {
|
|
1290
|
+
return table.createdAt;
|
|
1291
|
+
}
|
|
1292
|
+
case "updated_at": {
|
|
1293
|
+
return table.updatedAt;
|
|
1294
|
+
}
|
|
1295
|
+
case "version": {
|
|
1296
|
+
throw new Error(`Unsupported edge system column for indexes: ${column}`);
|
|
1297
|
+
}
|
|
1298
|
+
}
|
|
1299
|
+
}
|
|
1300
|
+
function assertNonEmpty(values, label) {
|
|
1301
|
+
if (values.length === 0) {
|
|
1302
|
+
throw new Error(`Index must have at least one key (${label})`);
|
|
754
1303
|
}
|
|
755
|
-
return (hash >>> 0).toString(36);
|
|
756
1304
|
}
|
|
757
1305
|
|
|
758
|
-
// src/
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
1306
|
+
// src/indexes/profiler.ts
|
|
1307
|
+
function toDeclaredIndex(index) {
|
|
1308
|
+
return {
|
|
1309
|
+
entityType: index.entity,
|
|
1310
|
+
kind: index.kind,
|
|
1311
|
+
fields: [...index.fields],
|
|
1312
|
+
unique: index.unique,
|
|
1313
|
+
name: index.name
|
|
1314
|
+
};
|
|
1315
|
+
}
|
|
1316
|
+
function toDeclaredIndexes(indexes) {
|
|
1317
|
+
return indexes.filter(
|
|
1318
|
+
(index) => index.entity === "node" || index.entity === "edge"
|
|
1319
|
+
).map((index) => toDeclaredIndex(index));
|
|
1320
|
+
}
|
|
1321
|
+
|
|
1322
|
+
// src/indexes/where.ts
|
|
1323
|
+
function andWhere(...predicates) {
|
|
1324
|
+
if (predicates.length === 1) {
|
|
1325
|
+
return predicates[0];
|
|
1326
|
+
}
|
|
1327
|
+
return {
|
|
1328
|
+
__type: "index_where_and",
|
|
1329
|
+
predicates
|
|
1330
|
+
};
|
|
1331
|
+
}
|
|
1332
|
+
function orWhere(...predicates) {
|
|
1333
|
+
if (predicates.length === 1) {
|
|
1334
|
+
return predicates[0];
|
|
1335
|
+
}
|
|
1336
|
+
return {
|
|
1337
|
+
__type: "index_where_or",
|
|
1338
|
+
predicates
|
|
1339
|
+
};
|
|
1340
|
+
}
|
|
1341
|
+
function notWhere(predicate) {
|
|
1342
|
+
return {
|
|
1343
|
+
__type: "index_where_not",
|
|
1344
|
+
predicate
|
|
1345
|
+
};
|
|
1346
|
+
}
|
|
774
1347
|
|
|
775
|
-
exports.
|
|
776
|
-
exports.DEFAULT_STREAM_BATCH_SIZE = DEFAULT_STREAM_BATCH_SIZE;
|
|
777
|
-
exports.EDGE_INDEX_TYPE_MARKER = EDGE_INDEX_TYPE_MARKER;
|
|
778
|
-
exports.EDGE_META_KEYS = EDGE_META_KEYS;
|
|
779
|
-
exports.IDENTIFIER_COMPONENT_MAX_LENGTH = IDENTIFIER_COMPONENT_MAX_LENGTH;
|
|
780
|
-
exports.MAX_PG_IDENTIFIER_LENGTH = MAX_PG_IDENTIFIER_LENGTH;
|
|
781
|
-
exports.NODE_INDEX_TYPE_MARKER = NODE_INDEX_TYPE_MARKER;
|
|
782
|
-
exports.NODE_META_KEYS = NODE_META_KEYS;
|
|
783
|
-
exports.PG_ARRAY_END = PG_ARRAY_END;
|
|
784
|
-
exports.PG_ARRAY_START = PG_ARRAY_START;
|
|
785
|
-
exports.PG_PATH_ELEMENT_SEPARATOR = PG_PATH_ELEMENT_SEPARATOR;
|
|
786
|
-
exports.SQLITE_PATH_DELIMITER = SQLITE_PATH_DELIMITER;
|
|
787
|
-
exports.TRUNCATED_IDENTIFIER_MAX_LENGTH = TRUNCATED_IDENTIFIER_MAX_LENGTH;
|
|
1348
|
+
exports.andWhere = andWhere;
|
|
788
1349
|
exports.buildFulltextCapabilities = buildFulltextCapabilities;
|
|
1350
|
+
exports.buildPostgresEdgeIndexBuilders = buildPostgresEdgeIndexBuilders;
|
|
1351
|
+
exports.buildPostgresNodeIndexBuilders = buildPostgresNodeIndexBuilders;
|
|
1352
|
+
exports.buildSqliteEdgeIndexBuilders = buildSqliteEdgeIndexBuilders;
|
|
1353
|
+
exports.buildSqliteNodeIndexBuilders = buildSqliteNodeIndexBuilders;
|
|
789
1354
|
exports.edgeColumnList = edgeColumnList;
|
|
790
|
-
exports.fnv1aBase36 = fnv1aBase36;
|
|
791
1355
|
exports.fts5Strategy = fts5Strategy;
|
|
1356
|
+
exports.generateEdgeIndexDDL = generateEdgeIndexDDL;
|
|
1357
|
+
exports.generateIndexDDL = generateIndexDDL;
|
|
1358
|
+
exports.generateNodeIndexDDL = generateNodeIndexDDL;
|
|
792
1359
|
exports.getDialect = getDialect;
|
|
793
1360
|
exports.nodeColumnList = nodeColumnList;
|
|
1361
|
+
exports.notWhere = notWhere;
|
|
1362
|
+
exports.orWhere = orWhere;
|
|
794
1363
|
exports.quotedColumn = quotedColumn;
|
|
795
1364
|
exports.quotedTableName = quotedTableName;
|
|
796
1365
|
exports.sqlNull = sqlNull;
|
|
1366
|
+
exports.toDeclaredIndex = toDeclaredIndex;
|
|
1367
|
+
exports.toDeclaredIndexes = toDeclaredIndexes;
|
|
797
1368
|
exports.tsvectorStrategy = tsvectorStrategy;
|
|
798
|
-
//# sourceMappingURL=chunk-
|
|
799
|
-
//# sourceMappingURL=chunk-
|
|
1369
|
+
//# sourceMappingURL=chunk-JTI5WT4P.cjs.map
|
|
1370
|
+
//# sourceMappingURL=chunk-JTI5WT4P.cjs.map
|