@nicia-ai/typegraph 0.29.0 → 0.30.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.
Files changed (142) hide show
  1. package/dist/backend/postgres/index.cjs +19 -19
  2. package/dist/backend/postgres/index.d.cts +5 -5
  3. package/dist/backend/postgres/index.d.ts +5 -5
  4. package/dist/backend/postgres/index.js +9 -9
  5. package/dist/backend/postgres/pglite.cjs +14 -14
  6. package/dist/backend/postgres/pglite.d.cts +2 -2
  7. package/dist/backend/postgres/pglite.d.ts +2 -2
  8. package/dist/backend/postgres/pglite.js +9 -9
  9. package/dist/backend/sqlite/index.cjs +17 -17
  10. package/dist/backend/sqlite/index.d.cts +11 -6
  11. package/dist/backend/sqlite/index.d.ts +11 -6
  12. package/dist/backend/sqlite/index.js +8 -8
  13. package/dist/backend/sqlite/libsql.cjs +13 -13
  14. package/dist/backend/sqlite/libsql.d.cts +2 -2
  15. package/dist/backend/sqlite/libsql.d.ts +2 -2
  16. package/dist/backend/sqlite/libsql.js +9 -9
  17. package/dist/backend/sqlite/local.cjs +16 -15
  18. package/dist/backend/sqlite/local.cjs.map +1 -1
  19. package/dist/backend/sqlite/local.d.cts +8 -2
  20. package/dist/backend/sqlite/local.d.ts +8 -2
  21. package/dist/backend/sqlite/local.js +11 -10
  22. package/dist/backend/sqlite/local.js.map +1 -1
  23. package/dist/{chunk-UP4QAJND.cjs → chunk-26HWIIVS.cjs} +65 -65
  24. package/dist/{chunk-UP4QAJND.cjs.map → chunk-26HWIIVS.cjs.map} +1 -1
  25. package/dist/{chunk-GPUNAJFH.js → chunk-2QA5EHEN.js} +3 -3
  26. package/dist/{chunk-GPUNAJFH.js.map → chunk-2QA5EHEN.js.map} +1 -1
  27. package/dist/{chunk-CUZGBWFT.js → chunk-3IRMLJEK.js} +3 -3
  28. package/dist/{chunk-CUZGBWFT.js.map → chunk-3IRMLJEK.js.map} +1 -1
  29. package/dist/{chunk-MRMD7S7E.js → chunk-3JLRHQ67.js} +7 -7
  30. package/dist/{chunk-MRMD7S7E.js.map → chunk-3JLRHQ67.js.map} +1 -1
  31. package/dist/{chunk-UPBXUOW7.cjs → chunk-4BXHVEFB.cjs} +15 -15
  32. package/dist/{chunk-UPBXUOW7.cjs.map → chunk-4BXHVEFB.cjs.map} +1 -1
  33. package/dist/{chunk-RU5BBUU2.cjs → chunk-4LBO6KIF.cjs} +70 -67
  34. package/dist/chunk-4LBO6KIF.cjs.map +1 -0
  35. package/dist/{chunk-HKN622O4.js → chunk-633N7DSE.js} +9 -5
  36. package/dist/chunk-633N7DSE.js.map +1 -0
  37. package/dist/{chunk-R2LA6MKR.cjs → chunk-7JGLPAFV.cjs} +8 -8
  38. package/dist/{chunk-R2LA6MKR.cjs.map → chunk-7JGLPAFV.cjs.map} +1 -1
  39. package/dist/{chunk-7KLVFWXR.js → chunk-AI3RNREM.js} +30 -4
  40. package/dist/chunk-AI3RNREM.js.map +1 -0
  41. package/dist/{chunk-SFNUHFON.js → chunk-ENDUY2CD.js} +4 -4
  42. package/dist/{chunk-SFNUHFON.js.map → chunk-ENDUY2CD.js.map} +1 -1
  43. package/dist/{chunk-7V335GHG.cjs → chunk-FLRCVI2G.cjs} +12 -2
  44. package/dist/chunk-FLRCVI2G.cjs.map +1 -0
  45. package/dist/{chunk-IE2TPFBT.js → chunk-FVIGJTS7.js} +3 -3
  46. package/dist/{chunk-IE2TPFBT.js.map → chunk-FVIGJTS7.js.map} +1 -1
  47. package/dist/{chunk-Q5ASTPM4.cjs → chunk-FWBVPATK.cjs} +19 -19
  48. package/dist/{chunk-Q5ASTPM4.cjs.map → chunk-FWBVPATK.cjs.map} +1 -1
  49. package/dist/{chunk-KGAJ5HFO.cjs → chunk-IE6GN7L3.cjs} +17 -17
  50. package/dist/{chunk-KGAJ5HFO.cjs.map → chunk-IE6GN7L3.cjs.map} +1 -1
  51. package/dist/{chunk-A4H6QMV4.js → chunk-IUIJJYPI.js} +14 -11
  52. package/dist/chunk-IUIJJYPI.js.map +1 -0
  53. package/dist/{chunk-BMDF2S7S.js → chunk-IX7RE7CG.js} +3 -3
  54. package/dist/{chunk-BMDF2S7S.js.map → chunk-IX7RE7CG.js.map} +1 -1
  55. package/dist/{chunk-G6P3OVDY.cjs → chunk-JIEJCTDS.cjs} +18 -2
  56. package/dist/chunk-JIEJCTDS.cjs.map +1 -0
  57. package/dist/{chunk-XTQHSOIC.cjs → chunk-K4N35E7B.cjs} +86 -86
  58. package/dist/{chunk-XTQHSOIC.cjs.map → chunk-K4N35E7B.cjs.map} +1 -1
  59. package/dist/{chunk-NZ5PMBTG.js → chunk-K5P5OZXS.js} +12 -3
  60. package/dist/chunk-K5P5OZXS.js.map +1 -0
  61. package/dist/{chunk-Y52UNT66.js → chunk-K5VREXMZ.js} +7 -7
  62. package/dist/{chunk-Y52UNT66.js.map → chunk-K5VREXMZ.js.map} +1 -1
  63. package/dist/chunk-LUHU4T2F.cjs +12 -0
  64. package/dist/{chunk-Q3ZZLU3O.cjs.map → chunk-LUHU4T2F.cjs.map} +1 -1
  65. package/dist/{chunk-Z36W5WUM.js → chunk-MAQJYNJR.js} +3 -3
  66. package/dist/{chunk-Z36W5WUM.js.map → chunk-MAQJYNJR.js.map} +1 -1
  67. package/dist/{chunk-N3VVQDMA.js → chunk-MXE2U3EX.js} +3 -3
  68. package/dist/{chunk-N3VVQDMA.js.map → chunk-MXE2U3EX.js.map} +1 -1
  69. package/dist/{chunk-3DTLDGIM.js → chunk-N2OEOGBB.js} +6 -6
  70. package/dist/{chunk-3DTLDGIM.js.map → chunk-N2OEOGBB.js.map} +1 -1
  71. package/dist/{chunk-OGUH56BB.js → chunk-R4JOBEJU.js} +4 -4
  72. package/dist/{chunk-OGUH56BB.js.map → chunk-R4JOBEJU.js.map} +1 -1
  73. package/dist/{chunk-HM6XMR3E.cjs → chunk-SGPXKJ4A.cjs} +18 -18
  74. package/dist/{chunk-HM6XMR3E.cjs.map → chunk-SGPXKJ4A.cjs.map} +1 -1
  75. package/dist/{chunk-MB363HT5.js → chunk-TQOYM4LN.js} +18 -3
  76. package/dist/chunk-TQOYM4LN.js.map +1 -0
  77. package/dist/{chunk-C2RWFIYP.cjs → chunk-UESTHN47.cjs} +34 -6
  78. package/dist/chunk-UESTHN47.cjs.map +1 -0
  79. package/dist/{chunk-4K6IHUW6.cjs → chunk-VFX3LC76.cjs} +14 -14
  80. package/dist/{chunk-4K6IHUW6.cjs.map → chunk-VFX3LC76.cjs.map} +1 -1
  81. package/dist/{chunk-F2Q76CQ4.cjs → chunk-WEMZM7J7.cjs} +11 -7
  82. package/dist/chunk-WEMZM7J7.cjs.map +1 -0
  83. package/dist/{chunk-ZYQEXGYC.cjs → chunk-WFCECD6Q.cjs} +84 -84
  84. package/dist/{chunk-ZYQEXGYC.cjs.map → chunk-WFCECD6Q.cjs.map} +1 -1
  85. package/dist/{chunk-VGU26WIU.cjs → chunk-YQGLVWB2.cjs} +4 -4
  86. package/dist/{chunk-VGU26WIU.cjs.map → chunk-YQGLVWB2.cjs.map} +1 -1
  87. package/dist/{ddl-D3o-RmsV.d.cts → ddl-BSFlbGQF.d.cts} +3 -3
  88. package/dist/{ddl-BwH00BB6.d.ts → ddl-EdkIiFVU.d.ts} +3 -3
  89. package/dist/graph-extension/index.cjs +19 -19
  90. package/dist/graph-extension/index.d.cts +1 -1
  91. package/dist/graph-extension/index.d.ts +1 -1
  92. package/dist/graph-extension/index.js +4 -4
  93. package/dist/{index-CapHwi1a.d.ts → index-DzeIiMO3.d.ts} +9 -1
  94. package/dist/{index-jPPexxM5.d.cts → index-Ln_KHTGA.d.cts} +9 -1
  95. package/dist/index.cjs +780 -515
  96. package/dist/index.cjs.map +1 -1
  97. package/dist/index.d.cts +8 -8
  98. package/dist/index.d.ts +8 -8
  99. package/dist/index.js +314 -53
  100. package/dist/index.js.map +1 -1
  101. package/dist/indexes/index.cjs +18 -18
  102. package/dist/indexes/index.d.cts +4 -4
  103. package/dist/indexes/index.d.ts +4 -4
  104. package/dist/indexes/index.js +4 -4
  105. package/dist/interchange/index.cjs +7 -7
  106. package/dist/interchange/index.d.cts +3 -3
  107. package/dist/interchange/index.d.ts +3 -3
  108. package/dist/interchange/index.js +2 -2
  109. package/dist/{manager-BUugwCYz.d.ts → manager-BbdyNhkv.d.ts} +1 -1
  110. package/dist/{manager-DpIpn1HQ.d.cts → manager-wTDgjoXG.d.cts} +1 -1
  111. package/dist/{postgres-CQL9UIn2.d.cts → postgres-CK2ByP1q.d.cts} +1 -1
  112. package/dist/{postgres-CcRLaxz0.d.ts → postgres-ymXYC6Rr.d.ts} +1 -1
  113. package/dist/profiler/index.cjs +9 -9
  114. package/dist/profiler/index.d.cts +5 -5
  115. package/dist/profiler/index.d.ts +5 -5
  116. package/dist/profiler/index.js +2 -2
  117. package/dist/schema/index.cjs +31 -31
  118. package/dist/schema/index.d.cts +5 -5
  119. package/dist/schema/index.d.ts +5 -5
  120. package/dist/schema/index.js +8 -8
  121. package/dist/{sqlite-Rj3xu4It.d.cts → sqlite-DxH1lrwD.d.cts} +1 -1
  122. package/dist/{sqlite-CZDFUfHS.d.ts → sqlite-R8YGOqVQ.d.ts} +1 -1
  123. package/dist/{store-B43FpOVX.d.cts → store--z1Tmk7U.d.cts} +43 -3
  124. package/dist/{store-De0Y33wP.d.ts → store-CNKM334w.d.ts} +43 -3
  125. package/dist/{types-CmAT-Z47.d.ts → types-BBiDqJCU.d.ts} +2 -0
  126. package/dist/{types-B5GSeE3t.d.ts → types-CMvxx2kd.d.ts} +1 -1
  127. package/dist/{types-Bwlp_yvu.d.cts → types-D5B6Be5c.d.cts} +1 -1
  128. package/dist/{types-DXCSyxac.d.cts → types-dL-clxO3.d.cts} +2 -0
  129. package/dist/{where-CP4qGIHd.d.ts → where-CAo6wsBZ.d.ts} +1 -1
  130. package/dist/{where-2dsyYt3d.d.cts → where-bJjuOCeV.d.cts} +1 -1
  131. package/package.json +1 -1
  132. package/dist/chunk-7KLVFWXR.js.map +0 -1
  133. package/dist/chunk-7V335GHG.cjs.map +0 -1
  134. package/dist/chunk-A4H6QMV4.js.map +0 -1
  135. package/dist/chunk-C2RWFIYP.cjs.map +0 -1
  136. package/dist/chunk-F2Q76CQ4.cjs.map +0 -1
  137. package/dist/chunk-G6P3OVDY.cjs.map +0 -1
  138. package/dist/chunk-HKN622O4.js.map +0 -1
  139. package/dist/chunk-MB363HT5.js.map +0 -1
  140. package/dist/chunk-NZ5PMBTG.js.map +0 -1
  141. package/dist/chunk-Q3ZZLU3O.cjs +0 -12
  142. package/dist/chunk-RU5BBUU2.cjs.map +0 -1
