@utaba/deep-memory-storage-cosmosdb 0.3.0 → 0.4.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/index.cjs +6 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -876,7 +876,7 @@ async function deleteRelationshipsByType(conn, repositoryId, relationshipType) {
|
|
|
876
876
|
|
|
877
877
|
// src/queries/traversal.ts
|
|
878
878
|
var import_deep_memory4 = require("@utaba/deep-memory");
|
|
879
|
-
async function
|
|
879
|
+
async function exploreNeighborhood(conn, repositoryId, entityId, options) {
|
|
880
880
|
const layers = [];
|
|
881
881
|
let frontier = /* @__PURE__ */ new Set([entityId]);
|
|
882
882
|
const visited = /* @__PURE__ */ new Set([entityId]);
|
|
@@ -927,7 +927,7 @@ async function exploreNeighbourhood(conn, repositoryId, entityId, options) {
|
|
|
927
927
|
frontier = nextFrontier;
|
|
928
928
|
if (frontier.size === 0) break;
|
|
929
929
|
}
|
|
930
|
-
return {
|
|
930
|
+
return { centerId: entityId, layers };
|
|
931
931
|
}
|
|
932
932
|
async function getRelationshipsForEntity(conn, repositoryId, entityId, options) {
|
|
933
933
|
const bindings = { rid: repositoryId, eid: entityId };
|
|
@@ -1087,7 +1087,7 @@ function isInTimeRange(timestamp, timeRange) {
|
|
|
1087
1087
|
|
|
1088
1088
|
// src/queries/bulk.ts
|
|
1089
1089
|
var EXPORT_BATCH_SIZE = 100;
|
|
1090
|
-
var IMPORT_CONCURRENCY =
|
|
1090
|
+
var IMPORT_CONCURRENCY = 20;
|
|
1091
1091
|
async function runWithConcurrency(items, concurrency, fn) {
|
|
1092
1092
|
const results = new Array(items.length);
|
|
1093
1093
|
let nextIndex = 0;
|
|
@@ -1320,7 +1320,7 @@ var CosmosDbProvider = class {
|
|
|
1320
1320
|
});
|
|
1321
1321
|
}
|
|
1322
1322
|
// ─── Lifecycle ─────────────────────────────────────────────────────
|
|
1323
|
-
async
|
|
1323
|
+
async initialize() {
|
|
1324
1324
|
await this.conn.connect();
|
|
1325
1325
|
}
|
|
1326
1326
|
async dispose() {
|
|
@@ -1476,8 +1476,8 @@ var CosmosDbProvider = class {
|
|
|
1476
1476
|
return deleteRelationshipsByType(this.conn, repositoryId, relationshipType);
|
|
1477
1477
|
}
|
|
1478
1478
|
// ─── Graph Traversal (StorageProvider) ─────────────────────────────
|
|
1479
|
-
async
|
|
1480
|
-
return
|
|
1479
|
+
async exploreNeighborhood(repositoryId, entityId, options) {
|
|
1480
|
+
return exploreNeighborhood(this.conn, repositoryId, entityId, options);
|
|
1481
1481
|
}
|
|
1482
1482
|
async findPaths(repositoryId, sourceId, targetId, options) {
|
|
1483
1483
|
return findPaths(this.conn, repositoryId, sourceId, targetId, options);
|