@nicia-ai/typegraph 0.48.0 → 0.49.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 +3 -3
- package/dist/backend/postgres/index.js +2 -2
- package/dist/backend/postgres/pglite-store.cjs +4 -4
- package/dist/backend/postgres/pglite-store.d.cts +2 -2
- package/dist/backend/postgres/pglite-store.d.ts +2 -2
- package/dist/backend/postgres/pglite-store.js +3 -3
- package/dist/backend/postgres/pglite.cjs +4 -4
- package/dist/backend/postgres/pglite.js +3 -3
- package/dist/backend/sqlite/index.cjs +3 -3
- package/dist/backend/sqlite/index.js +2 -2
- package/dist/backend/sqlite/libsql.cjs +4 -4
- package/dist/backend/sqlite/libsql.js +2 -2
- package/dist/backend/sqlite/local-store.cjs +5 -5
- package/dist/backend/sqlite/local-store.d.cts +2 -2
- package/dist/backend/sqlite/local-store.d.ts +2 -2
- package/dist/backend/sqlite/local-store.js +4 -4
- package/dist/backend/sqlite/local.cjs +5 -5
- package/dist/backend/sqlite/local.js +3 -3
- package/dist/{chunk-TKZXMWQF.cjs → chunk-2O4PCIZ6.cjs} +4 -4
- package/dist/{chunk-TKZXMWQF.cjs.map → chunk-2O4PCIZ6.cjs.map} +1 -1
- package/dist/{chunk-OTUPEF2W.cjs → chunk-3G5W2U2L.cjs} +30 -4
- package/dist/chunk-3G5W2U2L.cjs.map +1 -0
- package/dist/{chunk-WCCATHMB.cjs → chunk-3QNZ5SAJ.cjs} +3 -3
- package/dist/chunk-3QNZ5SAJ.cjs.map +1 -0
- package/dist/{chunk-OD4SSY2U.js → chunk-7LZJNLA5.js} +3 -3
- package/dist/{chunk-OD4SSY2U.js.map → chunk-7LZJNLA5.js.map} +1 -1
- package/dist/{chunk-7XUYFFR4.cjs → chunk-7UOLHNWC.cjs} +5 -5
- package/dist/{chunk-7XUYFFR4.cjs.map → chunk-7UOLHNWC.cjs.map} +1 -1
- package/dist/{chunk-2SYZXD54.js → chunk-D4QLTJSM.js} +3 -3
- package/dist/{chunk-2SYZXD54.js.map → chunk-D4QLTJSM.js.map} +1 -1
- package/dist/{chunk-CT3ZKTOF.js → chunk-JPD2CTC3.js} +3 -3
- package/dist/{chunk-CT3ZKTOF.js.map → chunk-JPD2CTC3.js.map} +1 -1
- package/dist/{chunk-AX6JGVTZ.js → chunk-LTXQOEIC.js} +30 -5
- package/dist/chunk-LTXQOEIC.js.map +1 -0
- package/dist/{chunk-PFBRJBUL.cjs → chunk-UGHQV7MP.cjs} +55 -55
- package/dist/{chunk-PFBRJBUL.cjs.map → chunk-UGHQV7MP.cjs.map} +1 -1
- package/dist/{chunk-4WMMBDS5.js → chunk-WIC7DRXW.js} +3 -3
- package/dist/{chunk-4WMMBDS5.js.map → chunk-WIC7DRXW.js.map} +1 -1
- package/dist/{chunk-2HIYYMWY.cjs → chunk-YYUHLYM2.cjs} +54 -54
- package/dist/{chunk-2HIYYMWY.cjs.map → chunk-YYUHLYM2.cjs.map} +1 -1
- package/dist/{chunk-ACGSAMD3.js → chunk-Z2JCLZFJ.js} +3 -3
- package/dist/chunk-Z2JCLZFJ.js.map +1 -0
- package/dist/graph-merge/index.cjs +28 -5
- package/dist/graph-merge/index.cjs.map +1 -1
- package/dist/graph-merge/index.d.cts +7 -4
- package/dist/graph-merge/index.d.ts +7 -4
- package/dist/graph-merge/index.js +24 -1
- package/dist/graph-merge/index.js.map +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/ingestion-import-target-XPxZYw89.d.cts +17 -0
- package/dist/ingestion-import-target-dNeL7iAv.d.ts +17 -0
- package/dist/interchange/index.cjs +25 -25
- package/dist/interchange/index.d.cts +9 -6
- package/dist/interchange/index.d.ts +9 -6
- package/dist/interchange/index.js +2 -2
- package/dist/profiler/index.d.cts +1 -1
- package/dist/profiler/index.d.ts +1 -1
- package/dist/provenance/index.d.cts +1 -1
- package/dist/provenance/index.d.ts +1 -1
- package/dist/{store-UzrGvZOo.d.ts → store-DRrFCx5x.d.ts} +9 -1
- package/dist/{store-JUVvtmR4.d.cts → store-bphCSo7z.d.cts} +9 -1
- package/package.json +2 -3
- package/dist/chunk-ACGSAMD3.js.map +0 -1
- package/dist/chunk-AX6JGVTZ.js.map +0 -1
- package/dist/chunk-OTUPEF2W.cjs.map +0 -1
- package/dist/chunk-WCCATHMB.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk3QNZ5SAJ_cjs = require('./chunk-3QNZ5SAJ.cjs');
|
|
4
4
|
var chunkROR5ZR6A_cjs = require('./chunk-ROR5ZR6A.cjs');
|
|
5
5
|
var chunkFA2AFWLP_cjs = require('./chunk-FA2AFWLP.cjs');
|
|
6
6
|
var chunkHDL2ARHX_cjs = require('./chunk-HDL2ARHX.cjs');
|
|
@@ -53,7 +53,7 @@ var DEFAULT_POSTGRES_STATEMENT_CACHE_MAX = 256;
|
|
|
53
53
|
var STATEMENT_NAME_CACHE = /* @__PURE__ */ new Map();
|
|
54
54
|
var nextStatementId = 0;
|
|
55
55
|
function statementNameFor(sqlText, cacheMax) {
|
|
56
|
-
return
|
|
56
|
+
return chunk3QNZ5SAJ_cjs.getOrCreateLru(STATEMENT_NAME_CACHE, sqlText, cacheMax, () => {
|
|
57
57
|
const name = `tg_${nextStatementId}`;
|
|
58
58
|
nextStatementId += 1;
|
|
59
59
|
return name;
|
|
@@ -310,11 +310,11 @@ function computePostgresBatchChunkSizes(maxBindParameters) {
|
|
|
310
310
|
),
|
|
311
311
|
embeddingUpsertBatchSize: Math.max(
|
|
312
312
|
1,
|
|
313
|
-
Math.floor(maxBindParameters /
|
|
313
|
+
Math.floor(maxBindParameters / chunk3QNZ5SAJ_cjs.EMBEDDING_UPSERT_PARAM_COUNT)
|
|
314
314
|
),
|
|
315
315
|
findEdgesEndpointChunkSize: Math.max(
|
|
316
316
|
1,
|
|
317
|
-
maxBindParameters -
|
|
317
|
+
maxBindParameters - chunk3QNZ5SAJ_cjs.FIND_EDGES_ENDPOINT_FIXED_PARAM_COUNT
|
|
318
318
|
),
|
|
319
319
|
fulltextDeleteChunkSize: Math.max(
|
|
320
320
|
1,
|
|
@@ -510,7 +510,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
510
510
|
contributions: {
|
|
511
511
|
supported: true,
|
|
512
512
|
probe: true,
|
|
513
|
-
rebuild:
|
|
513
|
+
rebuild: chunk3QNZ5SAJ_cjs.contributionRebuildSupported(
|
|
514
514
|
fulltextStrategy,
|
|
515
515
|
tables2.fulltextTableName,
|
|
516
516
|
declaredCapabilities.transactions
|
|
@@ -557,11 +557,11 @@ function createPostgresBackend(db, options = {}) {
|
|
|
557
557
|
tableNames.identityClosure,
|
|
558
558
|
tableNames.identitySeparation
|
|
559
559
|
];
|
|
560
|
-
const operationStrategy =
|
|
560
|
+
const operationStrategy = chunk3QNZ5SAJ_cjs.createPostgresOperationStrategy(
|
|
561
561
|
tables2,
|
|
562
562
|
fulltextStrategy
|
|
563
563
|
);
|
|
564
|
-
const guardedTableExists =
|
|
564
|
+
const guardedTableExists = chunk3QNZ5SAJ_cjs.createCachedTableExistence(
|
|
565
565
|
async (tableName) => {
|
|
566
566
|
const rows = await executionAdapter.execute(
|
|
567
567
|
operationStrategy.buildTableExists(tableName)
|
|
@@ -608,25 +608,25 @@ function createPostgresBackend(db, options = {}) {
|
|
|
608
608
|
);
|
|
609
609
|
const row = rows[0];
|
|
610
610
|
if (row === void 0) return void 0;
|
|
611
|
-
return
|
|
611
|
+
return chunk3QNZ5SAJ_cjs.mapContributionMaterializationRow(
|
|
612
612
|
row,
|
|
613
|
-
|
|
613
|
+
chunk3QNZ5SAJ_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
614
614
|
);
|
|
615
615
|
}
|
|
616
616
|
async function getContributionMaterializationRows(graphId) {
|
|
617
617
|
const rows = await db.select().from(matTable).where(drizzleOrm.eq(matTable.graphId, graphId));
|
|
618
618
|
return rows.map(
|
|
619
|
-
(row) =>
|
|
619
|
+
(row) => chunk3QNZ5SAJ_cjs.mapContributionMaterializationRow(
|
|
620
620
|
row,
|
|
621
|
-
|
|
621
|
+
chunk3QNZ5SAJ_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.decode
|
|
622
622
|
)
|
|
623
623
|
);
|
|
624
624
|
}
|
|
625
625
|
async function recordContributionMaterializationRow(params) {
|
|
626
626
|
await db.insert(matTable).values(
|
|
627
|
-
|
|
627
|
+
chunk3QNZ5SAJ_cjs.buildContributionInsertValues(
|
|
628
628
|
params,
|
|
629
|
-
|
|
629
|
+
chunk3QNZ5SAJ_cjs.POSTGRES_CONTRIBUTION_MAT_TIMESTAMPS.encode
|
|
630
630
|
)
|
|
631
631
|
).onConflictDoUpdate({
|
|
632
632
|
target: [
|
|
@@ -635,7 +635,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
635
635
|
matTable.owner,
|
|
636
636
|
matTable.tableName
|
|
637
637
|
],
|
|
638
|
-
set:
|
|
638
|
+
set: chunk3QNZ5SAJ_cjs.buildContributionOnConflictSet(
|
|
639
639
|
matTable.materializedAt,
|
|
640
640
|
params.materializedAt
|
|
641
641
|
)
|
|
@@ -655,9 +655,9 @@ function createPostgresBackend(db, options = {}) {
|
|
|
655
655
|
const rows = await executionAdapter.execute(
|
|
656
656
|
operationStrategy.buildTableExists(tableName)
|
|
657
657
|
);
|
|
658
|
-
return
|
|
658
|
+
return chunk3QNZ5SAJ_cjs.tableExistsFromRow(rows[0]);
|
|
659
659
|
}
|
|
660
|
-
const contributionMaterializer =
|
|
660
|
+
const contributionMaterializer = chunk3QNZ5SAJ_cjs.createContributionMaterializer({
|
|
661
661
|
dialect: "postgres",
|
|
662
662
|
fulltextStrategy,
|
|
663
663
|
fulltextTableName: tables2.fulltextTableName,
|
|
@@ -749,7 +749,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
749
749
|
schemaVersionsTable: tables2.schemaVersions
|
|
750
750
|
});
|
|
751
751
|
return {
|
|
752
|
-
backend:
|
|
752
|
+
backend: chunk3QNZ5SAJ_cjs.gateFulltext(
|
|
753
753
|
backend2,
|
|
754
754
|
contributionMaterializer.assertInitialized,
|
|
755
755
|
contributionMaterializer.refuseUnavailableFulltext
|
|
@@ -783,17 +783,17 @@ function createPostgresBackend(db, options = {}) {
|
|
|
783
783
|
return executeCompiled({ params, sql: sqlText });
|
|
784
784
|
}
|
|
785
785
|
});
|
|
786
|
-
await
|
|
787
|
-
await
|
|
788
|
-
const indexDefinitions = await
|
|
786
|
+
await chunk3QNZ5SAJ_cjs.lockPostgresTrustedImportTables(trustedTx, tableNames);
|
|
787
|
+
await chunk3QNZ5SAJ_cjs.assertTrustedImportDatabaseEmpty(trustedTx, tableNames);
|
|
788
|
+
const indexDefinitions = await chunk3QNZ5SAJ_cjs.suspendPostgresSecondaryIndexes(
|
|
789
789
|
trustedTx,
|
|
790
790
|
tableNames
|
|
791
791
|
);
|
|
792
792
|
const result = await fn(
|
|
793
|
-
|
|
793
|
+
chunk3QNZ5SAJ_cjs.createPostgresTrustedImportSession(trustedTx, tableNames)
|
|
794
794
|
);
|
|
795
|
-
await
|
|
796
|
-
await
|
|
795
|
+
await chunk3QNZ5SAJ_cjs.restoreSecondaryIndexes(trustedTx, indexDefinitions);
|
|
796
|
+
await chunk3QNZ5SAJ_cjs.analyzeImportedTables(trustedTx, tableNames);
|
|
797
797
|
return result;
|
|
798
798
|
});
|
|
799
799
|
}
|
|
@@ -834,7 +834,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
834
834
|
// uninitialized database throws `StoreNotInitializedError` loudly
|
|
835
835
|
// rather than self-healing on a read/write path (#135). Shared
|
|
836
836
|
// verbatim with the tx-scoped gate via `gateFulltextMethods`.
|
|
837
|
-
...
|
|
837
|
+
...chunk3QNZ5SAJ_cjs.gateFulltextMethods(
|
|
838
838
|
operations,
|
|
839
839
|
contributionMaterializer.assertInitialized,
|
|
840
840
|
contributionMaterializer.refuseUnavailableFulltext
|
|
@@ -902,26 +902,26 @@ function createPostgresBackend(db, options = {}) {
|
|
|
902
902
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.indexName, indexName));
|
|
903
903
|
const row = rows[0];
|
|
904
904
|
if (row === void 0) return void 0;
|
|
905
|
-
return
|
|
905
|
+
return chunk3QNZ5SAJ_cjs.mapMaterializationRow(row, chunk3QNZ5SAJ_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode);
|
|
906
906
|
},
|
|
907
907
|
async getIndexMaterializations(statusKeys) {
|
|
908
908
|
if (statusKeys.length === 0) return [];
|
|
909
909
|
const t = tables2.indexMaterializations;
|
|
910
910
|
const rows = await db.select().from(t).where(drizzleOrm.inArray(t.indexName, [...statusKeys]));
|
|
911
911
|
return rows.map(
|
|
912
|
-
(row) =>
|
|
912
|
+
(row) => chunk3QNZ5SAJ_cjs.mapMaterializationRow(row, chunk3QNZ5SAJ_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode)
|
|
913
913
|
);
|
|
914
914
|
},
|
|
915
915
|
async recordIndexMaterialization(params) {
|
|
916
916
|
const t = tables2.indexMaterializations;
|
|
917
917
|
await db.insert(t).values(
|
|
918
|
-
|
|
918
|
+
chunk3QNZ5SAJ_cjs.buildMaterializationInsertValues(
|
|
919
919
|
params,
|
|
920
|
-
|
|
920
|
+
chunk3QNZ5SAJ_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.encode
|
|
921
921
|
)
|
|
922
922
|
).onConflictDoUpdate({
|
|
923
923
|
target: t.indexName,
|
|
924
|
-
set:
|
|
924
|
+
set: chunk3QNZ5SAJ_cjs.buildMaterializationOnConflictSet(params.materializedAt)
|
|
925
925
|
});
|
|
926
926
|
},
|
|
927
927
|
async ensureContributionMaterializationsTable() {
|
|
@@ -943,26 +943,26 @@ function createPostgresBackend(db, options = {}) {
|
|
|
943
943
|
const t = tables2.kindRemovals;
|
|
944
944
|
const rows = await db.select().from(t).where(drizzleOrm.and(drizzleOrm.eq(t.graphId, graphId), drizzleOrm.isNull(t.removedAt)));
|
|
945
945
|
return rows.map(
|
|
946
|
-
(row) =>
|
|
946
|
+
(row) => chunk3QNZ5SAJ_cjs.mapKindRemovalRow(row, chunk3QNZ5SAJ_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
947
947
|
);
|
|
948
948
|
},
|
|
949
949
|
async getAllKindRemovals(graphId) {
|
|
950
950
|
const t = tables2.kindRemovals;
|
|
951
951
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
|
|
952
952
|
return rows.map(
|
|
953
|
-
(row) =>
|
|
953
|
+
(row) => chunk3QNZ5SAJ_cjs.mapKindRemovalRow(row, chunk3QNZ5SAJ_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
954
954
|
);
|
|
955
955
|
},
|
|
956
956
|
async recordKindRemoval(params) {
|
|
957
957
|
const t = tables2.kindRemovals;
|
|
958
958
|
await db.insert(t).values(
|
|
959
|
-
|
|
959
|
+
chunk3QNZ5SAJ_cjs.buildKindRemovalInsertValues(
|
|
960
960
|
params,
|
|
961
|
-
|
|
961
|
+
chunk3QNZ5SAJ_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.encode
|
|
962
962
|
)
|
|
963
963
|
).onConflictDoUpdate({
|
|
964
964
|
target: [t.graphId, t.kindName, t.entity, t.schemaVersion],
|
|
965
|
-
set:
|
|
965
|
+
set: chunk3QNZ5SAJ_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
|
|
966
966
|
});
|
|
967
967
|
},
|
|
968
968
|
async ensureReconciliationMarkersTable() {
|
|
@@ -1057,7 +1057,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
1057
1057
|
async commitSchemaVersionIfKindsEmpty(params, probes) {
|
|
1058
1058
|
return runSchemaWriteTransaction(
|
|
1059
1059
|
params.graphId,
|
|
1060
|
-
(target) =>
|
|
1060
|
+
(target) => chunk3QNZ5SAJ_cjs.commitSchemaVersionIfKindsEmpty(target, params, probes)
|
|
1061
1061
|
);
|
|
1062
1062
|
},
|
|
1063
1063
|
async commitSchemaVersionWithPreflight(params, preflight) {
|
|
@@ -1114,7 +1114,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
1114
1114
|
}
|
|
1115
1115
|
);
|
|
1116
1116
|
}
|
|
1117
|
-
|
|
1117
|
+
chunk3QNZ5SAJ_cjs.assertAdoptedDialect(
|
|
1118
1118
|
externalTx,
|
|
1119
1119
|
pgCore.PgTransaction,
|
|
1120
1120
|
"postgres"
|
|
@@ -1305,7 +1305,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1305
1305
|
const batchConfig = computePostgresBatchChunkSizes(
|
|
1306
1306
|
capabilities.maxBindParameters ?? chunk5PRKMB24_cjs.POSTGRES_MAX_BIND_PARAMETERS
|
|
1307
1307
|
);
|
|
1308
|
-
const commonOperationMembers =
|
|
1308
|
+
const commonOperationMembers = chunk3QNZ5SAJ_cjs.createCommonOperationBackend({
|
|
1309
1309
|
batchConfig,
|
|
1310
1310
|
execution: {
|
|
1311
1311
|
execAll,
|
|
@@ -1331,7 +1331,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1331
1331
|
};
|
|
1332
1332
|
const vectorEmbeddingMethods = vectorStrategy === void 0 ? {} : {
|
|
1333
1333
|
async upsertEmbedding(params) {
|
|
1334
|
-
const slot =
|
|
1334
|
+
const slot = chunk3QNZ5SAJ_cjs.vectorSlotFromParams(params);
|
|
1335
1335
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1336
1336
|
const statements = vectorStrategy.buildUpsert(slot, params, chunkFA2AFWLP_cjs.nowIso());
|
|
1337
1337
|
try {
|
|
@@ -1339,12 +1339,12 @@ function createPostgresOperationBackend(options) {
|
|
|
1339
1339
|
await execRun(statement);
|
|
1340
1340
|
}
|
|
1341
1341
|
} catch (error) {
|
|
1342
|
-
throw
|
|
1342
|
+
throw chunk3QNZ5SAJ_cjs.mapVectorWriteError(error, params);
|
|
1343
1343
|
}
|
|
1344
1344
|
},
|
|
1345
1345
|
async upsertEmbeddingBatch(params) {
|
|
1346
1346
|
if (params.rows.length === 0) return;
|
|
1347
|
-
const slot =
|
|
1347
|
+
const slot = chunk3QNZ5SAJ_cjs.vectorSlotFromParams(params);
|
|
1348
1348
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1349
1349
|
const rowsById = new Map(
|
|
1350
1350
|
params.rows.map((row) => [row.nodeId, row])
|
|
@@ -1381,11 +1381,11 @@ function createPostgresOperationBackend(options) {
|
|
|
1381
1381
|
}
|
|
1382
1382
|
}
|
|
1383
1383
|
} catch (error) {
|
|
1384
|
-
throw
|
|
1384
|
+
throw chunk3QNZ5SAJ_cjs.mapVectorWriteError(error, params);
|
|
1385
1385
|
}
|
|
1386
1386
|
},
|
|
1387
1387
|
async deleteEmbedding(params) {
|
|
1388
|
-
const slot =
|
|
1388
|
+
const slot = chunk3QNZ5SAJ_cjs.vectorSlotFromParams(params);
|
|
1389
1389
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1390
1390
|
const statements = vectorStrategy.buildDelete(slot, params);
|
|
1391
1391
|
for (const statement of statements) {
|
|
@@ -1394,7 +1394,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1394
1394
|
},
|
|
1395
1395
|
async deleteEmbeddingBatch(params) {
|
|
1396
1396
|
if (params.nodeIds.length === 0) return;
|
|
1397
|
-
const slot =
|
|
1397
|
+
const slot = chunk3QNZ5SAJ_cjs.vectorSlotFromParams(params);
|
|
1398
1398
|
await contributionMaterializer.assertVectorSlot(slot);
|
|
1399
1399
|
for (const nodeIds of chunkSIT26LAZ_cjs.chunk(
|
|
1400
1400
|
[...new Set(params.nodeIds)],
|
|
@@ -1410,13 +1410,13 @@ function createPostgresOperationBackend(options) {
|
|
|
1410
1410
|
async vectorSearch(params) {
|
|
1411
1411
|
chunkL3LQNR34_cjs.assertVectorSearchLimit(params.limit);
|
|
1412
1412
|
chunkROR5ZR6A_cjs.assertPgvectorEfSearch(params.efSearch);
|
|
1413
|
-
const slot =
|
|
1413
|
+
const slot = chunk3QNZ5SAJ_cjs.vectorSlotFromParams(params);
|
|
1414
1414
|
const query = vectorStrategy.buildSearch(
|
|
1415
1415
|
slot,
|
|
1416
1416
|
params,
|
|
1417
1417
|
// Store-compiled candidates (predicates + subclass + currency)
|
|
1418
1418
|
// take precedence; the live-node default covers direct backend use.
|
|
1419
|
-
params.candidates ??
|
|
1419
|
+
params.candidates ?? chunk3QNZ5SAJ_cjs.buildLiveNodeCandidates(
|
|
1420
1420
|
tableNames.nodes,
|
|
1421
1421
|
params.graphId,
|
|
1422
1422
|
params.nodeKind,
|
|
@@ -1428,7 +1428,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1428
1428
|
try {
|
|
1429
1429
|
rows = await runVectorSearch(gucOverrides, query);
|
|
1430
1430
|
} catch (error) {
|
|
1431
|
-
throw
|
|
1431
|
+
throw chunk3QNZ5SAJ_cjs.mapVectorWriteError(error, params);
|
|
1432
1432
|
}
|
|
1433
1433
|
return rows.map((row) => ({
|
|
1434
1434
|
nodeId: row.node_id,
|
|
@@ -1443,7 +1443,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1443
1443
|
chunkL3LQNR34_cjs.assertVectorSearchLimit(params.limit);
|
|
1444
1444
|
chunkL3LQNR34_cjs.assertVectorSearchLimit(params.vector.k);
|
|
1445
1445
|
chunkROR5ZR6A_cjs.assertPgvectorEfSearch(params.vector.efSearch);
|
|
1446
|
-
const slot =
|
|
1446
|
+
const slot = chunk3QNZ5SAJ_cjs.vectorSlotFromParams({
|
|
1447
1447
|
graphId: params.graphId,
|
|
1448
1448
|
nodeKind: params.nodeKind,
|
|
1449
1449
|
fieldPath: params.vector.fieldPath,
|
|
@@ -1451,7 +1451,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1451
1451
|
metric: params.vector.metric,
|
|
1452
1452
|
indexType: params.vector.indexType
|
|
1453
1453
|
});
|
|
1454
|
-
const candidates = params.candidates ??
|
|
1454
|
+
const candidates = params.candidates ?? chunk3QNZ5SAJ_cjs.buildLiveNodeCandidates(
|
|
1455
1455
|
tableNames.nodes,
|
|
1456
1456
|
params.graphId,
|
|
1457
1457
|
params.nodeKind,
|
|
@@ -1489,9 +1489,9 @@ function createPostgresOperationBackend(options) {
|
|
|
1489
1489
|
statement
|
|
1490
1490
|
);
|
|
1491
1491
|
} catch (error) {
|
|
1492
|
-
throw
|
|
1492
|
+
throw chunk3QNZ5SAJ_cjs.mapVectorWriteError(error, vectorParams);
|
|
1493
1493
|
}
|
|
1494
|
-
return raw.map((row) =>
|
|
1494
|
+
return raw.map((row) => chunk3QNZ5SAJ_cjs.mapHybridSearchRow(row, toNodeRow));
|
|
1495
1495
|
}
|
|
1496
1496
|
} : {}
|
|
1497
1497
|
};
|
|
@@ -1556,7 +1556,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1556
1556
|
}
|
|
1557
1557
|
const locked = await lockActiveSchemaVersion(params.graphId);
|
|
1558
1558
|
if (locked !== void 0) {
|
|
1559
|
-
|
|
1559
|
+
chunk3QNZ5SAJ_cjs.assertActiveSchemaVersion(
|
|
1560
1560
|
params.graphId,
|
|
1561
1561
|
params.expectedVersion,
|
|
1562
1562
|
locked
|
|
@@ -1575,7 +1575,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1575
1575
|
// === Vector Index Operations ===
|
|
1576
1576
|
async createVectorIndex(params) {
|
|
1577
1577
|
if (vectorStrategy === void 0) return;
|
|
1578
|
-
const slot =
|
|
1578
|
+
const slot = chunk3QNZ5SAJ_cjs.vectorSlotFromCreateIndexParams(params);
|
|
1579
1579
|
await contributionMaterializer.ensureVectorSlot(slot);
|
|
1580
1580
|
const indexStatement = vectorStrategy.buildCreateIndex?.(slot, {
|
|
1581
1581
|
concurrent: params.concurrent === true
|
|
@@ -1655,7 +1655,7 @@ function createPostgresOperationBackend(options) {
|
|
|
1655
1655
|
},
|
|
1656
1656
|
async dropVectorIndex(params) {
|
|
1657
1657
|
if (vectorStrategy === void 0) return;
|
|
1658
|
-
const slot =
|
|
1658
|
+
const slot = chunk3QNZ5SAJ_cjs.vectorSlotFromDropIndexParams(params);
|
|
1659
1659
|
const dropStatement = vectorStrategy.buildDropIndex?.(slot);
|
|
1660
1660
|
if (dropStatement === void 0) return;
|
|
1661
1661
|
try {
|
|
@@ -1707,5 +1707,5 @@ function createTransactionBackend(options) {
|
|
|
1707
1707
|
}
|
|
1708
1708
|
|
|
1709
1709
|
exports.createPostgresBackend = createPostgresBackend;
|
|
1710
|
-
//# sourceMappingURL=chunk-
|
|
1711
|
-
//# sourceMappingURL=chunk-
|
|
1710
|
+
//# sourceMappingURL=chunk-UGHQV7MP.cjs.map
|
|
1711
|
+
//# sourceMappingURL=chunk-UGHQV7MP.cjs.map
|