package/dist/index.d.cts CHANGED
@@ -1,15 +1,15 @@
1
1
  import { z } from 'zod';
2
2
  import { e as KindAnnotations, N as NodeType, d as EdgeType } from './extension-types-CwHV-Uk4.cjs';
3
3
  export { A as AnyEdgeType, h as CURRENT_GRAPH_EXTENSION_VERSION, f as Cardinality, C as Collation, D as DeleteBehavior, i as EdgeId, j as EdgeProps, E as EdgeRegistration, k as EdgeTypeWithEndpoints, g as EndpointExistence, c as GraphDefaults, G as GraphExtension, l as GraphExtensionVersion, J as JsonValue, L as LEGACY_GRAPH_EXTENSION_VERSION, m as NodeId, n as NodeProps, b as NodeRegistration, T as TemporalMode, o as UniqueConstraint, U as UniquenessScope, p as isEdgeType, q as isEdgeTypeWithEndpoints, r as isNodeType } from './extension-types-CwHV-Uk4.cjs';
4
- import { K as InferenceType, M as MetaEdge, V as VectorStrategy, G as GraphBackend, O as OntologyRelation, L as AggregateExpr, P as FieldRef, T as ComparisonOp, U as AggregateComparisonPredicate } from './types-DXCSyxac.cjs';
5
- export { W as AdoptedTransaction, B as BackendCapabilities, X as CommitSchemaVersionExpected, Y as CommitSchemaVersionParams, Z as DEFAULT_SQL_SCHEMA, _ as DeleteFulltextBatchParams, E as EdgeIndexConfig, c as EdgeIndexDeclaration, q as EdgeIndexDirection, r as EdgeIndexWhereBuilder, $ as FulltextBatchRow, a0 as FulltextCapabilities, a1 as FulltextQueryMode, a2 as FulltextSearchParams, a3 as FulltextSearchResult, F as FulltextStrategy, a4 as HybridFusionOptions, I as IndexDeclaration, s as IndexOrigin, t as IndexScope, e as IndexWhereExpression, u as IndexWhereFieldBuilder, v as IndexWhereInput, J as JsonPointer, a5 as JsonPointerFor, a6 as JsonPointerInput, a7 as JsonPointerSegment, a8 as JsonPointerSegments, a9 as JsonPointerSegmentsFor, aa as MAX_JSON_POINTER_DEPTH, ab as MetaEdgeProperties, N as NodeIndexConfig, d as NodeIndexDeclaration, w as NodeIndexWhereBuilder, ac as OrderSpec, ad as ParameterRef, ae as ResolveJsonPointer, af as ResolveJsonPointerSegments, H as SchemaVersionRow, ag as SetActiveVersionParams, ah as SortDirection, p as SqlDialect, ai as SqlSchema, aj as SqlTableNames, ak as StrategyTableContribution, al as TableContribution, am as TransactionBackend, an as TraversalExpansion, ao as UpsertFulltextBatchParams, ap as VectorCapabilities, aq as VectorSlot, ar as buildVectorCapabilities, as as createSqlSchema, at as fts5Strategy, au as isMetaEdge, av as joinJsonPointers, aw as jsonPointer, ax as normalizeJsonPointer, ay as parseJsonPointer, az as tsvectorStrategy } from './types-DXCSyxac.cjs';
6
- import { E as EmbeddingMetric, a as EmbeddingIndexType, A as AliasMap, b as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-B43FpOVX.cjs';
7
- export { c as AggregateResult, d as AlgorithmCyclePolicy, e as AnyEdge, f as AnyNode, B as BaseTraversalOptions, g as BatchResults, h as BatchableQuery, i as ConstraintNames, j as CreateEdgeInput, k as CreateNodeInput, D as DEFAULT_SEARCHABLE_LANGUAGE, l as DegreeOptions, m as DynamicEdgeAccessor, n as DynamicEdgeCollection, o as DynamicEdgeType, p as DynamicFieldBuilder, q as DynamicNodeAccessor, r as DynamicNodeCollection, s as DynamicNodeType, t as DynamicSelectableEdge, u as DynamicSelectableNode, v as Edge, w as EdgeAccessor, x as EdgeCollection, y as EdgeFindByEndpointsOptions, z as EdgeGetOrCreateByEndpointsOptions, F as EdgeGetOrCreateByEndpointsResult, G as EdgeIntrospection, H as EmbeddingSchema, I as EmbeddingValue, J as ExecutableAggregateQuery, K as ExecutableQuery, L as FieldAccessor, M as FulltextSearchHit, N as FulltextSearchOptions, O as GetOrCreateAction, P as GraphAlgorithms, R as GraphEdgeCollections, U as GraphNodeCollections, V as HookContext, W as HybridFulltextOptions, X as HybridSearchHit, Y as HybridSearchOptions, Z as HybridVectorOptions, _ as IfExistsMode, $ as KindIntrospection, a0 as MaterializeRemovalsEntry, a1 as MaterializeRemovalsOptions, a2 as MaterializeRemovalsResult, a3 as NeighborsOptions, a4 as Node, a5 as NodeAccessor, a6 as NodeAlias, a7 as NodeCollection, a8 as NodeGetOrCreateByConstraintOptions, a9 as NodeGetOrCreateByConstraintResult, aa as NodeIdentifier, ab as NodeRef, ac as OntologyIntrospection, ad as OperationHookContext, ae as PaginateOptions, af as PaginatedResult, ag as PathNode, ah as Predicate, ai as PreparedQuery, aj as PropsAccessor, ak as QueryHookContext, al as QueryOptions, am as ReachableNode, an as ReachableOptions, ao as RebuildFulltextOptions, ap as RebuildFulltextResult, aq as ReclaimedVectorFieldEntry, ar as RecursiveTraversalOptions, as as ReembedFunction, at as ReembedVectorFieldOptions, au as ReembedVectorFieldResult, av as SchemaIntrospection, aw as SearchableMetadata, ax as SearchableOptions, ay as SearchableSchema, az as SelectContext, aA as SelectableEdge, aB as SelectableNode, aC as ShortestPathOptions, aD as ShortestPathResult, S as Store, aE as StoreHooks, aF as StoreOptions, aG as StoreProjection, aH as StoreRef, aI as StoreSearch, aJ as StreamOptions, aK as SubgraphEdgeResult, aL as SubgraphNodeResult, aM as SubgraphOptions, aN as SubgraphResult, aO as SubsetEdge, aP as SubsetNode, aQ as TemporalAlgorithmOptions, aR as TransactionContext, aS as TraversalDirection, aT as TypedEdgeCollection, aU as UnionableQuery, aV as UniqueIntrospection, aW as UpdateEdgeInput, aX as UpdateNodeInput, aY as VectorSearchHit, aZ as VectorSearchOptions, a_ as createStore, a$ as createStoreWithSchema, b0 as createVerifiedStore, b1 as defineSubgraphProject, b2 as embedding, b3 as exists, b4 as fieldRef, b5 as getEmbeddingDimensions, b6 as getSearchableMetadata, b7 as inSubquery, b8 as isEmbeddingSchema, b9 as isParameterRef, ba as isSearchableSchema, bb as notExists, bc as notInSubquery, bd as param, be as searchable } from './store-B43FpOVX.cjs';
8
- import { G as GraphDef, K as KindRegistry } from './manager-DpIpn1HQ.cjs';
9
- export { A as AllEdgeTypes, t as AllNodeTypes, u as EdgeKinds, v as GetEdgeType, w as GetNodeType, x as NodeKinds, c as SchemaManagerOptions, d as SchemaValidationResult, y as defineGraph, z as getEdgeKinds, B as getNodeKinds, F as isGraphDef } from './manager-DpIpn1HQ.cjs';
10
- export { B as BackendDisposedError, C as CardinalityError, b as CompilerInvariantError, c as ConfigurationError, D as DatabaseOperationError, d as DisjointError, E as EagerMaterializationError, e as EdgeNotFoundError, f as EmbeddingDimensionChangedError, g as EndpointError, h as EndpointNotFoundError, i as ErrorCategory, K as KindNotFoundError, M as MigrationError, N as NodeConstraintNotFoundError, j as NodeNotFoundError, R as RestrictedDeleteError, S as SchemaContentConflictError, k as SchemaMismatchError, l as StaleVersionError, m as StoreNotInitializedError, n as StoreNotInitializedReason, T as TypeGraphError, o as TypeGraphErrorOptions, U as UniquenessError, p as UnsupportedPredicateError, a as ValidationError, q as ValidationErrorDetails, V as ValidationIssue, r as VersionConflictError, s as getErrorSuggestion, t as isConstraintError, u as isSystemError, v as isTypeGraphError, w as isUserRecoverable } from './index-jPPexxM5.cjs';
4
+ import { K as InferenceType, M as MetaEdge, V as VectorStrategy, G as GraphBackend, O as OntologyRelation, L as AggregateExpr, P as FieldRef, T as ComparisonOp, U as AggregateComparisonPredicate } from './types-dL-clxO3.cjs';
5
+ export { W as AdoptedTransaction, B as BackendCapabilities, X as CommitSchemaVersionExpected, Y as CommitSchemaVersionParams, Z as DEFAULT_SQL_SCHEMA, _ as DeleteFulltextBatchParams, E as EdgeIndexConfig, c as EdgeIndexDeclaration, q as EdgeIndexDirection, r as EdgeIndexWhereBuilder, $ as FulltextBatchRow, a0 as FulltextCapabilities, a1 as FulltextQueryMode, a2 as FulltextSearchParams, a3 as FulltextSearchResult, F as FulltextStrategy, a4 as HybridFusionOptions, I as IndexDeclaration, s as IndexOrigin, t as IndexScope, e as IndexWhereExpression, u as IndexWhereFieldBuilder, v as IndexWhereInput, J as JsonPointer, a5 as JsonPointerFor, a6 as JsonPointerInput, a7 as JsonPointerSegment, a8 as JsonPointerSegments, a9 as JsonPointerSegmentsFor, aa as MAX_JSON_POINTER_DEPTH, ab as MetaEdgeProperties, N as NodeIndexConfig, d as NodeIndexDeclaration, w as NodeIndexWhereBuilder, ac as OrderSpec, ad as ParameterRef, ae as ResolveJsonPointer, af as ResolveJsonPointerSegments, H as SchemaVersionRow, ag as SetActiveVersionParams, ah as SortDirection, p as SqlDialect, ai as SqlSchema, aj as SqlTableNames, ak as StrategyTableContribution, al as TableContribution, am as TransactionBackend, an as TraversalExpansion, ao as UpsertFulltextBatchParams, ap as VectorCapabilities, aq as VectorSlot, ar as buildVectorCapabilities, as as createSqlSchema, at as fts5Strategy, au as isMetaEdge, av as joinJsonPointers, aw as jsonPointer, ax as normalizeJsonPointer, ay as parseJsonPointer, az as tsvectorStrategy } from './types-dL-clxO3.cjs';
6
+ import { E as EmbeddingMetric, a as EmbeddingIndexType, A as AliasMap, b as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store--z1Tmk7U.cjs';
7
+ export { c as AggregateResult, d as AlgorithmCyclePolicy, e as AnyEdge, f as AnyNode, B as BaseTraversalOptions, g as BatchResults, h as BatchableQuery, i as ConstraintNames, j as CreateEdgeInput, k as CreateNodeInput, D as DEFAULT_SEARCHABLE_LANGUAGE, l as DegreeOptions, m as DynamicEdgeAccessor, n as DynamicEdgeCollection, o as DynamicEdgeType, p as DynamicFieldBuilder, q as DynamicNodeAccessor, r as DynamicNodeCollection, s as DynamicNodeType, t as DynamicSelectableEdge, u as DynamicSelectableNode, v as Edge, w as EdgeAccessor, x as EdgeCollection, y as EdgeFindByEndpointsOptions, z as EdgeGetOrCreateByEndpointsOptions, F as EdgeGetOrCreateByEndpointsResult, G as EdgeIntrospection, H as EmbeddingSchema, I as EmbeddingValue, J as ExecutableAggregateQuery, K as ExecutableQuery, L as FieldAccessor, M as FulltextSearchHit, N as FulltextSearchOptions, O as GetOrCreateAction, P as GraphAlgorithms, R as GraphEdgeCollections, U as GraphNodeCollections, V as HookContext, W as HybridFulltextOptions, X as HybridSearchHit, Y as HybridSearchOptions, Z as HybridVectorOptions, _ as IfExistsMode, $ as KindIntrospection, a0 as MaterializeRemovalsEntry, a1 as MaterializeRemovalsOptions, a2 as MaterializeRemovalsResult, a3 as NeighborsOptions, a4 as Node, a5 as NodeAccessor, a6 as NodeAlias, a7 as NodeBulkFindByIndexOptions, a8 as NodeCollection, a9 as NodeGetOrCreateByConstraintOptions, aa as NodeGetOrCreateByConstraintResult, ab as NodeIdentifier, ac as NodeRef, ad as OntologyIntrospection, ae as OperationHookContext, af as PaginateOptions, ag as PaginatedResult, ah as PathNode, ai as Predicate, aj as PreparedQuery, ak as PropsAccessor, al as QueryHookContext, am as QueryOptions, an as ReachableNode, ao as ReachableOptions, ap as RebuildFulltextOptions, aq as RebuildFulltextResult, ar as ReclaimedVectorFieldEntry, as as RecursiveTraversalOptions, at as ReembedFunction, au as ReembedVectorFieldOptions, av as ReembedVectorFieldResult, aw as SchemaIntrospection, ax as SearchableMetadata, ay as SearchableOptions, az as SearchableSchema, aA as SelectContext, aB as SelectableEdge, aC as SelectableNode, aD as ShortestPathOptions, aE as ShortestPathResult, S as Store, aF as StoreHooks, aG as StoreOptions, aH as StoreProjection, aI as StoreRef, aJ as StoreSearch, aK as StreamOptions, aL as SubgraphEdgeResult, aM as SubgraphNodeResult, aN as SubgraphOptions, aO as SubgraphResult, aP as SubsetEdge, aQ as SubsetNode, aR as TemporalAlgorithmOptions, aS as TransactionContext, aT as TraversalDirection, aU as TypedEdgeCollection, aV as UnionableQuery, aW as UniqueIntrospection, aX as UpdateEdgeInput, aY as UpdateNodeInput, aZ as VectorSearchHit, a_ as VectorSearchOptions, a$ as createStore, b0 as createStoreWithSchema, b1 as createVerifiedStore, b2 as defineSubgraphProject, b3 as embedding, b4 as exists, b5 as fieldRef, b6 as getEmbeddingDimensions, b7 as getSearchableMetadata, b8 as inSubquery, b9 as isEmbeddingSchema, ba as isParameterRef, bb as isSearchableSchema, bc as notExists, bd as notInSubquery, be as param, bf as searchable } from './store--z1Tmk7U.cjs';
8
+ import { G as GraphDef, K as KindRegistry } from './manager-wTDgjoXG.cjs';
9
+ export { A as AllEdgeTypes, t as AllNodeTypes, u as EdgeKinds, v as GetEdgeType, w as GetNodeType, x as NodeKinds, c as SchemaManagerOptions, d as SchemaValidationResult, y as defineGraph, z as getEdgeKinds, B as getNodeKinds, F as isGraphDef } from './manager-wTDgjoXG.cjs';
10
+ export { B as BackendDisposedError, C as CardinalityError, b as CompilerInvariantError, c as ConfigurationError, D as DatabaseOperationError, d as DisjointError, E as EagerMaterializationError, e as EdgeNotFoundError, f as EmbeddingDimensionChangedError, g as EndpointError, h as EndpointNotFoundError, i as ErrorCategory, K as KindNotFoundError, M as MigrationError, N as NodeConstraintNotFoundError, j as NodeIndexNotFoundError, k as NodeNotFoundError, R as RestrictedDeleteError, S as SchemaContentConflictError, l as SchemaMismatchError, m as StaleVersionError, n as StoreNotInitializedError, o as StoreNotInitializedReason, T as TypeGraphError, p as TypeGraphErrorOptions, U as UniquenessError, q as UnsupportedPredicateError, a as ValidationError, r as ValidationErrorDetails, V as ValidationIssue, s as VersionConflictError, t as getErrorSuggestion, u as isConstraintError, v as isSystemError, w as isTypeGraphError, x as isUserRecoverable } from './index-Ln_KHTGA.cjs';
11
11
  export { a as MaterializeIndexesEntry, b as MaterializeIndexesOptions, M as MaterializeIndexesResult } from './materialize-indexes-oanE3RU0.cjs';
12
- export { a as andWhere, d as defineEdgeIndex, b as defineNodeIndex, n as notWhere, o as orWhere } from './where-2dsyYt3d.cjs';
12
+ export { a as andWhere, d as defineEdgeIndex, b as defineNodeIndex, n as notWhere, o as orWhere } from './where-bJjuOCeV.cjs';
13
13
  export { GraphExtensionError, GraphExtensionIssue, GraphExtensionIssueCode, GraphExtensionUnresolvedEndpointError, GraphExtensionValidationError, GraphExtensionVersionUnsupportedError, IncompatibleChange, IncompatibleChangeError, KindCollisionError, KindHasReferentsError, KindReferent, RemoveCompileTimeKindError, defineGraphExtension, validateGraphExtension } from './graph-extension/index.cjs';
14
14
  import 'drizzle-orm';
15
15
  import 'drizzle-orm/pg-core';
package/dist/index.d.ts CHANGED
@@ -1,15 +1,15 @@
1
1
  import { z } from 'zod';
2
2
  import { e as KindAnnotations, N as NodeType, d as EdgeType } from './extension-types-CwHV-Uk4.js';
3
3
  export { A as AnyEdgeType, h as CURRENT_GRAPH_EXTENSION_VERSION, f as Cardinality, C as Collation, D as DeleteBehavior, i as EdgeId, j as EdgeProps, E as EdgeRegistration, k as EdgeTypeWithEndpoints, g as EndpointExistence, c as GraphDefaults, G as GraphExtension, l as GraphExtensionVersion, J as JsonValue, L as LEGACY_GRAPH_EXTENSION_VERSION, m as NodeId, n as NodeProps, b as NodeRegistration, T as TemporalMode, o as UniqueConstraint, U as UniquenessScope, p as isEdgeType, q as isEdgeTypeWithEndpoints, r as isNodeType } from './extension-types-CwHV-Uk4.js';
4
- import { K as InferenceType, M as MetaEdge, V as VectorStrategy, G as GraphBackend, O as OntologyRelation, L as AggregateExpr, P as FieldRef, T as ComparisonOp, U as AggregateComparisonPredicate } from './types-CmAT-Z47.js';
5
- export { W as AdoptedTransaction, B as BackendCapabilities, X as CommitSchemaVersionExpected, Y as CommitSchemaVersionParams, Z as DEFAULT_SQL_SCHEMA, _ as DeleteFulltextBatchParams, E as EdgeIndexConfig, c as EdgeIndexDeclaration, q as EdgeIndexDirection, r as EdgeIndexWhereBuilder, $ as FulltextBatchRow, a0 as FulltextCapabilities, a1 as FulltextQueryMode, a2 as FulltextSearchParams, a3 as FulltextSearchResult, F as FulltextStrategy, a4 as HybridFusionOptions, I as IndexDeclaration, s as IndexOrigin, t as IndexScope, e as IndexWhereExpression, u as IndexWhereFieldBuilder, v as IndexWhereInput, J as JsonPointer, a5 as JsonPointerFor, a6 as JsonPointerInput, a7 as JsonPointerSegment, a8 as JsonPointerSegments, a9 as JsonPointerSegmentsFor, aa as MAX_JSON_POINTER_DEPTH, ab as MetaEdgeProperties, N as NodeIndexConfig, d as NodeIndexDeclaration, w as NodeIndexWhereBuilder, ac as OrderSpec, ad as ParameterRef, ae as ResolveJsonPointer, af as ResolveJsonPointerSegments, H as SchemaVersionRow, ag as SetActiveVersionParams, ah as SortDirection, p as SqlDialect, ai as SqlSchema, aj as SqlTableNames, ak as StrategyTableContribution, al as TableContribution, am as TransactionBackend, an as TraversalExpansion, ao as UpsertFulltextBatchParams, ap as VectorCapabilities, aq as VectorSlot, ar as buildVectorCapabilities, as as createSqlSchema, at as fts5Strategy, au as isMetaEdge, av as joinJsonPointers, aw as jsonPointer, ax as normalizeJsonPointer, ay as parseJsonPointer, az as tsvectorStrategy } from './types-CmAT-Z47.js';
6
- import { E as EmbeddingMetric, a as EmbeddingIndexType, A as AliasMap, b as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-De0Y33wP.js';
7
- export { c as AggregateResult, d as AlgorithmCyclePolicy, e as AnyEdge, f as AnyNode, B as BaseTraversalOptions, g as BatchResults, h as BatchableQuery, i as ConstraintNames, j as CreateEdgeInput, k as CreateNodeInput, D as DEFAULT_SEARCHABLE_LANGUAGE, l as DegreeOptions, m as DynamicEdgeAccessor, n as DynamicEdgeCollection, o as DynamicEdgeType, p as DynamicFieldBuilder, q as DynamicNodeAccessor, r as DynamicNodeCollection, s as DynamicNodeType, t as DynamicSelectableEdge, u as DynamicSelectableNode, v as Edge, w as EdgeAccessor, x as EdgeCollection, y as EdgeFindByEndpointsOptions, z as EdgeGetOrCreateByEndpointsOptions, F as EdgeGetOrCreateByEndpointsResult, G as EdgeIntrospection, H as EmbeddingSchema, I as EmbeddingValue, J as ExecutableAggregateQuery, K as ExecutableQuery, L as FieldAccessor, M as FulltextSearchHit, N as FulltextSearchOptions, O as GetOrCreateAction, P as GraphAlgorithms, R as GraphEdgeCollections, U as GraphNodeCollections, V as HookContext, W as HybridFulltextOptions, X as HybridSearchHit, Y as HybridSearchOptions, Z as HybridVectorOptions, _ as IfExistsMode, $ as KindIntrospection, a0 as MaterializeRemovalsEntry, a1 as MaterializeRemovalsOptions, a2 as MaterializeRemovalsResult, a3 as NeighborsOptions, a4 as Node, a5 as NodeAccessor, a6 as NodeAlias, a7 as NodeCollection, a8 as NodeGetOrCreateByConstraintOptions, a9 as NodeGetOrCreateByConstraintResult, aa as NodeIdentifier, ab as NodeRef, ac as OntologyIntrospection, ad as OperationHookContext, ae as PaginateOptions, af as PaginatedResult, ag as PathNode, ah as Predicate, ai as PreparedQuery, aj as PropsAccessor, ak as QueryHookContext, al as QueryOptions, am as ReachableNode, an as ReachableOptions, ao as RebuildFulltextOptions, ap as RebuildFulltextResult, aq as ReclaimedVectorFieldEntry, ar as RecursiveTraversalOptions, as as ReembedFunction, at as ReembedVectorFieldOptions, au as ReembedVectorFieldResult, av as SchemaIntrospection, aw as SearchableMetadata, ax as SearchableOptions, ay as SearchableSchema, az as SelectContext, aA as SelectableEdge, aB as SelectableNode, aC as ShortestPathOptions, aD as ShortestPathResult, S as Store, aE as StoreHooks, aF as StoreOptions, aG as StoreProjection, aH as StoreRef, aI as StoreSearch, aJ as StreamOptions, aK as SubgraphEdgeResult, aL as SubgraphNodeResult, aM as SubgraphOptions, aN as SubgraphResult, aO as SubsetEdge, aP as SubsetNode, aQ as TemporalAlgorithmOptions, aR as TransactionContext, aS as TraversalDirection, aT as TypedEdgeCollection, aU as UnionableQuery, aV as UniqueIntrospection, aW as UpdateEdgeInput, aX as UpdateNodeInput, aY as VectorSearchHit, aZ as VectorSearchOptions, a_ as createStore, a$ as createStoreWithSchema, b0 as createVerifiedStore, b1 as defineSubgraphProject, b2 as embedding, b3 as exists, b4 as fieldRef, b5 as getEmbeddingDimensions, b6 as getSearchableMetadata, b7 as inSubquery, b8 as isEmbeddingSchema, b9 as isParameterRef, ba as isSearchableSchema, bb as notExists, bc as notInSubquery, bd as param, be as searchable } from './store-De0Y33wP.js';
8
- import { G as GraphDef, K as KindRegistry } from './manager-BUugwCYz.js';
9
- export { A as AllEdgeTypes, t as AllNodeTypes, u as EdgeKinds, v as GetEdgeType, w as GetNodeType, x as NodeKinds, c as SchemaManagerOptions, d as SchemaValidationResult, y as defineGraph, z as getEdgeKinds, B as getNodeKinds, F as isGraphDef } from './manager-BUugwCYz.js';
10
- export { B as BackendDisposedError, C as CardinalityError, b as CompilerInvariantError, c as ConfigurationError, D as DatabaseOperationError, d as DisjointError, E as EagerMaterializationError, e as EdgeNotFoundError, f as EmbeddingDimensionChangedError, g as EndpointError, h as EndpointNotFoundError, i as ErrorCategory, K as KindNotFoundError, M as MigrationError, N as NodeConstraintNotFoundError, j as NodeNotFoundError, R as RestrictedDeleteError, S as SchemaContentConflictError, k as SchemaMismatchError, l as StaleVersionError, m as StoreNotInitializedError, n as StoreNotInitializedReason, T as TypeGraphError, o as TypeGraphErrorOptions, U as UniquenessError, p as UnsupportedPredicateError, a as ValidationError, q as ValidationErrorDetails, V as ValidationIssue, r as VersionConflictError, s as getErrorSuggestion, t as isConstraintError, u as isSystemError, v as isTypeGraphError, w as isUserRecoverable } from './index-CapHwi1a.js';
4
+ import { K as InferenceType, M as MetaEdge, V as VectorStrategy, G as GraphBackend, O as OntologyRelation, L as AggregateExpr, P as FieldRef, T as ComparisonOp, U as AggregateComparisonPredicate } from './types-BBiDqJCU.js';
5
+ export { W as AdoptedTransaction, B as BackendCapabilities, X as CommitSchemaVersionExpected, Y as CommitSchemaVersionParams, Z as DEFAULT_SQL_SCHEMA, _ as DeleteFulltextBatchParams, E as EdgeIndexConfig, c as EdgeIndexDeclaration, q as EdgeIndexDirection, r as EdgeIndexWhereBuilder, $ as FulltextBatchRow, a0 as FulltextCapabilities, a1 as FulltextQueryMode, a2 as FulltextSearchParams, a3 as FulltextSearchResult, F as FulltextStrategy, a4 as HybridFusionOptions, I as IndexDeclaration, s as IndexOrigin, t as IndexScope, e as IndexWhereExpression, u as IndexWhereFieldBuilder, v as IndexWhereInput, J as JsonPointer, a5 as JsonPointerFor, a6 as JsonPointerInput, a7 as JsonPointerSegment, a8 as JsonPointerSegments, a9 as JsonPointerSegmentsFor, aa as MAX_JSON_POINTER_DEPTH, ab as MetaEdgeProperties, N as NodeIndexConfig, d as NodeIndexDeclaration, w as NodeIndexWhereBuilder, ac as OrderSpec, ad as ParameterRef, ae as ResolveJsonPointer, af as ResolveJsonPointerSegments, H as SchemaVersionRow, ag as SetActiveVersionParams, ah as SortDirection, p as SqlDialect, ai as SqlSchema, aj as SqlTableNames, ak as StrategyTableContribution, al as TableContribution, am as TransactionBackend, an as TraversalExpansion, ao as UpsertFulltextBatchParams, ap as VectorCapabilities, aq as VectorSlot, ar as buildVectorCapabilities, as as createSqlSchema, at as fts5Strategy, au as isMetaEdge, av as joinJsonPointers, aw as jsonPointer, ax as normalizeJsonPointer, ay as parseJsonPointer, az as tsvectorStrategy } from './types-BBiDqJCU.js';
6
+ import { E as EmbeddingMetric, a as EmbeddingIndexType, A as AliasMap, b as EdgeAliasMap, Q as QueryBuilder, T as TraversalBuilder, C as CreateQueryBuilderOptions } from './store-CNKM334w.js';
7
+ export { c as AggregateResult, d as AlgorithmCyclePolicy, e as AnyEdge, f as AnyNode, B as BaseTraversalOptions, g as BatchResults, h as BatchableQuery, i as ConstraintNames, j as CreateEdgeInput, k as CreateNodeInput, D as DEFAULT_SEARCHABLE_LANGUAGE, l as DegreeOptions, m as DynamicEdgeAccessor, n as DynamicEdgeCollection, o as DynamicEdgeType, p as DynamicFieldBuilder, q as DynamicNodeAccessor, r as DynamicNodeCollection, s as DynamicNodeType, t as DynamicSelectableEdge, u as DynamicSelectableNode, v as Edge, w as EdgeAccessor, x as EdgeCollection, y as EdgeFindByEndpointsOptions, z as EdgeGetOrCreateByEndpointsOptions, F as EdgeGetOrCreateByEndpointsResult, G as EdgeIntrospection, H as EmbeddingSchema, I as EmbeddingValue, J as ExecutableAggregateQuery, K as ExecutableQuery, L as FieldAccessor, M as FulltextSearchHit, N as FulltextSearchOptions, O as GetOrCreateAction, P as GraphAlgorithms, R as GraphEdgeCollections, U as GraphNodeCollections, V as HookContext, W as HybridFulltextOptions, X as HybridSearchHit, Y as HybridSearchOptions, Z as HybridVectorOptions, _ as IfExistsMode, $ as KindIntrospection, a0 as MaterializeRemovalsEntry, a1 as MaterializeRemovalsOptions, a2 as MaterializeRemovalsResult, a3 as NeighborsOptions, a4 as Node, a5 as NodeAccessor, a6 as NodeAlias, a7 as NodeBulkFindByIndexOptions, a8 as NodeCollection, a9 as NodeGetOrCreateByConstraintOptions, aa as NodeGetOrCreateByConstraintResult, ab as NodeIdentifier, ac as NodeRef, ad as OntologyIntrospection, ae as OperationHookContext, af as PaginateOptions, ag as PaginatedResult, ah as PathNode, ai as Predicate, aj as PreparedQuery, ak as PropsAccessor, al as QueryHookContext, am as QueryOptions, an as ReachableNode, ao as ReachableOptions, ap as RebuildFulltextOptions, aq as RebuildFulltextResult, ar as ReclaimedVectorFieldEntry, as as RecursiveTraversalOptions, at as ReembedFunction, au as ReembedVectorFieldOptions, av as ReembedVectorFieldResult, aw as SchemaIntrospection, ax as SearchableMetadata, ay as SearchableOptions, az as SearchableSchema, aA as SelectContext, aB as SelectableEdge, aC as SelectableNode, aD as ShortestPathOptions, aE as ShortestPathResult, S as Store, aF as StoreHooks, aG as StoreOptions, aH as StoreProjection, aI as StoreRef, aJ as StoreSearch, aK as StreamOptions, aL as SubgraphEdgeResult, aM as SubgraphNodeResult, aN as SubgraphOptions, aO as SubgraphResult, aP as SubsetEdge, aQ as SubsetNode, aR as TemporalAlgorithmOptions, aS as TransactionContext, aT as TraversalDirection, aU as TypedEdgeCollection, aV as UnionableQuery, aW as UniqueIntrospection, aX as UpdateEdgeInput, aY as UpdateNodeInput, aZ as VectorSearchHit, a_ as VectorSearchOptions, a$ as createStore, b0 as createStoreWithSchema, b1 as createVerifiedStore, b2 as defineSubgraphProject, b3 as embedding, b4 as exists, b5 as fieldRef, b6 as getEmbeddingDimensions, b7 as getSearchableMetadata, b8 as inSubquery, b9 as isEmbeddingSchema, ba as isParameterRef, bb as isSearchableSchema, bc as notExists, bd as notInSubquery, be as param, bf as searchable } from './store-CNKM334w.js';
8
+ import { G as GraphDef, K as KindRegistry } from './manager-BbdyNhkv.js';
9
+ export { A as AllEdgeTypes, t as AllNodeTypes, u as EdgeKinds, v as GetEdgeType, w as GetNodeType, x as NodeKinds, c as SchemaManagerOptions, d as SchemaValidationResult, y as defineGraph, z as getEdgeKinds, B as getNodeKinds, F as isGraphDef } from './manager-BbdyNhkv.js';
10
+ export { B as BackendDisposedError, C as CardinalityError, b as CompilerInvariantError, c as ConfigurationError, D as DatabaseOperationError, d as DisjointError, E as EagerMaterializationError, e as EdgeNotFoundError, f as EmbeddingDimensionChangedError, g as EndpointError, h as EndpointNotFoundError, i as ErrorCategory, K as KindNotFoundError, M as MigrationError, N as NodeConstraintNotFoundError, j as NodeIndexNotFoundError, k as NodeNotFoundError, R as RestrictedDeleteError, S as SchemaContentConflictError, l as SchemaMismatchError, m as StaleVersionError, n as StoreNotInitializedError, o as StoreNotInitializedReason, T as TypeGraphError, p as TypeGraphErrorOptions, U as UniquenessError, q as UnsupportedPredicateError, a as ValidationError, r as ValidationErrorDetails, V as ValidationIssue, s as VersionConflictError, t as getErrorSuggestion, u as isConstraintError, v as isSystemError, w as isTypeGraphError, x as isUserRecoverable } from './index-DzeIiMO3.js';
11
11
  export { a as MaterializeIndexesEntry, b as MaterializeIndexesOptions, M as MaterializeIndexesResult } from './materialize-indexes-lkawaDor.js';
12
- export { a as andWhere, d as defineEdgeIndex, b as defineNodeIndex, n as notWhere, o as orWhere } from './where-CP4qGIHd.js';
12
+ export { a as andWhere, d as defineEdgeIndex, b as defineNodeIndex, n as notWhere, o as orWhere } from './where-CAo6wsBZ.js';
13
13
  export { GraphExtensionError, GraphExtensionIssue, GraphExtensionIssueCode, GraphExtensionUnresolvedEndpointError, GraphExtensionValidationError, GraphExtensionVersionUnsupportedError, IncompatibleChange, IncompatibleChangeError, KindCollisionError, KindHasReferentsError, KindReferent, RemoveCompileTimeKindError, defineGraphExtension, validateGraphExtension } from './graph-extension/index.js';
14
14
  import 'drizzle-orm';
15
15
  import 'drizzle-orm/pg-core';
package/dist/index.js CHANGED
@@ -1,28 +1,28 @@
1
- export { libsqlVectorStrategy } from './chunk-CUZGBWFT.js';
2
- import { quoteIdentifier, EMPTY_REQUIRED_COLUMNS, addRequiredColumn, markSelectiveFieldAsRequired, markFieldRefAsRequired, NODE_COLUMNS, shouldProjectColumn, mapSelectiveSystemFieldToColumn, isIdFieldRef, isAggregateExpr, EDGE_COLUMNS } from './chunk-IE2TPFBT.js';
3
- export { pgvectorStrategy } from './chunk-IE2TPFBT.js';
4
- import { META_EDGE_BRAND, loadAndMergeGraphExtensionDocument, ensureSchema, loadAndVerifyGraph, mergeGraphExtension, commitNewSchemaVersion, applyDeprecatedKinds, loadActiveSchemaWithBootstrap, parseSerializedSchema, computeClosuresFromOntology, createEmptyClosures, KindRegistry, extensionKindNames, serializeSchemaProperties, buildGraphExtensionOntologyKeySet, compileTimeOntologyKey, getTypeName, validateNodeProps, validateEdgeProps } from './chunk-MRMD7S7E.js';
5
- export { broader, core, defineEdge, defineNode, differentFrom, disjointWith, equivalentTo, hasPart, implies, inverseOf, isMetaEdge, narrower, partOf, relatedTo, sameAs, subClassOf } from './chunk-MRMD7S7E.js';
6
- import { nowIso, isKnownKind, validateOptionalIsoDate, getNodeKinds, getEdgeKinds } from './chunk-Z36W5WUM.js';
7
- export { defineGraph, getEdgeKinds, getNodeKinds, isEdgeType, isEdgeTypeWithEndpoints, isGraphDef, isNodeType } from './chunk-Z36W5WUM.js';
8
- export { defineGraphExtension } from './chunk-BMDF2S7S.js';
9
- import { IncompatibleChangeError, filterReservedKeys, RESERVED_NODE_KEYS, RESERVED_EDGE_KEYS, RemoveCompileTimeKindError, KindHasReferentsError, validateProjectionField } from './chunk-SFNUHFON.js';
10
- export { CURRENT_GRAPH_EXTENSION_VERSION, GraphExtensionError, GraphExtensionUnresolvedEndpointError, GraphExtensionValidationError, GraphExtensionVersionUnsupportedError, IncompatibleChangeError, KindCollisionError, KindHasReferentsError, LEGACY_GRAPH_EXTENSION_VERSION, RemoveCompileTimeKindError, computeTransitiveClosure, invertClosure, isReachable, validateGraphExtension } from './chunk-SFNUHFON.js';
11
- export { sqliteVecStrategy } from './chunk-GPUNAJFH.js';
12
- import { LEGACY_EMBEDDINGS_TABLE_NAME, runOptionallyInTransaction } from './chunk-HKN622O4.js';
1
+ export { libsqlVectorStrategy } from './chunk-3IRMLJEK.js';
2
+ import { quoteIdentifier, EMPTY_REQUIRED_COLUMNS, addRequiredColumn, markSelectiveFieldAsRequired, markFieldRefAsRequired, NODE_COLUMNS, shouldProjectColumn, mapSelectiveSystemFieldToColumn, isIdFieldRef, isAggregateExpr, EDGE_COLUMNS } from './chunk-FVIGJTS7.js';
3
+ export { pgvectorStrategy } from './chunk-FVIGJTS7.js';
4
+ import { META_EDGE_BRAND, loadAndMergeGraphExtensionDocument, ensureSchema, loadAndVerifyGraph, mergeGraphExtension, commitNewSchemaVersion, applyDeprecatedKinds, loadActiveSchemaWithBootstrap, parseSerializedSchema, computeClosuresFromOntology, createEmptyClosures, KindRegistry, extensionKindNames, serializeSchemaProperties, buildGraphExtensionOntologyKeySet, compileTimeOntologyKey, getTypeName, validateNodeProps, validateEdgeProps } from './chunk-3JLRHQ67.js';
5
+ export { broader, core, defineEdge, defineNode, differentFrom, disjointWith, equivalentTo, hasPart, implies, inverseOf, isMetaEdge, narrower, partOf, relatedTo, sameAs, subClassOf } from './chunk-3JLRHQ67.js';
6
+ import { nowIso, isKnownKind, validateOptionalIsoDate, getNodeKinds, getEdgeKinds } from './chunk-MAQJYNJR.js';
7
+ export { defineGraph, getEdgeKinds, getNodeKinds, isEdgeType, isEdgeTypeWithEndpoints, isGraphDef, isNodeType } from './chunk-MAQJYNJR.js';
8
+ export { defineGraphExtension } from './chunk-IX7RE7CG.js';
9
+ import { IncompatibleChangeError, filterReservedKeys, RESERVED_NODE_KEYS, RESERVED_EDGE_KEYS, RemoveCompileTimeKindError, KindHasReferentsError, validateProjectionField } from './chunk-ENDUY2CD.js';
10
+ export { CURRENT_GRAPH_EXTENSION_VERSION, GraphExtensionError, GraphExtensionUnresolvedEndpointError, GraphExtensionValidationError, GraphExtensionVersionUnsupportedError, IncompatibleChangeError, KindCollisionError, KindHasReferentsError, LEGACY_GRAPH_EXTENSION_VERSION, RemoveCompileTimeKindError, computeTransitiveClosure, invertClosure, isReachable, validateGraphExtension } from './chunk-ENDUY2CD.js';
11
+ export { sqliteVecStrategy } from './chunk-2QA5EHEN.js';
12
+ import { LEGACY_EMBEDDINGS_TABLE_NAME, runOptionallyInTransaction } from './chunk-633N7DSE.js';
13
13
  import { isMissingTableError, sortedReplacer, canonicalEqual } from './chunk-M6OC455F.js';
14
- import { quotedTableName, getDialect, assertVectorMinScore, generateIndexDDL, vectorScoreExpression, vectorMinScoreCondition } from './chunk-7KLVFWXR.js';
15
- export { andWhere, buildVectorCapabilities, fts5Strategy, notWhere, orWhere, tsvectorStrategy } from './chunk-7KLVFWXR.js';
16
- import { MAX_PG_IDENTIFIER_LENGTH, DEFAULT_PAGINATION_LIMIT, DEFAULT_STREAM_BATCH_SIZE, NODE_META_KEYS, EDGE_META_KEYS, sha256Hex, SQLITE_PATH_DELIMITER, PG_ARRAY_START, PG_ARRAY_END, PG_PATH_ELEMENT_SEPARATOR, fnv1aBase36 } from './chunk-OGUH56BB.js';
17
- export { defineEdgeIndex, defineNodeIndex } from './chunk-OGUH56BB.js';
18
- import { createSchemaIntrospector, resolveFieldTypeInfoAtJsonPointer, getSearchableMetadata, DEFAULT_SEARCHABLE_LANGUAGE } from './chunk-N3VVQDMA.js';
19
- export { DEFAULT_SEARCHABLE_LANGUAGE, getSearchableMetadata, isSearchableSchema, searchable } from './chunk-N3VVQDMA.js';
14
+ import { quotedTableName, getDialect, assertVectorMinScore, compileNodeIndexFieldKeys, compileIndexWhere, generateIndexDDL, vectorScoreExpression, vectorMinScoreCondition } from './chunk-AI3RNREM.js';
15
+ export { andWhere, buildVectorCapabilities, fts5Strategy, notWhere, orWhere, tsvectorStrategy } from './chunk-AI3RNREM.js';
16
+ import { MAX_PG_IDENTIFIER_LENGTH, DEFAULT_PAGINATION_LIMIT, DEFAULT_STREAM_BATCH_SIZE, NODE_META_KEYS, EDGE_META_KEYS, sha256Hex, SQLITE_PATH_DELIMITER, PG_ARRAY_START, PG_ARRAY_END, PG_PATH_ELEMENT_SEPARATOR, fnv1aBase36 } from './chunk-R4JOBEJU.js';
17
+ export { defineEdgeIndex, defineNodeIndex } from './chunk-R4JOBEJU.js';
18
+ import { createSchemaIntrospector, resolveFieldTypeInfoAtJsonPointer, getSearchableMetadata, DEFAULT_SEARCHABLE_LANGUAGE } from './chunk-MXE2U3EX.js';
19
+ export { DEFAULT_SEARCHABLE_LANGUAGE, getSearchableMetadata, isSearchableSchema, searchable } from './chunk-MXE2U3EX.js';
20
20
  import { DEFAULT_EMBEDDING_INDEX_TYPE, DEFAULT_EMBEDDING_METRIC, resolveEmbeddingFields } from './chunk-454I6GDF.js';
21
21
  export { embedding, getEmbeddingDimensions, isEmbeddingSchema } from './chunk-454I6GDF.js';
22
- import { ConfigurationError, EmbeddingDimensionChangedError, UnsupportedPredicateError, ValidationError, KindNotFoundError, EndpointError, EagerMaterializationError, CompilerInvariantError, DatabaseOperationError, EdgeNotFoundError, NodeConstraintNotFoundError, RestrictedDeleteError, NodeNotFoundError, EndpointNotFoundError, UniquenessError, CardinalityError, DisjointError } from './chunk-MB363HT5.js';
23
- export { BackendDisposedError, CardinalityError, CompilerInvariantError, ConfigurationError, DatabaseOperationError, DisjointError, EagerMaterializationError, EdgeNotFoundError, EmbeddingDimensionChangedError, EndpointError, EndpointNotFoundError, KindNotFoundError, MigrationError, NodeConstraintNotFoundError, NodeNotFoundError, RestrictedDeleteError, SchemaContentConflictError, SchemaMismatchError, StaleVersionError, StoreNotInitializedError, TypeGraphError, UniquenessError, UnsupportedPredicateError, ValidationError, VersionConflictError, getErrorSuggestion, isConstraintError, isSystemError, isTypeGraphError, isUserRecoverable } from './chunk-MB363HT5.js';
24
- import { jsonPointer, parseJsonPointer, normalizeJsonPointer, joinJsonPointers } from './chunk-NZ5PMBTG.js';
25
- export { MAX_JSON_POINTER_DEPTH, joinJsonPointers, jsonPointer, normalizeJsonPointer, parseJsonPointer } from './chunk-NZ5PMBTG.js';
22
+ import { ConfigurationError, EmbeddingDimensionChangedError, UnsupportedPredicateError, ValidationError, KindNotFoundError, EndpointError, EagerMaterializationError, CompilerInvariantError, DatabaseOperationError, EdgeNotFoundError, NodeIndexNotFoundError, NodeConstraintNotFoundError, RestrictedDeleteError, NodeNotFoundError, EndpointNotFoundError, UniquenessError, CardinalityError, DisjointError } from './chunk-TQOYM4LN.js';
23
+ export { BackendDisposedError, CardinalityError, CompilerInvariantError, ConfigurationError, DatabaseOperationError, DisjointError, EagerMaterializationError, EdgeNotFoundError, EmbeddingDimensionChangedError, EndpointError, EndpointNotFoundError, KindNotFoundError, MigrationError, NodeConstraintNotFoundError, NodeIndexNotFoundError, NodeNotFoundError, RestrictedDeleteError, SchemaContentConflictError, SchemaMismatchError, StaleVersionError, StoreNotInitializedError, TypeGraphError, UniquenessError, UnsupportedPredicateError, ValidationError, VersionConflictError, getErrorSuggestion, isConstraintError, isSystemError, isTypeGraphError, isUserRecoverable } from './chunk-TQOYM4LN.js';
24
+ import { jsonPointer, parseJsonPointer, resolveJsonPointer, normalizeJsonPointer, joinJsonPointers } from './chunk-K5P5OZXS.js';
25
+ export { MAX_JSON_POINTER_DEPTH, joinJsonPointers, jsonPointer, normalizeJsonPointer, parseJsonPointer } from './chunk-K5P5OZXS.js';
26
26
  import { z } from 'zod';
27
27
  import { sql, Placeholder } from 'drizzle-orm';
28
28
  import { nanoid } from 'nanoid';
@@ -5201,6 +5201,7 @@ function compileQuery(ast, graphId, options = "sqlite") {
5201
5201
  schema,
5202
5202
  compileQuery: (subAst, subGraphId) => compileQuery(subAst, subGraphId, propagateOptions(options_)),
5203
5203
  ...options_.vectorStrategy === void 0 ? {} : { vectorStrategy: options_.vectorStrategy },
5204
+ windowFunctions: options_.windowFunctions ?? true,
5204
5205
  ...options_.vectorSlots === void 0 ? {} : { vectorSlots: options_.vectorSlots }
5205
5206
  };
5206
5207
  if (hasVariableLengthTraversal(ast)) {
@@ -5258,6 +5259,7 @@ function propagateOptions(options_) {
5258
5259
  ...options_.schema === void 0 ? {} : { schema: options_.schema },
5259
5260
  ...options_.fulltextStrategy === void 0 ? {} : { fulltextStrategy: options_.fulltextStrategy },
5260
5261
  ...options_.vectorStrategy === void 0 ? {} : { vectorStrategy: options_.vectorStrategy },
5262
+ windowFunctions: options_.windowFunctions ?? true,
5261
5263
  ...options_.vectorSlots === void 0 ? {} : { vectorSlots: options_.vectorSlots }
5262
5264
  };
5263
5265
  }
@@ -5538,6 +5540,27 @@ function selectStandardOrderBy(input) {
5538
5540
  dialect
5539
5541
  });
5540
5542
  }
5543
+ function selectWindowFunctionOperation(vectorPredicate, fulltextPredicate) {
5544
+ if (vectorPredicate !== void 0 && fulltextPredicate !== void 0) {
5545
+ return "hybrid relevance ranking";
5546
+ }
5547
+ if (vectorPredicate !== void 0) return "vector relevance ranking";
5548
+ return "fulltext relevance ranking";
5549
+ }
5550
+ function assertWindowFunctionsSupported(ctx, operation) {
5551
+ if (ctx.windowFunctions) return;
5552
+ throw new ConfigurationError(
5553
+ `${operation} requires SQL window functions, but this backend profile declares windowFunctions: false.`,
5554
+ {
5555
+ capability: "windowFunctions",
5556
+ operation,
5557
+ windowFunctions: false
5558
+ },
5559
+ {
5560
+ suggestion: "Use a backend profile that supports SQL window functions, or avoid this query shape."
5561
+ }
5562
+ );
5563
+ }
5541
5564
  function compileStandardQueryWithCteStrategy(ast, graphId, ctx) {
5542
5565
  const { dialect } = ctx;
5543
5566
  const {
@@ -5565,6 +5588,12 @@ function compileStandardQueryWithCteStrategy(ast, graphId, ctx) {
5565
5588
  { phase: "standard-pass-pipeline" }
5566
5589
  );
5567
5590
  }
5591
+ if (vectorPredicate !== void 0 || fulltextPredicate !== void 0) {
5592
+ assertWindowFunctionsSupported(
5593
+ ctx,
5594
+ selectWindowFunctionOperation(vectorPredicate, fulltextPredicate)
5595
+ );
5596
+ }
5568
5597
  if (!vectorPredicate && !fulltextPredicate) {
5569
5598
  const fastPathSql = compileCountAggregateFastPath(
5570
5599
  ast,
@@ -5776,12 +5805,7 @@ function extractCursorValue(row, spec) {
5776
5805
  current = record[segment];
5777
5806
  }
5778
5807
  if (jsonPointer2) {
5779
- const segments = parseJsonPointer(jsonPointer2);
5780
- for (const segment of segments) {
5781
- if (current === null || current === void 0) return void 0;
5782
- if (typeof current !== "object") return void 0;
5783
- current = current[segment];
5784
- }
5808
+ return resolveJsonPointer(current, jsonPointer2);
5785
5809
  }
5786
5810
  return current;
5787
5811
  }
@@ -6853,6 +6877,7 @@ function buildCompileOptions(config) {
6853
6877
  return {
6854
6878
  dialect: config.dialect ?? "sqlite",
6855
6879
  schema: config.schema,
6880
+ windowFunctions: config.backend?.capabilities.windowFunctions ?? true,
6856
6881
  ...fulltextStrategy === void 0 ? {} : { fulltextStrategy },
6857
6882
  ...vectorStrategy === void 0 ? {} : { vectorStrategy, vectorSlots: buildVectorSlots(config.registry) }
6858
6883
  };
@@ -10493,6 +10518,27 @@ function createEdgeCollection(config) {
10493
10518
  };
10494
10519
  }
10495
10520
 
10521
+ // src/store/node-fetch.ts
10522
+ async function getNodeRowsByIds(backend, graphId, kind, ids) {
10523
+ const rowsById = /* @__PURE__ */ new Map();
10524
+ if (ids.length === 0) return rowsById;
10525
+ if (backend.getNodes !== void 0) {
10526
+ const rows2 = await backend.getNodes(graphId, kind, ids);
10527
+ for (const row of rows2) {
10528
+ rowsById.set(row.id, row);
10529
+ }
10530
+ return rowsById;
10531
+ }
10532
+ const uniqueIds = [...new Set(ids)];
10533
+ const rows = await Promise.all(
10534
+ uniqueIds.map((id) => backend.getNode(graphId, kind, id))
10535
+ );
10536
+ for (const row of rows) {
10537
+ if (row !== void 0) rowsById.set(row.id, row);
10538
+ }
10539
+ return rowsById;
10540
+ }
10541
+
10496
10542
  // src/store/collections/node-collection.ts
10497
10543
  function narrowNode(node) {
10498
10544
  return node;
@@ -10534,7 +10580,8 @@ function createNodeCollection(config) {
10534
10580
  executeGetOrCreateByConstraint,
10535
10581
  executeBulkGetOrCreateByConstraint,
10536
10582
  executeFindByConstraint,
10537
- executeBulkFindByConstraint
10583
+ executeBulkFindByConstraint,
10584
+ executeBulkFindByIndex
10538
10585
  } = config;
10539
10586
  return {
10540
10587
  async create(props, options) {
@@ -10555,27 +10602,13 @@ function createNodeCollection(config) {
10555
10602
  },
10556
10603
  async getByIds(ids, options) {
10557
10604
  if (ids.length === 0) return [];
10558
- if (backend.getNodes !== void 0) {
10559
- const rows = await backend.getNodes(graphId, kind, ids);
10560
- const rowMap = /* @__PURE__ */ new Map();
10561
- for (const row of rows) {
10562
- rowMap.set(row.id, row);
10563
- }
10564
- return ids.map((id) => {
10565
- const row = rowMap.get(id);
10566
- if (!row) return;
10567
- if (!matchesTemporalMode(row, options)) return;
10568
- return narrowNode(rowToNode2(row));
10569
- });
10570
- }
10571
- return Promise.all(
10572
- ids.map(async (id) => {
10573
- const row = await backend.getNode(graphId, kind, id);
10574
- if (!row) return;
10575
- if (!matchesTemporalMode(row, options)) return;
10576
- return narrowNode(rowToNode2(row));
10577
- })
10578
- );
10605
+ const rowsById = await getNodeRowsByIds(backend, graphId, kind, ids);
10606
+ return ids.map((id) => {
10607
+ const row = rowsById.get(id);
10608
+ if (!row) return;
10609
+ if (!matchesTemporalMode(row, options)) return;
10610
+ return narrowNode(rowToNode2(row));
10611
+ });
10579
10612
  },
10580
10613
  async update(id, props, options) {
10581
10614
  const result = await executeNodeUpdate2(
@@ -10772,6 +10805,20 @@ function createNodeCollection(config) {
10772
10805
  (result) => result === void 0 ? void 0 : narrowNode(result)
10773
10806
  );
10774
10807
  },
10808
+ async bulkFindByIndex(indexName, items, options) {
10809
+ if (items.length === 0) return [];
10810
+ const mappedItems = items.map((item) => ({
10811
+ props: item.props
10812
+ }));
10813
+ const results = await executeBulkFindByIndex(
10814
+ kind,
10815
+ indexName,
10816
+ mappedItems,
10817
+ backend,
10818
+ options
10819
+ );
10820
+ return results.map((bucket) => narrowNodes(bucket));
10821
+ },
10775
10822
  async getOrCreateByConstraint(constraintName, props, options) {
10776
10823
  const execute = async (target) => {
10777
10824
  const result = await executeGetOrCreateByConstraint(
@@ -13512,6 +13559,212 @@ async function executeNodeBulkFindByConstraint(ctx, kind, constraintName, items,
13512
13559
  }
13513
13560
  return results;
13514
13561
  }
13562
+ function resolveNodeIndex(graph, kind, indexName) {
13563
+ getNodeRegistration(graph, kind);
13564
+ const declaration = graph.indexes?.find(
13565
+ (candidate) => candidate.entity === "node" && candidate.kind === kind && candidate.name === indexName
13566
+ );
13567
+ if (declaration?.entity !== "node") {
13568
+ throw new NodeIndexNotFoundError(indexName, kind);
13569
+ }
13570
+ return declaration;
13571
+ }
13572
+ var INDEX_PROBE_EXPECTED_TYPEOF = {
13573
+ string: "string",
13574
+ number: "number",
13575
+ boolean: "boolean"
13576
+ };
13577
+ function validateIndexProbeValue(value, valueType, pointer, kind) {
13578
+ if (value === void 0 || value === null) return;
13579
+ if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean" && !(value instanceof Date)) {
13580
+ throw indexProbeTypeError(
13581
+ pointer,
13582
+ kind,
13583
+ "a scalar (string, number, boolean, or Date)",
13584
+ value
13585
+ );
13586
+ }
13587
+ if (valueType === "date") {
13588
+ if (value instanceof Date || typeof value === "string") return;
13589
+ throw indexProbeTypeError(
13590
+ pointer,
13591
+ kind,
13592
+ "date (Date or ISO string)",
13593
+ value
13594
+ );
13595
+ }
13596
+ const expected = INDEX_PROBE_EXPECTED_TYPEOF[valueType ?? "unknown"];
13597
+ if (expected === void 0) return;
13598
+ if (typeof value !== expected) {
13599
+ throw indexProbeTypeError(pointer, kind, expected, value);
13600
+ }
13601
+ }
13602
+ function indexProbeTypeError(pointer, kind, expected, value) {
13603
+ return new ValidationError(
13604
+ `Index probe value for "${pointer}" on node kind "${kind}" has an incompatible type`,
13605
+ {
13606
+ entityType: "node",
13607
+ kind,
13608
+ issues: [
13609
+ {
13610
+ path: pointer,
13611
+ message: `Expected ${expected}, received ${typeof value}`,
13612
+ code: "invalid_type"
13613
+ }
13614
+ ]
13615
+ }
13616
+ );
13617
+ }
13618
+ function coerceIndexProbeBind(value, adapter) {
13619
+ return adapter.bindValue(normalizeProbeScalar(value));
13620
+ }
13621
+ function normalizeProbeScalar(value) {
13622
+ return value instanceof Date ? value.toISOString() : value;
13623
+ }
13624
+ var PROBE_NULL_TAG = 0;
13625
+ var PROBE_VALUE_TAG = 1;
13626
+ function canonicalIndexProbeKey(probe) {
13627
+ return JSON.stringify(
13628
+ probe.map(
13629
+ (value) => value === void 0 || value === null ? [PROBE_NULL_TAG] : [PROBE_VALUE_TAG, normalizeProbeScalar(value)]
13630
+ )
13631
+ );
13632
+ }
13633
+ async function executeNodeBulkFindByIndex(ctx, kind, indexName, items, backend, options) {
13634
+ if (items.length === 0) return [];
13635
+ const index = resolveNodeIndex(ctx.graph, kind, indexName);
13636
+ if (index.fieldValueTypes.includes("date")) {
13637
+ throw new ConfigurationError(
13638
+ `bulkFindByIndex does not support date-typed key fields on index "${indexName}" (node kind "${kind}")`,
13639
+ { indexName, kind },
13640
+ {
13641
+ suggestion: "Date index keys compare differently across SQLite and PostgreSQL. Use a string-encoded key field, or query date predicates via store.query(...).where(...)."
13642
+ }
13643
+ );
13644
+ }
13645
+ const limitPerInput = options?.limitPerInput;
13646
+ if (limitPerInput !== void 0 && (!Number.isInteger(limitPerInput) || limitPerInput <= 0)) {
13647
+ throw new ValidationError(
13648
+ "bulkFindByIndex limitPerInput must be a positive integer",
13649
+ {
13650
+ entityType: "node",
13651
+ kind,
13652
+ issues: [
13653
+ {
13654
+ path: "limitPerInput",
13655
+ message: `Expected a positive integer, received ${String(limitPerInput)}`,
13656
+ code: "invalid_value"
13657
+ }
13658
+ ]
13659
+ }
13660
+ );
13661
+ }
13662
+ const adapter = getDialect(backend.dialect);
13663
+ const probes = items.map(
13664
+ (item) => index.fields.map((pointer, position) => {
13665
+ const value = resolveJsonPointer(item.props, pointer);
13666
+ validateIndexProbeValue(
13667
+ value,
13668
+ index.fieldValueTypes[position],
13669
+ pointer,
13670
+ kind
13671
+ );
13672
+ return value;
13673
+ })
13674
+ );
13675
+ const groupByKey = /* @__PURE__ */ new Map();
13676
+ const groupProbes = [];
13677
+ const groupToInputs = [];
13678
+ for (const [inputIndex, probe] of probes.entries()) {
13679
+ const key = canonicalIndexProbeKey(probe);
13680
+ const existing = groupByKey.get(key);
13681
+ if (existing === void 0) {
13682
+ groupByKey.set(key, groupProbes.length);
13683
+ groupProbes.push(probe);
13684
+ groupToInputs.push([inputIndex]);
13685
+ continue;
13686
+ }
13687
+ groupToInputs[existing]?.push(inputIndex);
13688
+ }
13689
+ const schema = backend.tableNames ? createSqlSchema(backend.tableNames) : DEFAULT_SQL_SCHEMA;
13690
+ const compileContext = {
13691
+ dialect: backend.dialect,
13692
+ propsColumn: sql.raw(`"props"`),
13693
+ systemColumn: (column) => sql.raw(`"${column}"`)
13694
+ };
13695
+ const fieldKeys = compileNodeIndexFieldKeys(index, compileContext);
13696
+ const groupPredicates = groupProbes.map(
13697
+ (probe) => sql`(${sql.join(
13698
+ fieldKeys.map((fieldKey, position) => {
13699
+ const value = probe[position];
13700
+ if (value === void 0 || value === null) {
13701
+ return sql`${fieldKey} IS NULL`;
13702
+ }
13703
+ return adapter.nullSafeEquals(
13704
+ fieldKey,
13705
+ sql`${coerceIndexProbeBind(value, adapter)}`
13706
+ );
13707
+ }),
13708
+ sql` AND `
13709
+ )})`
13710
+ );
13711
+ const caseBranches = groupPredicates.map(
13712
+ (predicate2, group) => sql`WHEN ${predicate2} THEN ${sql.raw(String(group))}`
13713
+ );
13714
+ const probeIndexExpr = sql`CASE ${sql.join(caseBranches, sql` `)} ELSE NULL END`;
13715
+ const conditions = [
13716
+ sql`"graph_id" = ${ctx.graphId}`,
13717
+ sql`"kind" = ${kind}`,
13718
+ sql`"deleted_at" IS NULL`
13719
+ ];
13720
+ if (index.where !== void 0) {
13721
+ conditions.push(compileIndexWhere(compileContext, index.where));
13722
+ }
13723
+ conditions.push(sql`(${sql.join(groupPredicates, sql` OR `)})`);
13724
+ const whereClause = sql.join(conditions, sql` AND `);
13725
+ const probedSelect = sql`SELECT "id", ${probeIndexExpr} AS probe_idx FROM ${schema.nodesTable} WHERE ${whereClause}`;
13726
+ const capInSql = limitPerInput !== void 0 && backend.capabilities.windowFunctions;
13727
+ const query = capInSql ? sql`SELECT "id", probe_idx FROM (SELECT "id", probe_idx, ROW_NUMBER() OVER (PARTITION BY probe_idx ORDER BY "id") AS probe_rank FROM (${probedSelect}) AS probed) AS ranked WHERE probe_rank <= ${limitPerInput} ORDER BY probe_idx, "id"` : sql`${probedSelect} ORDER BY probe_idx, "id"`;
13728
+ const rawMatches = await backend.execute(query);
13729
+ const matches = limitPerInput !== void 0 && !capInSql ? capMatchesPerGroup(rawMatches, limitPerInput) : rawMatches;
13730
+ const nodesById = await hydrateNodesById(
13731
+ backend,
13732
+ ctx.graphId,
13733
+ kind,
13734
+ matches.map((match) => match.id)
13735
+ );
13736
+ const results = Array.from({ length: items.length }, () => []);
13737
+ for (const match of matches) {
13738
+ const node = nodesById.get(match.id);
13739
+ if (node === void 0) continue;
13740
+ const inputs = groupToInputs[match.probe_idx];
13741
+ if (inputs === void 0) continue;
13742
+ for (const inputIndex of inputs) {
13743
+ results[inputIndex]?.push(node);
13744
+ }
13745
+ }
13746
+ return results;
13747
+ }
13748
+ function capMatchesPerGroup(matches, limitPerInput) {
13749
+ const perGroupCount = /* @__PURE__ */ new Map();
13750
+ const capped = [];
13751
+ for (const match of matches) {
13752
+ const count2 = perGroupCount.get(match.probe_idx) ?? 0;
13753
+ if (count2 >= limitPerInput) continue;
13754
+ perGroupCount.set(match.probe_idx, count2 + 1);
13755
+ capped.push(match);
13756
+ }
13757
+ return capped;
13758
+ }
13759
+ async function hydrateNodesById(backend, graphId, kind, ids) {
13760
+ const rowsById = await getNodeRowsByIds(backend, graphId, kind, ids);
13761
+ const nodesById = /* @__PURE__ */ new Map();
13762
+ for (const [id, row] of rowsById) {
13763
+ if (row.deleted_at !== void 0) continue;
13764
+ nodesById.set(id, rowToNode(row));
13765
+ }
13766
+ return nodesById;
13767
+ }
13515
13768
  async function executeNodeBulkGetOrCreateByConstraint(ctx, kind, constraintName, items, backend, options) {
13516
13769
  if (items.length === 0) return [];
13517
13770
  const ifExists = options?.ifExists ?? "return";
@@ -14610,6 +14863,14 @@ var Store = class _Store {
14610
14863
  constraintName,
14611
14864
  items,
14612
14865
  backend
14866
+ ),
14867
+ executeBulkFindByIndex: (kind, indexName, items, backend, options) => executeNodeBulkFindByIndex(
14868
+ ctx,
14869
+ kind,
14870
+ indexName,
14871
+ items,
14872
+ backend,
14873
+ options
14613
14874
  )
14614
14875
  };
14615
14876
  }
@@ -14856,7 +15117,7 @@ var Store = class _Store {
14856
15117
  return fn({ nodes: this.nodes, edges: this.edges });
14857
15118
  }
14858
15119
  return this.#backend.transaction(
14859
- async (txBackend, sql18) => fn(this.#buildTransactionContext(txBackend, sql18))
15120
+ async (txBackend, sql19) => fn(this.#buildTransactionContext(txBackend, sql19))
14860
15121
  );
14861
15122
  }
14862
15123
  /**
@@ -14933,7 +15194,7 @@ var Store = class _Store {
14933
15194
  * raw Drizzle handle bound to the same transaction (#140);
14934
15195
  * `undefined` only on the non-transactional fallback.
14935
15196
  */
14936
- #buildTransactionContext(txBackend, sql18) {
15197
+ #buildTransactionContext(txBackend, sql19) {
14937
15198
  const txNodeOperations = {
14938
15199
  ...this.#nodeOperations,
14939
15200
  createQuery: () => this.#createQueryForBackend(txBackend)
@@ -14956,7 +15217,7 @@ var Store = class _Store {
14956
15217
  txBackend,
14957
15218
  txEdgeOperations
14958
15219
  );
14959
- return sql18 === void 0 ? { nodes, edges } : { nodes, edges, sql: sql18 };
15220
+ return sql19 === void 0 ? { nodes, edges } : { nodes, edges, sql: sql19 };
14960
15221
  }
14961
15222
  // === Graph Lifecycle ===
14962
15223
  /**