@nicia-ai/typegraph 0.25.0 → 0.25.1
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 +92 -44
- package/dist/backend/postgres/index.cjs.map +1 -1
- package/dist/backend/postgres/index.d.cts +4 -4
- package/dist/backend/postgres/index.d.ts +4 -4
- package/dist/backend/postgres/index.js +47 -3
- package/dist/backend/postgres/index.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +13 -13
- package/dist/backend/sqlite/index.d.cts +4 -4
- package/dist/backend/sqlite/index.d.ts +4 -4
- package/dist/backend/sqlite/index.js +3 -3
- package/dist/backend/sqlite/libsql.cjs +6 -6
- package/dist/backend/sqlite/libsql.d.cts +2 -2
- package/dist/backend/sqlite/libsql.d.ts +2 -2
- package/dist/backend/sqlite/libsql.js +3 -3
- package/dist/backend/sqlite/local.cjs +7 -7
- package/dist/backend/sqlite/local.d.cts +2 -2
- package/dist/backend/sqlite/local.d.ts +2 -2
- package/dist/backend/sqlite/local.js +3 -3
- package/dist/{chunk-LVCSL6A3.js → chunk-AAA2CR3P.js} +5 -3
- package/dist/chunk-AAA2CR3P.js.map +1 -0
- package/dist/{chunk-OJ6IQVZG.js → chunk-CLEUFN2K.js} +48 -4
- package/dist/chunk-CLEUFN2K.js.map +1 -0
- package/dist/{chunk-ZEMNF3QK.cjs → chunk-CLGC7AQ2.cjs} +78 -34
- package/dist/chunk-CLGC7AQ2.cjs.map +1 -0
- package/dist/{chunk-FPCOUJSL.js → chunk-CPFR3O7L.js} +2 -2
- package/dist/{chunk-FPCOUJSL.js.map → chunk-CPFR3O7L.js.map} +1 -1
- package/dist/{chunk-O2P3KAUT.cjs → chunk-CQVNGKU7.cjs} +39 -14
- package/dist/chunk-CQVNGKU7.cjs.map +1 -0
- package/dist/{chunk-7CDXX3QZ.cjs → chunk-OECDVACY.cjs} +2 -2
- package/dist/{chunk-7CDXX3QZ.cjs.map → chunk-OECDVACY.cjs.map} +1 -1
- package/dist/{chunk-WI5VRP3X.js → chunk-PSKUWVCB.js} +39 -15
- package/dist/chunk-PSKUWVCB.js.map +1 -0
- package/dist/{chunk-7W3KAMVQ.cjs → chunk-QMQYK3IF.cjs} +5 -3
- package/dist/chunk-QMQYK3IF.cjs.map +1 -0
- package/dist/{ddl-DpaeAKPp.d.ts → ddl-BqMmpNor.d.ts} +403 -21
- package/dist/{ddl-B2jjLjpR.d.cts → ddl-Bwjh8Hff.d.cts} +403 -21
- package/dist/index.cjs +65 -65
- package/dist/index.d.cts +7 -7
- package/dist/index.d.ts +7 -7
- package/dist/index.js +3 -3
- package/dist/indexes/index.d.cts +4 -4
- package/dist/indexes/index.d.ts +4 -4
- package/dist/interchange/index.d.cts +3 -3
- package/dist/interchange/index.d.ts +3 -3
- package/dist/{manager-BpjBW1JK.d.cts → manager-Cy3dhwYO.d.cts} +7 -2
- package/dist/{manager-BKaPQbns.d.ts → manager-sZkU2VPC.d.ts} +7 -2
- package/dist/profiler/index.d.cts +5 -5
- package/dist/profiler/index.d.ts +5 -5
- package/dist/schema/index.cjs +24 -24
- package/dist/schema/index.d.cts +4 -4
- package/dist/schema/index.d.ts +4 -4
- package/dist/schema/index.js +2 -2
- package/dist/{sqlite-Myo8e3Lr.d.cts → sqlite-BhFswiAR.d.cts} +1 -1
- package/dist/{sqlite-CU3j6rc7.d.ts → sqlite-h6dta1IJ.d.ts} +1 -1
- package/dist/{store-De98Lod4.d.ts → store-BS_hehiz.d.ts} +2 -2
- package/dist/{store-BAGuOHDh.d.cts → store-CkCvqRUf.d.cts} +2 -2
- package/dist/{types-CYga3lZp.d.cts → types-BpgACExN.d.cts} +1 -1
- package/dist/{types-BLmJq4wI.d.ts → types-Bz-Pi681.d.ts} +1 -1
- package/dist/{types-BNWYZ-0-.d.ts → types-DptZHe-l.d.ts} +9 -0
- package/dist/{types--0EslBx5.d.cts → types-WF5ItKQu.d.cts} +9 -0
- package/dist/{where-CluR73rs.d.ts → where-C40InMIp.d.ts} +1 -1
- package/dist/{where-m1uWsdua.d.cts → where-DZYMiXVq.d.cts} +1 -1
- package/package.json +1 -1
- package/dist/chunk-7W3KAMVQ.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-WI5VRP3X.js.map +0 -1
- package/dist/chunk-ZEMNF3QK.cjs.map +0 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkHTGDWIDE_cjs = require('../../chunk-HTGDWIDE.cjs');
|
|
4
|
-
var
|
|
5
|
-
var
|
|
4
|
+
var chunkCQVNGKU7_cjs = require('../../chunk-CQVNGKU7.cjs');
|
|
5
|
+
var chunkOECDVACY_cjs = require('../../chunk-OECDVACY.cjs');
|
|
6
6
|
var chunkJTI5WT4P_cjs = require('../../chunk-JTI5WT4P.cjs');
|
|
7
7
|
require('../../chunk-CTHNVU6K.cjs');
|
|
8
8
|
require('../../chunk-EK6RJ373.cjs');
|
|
@@ -33,7 +33,7 @@ var DEFAULT_POSTGRES_STATEMENT_CACHE_MAX = 256;
|
|
|
33
33
|
var STATEMENT_NAME_CACHE = /* @__PURE__ */ new Map();
|
|
34
34
|
var nextStatementId = 0;
|
|
35
35
|
function statementNameFor(sqlText, cacheMax) {
|
|
36
|
-
return
|
|
36
|
+
return chunkCQVNGKU7_cjs.getOrCreateLru(STATEMENT_NAME_CACHE, sqlText, cacheMax, () => {
|
|
37
37
|
const name = `tg_${nextStatementId}`;
|
|
38
38
|
nextStatementId += 1;
|
|
39
39
|
return name;
|
|
@@ -124,7 +124,7 @@ function createPostgresExecutionAdapter(db, options = {}) {
|
|
|
124
124
|
const cacheMax = options.preparedStatementCacheMax ?? DEFAULT_POSTGRES_STATEMENT_CACHE_MAX;
|
|
125
125
|
const pgClient = resolvePgClient(db, prepareStatements, cacheMax);
|
|
126
126
|
function compile(query) {
|
|
127
|
-
return
|
|
127
|
+
return chunkCQVNGKU7_cjs.compileQueryWithDialect(db, query, "PostgreSQL");
|
|
128
128
|
}
|
|
129
129
|
if (pgClient === void 0) {
|
|
130
130
|
return {
|
|
@@ -180,10 +180,10 @@ var POSTGRES_CHECK_UNIQUE_BATCH_CHUNK_SIZE = Math.max(
|
|
|
180
180
|
1,
|
|
181
181
|
POSTGRES_MAX_BIND_PARAMETERS - CHECK_UNIQUE_BATCH_FIXED_PARAM_COUNT
|
|
182
182
|
);
|
|
183
|
-
var toNodeRow =
|
|
184
|
-
var toEdgeRow =
|
|
185
|
-
var toUniqueRow =
|
|
186
|
-
var toSchemaVersionRow =
|
|
183
|
+
var toNodeRow = chunkCQVNGKU7_cjs.createNodeRowMapper(chunkCQVNGKU7_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
184
|
+
var toEdgeRow = chunkCQVNGKU7_cjs.createEdgeRowMapper(chunkCQVNGKU7_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
185
|
+
var toUniqueRow = chunkCQVNGKU7_cjs.createUniqueRowMapper(chunkCQVNGKU7_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
186
|
+
var toSchemaVersionRow = chunkCQVNGKU7_cjs.createSchemaVersionRowMapper(chunkCQVNGKU7_cjs.POSTGRES_ROW_MAPPER_CONFIG);
|
|
187
187
|
function toEmbeddingRow(row) {
|
|
188
188
|
let embedding;
|
|
189
189
|
if (typeof row.embedding === "string") {
|
|
@@ -201,8 +201,8 @@ function toEmbeddingRow(row) {
|
|
|
201
201
|
field_path: row.field_path,
|
|
202
202
|
embedding,
|
|
203
203
|
dimensions: row.dimensions,
|
|
204
|
-
created_at:
|
|
205
|
-
updated_at:
|
|
204
|
+
created_at: chunkCQVNGKU7_cjs.formatPostgresTimestamp(row.created_at) ?? "",
|
|
205
|
+
updated_at: chunkCQVNGKU7_cjs.formatPostgresTimestamp(row.updated_at) ?? ""
|
|
206
206
|
};
|
|
207
207
|
}
|
|
208
208
|
function coerceNumericScore(value) {
|
|
@@ -217,7 +217,7 @@ function coerceNumericScore(value) {
|
|
|
217
217
|
}
|
|
218
218
|
function buildPostgresCapabilities(strategy) {
|
|
219
219
|
return {
|
|
220
|
-
...
|
|
220
|
+
...chunkOECDVACY_cjs.POSTGRES_CAPABILITIES,
|
|
221
221
|
vector: {
|
|
222
222
|
supported: true,
|
|
223
223
|
metrics: ["cosine", "l2", "inner_product"],
|
|
@@ -229,7 +229,7 @@ function buildPostgresCapabilities(strategy) {
|
|
|
229
229
|
};
|
|
230
230
|
}
|
|
231
231
|
function createPostgresBackend(db, options = {}) {
|
|
232
|
-
const tables2 = options.tables ??
|
|
232
|
+
const tables2 = options.tables ?? chunkCQVNGKU7_cjs.tables;
|
|
233
233
|
const fulltextStrategy = options.fulltext ?? chunkJTI5WT4P_cjs.tsvectorStrategy;
|
|
234
234
|
const baseCapabilities = buildPostgresCapabilities(fulltextStrategy);
|
|
235
235
|
const httpOnlyOverrides = isNeonHttpClient(db) ? { transactions: false } : {};
|
|
@@ -260,7 +260,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
260
260
|
].map((name) => chunkHTGDWIDE_cjs.quoteIdentifier(name)),
|
|
261
261
|
drizzleOrm.sql`, `
|
|
262
262
|
)}`;
|
|
263
|
-
const operationStrategy =
|
|
263
|
+
const operationStrategy = chunkCQVNGKU7_cjs.createPostgresOperationStrategy(
|
|
264
264
|
tables2,
|
|
265
265
|
fulltextStrategy
|
|
266
266
|
);
|
|
@@ -298,20 +298,60 @@ function createPostgresBackend(db, options = {}) {
|
|
|
298
298
|
return fn(txBackend);
|
|
299
299
|
});
|
|
300
300
|
}
|
|
301
|
+
let fulltextEnsured = false;
|
|
302
|
+
async function ensureFulltextDdl() {
|
|
303
|
+
if (fulltextEnsured) return;
|
|
304
|
+
for (const statement of fulltextStrategy.generateDdl(
|
|
305
|
+
tables2.fulltextTableName
|
|
306
|
+
)) {
|
|
307
|
+
await db.execute(drizzleOrm.sql.raw(statement));
|
|
308
|
+
}
|
|
309
|
+
fulltextEnsured = true;
|
|
310
|
+
}
|
|
301
311
|
const backend = {
|
|
302
312
|
...operations,
|
|
303
313
|
async bootstrapTables() {
|
|
304
|
-
const statements =
|
|
314
|
+
const statements = chunkCQVNGKU7_cjs.generatePostgresDDL(tables2, fulltextStrategy);
|
|
305
315
|
for (const statement of statements) {
|
|
306
316
|
await db.execute(drizzleOrm.sql.raw(statement));
|
|
307
317
|
}
|
|
318
|
+
fulltextEnsured = true;
|
|
319
|
+
},
|
|
320
|
+
async upsertFulltext(params) {
|
|
321
|
+
await ensureFulltextDdl();
|
|
322
|
+
await operations.upsertFulltext(params);
|
|
323
|
+
},
|
|
324
|
+
async deleteFulltext(params) {
|
|
325
|
+
await ensureFulltextDdl();
|
|
326
|
+
await operations.deleteFulltext(params);
|
|
327
|
+
},
|
|
328
|
+
async upsertFulltextBatch(params) {
|
|
329
|
+
if (params.rows.length === 0) return;
|
|
330
|
+
await ensureFulltextDdl();
|
|
331
|
+
await operations.upsertFulltextBatch(params);
|
|
332
|
+
},
|
|
333
|
+
async deleteFulltextBatch(params) {
|
|
334
|
+
if (params.nodeIds.length === 0) return;
|
|
335
|
+
await ensureFulltextDdl();
|
|
336
|
+
await operations.deleteFulltextBatch(params);
|
|
337
|
+
},
|
|
338
|
+
async fulltextSearch(params) {
|
|
339
|
+
await ensureFulltextDdl();
|
|
340
|
+
return operations.fulltextSearch(params);
|
|
341
|
+
},
|
|
342
|
+
// hardDeleteNode is wrapped because the operation-backend-core
|
|
343
|
+
// cascade unconditionally deletes from the fulltext table — it
|
|
344
|
+
// would fail even on graphs that declare no searchable() fields.
|
|
345
|
+
async hardDeleteNode(params) {
|
|
346
|
+
await ensureFulltextDdl();
|
|
347
|
+
await operations.hardDeleteNode(params);
|
|
308
348
|
},
|
|
309
349
|
async executeDdl(ddl) {
|
|
310
350
|
await db.execute(drizzleOrm.sql.raw(ddl));
|
|
311
351
|
},
|
|
312
352
|
async ensureIndexMaterializationsTable() {
|
|
313
353
|
await db.execute(
|
|
314
|
-
drizzleOrm.sql.raw(
|
|
354
|
+
drizzleOrm.sql.raw(chunkCQVNGKU7_cjs.generatePgCreateTableSQL(tables2.indexMaterializations))
|
|
315
355
|
);
|
|
316
356
|
},
|
|
317
357
|
async getIndexMaterialization(indexName) {
|
|
@@ -319,26 +359,26 @@ function createPostgresBackend(db, options = {}) {
|
|
|
319
359
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.indexName, indexName));
|
|
320
360
|
const row = rows[0];
|
|
321
361
|
if (row === void 0) return void 0;
|
|
322
|
-
return
|
|
362
|
+
return chunkCQVNGKU7_cjs.mapMaterializationRow(row, chunkCQVNGKU7_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode);
|
|
323
363
|
},
|
|
324
364
|
async getIndexMaterializations(statusKeys) {
|
|
325
365
|
if (statusKeys.length === 0) return [];
|
|
326
366
|
const t = tables2.indexMaterializations;
|
|
327
367
|
const rows = await db.select().from(t).where(drizzleOrm.inArray(t.indexName, [...statusKeys]));
|
|
328
368
|
return rows.map(
|
|
329
|
-
(row) =>
|
|
369
|
+
(row) => chunkCQVNGKU7_cjs.mapMaterializationRow(row, chunkCQVNGKU7_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.decode)
|
|
330
370
|
);
|
|
331
371
|
},
|
|
332
372
|
async recordIndexMaterialization(params) {
|
|
333
373
|
const t = tables2.indexMaterializations;
|
|
334
374
|
await db.insert(t).values(
|
|
335
|
-
|
|
375
|
+
chunkCQVNGKU7_cjs.buildMaterializationInsertValues(
|
|
336
376
|
params,
|
|
337
|
-
|
|
377
|
+
chunkCQVNGKU7_cjs.POSTGRES_INDEX_MAT_TIMESTAMPS.encode
|
|
338
378
|
)
|
|
339
379
|
).onConflictDoUpdate({
|
|
340
380
|
target: t.indexName,
|
|
341
|
-
set:
|
|
381
|
+
set: chunkCQVNGKU7_cjs.buildMaterializationOnConflictSet(
|
|
342
382
|
t.materializedAt,
|
|
343
383
|
params.materializedAt
|
|
344
384
|
)
|
|
@@ -346,40 +386,43 @@ function createPostgresBackend(db, options = {}) {
|
|
|
346
386
|
},
|
|
347
387
|
async ensureKindRemovalsTable() {
|
|
348
388
|
await db.execute(
|
|
349
|
-
drizzleOrm.sql.raw(
|
|
389
|
+
drizzleOrm.sql.raw(chunkCQVNGKU7_cjs.generatePgCreateTableSQL(tables2.kindRemovals))
|
|
350
390
|
);
|
|
351
391
|
},
|
|
352
392
|
async getPendingKindRemovals(graphId) {
|
|
353
393
|
const t = tables2.kindRemovals;
|
|
354
394
|
const rows = await db.select().from(t).where(drizzleOrm.and(drizzleOrm.eq(t.graphId, graphId), drizzleOrm.isNull(t.removedAt)));
|
|
355
395
|
return rows.map(
|
|
356
|
-
(row) =>
|
|
396
|
+
(row) => chunkCQVNGKU7_cjs.mapKindRemovalRow(row, chunkCQVNGKU7_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
357
397
|
);
|
|
358
398
|
},
|
|
359
399
|
async getAllKindRemovals(graphId) {
|
|
360
400
|
const t = tables2.kindRemovals;
|
|
361
401
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
|
|
362
402
|
return rows.map(
|
|
363
|
-
(row) =>
|
|
403
|
+
(row) => chunkCQVNGKU7_cjs.mapKindRemovalRow(row, chunkCQVNGKU7_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.decode)
|
|
364
404
|
);
|
|
365
405
|
},
|
|
366
406
|
async recordKindRemoval(params) {
|
|
367
407
|
const t = tables2.kindRemovals;
|
|
368
408
|
await db.insert(t).values(
|
|
369
|
-
|
|
409
|
+
chunkCQVNGKU7_cjs.buildKindRemovalInsertValues(
|
|
370
410
|
params,
|
|
371
|
-
|
|
411
|
+
chunkCQVNGKU7_cjs.POSTGRES_KIND_REMOVAL_TIMESTAMPS.encode
|
|
372
412
|
)
|
|
373
413
|
).onConflictDoUpdate({
|
|
374
414
|
target: [t.graphId, t.kindName, t.entity, t.schemaVersion],
|
|
375
|
-
set:
|
|
415
|
+
set: chunkCQVNGKU7_cjs.buildKindRemovalOnConflictSet(t.removedAt, params.removedAt)
|
|
376
416
|
});
|
|
377
417
|
},
|
|
378
418
|
async ensureReconciliationMarkersTable() {
|
|
379
419
|
await db.execute(
|
|
380
|
-
drizzleOrm.sql.raw(
|
|
420
|
+
drizzleOrm.sql.raw(chunkCQVNGKU7_cjs.generatePgCreateTableSQL(tables2.reconciliationMarkers))
|
|
381
421
|
);
|
|
382
422
|
},
|
|
423
|
+
async ensureFulltextTable() {
|
|
424
|
+
await ensureFulltextDdl();
|
|
425
|
+
},
|
|
383
426
|
async getReconciliationMarker(graphId) {
|
|
384
427
|
const t = tables2.reconciliationMarkers;
|
|
385
428
|
const rows = await db.select().from(t).where(drizzleOrm.eq(t.graphId, graphId));
|
|
@@ -408,6 +451,7 @@ function createPostgresBackend(db, options = {}) {
|
|
|
408
451
|
);
|
|
409
452
|
},
|
|
410
453
|
async transaction(fn, options2) {
|
|
454
|
+
await ensureFulltextDdl();
|
|
411
455
|
const txConfig = options2?.isolationLevel ? {
|
|
412
456
|
isolationLevel: options2.isolationLevel.replace("_", " ")
|
|
413
457
|
} : void 0;
|
|
@@ -447,7 +491,7 @@ function createPostgresOperationBackend(options) {
|
|
|
447
491
|
async function execRun(query) {
|
|
448
492
|
await executionAdapter.execute(query);
|
|
449
493
|
}
|
|
450
|
-
const commonBackend =
|
|
494
|
+
const commonBackend = chunkCQVNGKU7_cjs.createCommonOperationBackend({
|
|
451
495
|
batchConfig: {
|
|
452
496
|
checkUniqueBatchChunkSize: POSTGRES_CHECK_UNIQUE_BATCH_CHUNK_SIZE,
|
|
453
497
|
edgeInsertBatchSize: POSTGRES_EDGE_INSERT_BATCH_SIZE,
|
|
@@ -460,7 +504,7 @@ function createPostgresOperationBackend(options) {
|
|
|
460
504
|
execGet,
|
|
461
505
|
execRun
|
|
462
506
|
},
|
|
463
|
-
nowIso:
|
|
507
|
+
nowIso: chunkCQVNGKU7_cjs.nowIso,
|
|
464
508
|
operationStrategy,
|
|
465
509
|
rowMappers: {
|
|
466
510
|
toEdgeRow,
|
|
@@ -484,7 +528,7 @@ function createPostgresOperationBackend(options) {
|
|
|
484
528
|
tableNames,
|
|
485
529
|
// === Embedding Operations ===
|
|
486
530
|
async upsertEmbedding(params) {
|
|
487
|
-
const timestamp =
|
|
531
|
+
const timestamp = chunkCQVNGKU7_cjs.nowIso();
|
|
488
532
|
const query = operationStrategy.buildUpsertEmbedding(params, timestamp);
|
|
489
533
|
await execRun(query);
|
|
490
534
|
},
|
|
@@ -524,7 +568,7 @@ function createPostgresOperationBackend(options) {
|
|
|
524
568
|
...params.indexParams?.lists === void 0 ? {} : { ivfflatLists: params.indexParams.lists },
|
|
525
569
|
...params.concurrent === true ? { concurrent: true } : {}
|
|
526
570
|
};
|
|
527
|
-
const result = await
|
|
571
|
+
const result = await chunkCQVNGKU7_cjs.createPostgresVectorIndex(db, indexOptions);
|
|
528
572
|
if (!result.success) {
|
|
529
573
|
throw new Error(
|
|
530
574
|
result.message ?? "Failed to create PostgreSQL vector index"
|
|
@@ -533,7 +577,7 @@ function createPostgresOperationBackend(options) {
|
|
|
533
577
|
},
|
|
534
578
|
// === Fulltext Operations ===
|
|
535
579
|
async upsertFulltext(params) {
|
|
536
|
-
const timestamp =
|
|
580
|
+
const timestamp = chunkCQVNGKU7_cjs.nowIso();
|
|
537
581
|
const statements = operationStrategy.buildUpsertFulltext(
|
|
538
582
|
params,
|
|
539
583
|
timestamp
|
|
@@ -550,7 +594,7 @@ function createPostgresOperationBackend(options) {
|
|
|
550
594
|
},
|
|
551
595
|
async upsertFulltextBatch(params) {
|
|
552
596
|
if (params.rows.length === 0) return;
|
|
553
|
-
const timestamp =
|
|
597
|
+
const timestamp = chunkCQVNGKU7_cjs.nowIso();
|
|
554
598
|
const statements = operationStrategy.buildUpsertFulltextBatch(
|
|
555
599
|
params,
|
|
556
600
|
timestamp
|
|
@@ -580,13 +624,13 @@ function createPostgresOperationBackend(options) {
|
|
|
580
624
|
const metrics = capabilities.vector?.metrics ?? ["cosine"];
|
|
581
625
|
await Promise.all(
|
|
582
626
|
metrics.map(async (metric) => {
|
|
583
|
-
const indexName =
|
|
627
|
+
const indexName = chunkCQVNGKU7_cjs.generateVectorIndexName(
|
|
584
628
|
params.graphId,
|
|
585
629
|
params.nodeKind,
|
|
586
630
|
params.fieldPath,
|
|
587
631
|
metric
|
|
588
632
|
);
|
|
589
|
-
const result = await
|
|
633
|
+
const result = await chunkCQVNGKU7_cjs.dropPostgresVectorIndex(db, indexName);
|
|
590
634
|
if (!result.success) {
|
|
591
635
|
throw new Error(
|
|
592
636
|
result.message ?? "Failed to drop PostgreSQL vector index"
|
|
@@ -619,39 +663,43 @@ function createTransactionBackend(options) {
|
|
|
619
663
|
|
|
620
664
|
Object.defineProperty(exports, "createPostgresTables", {
|
|
621
665
|
enumerable: true,
|
|
622
|
-
get: function () { return
|
|
666
|
+
get: function () { return chunkCQVNGKU7_cjs.createPostgresTables; }
|
|
623
667
|
});
|
|
624
668
|
Object.defineProperty(exports, "edges", {
|
|
625
669
|
enumerable: true,
|
|
626
|
-
get: function () { return
|
|
670
|
+
get: function () { return chunkCQVNGKU7_cjs.edges; }
|
|
627
671
|
});
|
|
628
672
|
Object.defineProperty(exports, "embeddings", {
|
|
629
673
|
enumerable: true,
|
|
630
|
-
get: function () { return
|
|
674
|
+
get: function () { return chunkCQVNGKU7_cjs.embeddings; }
|
|
675
|
+
});
|
|
676
|
+
Object.defineProperty(exports, "fulltext", {
|
|
677
|
+
enumerable: true,
|
|
678
|
+
get: function () { return chunkCQVNGKU7_cjs.fulltext; }
|
|
631
679
|
});
|
|
632
680
|
Object.defineProperty(exports, "generatePostgresDDL", {
|
|
633
681
|
enumerable: true,
|
|
634
|
-
get: function () { return
|
|
682
|
+
get: function () { return chunkCQVNGKU7_cjs.generatePostgresDDL; }
|
|
635
683
|
});
|
|
636
684
|
Object.defineProperty(exports, "generatePostgresMigrationSQL", {
|
|
637
685
|
enumerable: true,
|
|
638
|
-
get: function () { return
|
|
686
|
+
get: function () { return chunkCQVNGKU7_cjs.generatePostgresMigrationSQL; }
|
|
639
687
|
});
|
|
640
688
|
Object.defineProperty(exports, "nodes", {
|
|
641
689
|
enumerable: true,
|
|
642
|
-
get: function () { return
|
|
690
|
+
get: function () { return chunkCQVNGKU7_cjs.nodes; }
|
|
643
691
|
});
|
|
644
692
|
Object.defineProperty(exports, "schemaVersions", {
|
|
645
693
|
enumerable: true,
|
|
646
|
-
get: function () { return
|
|
694
|
+
get: function () { return chunkCQVNGKU7_cjs.schemaVersions; }
|
|
647
695
|
});
|
|
648
696
|
Object.defineProperty(exports, "tables", {
|
|
649
697
|
enumerable: true,
|
|
650
|
-
get: function () { return
|
|
698
|
+
get: function () { return chunkCQVNGKU7_cjs.tables; }
|
|
651
699
|
});
|
|
652
700
|
Object.defineProperty(exports, "uniques", {
|
|
653
701
|
enumerable: true,
|
|
654
|
-
get: function () { return
|
|
702
|
+
get: function () { return chunkCQVNGKU7_cjs.uniques; }
|
|
655
703
|
});
|
|
656
704
|
exports.createPostgresBackend = createPostgresBackend;
|
|
657
705
|
//# sourceMappingURL=index.cjs.map
|