@nicia-ai/typegraph 0.14.0 → 0.16.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 +32 -26
- package/dist/backend/postgres/index.cjs.map +1 -1
- package/dist/backend/postgres/index.d.cts +5 -5
- package/dist/backend/postgres/index.d.ts +5 -5
- package/dist/backend/postgres/index.js +14 -8
- package/dist/backend/postgres/index.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +12 -12
- package/dist/backend/sqlite/index.d.cts +5 -5
- package/dist/backend/sqlite/index.d.ts +5 -5
- package/dist/backend/sqlite/index.js +2 -2
- package/dist/backend/sqlite/local.cjs +5 -5
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +3 -3
- package/dist/backend/sqlite/local.d.ts +3 -3
- package/dist/backend/sqlite/local.js +5 -5
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/{chunk-QFZ5QB2J.cjs → chunk-3HQLOKS5.cjs} +25 -3
- package/dist/chunk-3HQLOKS5.cjs.map +1 -0
- package/dist/{chunk-OEKH5PWL.cjs → chunk-56RQFK7U.cjs} +22 -15
- package/dist/chunk-56RQFK7U.cjs.map +1 -0
- package/dist/{chunk-KE2BL3JZ.cjs → chunk-CRMN2NOM.cjs} +179 -179
- package/dist/chunk-CRMN2NOM.cjs.map +1 -0
- package/dist/{chunk-BNIBR5U2.js → chunk-HWWF3FOP.js} +91 -91
- package/dist/chunk-HWWF3FOP.js.map +1 -0
- package/dist/{chunk-KLOSTZDQ.js → chunk-L4ON6RJF.js} +25 -3
- package/dist/chunk-L4ON6RJF.js.map +1 -0
- package/dist/{chunk-RVUEBUBH.js → chunk-XZBAGJJH.js} +15 -8
- package/dist/chunk-XZBAGJJH.js.map +1 -0
- package/dist/{ddl-BJg93HDN.d.cts → ddl-BBo2EcFc.d.cts} +2 -2
- package/dist/{ddl-CsfWcl_B.d.ts → ddl-D4jlcOH_.d.ts} +2 -2
- package/dist/index.cjs +92 -74
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -6
- package/dist/index.d.ts +6 -6
- package/dist/index.js +61 -43
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.d.cts +2 -2
- package/dist/indexes/index.d.ts +2 -2
- package/dist/interchange/index.d.cts +3 -3
- package/dist/interchange/index.d.ts +3 -3
- package/dist/{manager-oh2mTMvy.d.cts → manager-Bj1UEnhE.d.cts} +2 -2
- package/dist/{manager-qRSdnKEO.d.ts → manager-Chhrq1vl.d.ts} +2 -2
- package/dist/profiler/index.d.cts +3 -3
- package/dist/profiler/index.d.ts +3 -3
- package/dist/schema/index.cjs +20 -20
- 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-DVca_IIy.d.cts → sqlite-Blq-AhmK.d.ts} +1 -1
- package/dist/{sqlite-H01wIXvB.d.ts → sqlite-DE-6NWtC.d.cts} +1 -1
- package/dist/{store-B9ItxA-Q.d.ts → store-Bitii3qj.d.ts} +85 -16
- package/dist/{store-BJPIoe8u.d.cts → store-gTd_qa6u.d.cts} +85 -16
- package/dist/{types-Ckfwgv9l.d.cts → types-B3mmOMJV.d.cts} +8 -0
- package/dist/{types-C8Ra3ROE.d.cts → types-CZd2PEOc.d.cts} +8 -2
- package/dist/{types-CC8eB0PB.d.ts → types-Ceb01czq.d.ts} +8 -2
- package/dist/{types-5t_MIcvv.d.ts → types-ThB4cFLp.d.ts} +8 -0
- package/package.json +3 -3
- package/dist/chunk-BNIBR5U2.js.map +0 -1
- package/dist/chunk-KE2BL3JZ.cjs.map +0 -1
- package/dist/chunk-KLOSTZDQ.js.map +0 -1
- package/dist/chunk-OEKH5PWL.cjs.map +0 -1
- package/dist/chunk-QFZ5QB2J.cjs.map +0 -1
- package/dist/chunk-RVUEBUBH.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { N as NodeType, E as EdgeType } from './types-DMzKq0d5.cjs';
|
|
3
3
|
export { A as AnyEdgeType, C as Cardinality, a as Collation, D as DeleteBehavior, b as EdgeId, c as EdgeProps, d as EdgeRegistration, e as EdgeTypeWithEndpoints, f as EndpointExistence, G as GraphDefaults, g as NodeId, h as NodeProps, i as NodeRegistration, S as SqlDialect, T as TemporalMode, U as UniqueConstraint, j as UniquenessScope, k as isEdgeType, l as isEdgeTypeWithEndpoints, m as isNodeType } from './types-DMzKq0d5.cjs';
|
|
4
|
-
import { I as InferenceType, M as MetaEdge, O as OntologyRelation } from './types-
|
|
5
|
-
export { D as DEFAULT_SQL_SCHEMA, G as GraphBackend, a as MetaEdgeProperties, S as SqlSchema, b as SqlTableNames, T as TransactionBackend, c as createSqlSchema, i as isMetaEdge } from './types-
|
|
6
|
-
import { A as AliasMap, E as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-
|
|
7
|
-
export { a as AggregateResult, b as AnyEdge, c as AnyNode, B as BatchResults, d as BatchableQuery, e as ConstraintNames, f as CreateEdgeInput, g as CreateNodeInput, h as
|
|
8
|
-
import { G as GraphDef, K as KindRegistry } from './manager-
|
|
9
|
-
export { A as AllEdgeTypes, a as AllNodeTypes, E as EdgeKinds, b as GetEdgeType, c as GetNodeType, N as NodeKinds, d as defineGraph, g as getEdgeKinds,
|
|
4
|
+
import { I as InferenceType, M as MetaEdge, O as OntologyRelation } from './types-B3mmOMJV.cjs';
|
|
5
|
+
export { D as DEFAULT_SQL_SCHEMA, G as GraphBackend, a as MetaEdgeProperties, S as SqlSchema, b as SqlTableNames, T as TransactionBackend, c as createSqlSchema, i as isMetaEdge } from './types-B3mmOMJV.cjs';
|
|
6
|
+
import { A as AliasMap, E as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-gTd_qa6u.cjs';
|
|
7
|
+
export { a as AggregateResult, b as AnyEdge, c as AnyNode, B as BatchResults, d as BatchableQuery, e as ConstraintNames, f as CreateEdgeInput, g as CreateNodeInput, D as DynamicEdgeCollection, h as DynamicNodeCollection, i as Edge, j as EdgeAccessor, k as EdgeCollection, l as EdgeFindByEndpointsOptions, m as EdgeGetOrCreateByEndpointsOptions, n as EdgeGetOrCreateByEndpointsResult, o as EmbeddingSchema, p as EmbeddingValue, q as ExecutableAggregateQuery, r as ExecutableQuery, F as FieldAccessor, G as GetOrCreateAction, s as GraphEdgeCollections, t as GraphNodeCollections, H as HookContext, I as IfExistsMode, N as Node, u as NodeAccessor, v as NodeAlias, w as NodeCollection, x as NodeGetOrCreateByConstraintOptions, y as NodeGetOrCreateByConstraintResult, z as NodeRef, O as OperationHookContext, P as PaginateOptions, J as PaginatedResult, K as Predicate, L as PreparedQuery, M as PropsAccessor, R as QueryHookContext, S as QueryOptions, U as RecursiveTraversalOptions, V as SelectContext, W as SelectableEdge, X as SelectableNode, Y as Store, Z as StoreHooks, _ as StoreOptions, $ as StoreProjection, a0 as StreamOptions, a1 as SubgraphOptions, a2 as SubgraphResult, a3 as SubsetEdge, a4 as SubsetNode, a5 as TransactionContext, a6 as TypedEdgeCollection, a7 as UnionableQuery, a8 as UpdateEdgeInput, a9 as UpdateNodeInput, aa as createStore, ab as createStoreWithSchema, ac as defineSubgraphProject, ad as embedding, ae as exists, af as fieldRef, ag as getEmbeddingDimensions, ah as inSubquery, ai as isEmbeddingSchema, aj as isParameterRef, ak as notExists, al as notInSubquery, am as param } from './store-gTd_qa6u.cjs';
|
|
8
|
+
import { G as GraphDef, K as KindRegistry } from './manager-Bj1UEnhE.cjs';
|
|
9
|
+
export { A as AllEdgeTypes, a as AllNodeTypes, E as EdgeKinds, b as GetEdgeType, c as GetNodeType, N as NodeKinds, S as SchemaManagerOptions, d as SchemaValidationResult, e as defineGraph, g as getEdgeKinds, f as getNodeKinds, i as isGraphDef } from './manager-Bj1UEnhE.cjs';
|
|
10
10
|
export { C as CardinalityError, a as CompilerInvariantError, b as ConfigurationError, D as DatabaseOperationError, c as DisjointError, E as EdgeNotFoundError, d as EndpointError, e as EndpointNotFoundError, f as ErrorCategory, K as KindNotFoundError, M as MigrationError, N as NodeConstraintNotFoundError, g as NodeNotFoundError, R as RestrictedDeleteError, S as SchemaMismatchError, T as TypeGraphError, h as TypeGraphErrorOptions, U as UniquenessError, i as UnsupportedPredicateError, V as ValidationError, j as ValidationErrorDetails, k as ValidationIssue, l as VersionConflictError, m as getErrorSuggestion, n as isConstraintError, o as isSystemError, p as isTypeGraphError, q as isUserRecoverable } from './index-QTnQwakS.cjs';
|
|
11
11
|
import { A as AggregateExpr, F as FieldRef, C as ComparisonOp, a as AggregateComparisonPredicate } from './ast-Bh2NDeaK.cjs';
|
|
12
12
|
export { J as JsonPointer, b as JsonPointerFor, c as JsonPointerInput, d as JsonPointerSegment, e as JsonPointerSegments, f as JsonPointerSegmentsFor, M as MAX_JSON_POINTER_DEPTH, O as OrderSpec, P as ParameterRef, R as ResolveJsonPointer, g as ResolveJsonPointerSegments, S as SortDirection, T as TraversalExpansion, j as joinJsonPointers, h as jsonPointer, n as normalizeJsonPointer, p as parseJsonPointer } from './ast-Bh2NDeaK.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { N as NodeType, E as EdgeType } from './types-DMzKq0d5.js';
|
|
3
3
|
export { A as AnyEdgeType, C as Cardinality, a as Collation, D as DeleteBehavior, b as EdgeId, c as EdgeProps, d as EdgeRegistration, e as EdgeTypeWithEndpoints, f as EndpointExistence, G as GraphDefaults, g as NodeId, h as NodeProps, i as NodeRegistration, S as SqlDialect, T as TemporalMode, U as UniqueConstraint, j as UniquenessScope, k as isEdgeType, l as isEdgeTypeWithEndpoints, m as isNodeType } from './types-DMzKq0d5.js';
|
|
4
|
-
import { I as InferenceType, M as MetaEdge, O as OntologyRelation } from './types-
|
|
5
|
-
export { D as DEFAULT_SQL_SCHEMA, G as GraphBackend, a as MetaEdgeProperties, S as SqlSchema, b as SqlTableNames, T as TransactionBackend, c as createSqlSchema, i as isMetaEdge } from './types-
|
|
6
|
-
import { A as AliasMap, E as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-
|
|
7
|
-
export { a as AggregateResult, b as AnyEdge, c as AnyNode, B as BatchResults, d as BatchableQuery, e as ConstraintNames, f as CreateEdgeInput, g as CreateNodeInput, h as
|
|
8
|
-
import { G as GraphDef, K as KindRegistry } from './manager-
|
|
9
|
-
export { A as AllEdgeTypes, a as AllNodeTypes, E as EdgeKinds, b as GetEdgeType, c as GetNodeType, N as NodeKinds, d as defineGraph, g as getEdgeKinds,
|
|
4
|
+
import { I as InferenceType, M as MetaEdge, O as OntologyRelation } from './types-ThB4cFLp.js';
|
|
5
|
+
export { D as DEFAULT_SQL_SCHEMA, G as GraphBackend, a as MetaEdgeProperties, S as SqlSchema, b as SqlTableNames, T as TransactionBackend, c as createSqlSchema, i as isMetaEdge } from './types-ThB4cFLp.js';
|
|
6
|
+
import { A as AliasMap, E as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-Bitii3qj.js';
|
|
7
|
+
export { a as AggregateResult, b as AnyEdge, c as AnyNode, B as BatchResults, d as BatchableQuery, e as ConstraintNames, f as CreateEdgeInput, g as CreateNodeInput, D as DynamicEdgeCollection, h as DynamicNodeCollection, i as Edge, j as EdgeAccessor, k as EdgeCollection, l as EdgeFindByEndpointsOptions, m as EdgeGetOrCreateByEndpointsOptions, n as EdgeGetOrCreateByEndpointsResult, o as EmbeddingSchema, p as EmbeddingValue, q as ExecutableAggregateQuery, r as ExecutableQuery, F as FieldAccessor, G as GetOrCreateAction, s as GraphEdgeCollections, t as GraphNodeCollections, H as HookContext, I as IfExistsMode, N as Node, u as NodeAccessor, v as NodeAlias, w as NodeCollection, x as NodeGetOrCreateByConstraintOptions, y as NodeGetOrCreateByConstraintResult, z as NodeRef, O as OperationHookContext, P as PaginateOptions, J as PaginatedResult, K as Predicate, L as PreparedQuery, M as PropsAccessor, R as QueryHookContext, S as QueryOptions, U as RecursiveTraversalOptions, V as SelectContext, W as SelectableEdge, X as SelectableNode, Y as Store, Z as StoreHooks, _ as StoreOptions, $ as StoreProjection, a0 as StreamOptions, a1 as SubgraphOptions, a2 as SubgraphResult, a3 as SubsetEdge, a4 as SubsetNode, a5 as TransactionContext, a6 as TypedEdgeCollection, a7 as UnionableQuery, a8 as UpdateEdgeInput, a9 as UpdateNodeInput, aa as createStore, ab as createStoreWithSchema, ac as defineSubgraphProject, ad as embedding, ae as exists, af as fieldRef, ag as getEmbeddingDimensions, ah as inSubquery, ai as isEmbeddingSchema, aj as isParameterRef, ak as notExists, al as notInSubquery, am as param } from './store-Bitii3qj.js';
|
|
8
|
+
import { G as GraphDef, K as KindRegistry } from './manager-Chhrq1vl.js';
|
|
9
|
+
export { A as AllEdgeTypes, a as AllNodeTypes, E as EdgeKinds, b as GetEdgeType, c as GetNodeType, N as NodeKinds, S as SchemaManagerOptions, d as SchemaValidationResult, e as defineGraph, g as getEdgeKinds, f as getNodeKinds, i as isGraphDef } from './manager-Chhrq1vl.js';
|
|
10
10
|
export { C as CardinalityError, a as CompilerInvariantError, b as ConfigurationError, D as DatabaseOperationError, c as DisjointError, E as EdgeNotFoundError, d as EndpointError, e as EndpointNotFoundError, f as ErrorCategory, K as KindNotFoundError, M as MigrationError, N as NodeConstraintNotFoundError, g as NodeNotFoundError, R as RestrictedDeleteError, S as SchemaMismatchError, T as TypeGraphError, h as TypeGraphErrorOptions, U as UniquenessError, i as UnsupportedPredicateError, V as ValidationError, j as ValidationErrorDetails, k as ValidationIssue, l as VersionConflictError, m as getErrorSuggestion, n as isConstraintError, o as isSystemError, p as isTypeGraphError, q as isUserRecoverable } from './index-QTnQwakS.js';
|
|
11
11
|
import { A as AggregateExpr, F as FieldRef, C as ComparisonOp, a as AggregateComparisonPredicate } from './ast-COMyNeMn.js';
|
|
12
12
|
export { J as JsonPointer, b as JsonPointerFor, c as JsonPointerInput, d as JsonPointerSegment, e as JsonPointerSegments, f as JsonPointerSegmentsFor, M as MAX_JSON_POINTER_DEPTH, O as OrderSpec, P as ParameterRef, R as ResolveJsonPointer, g as ResolveJsonPointerSegments, S as SortDirection, T as TraversalExpansion, j as joinJsonPointers, h as jsonPointer, n as normalizeJsonPointer, p as parseJsonPointer } from './ast-COMyNeMn.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { META_EDGE_BRAND, META_EDGE_SUB_CLASS_OF, META_EDGE_NARROWER, META_EDGE_BROADER, META_EDGE_RELATED_TO, META_EDGE_EQUIVALENT_TO, META_EDGE_SAME_AS, META_EDGE_DIFFERENT_FROM, META_EDGE_DISJOINT_WITH, META_EDGE_HAS_PART, META_EDGE_PART_OF, META_EDGE_INVERSE_OF, META_EDGE_IMPLIES, ensureSchema, computeClosuresFromOntology, createEmptyClosures, KindRegistry, validateNodeProps, validateEdgeProps } from './chunk-
|
|
2
|
-
export { isMetaEdge } from './chunk-
|
|
1
|
+
import { META_EDGE_BRAND, META_EDGE_SUB_CLASS_OF, META_EDGE_NARROWER, META_EDGE_BROADER, META_EDGE_RELATED_TO, META_EDGE_EQUIVALENT_TO, META_EDGE_SAME_AS, META_EDGE_DIFFERENT_FROM, META_EDGE_DISJOINT_WITH, META_EDGE_HAS_PART, META_EDGE_PART_OF, META_EDGE_INVERSE_OF, META_EDGE_IMPLIES, ensureSchema, computeClosuresFromOntology, createEmptyClosures, KindRegistry, validateNodeProps, validateEdgeProps } from './chunk-L4ON6RJF.js';
|
|
2
|
+
export { isMetaEdge } from './chunk-L4ON6RJF.js';
|
|
3
3
|
import { NODE_TYPE_BRAND, EDGE_TYPE_BRAND, nowIso, validateOptionalIsoDate, getNodeKinds, getEdgeKinds } from './chunk-IRFD3MEU.js';
|
|
4
4
|
export { defineGraph, getEdgeKinds, getNodeKinds, isEdgeType, isEdgeTypeWithEndpoints, isGraphDef, isNodeType } from './chunk-IRFD3MEU.js';
|
|
5
5
|
import { ConfigurationError, UnsupportedPredicateError, ValidationError, CompilerInvariantError, KindNotFoundError, DatabaseOperationError, EdgeNotFoundError, NodeConstraintNotFoundError, RestrictedDeleteError, NodeNotFoundError, EndpointNotFoundError, UniquenessError, CardinalityError, EndpointError, DisjointError } from './chunk-SJ2QMDXY.js';
|
|
@@ -2315,7 +2315,7 @@ function buildStandardEmbeddingsCte(input) {
|
|
|
2315
2315
|
const { ctx, graphId, vectorPredicate } = input;
|
|
2316
2316
|
const { dialect } = ctx;
|
|
2317
2317
|
const { field: field2, metric, minScore, queryEmbedding } = vectorPredicate;
|
|
2318
|
-
const fieldPath = field2.jsonPointer
|
|
2318
|
+
const fieldPath = field2.jsonPointer ?? (field2.path.length > 1 && field2.path[0] === "props" ? `/${field2.path.slice(1).join("/")}` : `/${field2.path.join("/")}`);
|
|
2319
2319
|
const distanceExpr = dialect.vectorDistance(
|
|
2320
2320
|
sql.raw("embedding"),
|
|
2321
2321
|
queryEmbedding,
|
|
@@ -9593,53 +9593,47 @@ function createNodeCollection(config) {
|
|
|
9593
9593
|
// src/store/collection-factory.ts
|
|
9594
9594
|
function createNodeCollectionsProxy(graph, graphId, registry, backend, operations) {
|
|
9595
9595
|
const collectionCache = /* @__PURE__ */ new Map();
|
|
9596
|
-
return new Proxy(
|
|
9597
|
-
{
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
if (cached !== void 0) {
|
|
9605
|
-
return cached;
|
|
9606
|
-
}
|
|
9607
|
-
const collection = createNodeCollection({
|
|
9608
|
-
graphId,
|
|
9609
|
-
kind,
|
|
9610
|
-
backend,
|
|
9611
|
-
...operations
|
|
9612
|
-
});
|
|
9613
|
-
collectionCache.set(kind, collection);
|
|
9614
|
-
return collection;
|
|
9596
|
+
return new Proxy({}, {
|
|
9597
|
+
get: (_, kind) => {
|
|
9598
|
+
if (!Object.hasOwn(graph.nodes, kind)) {
|
|
9599
|
+
throw new KindNotFoundError(kind, "node");
|
|
9600
|
+
}
|
|
9601
|
+
const cached = collectionCache.get(kind);
|
|
9602
|
+
if (cached !== void 0) {
|
|
9603
|
+
return cached;
|
|
9615
9604
|
}
|
|
9605
|
+
const collection = createNodeCollection({
|
|
9606
|
+
graphId,
|
|
9607
|
+
kind,
|
|
9608
|
+
backend,
|
|
9609
|
+
...operations
|
|
9610
|
+
});
|
|
9611
|
+
collectionCache.set(kind, collection);
|
|
9612
|
+
return collection;
|
|
9616
9613
|
}
|
|
9617
|
-
);
|
|
9614
|
+
});
|
|
9618
9615
|
}
|
|
9619
9616
|
function createEdgeCollectionsProxy(graph, graphId, registry, backend, operations) {
|
|
9620
9617
|
const collectionCache = /* @__PURE__ */ new Map();
|
|
9621
|
-
return new Proxy(
|
|
9622
|
-
{
|
|
9623
|
-
|
|
9624
|
-
|
|
9625
|
-
if (!(kind in graph.edges)) {
|
|
9626
|
-
throw new KindNotFoundError(kind, "edge");
|
|
9627
|
-
}
|
|
9628
|
-
const cached = collectionCache.get(kind);
|
|
9629
|
-
if (cached !== void 0) {
|
|
9630
|
-
return cached;
|
|
9631
|
-
}
|
|
9632
|
-
const collection = createEdgeCollection({
|
|
9633
|
-
graphId,
|
|
9634
|
-
kind,
|
|
9635
|
-
backend,
|
|
9636
|
-
...operations
|
|
9637
|
-
});
|
|
9638
|
-
collectionCache.set(kind, collection);
|
|
9639
|
-
return collection;
|
|
9618
|
+
return new Proxy({}, {
|
|
9619
|
+
get: (_, kind) => {
|
|
9620
|
+
if (!Object.hasOwn(graph.edges, kind)) {
|
|
9621
|
+
throw new KindNotFoundError(kind, "edge");
|
|
9640
9622
|
}
|
|
9623
|
+
const cached = collectionCache.get(kind);
|
|
9624
|
+
if (cached !== void 0) {
|
|
9625
|
+
return cached;
|
|
9626
|
+
}
|
|
9627
|
+
const collection = createEdgeCollection({
|
|
9628
|
+
graphId,
|
|
9629
|
+
kind,
|
|
9630
|
+
backend,
|
|
9631
|
+
...operations
|
|
9632
|
+
});
|
|
9633
|
+
collectionCache.set(kind, collection);
|
|
9634
|
+
return collection;
|
|
9641
9635
|
}
|
|
9642
|
-
);
|
|
9636
|
+
});
|
|
9643
9637
|
}
|
|
9644
9638
|
|
|
9645
9639
|
// src/constraints/index.ts
|
|
@@ -11713,6 +11707,30 @@ var Store = class {
|
|
|
11713
11707
|
}
|
|
11714
11708
|
return this.#edgeCollections;
|
|
11715
11709
|
}
|
|
11710
|
+
// === Dynamic Collection Access ===
|
|
11711
|
+
/**
|
|
11712
|
+
* Returns the node collection for the given kind, or undefined if the kind
|
|
11713
|
+
* is not registered in this graph.
|
|
11714
|
+
*
|
|
11715
|
+
* Use this for runtime string-keyed access when the kind is not known at
|
|
11716
|
+
* compile time (e.g., iterating all kinds, resolving from edge metadata,
|
|
11717
|
+
* dynamic admin UIs).
|
|
11718
|
+
*/
|
|
11719
|
+
getNodeCollection(kind) {
|
|
11720
|
+
if (!Object.hasOwn(this.#graph.nodes, kind)) return void 0;
|
|
11721
|
+
return this.nodes[kind];
|
|
11722
|
+
}
|
|
11723
|
+
/**
|
|
11724
|
+
* Returns the edge collection for the given kind, or undefined if the kind
|
|
11725
|
+
* is not registered in this graph.
|
|
11726
|
+
*
|
|
11727
|
+
* Use this for runtime string-keyed access when the kind is not known at
|
|
11728
|
+
* compile time.
|
|
11729
|
+
*/
|
|
11730
|
+
getEdgeCollection(kind) {
|
|
11731
|
+
if (!Object.hasOwn(this.#graph.edges, kind)) return void 0;
|
|
11732
|
+
return this.edges[kind];
|
|
11733
|
+
}
|
|
11716
11734
|
/**
|
|
11717
11735
|
* Node operations bound to this store instance.
|
|
11718
11736
|
*/
|