@nicia-ai/typegraph 0.19.0 → 0.21.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/{ast-Bh2NDeaK.d.cts → ast-CSLbPIOC.d.ts} +56 -3
- package/dist/{ast-COMyNeMn.d.ts → ast-DogwbBqA.d.cts} +56 -3
- package/dist/backend/postgres/index.cjs +123 -45
- package/dist/backend/postgres/index.cjs.map +1 -1
- package/dist/backend/postgres/index.d.cts +15 -7
- package/dist/backend/postgres/index.d.ts +15 -7
- package/dist/backend/postgres/index.js +101 -23
- package/dist/backend/postgres/index.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +15 -15
- package/dist/backend/sqlite/index.d.cts +11 -7
- package/dist/backend/sqlite/index.d.ts +11 -7
- package/dist/backend/sqlite/index.js +5 -5
- package/dist/backend/sqlite/libsql.cjs +8 -8
- package/dist/backend/sqlite/libsql.d.cts +4 -5
- package/dist/backend/sqlite/libsql.d.ts +4 -5
- package/dist/backend/sqlite/libsql.js +5 -5
- package/dist/backend/sqlite/local.cjs +9 -9
- package/dist/backend/sqlite/local.d.cts +4 -5
- package/dist/backend/sqlite/local.d.ts +4 -5
- package/dist/backend/sqlite/local.js +5 -5
- package/dist/{chunk-LELLOHJK.cjs → chunk-2X7P7AD5.cjs} +35 -35
- package/dist/{chunk-LELLOHJK.cjs.map → chunk-2X7P7AD5.cjs.map} +1 -1
- package/dist/{chunk-GNIYZKBI.js → chunk-4XNE2JG3.js} +376 -8
- package/dist/chunk-4XNE2JG3.js.map +1 -0
- package/dist/{chunk-HXJXTOXR.cjs → chunk-CQL6FOTT.cjs} +82 -21
- package/dist/chunk-CQL6FOTT.cjs.map +1 -0
- package/dist/{chunk-K7SQ3SWP.js → chunk-EYELZHKY.js} +120 -12
- package/dist/chunk-EYELZHKY.js.map +1 -0
- package/dist/{chunk-MME3H4ZF.cjs → chunk-FQCQM3KG.cjs} +385 -9
- package/dist/chunk-FQCQM3KG.cjs.map +1 -0
- package/dist/{chunk-X33WV2UF.cjs → chunk-HRNQ3DVJ.cjs} +24 -21
- package/dist/chunk-HRNQ3DVJ.cjs.map +1 -0
- package/dist/{chunk-W6M7XWKX.js → chunk-JYUQA77I.js} +21 -18
- package/dist/chunk-JYUQA77I.js.map +1 -0
- package/dist/{chunk-LLHFS53Q.js → chunk-NRNJ52AA.js} +72 -11
- package/dist/chunk-NRNJ52AA.js.map +1 -0
- package/dist/{chunk-IYWWXOVK.cjs → chunk-Q73OWTJY.cjs} +204 -89
- package/dist/chunk-Q73OWTJY.cjs.map +1 -0
- package/dist/{chunk-G5CYWKRF.js → chunk-RS5OLGEW.js} +2 -2
- package/dist/{chunk-G5CYWKRF.js.map → chunk-RS5OLGEW.js.map} +1 -1
- package/dist/{chunk-6GWJH6AR.js → chunk-SMMOAVJ5.js} +4 -4
- package/dist/{chunk-6GWJH6AR.js.map → chunk-SMMOAVJ5.js.map} +1 -1
- package/dist/{chunk-QFZQGEQ3.js → chunk-UQVBVBVG.js} +151 -36
- package/dist/chunk-UQVBVBVG.js.map +1 -0
- package/dist/{chunk-P5CNM325.cjs → chunk-UVZHTBZ5.cjs} +123 -11
- package/dist/chunk-UVZHTBZ5.cjs.map +1 -0
- package/dist/{chunk-5GZMPJOP.cjs → chunk-WRWVWKQL.cjs} +2 -2
- package/dist/{chunk-5GZMPJOP.cjs.map → chunk-WRWVWKQL.cjs.map} +1 -1
- package/dist/{ddl-BBo2EcFc.d.cts → ddl-BqkTShcR.d.ts} +28 -6
- package/dist/{ddl-D4jlcOH_.d.ts → ddl-Dk1NDN3M.d.cts} +28 -6
- package/dist/index.cjs +2102 -556
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -10
- package/dist/index.d.ts +8 -10
- package/dist/index.js +1961 -439
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +17 -17
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +3 -3
- package/dist/interchange/index.cjs +6 -6
- package/dist/interchange/index.d.cts +4 -5
- package/dist/interchange/index.d.ts +4 -5
- package/dist/interchange/index.js +1 -1
- package/dist/{manager-Chhrq1vl.d.ts → manager-0jVZtiE8.d.ts} +1 -2
- package/dist/{manager-Bj1UEnhE.d.cts → manager-BPK-2PUI.d.cts} +1 -2
- package/dist/profiler/index.cjs +15 -8
- package/dist/profiler/index.cjs.map +1 -1
- package/dist/profiler/index.d.cts +7 -8
- package/dist/profiler/index.d.ts +7 -8
- package/dist/profiler/index.js +8 -1
- package/dist/profiler/index.js.map +1 -1
- package/dist/schema/index.cjs +21 -21
- package/dist/schema/index.d.cts +4 -5
- package/dist/schema/index.d.ts +4 -5
- package/dist/schema/index.js +3 -3
- package/dist/{sqlite-DE-6NWtC.d.cts → sqlite-D1rrwcir.d.cts} +14 -1
- package/dist/{sqlite-Blq-AhmK.d.ts → sqlite-W3rmJMlc.d.ts} +14 -1
- package/dist/{store-BnUu4qo5.d.cts → store-2QW2SIRk.d.cts} +626 -7
- package/dist/{store-CCOwNft_.d.ts → store-C0q13mtJ.d.ts} +626 -7
- package/dist/{types-B3mmOMJV.d.cts → types-CQF88McG.d.cts} +475 -2
- package/dist/{types-ThB4cFLp.d.ts → types-CQF88McG.d.ts} +475 -2
- package/dist/{types-COPePE8_.d.ts → types-CglvhPKz.d.ts} +1 -1
- package/dist/{types-CVtGFpB9.d.cts → types-D23slCOA.d.cts} +1 -1
- package/dist/{types-Ceb01czq.d.ts → types-IMQCuser.d.ts} +2 -2
- package/dist/{types-CZd2PEOc.d.cts → types-vgjar7Ch.d.cts} +2 -2
- package/package.json +10 -10
- package/dist/chunk-GNIYZKBI.js.map +0 -1
- package/dist/chunk-HXJXTOXR.cjs.map +0 -1
- package/dist/chunk-IYWWXOVK.cjs.map +0 -1
- package/dist/chunk-K7SQ3SWP.js.map +0 -1
- package/dist/chunk-LLHFS53Q.js.map +0 -1
- package/dist/chunk-MME3H4ZF.cjs.map +0 -1
- package/dist/chunk-P5CNM325.cjs.map +0 -1
- package/dist/chunk-QFZQGEQ3.js.map +0 -1
- package/dist/chunk-W6M7XWKX.js.map +0 -1
- package/dist/chunk-X33WV2UF.cjs.map +0 -1
- package/dist/types-DMzKq0d5.d.cts +0 -181
- package/dist/types-DMzKq0d5.d.ts +0 -181
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
|
|
2
|
-
import { G as GraphBackend } from '../../types-
|
|
3
|
-
import { S as SqliteTables } from '../../sqlite-
|
|
2
|
+
import { G as GraphBackend } from '../../types-CQF88McG.cjs';
|
|
3
|
+
import { S as SqliteTables } from '../../sqlite-D1rrwcir.cjs';
|
|
4
4
|
import 'drizzle-orm';
|
|
5
|
-
import '../../types-DMzKq0d5.cjs';
|
|
6
5
|
import 'zod';
|
|
7
6
|
import 'drizzle-orm/sqlite-core';
|
|
8
|
-
import '../../types-
|
|
9
|
-
import '../../ast-
|
|
7
|
+
import '../../types-vgjar7Ch.cjs';
|
|
8
|
+
import '../../ast-DogwbBqA.cjs';
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Options for creating a local SQLite backend.
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { BetterSQLite3Database } from 'drizzle-orm/better-sqlite3';
|
|
2
|
-
import { G as GraphBackend } from '../../types-
|
|
3
|
-
import { S as SqliteTables } from '../../sqlite-
|
|
2
|
+
import { G as GraphBackend } from '../../types-CQF88McG.js';
|
|
3
|
+
import { S as SqliteTables } from '../../sqlite-W3rmJMlc.js';
|
|
4
4
|
import 'drizzle-orm';
|
|
5
|
-
import '../../types-DMzKq0d5.js';
|
|
6
5
|
import 'zod';
|
|
7
6
|
import 'drizzle-orm/sqlite-core';
|
|
8
|
-
import '../../types-
|
|
9
|
-
import '../../ast-
|
|
7
|
+
import '../../types-IMQCuser.js';
|
|
8
|
+
import '../../ast-CSLbPIOC.js';
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
11
|
* Options for creating a local SQLite backend.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { createSqliteBackend } from '../../chunk-
|
|
2
|
-
import { tables2, generateSqliteDDL, wrapWithManagedClose } from '../../chunk-
|
|
1
|
+
import { createSqliteBackend } from '../../chunk-NRNJ52AA.js';
|
|
2
|
+
import { tables2, generateSqliteDDL, wrapWithManagedClose } from '../../chunk-UQVBVBVG.js';
|
|
3
3
|
import { ConfigurationError } from '../../chunk-WFMTAEEN.js';
|
|
4
|
-
import '../../chunk-
|
|
5
|
-
import '../../chunk-
|
|
6
|
-
import '../../chunk-
|
|
4
|
+
import '../../chunk-SMMOAVJ5.js';
|
|
5
|
+
import '../../chunk-4XNE2JG3.js';
|
|
6
|
+
import '../../chunk-EYELZHKY.js';
|
|
7
7
|
import Database from 'better-sqlite3';
|
|
8
8
|
import { drizzle } from 'drizzle-orm/better-sqlite3';
|
|
9
9
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkFQCQM3KG_cjs = require('./chunk-FQCQM3KG.cjs');
|
|
4
|
+
var chunkUVZHTBZ5_cjs = require('./chunk-UVZHTBZ5.cjs');
|
|
5
5
|
var drizzleOrm = require('drizzle-orm');
|
|
6
6
|
var casing = require('drizzle-orm/casing');
|
|
7
7
|
var pgCore = require('drizzle-orm/pg-core');
|
|
8
8
|
var sqliteCore = require('drizzle-orm/sqlite-core');
|
|
9
9
|
|
|
10
10
|
function compileNodeIndexKeys(index, dialect, propsColumn, systemColumn) {
|
|
11
|
-
const adapter =
|
|
11
|
+
const adapter = chunkFQCQM3KG_cjs.getDialect(dialect);
|
|
12
12
|
const keys = [];
|
|
13
13
|
for (const column of getNodeScopeColumns(index.scope)) {
|
|
14
14
|
keys.push(systemColumn(column));
|
|
@@ -31,7 +31,7 @@ function compileNodeIndexKeys(index, dialect, propsColumn, systemColumn) {
|
|
|
31
31
|
return { keys };
|
|
32
32
|
}
|
|
33
33
|
function compileEdgeIndexKeys(index, dialect, propsColumn, systemColumn) {
|
|
34
|
-
const adapter =
|
|
34
|
+
const adapter = chunkFQCQM3KG_cjs.getDialect(dialect);
|
|
35
35
|
const keys = [];
|
|
36
36
|
for (const column of getEdgeScopeColumns(index.scope, index.direction)) {
|
|
37
37
|
keys.push(systemColumn(column));
|
|
@@ -153,8 +153,8 @@ function compileIndexWhereOperand(ctx, operand) {
|
|
|
153
153
|
if (operand.__type === "index_operand_system") {
|
|
154
154
|
return ctx.systemColumn(operand.column);
|
|
155
155
|
}
|
|
156
|
-
const adapter =
|
|
157
|
-
const pointer =
|
|
156
|
+
const adapter = chunkFQCQM3KG_cjs.getDialect(ctx.dialect);
|
|
157
|
+
const pointer = chunkUVZHTBZ5_cjs.jsonPointer([operand.field]);
|
|
158
158
|
switch (operand.valueType) {
|
|
159
159
|
case "number": {
|
|
160
160
|
return adapter.jsonExtractNumber(ctx.propsColumn, pointer);
|
|
@@ -187,7 +187,7 @@ function compileIndexWhereLiteral(dialect, literal) {
|
|
|
187
187
|
return drizzleOrm.sql.raw(literal.value.toString());
|
|
188
188
|
}
|
|
189
189
|
case "boolean": {
|
|
190
|
-
return
|
|
190
|
+
return chunkFQCQM3KG_cjs.getDialect(dialect).booleanLiteral(literal.value);
|
|
191
191
|
}
|
|
192
192
|
case "array":
|
|
193
193
|
case "object":
|
|
@@ -225,7 +225,7 @@ function escapeStringLiteral(value) {
|
|
|
225
225
|
|
|
226
226
|
// src/indexes/ddl.ts
|
|
227
227
|
function generateIndexDDL(index, dialect, options = {}) {
|
|
228
|
-
if (index.__type ===
|
|
228
|
+
if (index.__type === chunkFQCQM3KG_cjs.NODE_INDEX_TYPE_MARKER) {
|
|
229
229
|
return generateNodeIndexDDL(index, dialect, options);
|
|
230
230
|
}
|
|
231
231
|
return generateEdgeIndexDDL(index, dialect, options);
|
|
@@ -242,7 +242,7 @@ function generateTableIndexDDL(index, dialect, tableName, options) {
|
|
|
242
242
|
const ifNotExists = options.ifNotExists ?? true;
|
|
243
243
|
const propsColumn = drizzleOrm.sql.raw('"props"');
|
|
244
244
|
const systemColumn = (column) => drizzleOrm.sql.raw(quoteIdentifier(column));
|
|
245
|
-
const keys = index.__type ===
|
|
245
|
+
const keys = index.__type === chunkFQCQM3KG_cjs.NODE_INDEX_TYPE_MARKER ? compileNodeIndexKeys(index, dialect, propsColumn, systemColumn).keys : compileEdgeIndexKeys(index, dialect, propsColumn, systemColumn).keys;
|
|
246
246
|
const whereSql = index.where ? sqlToInlineString(
|
|
247
247
|
compileIndexWhere(
|
|
248
248
|
{
|
|
@@ -293,7 +293,7 @@ function inlineParam(value, dialect) {
|
|
|
293
293
|
return value.toString();
|
|
294
294
|
}
|
|
295
295
|
if (typeof value === "boolean") {
|
|
296
|
-
return
|
|
296
|
+
return chunkFQCQM3KG_cjs.getDialect(dialect).booleanLiteralString(value);
|
|
297
297
|
}
|
|
298
298
|
if (typeof value === "bigint") {
|
|
299
299
|
return value.toString();
|
|
@@ -310,7 +310,7 @@ function escapeStringLiteral2(value) {
|
|
|
310
310
|
function defineNodeIndex(node, config) {
|
|
311
311
|
const scope = config.scope ?? "graphAndKind";
|
|
312
312
|
const unique = config.unique ?? false;
|
|
313
|
-
const schemaIntrospector =
|
|
313
|
+
const schemaIntrospector = chunkUVZHTBZ5_cjs.createSchemaIntrospector(
|
|
314
314
|
/* @__PURE__ */ new Map([[node.kind, { schema: node.schema }]])
|
|
315
315
|
);
|
|
316
316
|
const { pointers: fields, valueTypes: fieldValueTypes } = normalizeNodeIndexFieldsOrThrow(
|
|
@@ -342,7 +342,7 @@ function defineNodeIndex(node, config) {
|
|
|
342
342
|
coveringFields
|
|
343
343
|
});
|
|
344
344
|
return {
|
|
345
|
-
__type:
|
|
345
|
+
__type: chunkFQCQM3KG_cjs.NODE_INDEX_TYPE_MARKER,
|
|
346
346
|
node,
|
|
347
347
|
nodeKind: node.kind,
|
|
348
348
|
fields,
|
|
@@ -359,7 +359,7 @@ function defineEdgeIndex(edge, config) {
|
|
|
359
359
|
const scope = config.scope ?? "graphAndKind";
|
|
360
360
|
const unique = config.unique ?? false;
|
|
361
361
|
const direction = config.direction ?? "none";
|
|
362
|
-
const schemaIntrospector =
|
|
362
|
+
const schemaIntrospector = chunkUVZHTBZ5_cjs.createSchemaIntrospector(
|
|
363
363
|
/* @__PURE__ */ new Map(),
|
|
364
364
|
/* @__PURE__ */ new Map([[edge.kind, { schema: edge.schema }]])
|
|
365
365
|
);
|
|
@@ -392,7 +392,7 @@ function defineEdgeIndex(edge, config) {
|
|
|
392
392
|
coveringFields
|
|
393
393
|
});
|
|
394
394
|
return {
|
|
395
|
-
__type:
|
|
395
|
+
__type: chunkFQCQM3KG_cjs.EDGE_INDEX_TYPE_MARKER,
|
|
396
396
|
edge,
|
|
397
397
|
edgeKind: edge.kind,
|
|
398
398
|
fields,
|
|
@@ -570,7 +570,7 @@ function createSystemColumnMapForNode() {
|
|
|
570
570
|
["kind", { column: "kind", valueType: "string" }],
|
|
571
571
|
["id", { column: "id", valueType: "string" }]
|
|
572
572
|
];
|
|
573
|
-
for (const key of
|
|
573
|
+
for (const key of chunkFQCQM3KG_cjs.NODE_META_KEYS) {
|
|
574
574
|
if (key === "version") {
|
|
575
575
|
entries.push([key, { column: "version", valueType: "number" }]);
|
|
576
576
|
continue;
|
|
@@ -589,7 +589,7 @@ function createSystemColumnMapForEdge() {
|
|
|
589
589
|
["toKind", { column: "to_kind", valueType: "string" }],
|
|
590
590
|
["toId", { column: "to_id", valueType: "string" }]
|
|
591
591
|
];
|
|
592
|
-
for (const key of
|
|
592
|
+
for (const key of chunkFQCQM3KG_cjs.EDGE_META_KEYS) {
|
|
593
593
|
entries.push([key, { column: toSystemColumnName(key), valueType: "date" }]);
|
|
594
594
|
}
|
|
595
595
|
return new Map(entries);
|
|
@@ -686,11 +686,11 @@ function normalizeIndexFieldPointer(input) {
|
|
|
686
686
|
if (input.length === 0) {
|
|
687
687
|
throw new Error("Index field JSON pointer must not be empty");
|
|
688
688
|
}
|
|
689
|
-
return
|
|
689
|
+
return chunkUVZHTBZ5_cjs.jsonPointer(input);
|
|
690
690
|
}
|
|
691
691
|
if (typeof input === "string") {
|
|
692
692
|
if (input.startsWith("/")) {
|
|
693
|
-
const pointer =
|
|
693
|
+
const pointer = chunkUVZHTBZ5_cjs.normalizeJsonPointer(
|
|
694
694
|
input
|
|
695
695
|
);
|
|
696
696
|
if (pointer === "") {
|
|
@@ -698,12 +698,12 @@ function normalizeIndexFieldPointer(input) {
|
|
|
698
698
|
}
|
|
699
699
|
return pointer;
|
|
700
700
|
}
|
|
701
|
-
return
|
|
701
|
+
return chunkUVZHTBZ5_cjs.jsonPointer([input]);
|
|
702
702
|
}
|
|
703
703
|
throw new Error(`Unsupported index field input: ${String(input)}`);
|
|
704
704
|
}
|
|
705
705
|
function resolveNodeFieldTypeInfoOrThrow(nodeKind, pointer, schemaIntrospector) {
|
|
706
|
-
const segments =
|
|
706
|
+
const segments = chunkUVZHTBZ5_cjs.parseJsonPointer(pointer);
|
|
707
707
|
const [first, ...rest] = segments;
|
|
708
708
|
if (!first) {
|
|
709
709
|
throw new Error("Index field JSON pointer must not be empty");
|
|
@@ -717,9 +717,9 @@ function resolveNodeFieldTypeInfoOrThrow(nodeKind, pointer, schemaIntrospector)
|
|
|
717
717
|
if (rest.length === 0) {
|
|
718
718
|
return rootInfo;
|
|
719
719
|
}
|
|
720
|
-
const resolved =
|
|
720
|
+
const resolved = chunkUVZHTBZ5_cjs.resolveFieldTypeInfoAtJsonPointer(
|
|
721
721
|
rootInfo,
|
|
722
|
-
|
|
722
|
+
chunkUVZHTBZ5_cjs.jsonPointer(rest)
|
|
723
723
|
);
|
|
724
724
|
if (!resolved) {
|
|
725
725
|
throw new Error(
|
|
@@ -729,7 +729,7 @@ function resolveNodeFieldTypeInfoOrThrow(nodeKind, pointer, schemaIntrospector)
|
|
|
729
729
|
return resolved;
|
|
730
730
|
}
|
|
731
731
|
function resolveEdgeFieldTypeInfoOrThrow(edgeKind, pointer, schemaIntrospector) {
|
|
732
|
-
const segments =
|
|
732
|
+
const segments = chunkUVZHTBZ5_cjs.parseJsonPointer(pointer);
|
|
733
733
|
const [first, ...rest] = segments;
|
|
734
734
|
if (!first) {
|
|
735
735
|
throw new Error("Index field JSON pointer must not be empty");
|
|
@@ -743,9 +743,9 @@ function resolveEdgeFieldTypeInfoOrThrow(edgeKind, pointer, schemaIntrospector)
|
|
|
743
743
|
if (rest.length === 0) {
|
|
744
744
|
return rootInfo;
|
|
745
745
|
}
|
|
746
|
-
const resolved =
|
|
746
|
+
const resolved = chunkUVZHTBZ5_cjs.resolveFieldTypeInfoAtJsonPointer(
|
|
747
747
|
rootInfo,
|
|
748
|
-
|
|
748
|
+
chunkUVZHTBZ5_cjs.jsonPointer(rest)
|
|
749
749
|
);
|
|
750
750
|
if (!resolved) {
|
|
751
751
|
throw new Error(
|
|
@@ -755,7 +755,7 @@ function resolveEdgeFieldTypeInfoOrThrow(edgeKind, pointer, schemaIntrospector)
|
|
|
755
755
|
return resolved;
|
|
756
756
|
}
|
|
757
757
|
function generateDefaultIndexName(parts) {
|
|
758
|
-
const hash =
|
|
758
|
+
const hash = chunkFQCQM3KG_cjs.fnv1aBase36(
|
|
759
759
|
JSON.stringify({
|
|
760
760
|
kind: parts.kind,
|
|
761
761
|
kindName: parts.kindName,
|
|
@@ -779,14 +779,14 @@ function generateDefaultIndexName(parts) {
|
|
|
779
779
|
hash
|
|
780
780
|
].filter((part) => part !== void 0);
|
|
781
781
|
const joined = nameParts.join("_");
|
|
782
|
-
return joined.length <=
|
|
782
|
+
return joined.length <= chunkFQCQM3KG_cjs.MAX_PG_IDENTIFIER_LENGTH ? joined : `${joined.slice(0, chunkFQCQM3KG_cjs.TRUNCATED_IDENTIFIER_MAX_LENGTH)}_${hash}`;
|
|
783
783
|
}
|
|
784
784
|
function sanitizeIdentifierComponent(value) {
|
|
785
|
-
return value.toLowerCase().replaceAll(/[^a-z0-9_]+/g, "_").replaceAll(/^_+|_+$/g, "").slice(0,
|
|
785
|
+
return value.toLowerCase().replaceAll(/[^a-z0-9_]+/g, "_").replaceAll(/^_+|_+$/g, "").slice(0, chunkFQCQM3KG_cjs.IDENTIFIER_COMPONENT_MAX_LENGTH);
|
|
786
786
|
}
|
|
787
787
|
function buildPostgresNodeIndexBuilders(table, indexes) {
|
|
788
788
|
const nodeIndexes = indexes.filter(
|
|
789
|
-
(index) => index.__type ===
|
|
789
|
+
(index) => index.__type === chunkFQCQM3KG_cjs.NODE_INDEX_TYPE_MARKER
|
|
790
790
|
);
|
|
791
791
|
return nodeIndexes.map((index) => {
|
|
792
792
|
const propsColumn = drizzleOrm.sql`${table.props}`;
|
|
@@ -813,7 +813,7 @@ function buildPostgresNodeIndexBuilders(table, indexes) {
|
|
|
813
813
|
}
|
|
814
814
|
function buildPostgresEdgeIndexBuilders(table, indexes) {
|
|
815
815
|
const edgeIndexes = indexes.filter(
|
|
816
|
-
(index) => index.__type ===
|
|
816
|
+
(index) => index.__type === chunkFQCQM3KG_cjs.EDGE_INDEX_TYPE_MARKER
|
|
817
817
|
);
|
|
818
818
|
return edgeIndexes.map((index) => {
|
|
819
819
|
const propsColumn = drizzleOrm.sql`${table.props}`;
|
|
@@ -920,7 +920,7 @@ function getPostgresEdgeSystemColumn(table, column) {
|
|
|
920
920
|
}
|
|
921
921
|
function buildSqliteNodeIndexBuilders(table, indexes) {
|
|
922
922
|
const nodeIndexes = indexes.filter(
|
|
923
|
-
(index) => index.__type ===
|
|
923
|
+
(index) => index.__type === chunkFQCQM3KG_cjs.NODE_INDEX_TYPE_MARKER
|
|
924
924
|
);
|
|
925
925
|
return nodeIndexes.map((index) => {
|
|
926
926
|
const propsColumn = drizzleOrm.sql`${table.props}`;
|
|
@@ -947,7 +947,7 @@ function buildSqliteNodeIndexBuilders(table, indexes) {
|
|
|
947
947
|
}
|
|
948
948
|
function buildSqliteEdgeIndexBuilders(table, indexes) {
|
|
949
949
|
const edgeIndexes = indexes.filter(
|
|
950
|
-
(index) => index.__type ===
|
|
950
|
+
(index) => index.__type === chunkFQCQM3KG_cjs.EDGE_INDEX_TYPE_MARKER
|
|
951
951
|
);
|
|
952
952
|
return edgeIndexes.map((index) => {
|
|
953
953
|
const propsColumn = drizzleOrm.sql`${table.props}`;
|
|
@@ -1060,7 +1060,7 @@ function assertNonEmpty2(values, label) {
|
|
|
1060
1060
|
|
|
1061
1061
|
// src/indexes/profiler.ts
|
|
1062
1062
|
function toDeclaredIndex(index) {
|
|
1063
|
-
if (index.__type ===
|
|
1063
|
+
if (index.__type === chunkFQCQM3KG_cjs.NODE_INDEX_TYPE_MARKER) {
|
|
1064
1064
|
return toDeclaredNodeIndex(index);
|
|
1065
1065
|
}
|
|
1066
1066
|
return toDeclaredEdgeIndex(index);
|
|
@@ -1127,5 +1127,5 @@ exports.notWhere = notWhere;
|
|
|
1127
1127
|
exports.orWhere = orWhere;
|
|
1128
1128
|
exports.toDeclaredIndex = toDeclaredIndex;
|
|
1129
1129
|
exports.toDeclaredIndexes = toDeclaredIndexes;
|
|
1130
|
-
//# sourceMappingURL=chunk-
|
|
1131
|
-
//# sourceMappingURL=chunk-
|
|
1130
|
+
//# sourceMappingURL=chunk-2X7P7AD5.cjs.map
|
|
1131
|
+
//# sourceMappingURL=chunk-2X7P7AD5.cjs.map
|