@nicia-ai/typegraph 0.5.0 → 0.7.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 (128) hide show
  1. package/README.md +2 -2
  2. package/dist/{ast-D-3bOanX.d.cts → ast-Bh2NDeaK.d.cts} +2 -2
  3. package/dist/{ast-CXFx6bF6.d.ts → ast-COMyNeMn.d.ts} +2 -2
  4. package/dist/backend/postgres/index.cjs +295 -23
  5. package/dist/backend/postgres/index.cjs.map +1 -1
  6. package/dist/backend/postgres/index.d.cts +33 -10
  7. package/dist/backend/postgres/index.d.ts +33 -10
  8. package/dist/backend/postgres/index.js +285 -5
  9. package/dist/backend/postgres/index.js.map +1 -1
  10. package/dist/backend/sqlite/index.cjs +21 -90
  11. package/dist/backend/sqlite/index.cjs.map +1 -1
  12. package/dist/backend/sqlite/index.d.cts +22 -58
  13. package/dist/backend/sqlite/index.d.ts +22 -58
  14. package/dist/backend/sqlite/index.js +3 -78
  15. package/dist/backend/sqlite/index.js.map +1 -1
  16. package/dist/backend/sqlite/local.cjs +83 -0
  17. package/dist/backend/sqlite/local.cjs.map +1 -0
  18. package/dist/backend/sqlite/local.d.cts +66 -0
  19. package/dist/backend/sqlite/local.d.ts +66 -0
  20. package/dist/backend/sqlite/local.js +77 -0
  21. package/dist/backend/sqlite/local.js.map +1 -0
  22. package/dist/chunk-23NGZHUN.cjs +2132 -0
  23. package/dist/chunk-23NGZHUN.cjs.map +1 -0
  24. package/dist/{chunk-4MTYE6CF.js → chunk-2DKSQNPW.js} +3 -4
  25. package/dist/chunk-2DKSQNPW.js.map +1 -0
  26. package/dist/{chunk-K2ROKOK3.cjs → chunk-BELXZTVK.cjs} +2 -2
  27. package/dist/chunk-BELXZTVK.cjs.map +1 -0
  28. package/dist/chunk-JPO7W262.js +2093 -0
  29. package/dist/chunk-JPO7W262.js.map +1 -0
  30. package/dist/{chunk-TGDFBLGS.js → chunk-JUZWF5NX.js} +2 -2
  31. package/dist/chunk-JUZWF5NX.js.map +1 -0
  32. package/dist/{chunk-KPU6TLUV.cjs → chunk-K5O7TOJO.cjs} +15 -16
  33. package/dist/chunk-K5O7TOJO.cjs.map +1 -0
  34. package/dist/{chunk-LDM2AFKZ.cjs → chunk-PDQBCQ34.cjs} +6 -6
  35. package/dist/{chunk-LDM2AFKZ.cjs.map → chunk-PDQBCQ34.cjs.map} +1 -1
  36. package/dist/{chunk-M5SOQ7UV.js → chunk-SH237DWD.js} +3 -3
  37. package/dist/{chunk-M5SOQ7UV.js.map → chunk-SH237DWD.js.map} +1 -1
  38. package/dist/{backend/drizzle/schema/postgres.d.ts → ddl-BJg93HDN.d.cts} +17 -17
  39. package/dist/{backend/drizzle/schema/postgres.d.cts → ddl-CsfWcl_B.d.ts} +17 -17
  40. package/dist/{index-DyrR_d-H.d.ts → index-QTnQwakS.d.cts} +1 -1
  41. package/dist/{index-DyrR_d-H.d.cts → index-QTnQwakS.d.ts} +1 -1
  42. package/dist/index.cjs +61 -61
  43. package/dist/index.cjs.map +1 -1
  44. package/dist/index.d.cts +11 -12
  45. package/dist/index.d.ts +11 -12
  46. package/dist/index.js +4 -4
  47. package/dist/index.js.map +1 -1
  48. package/dist/indexes/index.d.cts +5 -6
  49. package/dist/indexes/index.d.ts +5 -6
  50. package/dist/interchange/index.cjs +6 -6
  51. package/dist/interchange/index.d.cts +5 -6
  52. package/dist/interchange/index.d.ts +5 -6
  53. package/dist/interchange/index.js +1 -1
  54. package/dist/{manager-DXC7CqKG.d.ts → manager-Ba2CXGMG.d.ts} +6 -6
  55. package/dist/{manager-DiPf-0GG.d.cts → manager-Cu3JQN0H.d.cts} +6 -6
  56. package/dist/profiler/index.d.cts +7 -8
  57. package/dist/profiler/index.d.ts +7 -8
  58. package/dist/schema/index.cjs +21 -21
  59. package/dist/schema/index.d.cts +6 -7
  60. package/dist/schema/index.d.ts +6 -7
  61. package/dist/schema/index.js +3 -3
  62. package/dist/{backend/drizzle/schema/sqlite.d.ts → sqlite-DVca_IIy.d.cts} +2 -25
  63. package/dist/{backend/drizzle/schema/sqlite.d.cts → sqlite-H01wIXvB.d.ts} +2 -25
  64. package/dist/{store-nDW3GOFb.d.cts → store-CL-QMus7.d.cts} +62 -62
  65. package/dist/{store-DODIWZxC.d.ts → store-DJpuUOSL.d.ts} +62 -62
  66. package/dist/{types-DpIoePMI.d.ts → types-1YJKodRv.d.ts} +2 -3
  67. package/dist/{types-DHRsi6j9.d.cts → types-C8Ra3ROE.d.cts} +2 -2
  68. package/dist/{types-ZT5mlism.d.ts → types-CC8eB0PB.d.ts} +2 -2
  69. package/dist/{types-DCGa53O2.d.ts → types-COPePE8_.d.ts} +1 -1
  70. package/dist/{types-BL1GyVku.d.cts → types-CVtGFpB9.d.cts} +1 -1
  71. package/dist/{types-DTJEu_-h.d.ts → types-DMzKq0d5.d.cts} +24 -1
  72. package/dist/{types-DTJEu_-h.d.cts → types-DMzKq0d5.d.ts} +24 -1
  73. package/dist/{types-WX8V9dqn.d.cts → types-GLkwvQvS.d.cts} +2 -3
  74. package/package.json +11 -46
  75. package/dist/backend/drizzle/index.cjs +0 -40
  76. package/dist/backend/drizzle/index.cjs.map +0 -1
  77. package/dist/backend/drizzle/index.d.cts +0 -13
  78. package/dist/backend/drizzle/index.d.ts +0 -13
  79. package/dist/backend/drizzle/index.js +0 -11
  80. package/dist/backend/drizzle/index.js.map +0 -1
  81. package/dist/backend/drizzle/postgres.cjs +0 -26
  82. package/dist/backend/drizzle/postgres.cjs.map +0 -1
  83. package/dist/backend/drizzle/postgres.d.cts +0 -35
  84. package/dist/backend/drizzle/postgres.d.ts +0 -35
  85. package/dist/backend/drizzle/postgres.js +0 -9
  86. package/dist/backend/drizzle/postgres.js.map +0 -1
  87. package/dist/backend/drizzle/schema/postgres.cjs +0 -39
  88. package/dist/backend/drizzle/schema/postgres.cjs.map +0 -1
  89. package/dist/backend/drizzle/schema/postgres.js +0 -6
  90. package/dist/backend/drizzle/schema/postgres.js.map +0 -1
  91. package/dist/backend/drizzle/schema/sqlite.cjs +0 -39
  92. package/dist/backend/drizzle/schema/sqlite.cjs.map +0 -1
  93. package/dist/backend/drizzle/schema/sqlite.js +0 -6
  94. package/dist/backend/drizzle/schema/sqlite.js.map +0 -1
  95. package/dist/backend/drizzle/sqlite.cjs +0 -26
  96. package/dist/backend/drizzle/sqlite.cjs.map +0 -1
  97. package/dist/backend/drizzle/sqlite.d.cts +0 -35
  98. package/dist/backend/drizzle/sqlite.d.ts +0 -35
  99. package/dist/backend/drizzle/sqlite.js +0 -9
  100. package/dist/backend/drizzle/sqlite.js.map +0 -1
  101. package/dist/chunk-3PURVEA4.js +0 -193
  102. package/dist/chunk-3PURVEA4.js.map +0 -1
  103. package/dist/chunk-4MTYE6CF.js.map +0 -1
  104. package/dist/chunk-6HFWKZU5.js +0 -1506
  105. package/dist/chunk-6HFWKZU5.js.map +0 -1
  106. package/dist/chunk-ENXM4W4M.cjs +0 -289
  107. package/dist/chunk-ENXM4W4M.cjs.map +0 -1
  108. package/dist/chunk-K2ROKOK3.cjs.map +0 -1
  109. package/dist/chunk-KKFJJYCP.js +0 -287
  110. package/dist/chunk-KKFJJYCP.js.map +0 -1
  111. package/dist/chunk-KPU6TLUV.cjs.map +0 -1
  112. package/dist/chunk-NU2XNMVI.cjs +0 -201
  113. package/dist/chunk-NU2XNMVI.cjs.map +0 -1
  114. package/dist/chunk-OGGLFYFA.js +0 -177
  115. package/dist/chunk-OGGLFYFA.js.map +0 -1
  116. package/dist/chunk-PW5BSBZV.cjs +0 -1527
  117. package/dist/chunk-PW5BSBZV.cjs.map +0 -1
  118. package/dist/chunk-SMLIWLS7.js +0 -236
  119. package/dist/chunk-SMLIWLS7.js.map +0 -1
  120. package/dist/chunk-TGDFBLGS.js.map +0 -1
  121. package/dist/chunk-UYMT4LO2.cjs +0 -241
  122. package/dist/chunk-UYMT4LO2.cjs.map +0 -1
  123. package/dist/chunk-XZL6MCZJ.cjs +0 -185
  124. package/dist/chunk-XZL6MCZJ.cjs.map +0 -1
  125. package/dist/test-helpers-CIq1Hhj1.d.ts +0 -26
  126. package/dist/test-helpers-DPRFVky4.d.cts +0 -26
  127. package/dist/types-BRzHlhKC.d.cts +0 -14
  128. package/dist/types-BRzHlhKC.d.ts +0 -14
@@ -1,4 +1,4 @@
1
- import { J as JsonPointer } from './ast-CXFx6bF6.js';
1
+ import { J as JsonPointer } from './ast-COMyNeMn.js';
2
2
 
3
3
  /**
4
4
  * QueryProfiler types.
@@ -1,4 +1,4 @@
1
- import { J as JsonPointer } from './ast-D-3bOanX.cjs';
1
+ import { J as JsonPointer } from './ast-Bh2NDeaK.cjs';
2
2
 
3
3
  /**
4
4
  * QueryProfiler types.
@@ -6,6 +6,8 @@ declare const NODE_TYPE_BRAND: "__nodeType";
6
6
  declare const EDGE_TYPE_BRAND: "__edgeType";
7
7
  /** Brand symbol for NodeId */
8
8
  declare const __nodeId: unique symbol;
9
+ /** Brand symbol for EdgeId */
10
+ declare const __edgeId: unique symbol;
9
11
  /**
10
12
  * A node type definition.
11
13
  *
@@ -56,6 +58,14 @@ type AnyEdgeType = EdgeType<string, z.ZodObject<z.ZodRawShape>, readonly NodeTyp
56
58
  * Can be used directly in defineGraph without an EdgeRegistration wrapper.
57
59
  */
58
60
  type EdgeTypeWithEndpoints = EdgeType<string, z.ZodObject<z.ZodRawShape>, readonly NodeType[], readonly NodeType[]>;
61
+ /**
62
+ * Branded edge ID type.
63
+ *
64
+ * Prevents mixing IDs from different edge types at compile time.
65
+ */
66
+ type EdgeId<E extends AnyEdgeType = AnyEdgeType> = string & Readonly<{
67
+ [__edgeId]: E;
68
+ }>;
59
69
  /**
60
70
  * Infer the props type from an EdgeType.
61
71
  */
@@ -155,4 +165,17 @@ declare function isEdgeType(value: unknown): value is AnyEdgeType;
155
165
  */
156
166
  declare function isEdgeTypeWithEndpoints(value: unknown): value is EdgeTypeWithEndpoints;
157
167
 
158
- export { type AnyEdgeType as A, type Collation as C, type DeleteBehavior as D, type EdgeType as E, type GraphDefaults as G, type NodeType as N, type TemporalMode as T, type UniquenessScope as U, type NodeRegistration as a, type EdgeRegistration as b, type EdgeTypeWithEndpoints as c, type Cardinality as d, type EndpointExistence as e, type EdgeProps as f, type NodeId as g, type NodeProps as h, type UniqueConstraint as i, isEdgeType as j, isEdgeTypeWithEndpoints as k, isNodeType as l };
168
+ /**
169
+ * SQL Dialect Abstraction Layer
170
+ *
171
+ * Provides a unified interface for dialect-specific SQL generation.
172
+ * Implementing a new dialect (MySQL, SQL Server, etc.) requires
173
+ * implementing this interface.
174
+ */
175
+
176
+ /**
177
+ * Supported SQL dialects.
178
+ */
179
+ type SqlDialect = "sqlite" | "postgres";
180
+
181
+ export { type AnyEdgeType as A, type Cardinality as C, type DeleteBehavior as D, type EdgeType as E, type GraphDefaults as G, type NodeType as N, type SqlDialect as S, type TemporalMode as T, type UniqueConstraint as U, type Collation as a, type EdgeId as b, type EdgeProps as c, type EdgeRegistration as d, type EdgeTypeWithEndpoints as e, type EndpointExistence as f, type NodeId as g, type NodeProps as h, type NodeRegistration as i, type UniquenessScope as j, isEdgeType as k, isEdgeTypeWithEndpoints as l, isNodeType as m };
@@ -6,6 +6,8 @@ declare const NODE_TYPE_BRAND: "__nodeType";
6
6
  declare const EDGE_TYPE_BRAND: "__edgeType";
7
7
  /** Brand symbol for NodeId */
8
8
  declare const __nodeId: unique symbol;
9
+ /** Brand symbol for EdgeId */
10
+ declare const __edgeId: unique symbol;
9
11
  /**
10
12
  * A node type definition.
11
13
  *
@@ -56,6 +58,14 @@ type AnyEdgeType = EdgeType<string, z.ZodObject<z.ZodRawShape>, readonly NodeTyp
56
58
  * Can be used directly in defineGraph without an EdgeRegistration wrapper.
57
59
  */
58
60
  type EdgeTypeWithEndpoints = EdgeType<string, z.ZodObject<z.ZodRawShape>, readonly NodeType[], readonly NodeType[]>;
61
+ /**
62
+ * Branded edge ID type.
63
+ *
64
+ * Prevents mixing IDs from different edge types at compile time.
65
+ */
66
+ type EdgeId<E extends AnyEdgeType = AnyEdgeType> = string & Readonly<{
67
+ [__edgeId]: E;
68
+ }>;
59
69
  /**
60
70
  * Infer the props type from an EdgeType.
61
71
  */
@@ -155,4 +165,17 @@ declare function isEdgeType(value: unknown): value is AnyEdgeType;
155
165
  */
156
166
  declare function isEdgeTypeWithEndpoints(value: unknown): value is EdgeTypeWithEndpoints;
157
167
 
158
- export { type AnyEdgeType as A, type Collation as C, type DeleteBehavior as D, type EdgeType as E, type GraphDefaults as G, type NodeType as N, type TemporalMode as T, type UniquenessScope as U, type NodeRegistration as a, type EdgeRegistration as b, type EdgeTypeWithEndpoints as c, type Cardinality as d, type EndpointExistence as e, type EdgeProps as f, type NodeId as g, type NodeProps as h, type UniqueConstraint as i, isEdgeType as j, isEdgeTypeWithEndpoints as k, isNodeType as l };
168
+ /**
169
+ * SQL Dialect Abstraction Layer
170
+ *
171
+ * Provides a unified interface for dialect-specific SQL generation.
172
+ * Implementing a new dialect (MySQL, SQL Server, etc.) requires
173
+ * implementing this interface.
174
+ */
175
+
176
+ /**
177
+ * Supported SQL dialects.
178
+ */
179
+ type SqlDialect = "sqlite" | "postgres";
180
+
181
+ export { type AnyEdgeType as A, type Cardinality as C, type DeleteBehavior as D, type EdgeType as E, type GraphDefaults as G, type NodeType as N, type SqlDialect as S, type TemporalMode as T, type UniqueConstraint as U, type Collation as a, type EdgeId as b, type EdgeProps as c, type EdgeRegistration as d, type EdgeTypeWithEndpoints as e, type EndpointExistence as f, type NodeId as g, type NodeProps as h, type NodeRegistration as i, type UniquenessScope as j, isEdgeType as k, isEdgeTypeWithEndpoints as l, isNodeType as m };
@@ -1,6 +1,5 @@
1
1
  import { SQL } from 'drizzle-orm';
2
- import { N as NodeType, E as EdgeType, U as UniquenessScope, C as Collation, D as DeleteBehavior, d as Cardinality, e as EndpointExistence, T as TemporalMode } from './types-DTJEu_-h.cjs';
3
- import { S as SqlDialect } from './types-BRzHlhKC.cjs';
2
+ import { N as NodeType, E as EdgeType, j as UniquenessScope, a as Collation, D as DeleteBehavior, C as Cardinality, f as EndpointExistence, T as TemporalMode, S as SqlDialect } from './types-DMzKq0d5.cjs';
4
3
 
5
4
  /** Brand key for MetaEdge */
6
5
  declare const META_EDGE_BRAND: "__metaEdge";
@@ -746,4 +745,4 @@ type CountEdgesByKindParams = Readonly<{
746
745
  asOf?: string;
747
746
  }>;
748
747
 
749
- export { DEFAULT_SQL_SCHEMA as D, type GraphBackend as G, type InferenceType as I, type JsonSchema as J, type MetaEdge as M, type OntologyRelation as O, type SerializedNodeDef as S, type TransactionBackend as T, type SerializedEdgeDef as a, type SerializedMetaEdge as b, type SerializedOntologyRelation as c, type SerializedClosures as d, type SerializedSchema as e, type SchemaHash as f, type SerializedOntology as g, type SerializedUniqueConstraint as h, type SchemaVersionRow as i, type MetaEdgeProperties as j, type SqlSchema as k, type SqlTableNames as l, createSqlSchema as m, isMetaEdge as n };
748
+ export { DEFAULT_SQL_SCHEMA as D, type GraphBackend as G, type InferenceType as I, type JsonSchema as J, type MetaEdge as M, type OntologyRelation as O, type SqlSchema as S, type TransactionBackend as T, type MetaEdgeProperties as a, type SqlTableNames as b, createSqlSchema as c, type SerializedNodeDef as d, type SerializedEdgeDef as e, type SerializedMetaEdge as f, type SerializedOntologyRelation as g, type SerializedClosures as h, isMetaEdge as i, type SerializedSchema as j, type SchemaHash as k, type SerializedOntology as l, type SerializedUniqueConstraint as m, type SchemaVersionRow as n };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nicia-ai/typegraph",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "description": "TypeScript-first embedded knowledge graph library with ontological reasoning",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -77,54 +77,14 @@
77
77
  "default": "./dist/backend/postgres/index.cjs"
78
78
  }
79
79
  },
80
- "./drizzle": {
80
+ "./sqlite/local": {
81
81
  "import": {
82
- "types": "./dist/backend/drizzle/index.d.ts",
83
- "default": "./dist/backend/drizzle/index.js"
82
+ "types": "./dist/backend/sqlite/local.d.ts",
83
+ "default": "./dist/backend/sqlite/local.js"
84
84
  },
85
85
  "require": {
86
- "types": "./dist/backend/drizzle/index.d.cts",
87
- "default": "./dist/backend/drizzle/index.cjs"
88
- }
89
- },
90
- "./drizzle/sqlite": {
91
- "import": {
92
- "types": "./dist/backend/drizzle/sqlite.d.ts",
93
- "default": "./dist/backend/drizzle/sqlite.js"
94
- },
95
- "require": {
96
- "types": "./dist/backend/drizzle/sqlite.d.cts",
97
- "default": "./dist/backend/drizzle/sqlite.cjs"
98
- }
99
- },
100
- "./drizzle/postgres": {
101
- "import": {
102
- "types": "./dist/backend/drizzle/postgres.d.ts",
103
- "default": "./dist/backend/drizzle/postgres.js"
104
- },
105
- "require": {
106
- "types": "./dist/backend/drizzle/postgres.d.cts",
107
- "default": "./dist/backend/drizzle/postgres.cjs"
108
- }
109
- },
110
- "./drizzle/schema/sqlite": {
111
- "import": {
112
- "types": "./dist/backend/drizzle/schema/sqlite.d.ts",
113
- "default": "./dist/backend/drizzle/schema/sqlite.js"
114
- },
115
- "require": {
116
- "types": "./dist/backend/drizzle/schema/sqlite.d.cts",
117
- "default": "./dist/backend/drizzle/schema/sqlite.cjs"
118
- }
119
- },
120
- "./drizzle/schema/postgres": {
121
- "import": {
122
- "types": "./dist/backend/drizzle/schema/postgres.d.ts",
123
- "default": "./dist/backend/drizzle/schema/postgres.js"
124
- },
125
- "require": {
126
- "types": "./dist/backend/drizzle/schema/postgres.d.cts",
127
- "default": "./dist/backend/drizzle/schema/postgres.cjs"
86
+ "types": "./dist/backend/sqlite/local.d.cts",
87
+ "default": "./dist/backend/sqlite/local.cjs"
128
88
  }
129
89
  }
130
90
  },
@@ -187,6 +147,7 @@
187
147
  "fast-check": "^4.5.3",
188
148
  "pg": "^8.18.0",
189
149
  "sqlite-vec": "0.1.7-alpha.2",
150
+ "tsd": "^0.33.0",
190
151
  "tsup": "^8.5.1",
191
152
  "typescript": "^5.9.3",
192
153
  "vitest": "^4.0.18",
@@ -198,6 +159,10 @@
198
159
  "build": "tsup",
199
160
  "lint": "eslint .",
200
161
  "typecheck": "tsc --noEmit --skipLibCheck",
162
+ "test:types": "node --import tsx scripts/test-types.ts all",
163
+ "test:types:inline": "node --import tsx scripts/test-types.ts inline",
164
+ "test:types:declarations": "node --import tsx scripts/test-types.ts declarations",
165
+ "test:types:consumer": "node --import tsx scripts/test-types.ts consumer",
201
166
  "pretest": "node --import tsx scripts/ensure-native-sqlite.ts",
202
167
  "test": "vitest run",
203
168
  "pretest:unit": "node --import tsx scripts/ensure-native-sqlite.ts",
@@ -1,40 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkKPU6TLUV_cjs = require('../../chunk-KPU6TLUV.cjs');
4
- var chunkENXM4W4M_cjs = require('../../chunk-ENXM4W4M.cjs');
5
- require('../../chunk-PW5BSBZV.cjs');
6
- var chunkXZL6MCZJ_cjs = require('../../chunk-XZL6MCZJ.cjs');
7
- var chunkNU2XNMVI_cjs = require('../../chunk-NU2XNMVI.cjs');
8
- require('../../chunk-44SXEVF4.cjs');
9
- require('../../chunk-JQDWEX6V.cjs');
10
- require('../../chunk-2WVFEIHR.cjs');
11
- require('../../chunk-P5CNM325.cjs');
12
-
13
-
14
-
15
- Object.defineProperty(exports, "createSqliteBackend", {
16
- enumerable: true,
17
- get: function () { return chunkKPU6TLUV_cjs.createSqliteBackend; }
18
- });
19
- Object.defineProperty(exports, "createPostgresBackend", {
20
- enumerable: true,
21
- get: function () { return chunkENXM4W4M_cjs.createPostgresBackend; }
22
- });
23
- Object.defineProperty(exports, "createSqliteTables", {
24
- enumerable: true,
25
- get: function () { return chunkXZL6MCZJ_cjs.createSqliteTables; }
26
- });
27
- Object.defineProperty(exports, "sqliteTables", {
28
- enumerable: true,
29
- get: function () { return chunkXZL6MCZJ_cjs.tables; }
30
- });
31
- Object.defineProperty(exports, "createPostgresTables", {
32
- enumerable: true,
33
- get: function () { return chunkNU2XNMVI_cjs.createPostgresTables; }
34
- });
35
- Object.defineProperty(exports, "postgresTables", {
36
- enumerable: true,
37
- get: function () { return chunkNU2XNMVI_cjs.tables; }
38
- });
39
- //# sourceMappingURL=index.cjs.map
40
- //# sourceMappingURL=index.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.cjs"}
@@ -1,13 +0,0 @@
1
- export { SqliteBackendOptions, createSqliteBackend } from './sqlite.cjs';
2
- export { PostgresBackendOptions, createPostgresBackend } from './postgres.cjs';
3
- export { PostgresTables, createPostgresTables, tables as postgresTables } from './schema/postgres.cjs';
4
- export { SqliteTables, createSqliteTables, tables as sqliteTables } from './schema/sqlite.cjs';
5
- import '../../types-WX8V9dqn.cjs';
6
- import 'drizzle-orm';
7
- import '../../types-DTJEu_-h.cjs';
8
- import 'zod';
9
- import '../../types-BRzHlhKC.cjs';
10
- import 'drizzle-orm/sqlite-core';
11
- import 'drizzle-orm/pg-core';
12
- import '../../types-DHRsi6j9.cjs';
13
- import '../../ast-D-3bOanX.cjs';
@@ -1,13 +0,0 @@
1
- export { SqliteBackendOptions, createSqliteBackend } from './sqlite.js';
2
- export { PostgresBackendOptions, createPostgresBackend } from './postgres.js';
3
- export { PostgresTables, createPostgresTables, tables as postgresTables } from './schema/postgres.js';
4
- export { SqliteTables, createSqliteTables, tables as sqliteTables } from './schema/sqlite.js';
5
- import '../../types-DpIoePMI.js';
6
- import 'drizzle-orm';
7
- import '../../types-DTJEu_-h.js';
8
- import 'zod';
9
- import '../../types-BRzHlhKC.js';
10
- import 'drizzle-orm/sqlite-core';
11
- import 'drizzle-orm/pg-core';
12
- import '../../types-ZT5mlism.js';
13
- import '../../ast-CXFx6bF6.js';
@@ -1,11 +0,0 @@
1
- export { createSqliteBackend } from '../../chunk-4MTYE6CF.js';
2
- export { createPostgresBackend } from '../../chunk-KKFJJYCP.js';
3
- import '../../chunk-6HFWKZU5.js';
4
- export { createSqliteTables, tables as sqliteTables } from '../../chunk-OGGLFYFA.js';
5
- export { createPostgresTables, tables as postgresTables } from '../../chunk-3PURVEA4.js';
6
- import '../../chunk-SJ2QMDXY.js';
7
- import '../../chunk-U3452TEU.js';
8
- import '../../chunk-54WJF3DW.js';
9
- import '../../chunk-K7SQ3SWP.js';
10
- //# sourceMappingURL=index.js.map
11
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js"}
@@ -1,26 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkENXM4W4M_cjs = require('../../chunk-ENXM4W4M.cjs');
4
- require('../../chunk-PW5BSBZV.cjs');
5
- var chunkNU2XNMVI_cjs = require('../../chunk-NU2XNMVI.cjs');
6
- require('../../chunk-44SXEVF4.cjs');
7
- require('../../chunk-JQDWEX6V.cjs');
8
- require('../../chunk-2WVFEIHR.cjs');
9
- require('../../chunk-P5CNM325.cjs');
10
-
11
-
12
-
13
- Object.defineProperty(exports, "createPostgresBackend", {
14
- enumerable: true,
15
- get: function () { return chunkENXM4W4M_cjs.createPostgresBackend; }
16
- });
17
- Object.defineProperty(exports, "createPostgresTables", {
18
- enumerable: true,
19
- get: function () { return chunkNU2XNMVI_cjs.createPostgresTables; }
20
- });
21
- Object.defineProperty(exports, "tables", {
22
- enumerable: true,
23
- get: function () { return chunkNU2XNMVI_cjs.tables; }
24
- });
25
- //# sourceMappingURL=postgres.cjs.map
26
- //# sourceMappingURL=postgres.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"postgres.cjs"}
@@ -1,35 +0,0 @@
1
- import { G as GraphBackend } from '../../types-WX8V9dqn.cjs';
2
- import { PgDatabase, PgQueryResultHKT } from 'drizzle-orm/pg-core';
3
- import { PostgresTables } from './schema/postgres.cjs';
4
- export { PostgresTableNames, createPostgresTables, tables } from './schema/postgres.cjs';
5
- import 'drizzle-orm';
6
- import '../../types-DTJEu_-h.cjs';
7
- import 'zod';
8
- import '../../types-BRzHlhKC.cjs';
9
- import '../../types-DHRsi6j9.cjs';
10
- import '../../ast-D-3bOanX.cjs';
11
-
12
- type AnyPgDatabase = PgDatabase<PgQueryResultHKT, Record<string, unknown>>;
13
-
14
- /**
15
- * Options for creating a PostgreSQL backend.
16
- */
17
- type PostgresBackendOptions = Readonly<{
18
- /**
19
- * Custom table definitions. Use createPostgresTables() to customize table names.
20
- * Defaults to standard TypeGraph table names.
21
- */
22
- tables?: PostgresTables;
23
- }>;
24
- /**
25
- * Creates a TypeGraph backend for PostgreSQL databases.
26
- *
27
- * Works with any Drizzle PostgreSQL instance regardless of the underlying driver.
28
- *
29
- * @param db - A Drizzle PostgreSQL database instance
30
- * @param options - Backend configuration
31
- * @returns A GraphBackend implementation
32
- */
33
- declare function createPostgresBackend(db: AnyPgDatabase, options?: PostgresBackendOptions): GraphBackend;
34
-
35
- export { type PostgresBackendOptions, PostgresTables, createPostgresBackend };
@@ -1,35 +0,0 @@
1
- import { G as GraphBackend } from '../../types-DpIoePMI.js';
2
- import { PgDatabase, PgQueryResultHKT } from 'drizzle-orm/pg-core';
3
- import { PostgresTables } from './schema/postgres.js';
4
- export { PostgresTableNames, createPostgresTables, tables } from './schema/postgres.js';
5
- import 'drizzle-orm';
6
- import '../../types-DTJEu_-h.js';
7
- import 'zod';
8
- import '../../types-BRzHlhKC.js';
9
- import '../../types-ZT5mlism.js';
10
- import '../../ast-CXFx6bF6.js';
11
-
12
- type AnyPgDatabase = PgDatabase<PgQueryResultHKT, Record<string, unknown>>;
13
-
14
- /**
15
- * Options for creating a PostgreSQL backend.
16
- */
17
- type PostgresBackendOptions = Readonly<{
18
- /**
19
- * Custom table definitions. Use createPostgresTables() to customize table names.
20
- * Defaults to standard TypeGraph table names.
21
- */
22
- tables?: PostgresTables;
23
- }>;
24
- /**
25
- * Creates a TypeGraph backend for PostgreSQL databases.
26
- *
27
- * Works with any Drizzle PostgreSQL instance regardless of the underlying driver.
28
- *
29
- * @param db - A Drizzle PostgreSQL database instance
30
- * @param options - Backend configuration
31
- * @returns A GraphBackend implementation
32
- */
33
- declare function createPostgresBackend(db: AnyPgDatabase, options?: PostgresBackendOptions): GraphBackend;
34
-
35
- export { type PostgresBackendOptions, PostgresTables, createPostgresBackend };
@@ -1,9 +0,0 @@
1
- export { createPostgresBackend } from '../../chunk-KKFJJYCP.js';
2
- import '../../chunk-6HFWKZU5.js';
3
- export { createPostgresTables, tables } from '../../chunk-3PURVEA4.js';
4
- import '../../chunk-SJ2QMDXY.js';
5
- import '../../chunk-U3452TEU.js';
6
- import '../../chunk-54WJF3DW.js';
7
- import '../../chunk-K7SQ3SWP.js';
8
- //# sourceMappingURL=postgres.js.map
9
- //# sourceMappingURL=postgres.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"postgres.js"}
@@ -1,39 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkNU2XNMVI_cjs = require('../../../chunk-NU2XNMVI.cjs');
4
- require('../../../chunk-JQDWEX6V.cjs');
5
- require('../../../chunk-2WVFEIHR.cjs');
6
- require('../../../chunk-P5CNM325.cjs');
7
-
8
-
9
-
10
- Object.defineProperty(exports, "createPostgresTables", {
11
- enumerable: true,
12
- get: function () { return chunkNU2XNMVI_cjs.createPostgresTables; }
13
- });
14
- Object.defineProperty(exports, "edges", {
15
- enumerable: true,
16
- get: function () { return chunkNU2XNMVI_cjs.edges; }
17
- });
18
- Object.defineProperty(exports, "embeddings", {
19
- enumerable: true,
20
- get: function () { return chunkNU2XNMVI_cjs.embeddings; }
21
- });
22
- Object.defineProperty(exports, "nodes", {
23
- enumerable: true,
24
- get: function () { return chunkNU2XNMVI_cjs.nodes; }
25
- });
26
- Object.defineProperty(exports, "schemaVersions", {
27
- enumerable: true,
28
- get: function () { return chunkNU2XNMVI_cjs.schemaVersions; }
29
- });
30
- Object.defineProperty(exports, "tables", {
31
- enumerable: true,
32
- get: function () { return chunkNU2XNMVI_cjs.tables; }
33
- });
34
- Object.defineProperty(exports, "uniques", {
35
- enumerable: true,
36
- get: function () { return chunkNU2XNMVI_cjs.uniques; }
37
- });
38
- //# sourceMappingURL=postgres.cjs.map
39
- //# sourceMappingURL=postgres.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"postgres.cjs"}
@@ -1,6 +0,0 @@
1
- export { createPostgresTables, edges, embeddings, nodes, schemaVersions, tables, uniques } from '../../../chunk-3PURVEA4.js';
2
- import '../../../chunk-U3452TEU.js';
3
- import '../../../chunk-54WJF3DW.js';
4
- import '../../../chunk-K7SQ3SWP.js';
5
- //# sourceMappingURL=postgres.js.map
6
- //# sourceMappingURL=postgres.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"postgres.js"}
@@ -1,39 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkXZL6MCZJ_cjs = require('../../../chunk-XZL6MCZJ.cjs');
4
- require('../../../chunk-JQDWEX6V.cjs');
5
- require('../../../chunk-2WVFEIHR.cjs');
6
- require('../../../chunk-P5CNM325.cjs');
7
-
8
-
9
-
10
- Object.defineProperty(exports, "createSqliteTables", {
11
- enumerable: true,
12
- get: function () { return chunkXZL6MCZJ_cjs.createSqliteTables; }
13
- });
14
- Object.defineProperty(exports, "edges", {
15
- enumerable: true,
16
- get: function () { return chunkXZL6MCZJ_cjs.edges; }
17
- });
18
- Object.defineProperty(exports, "embeddings", {
19
- enumerable: true,
20
- get: function () { return chunkXZL6MCZJ_cjs.embeddings; }
21
- });
22
- Object.defineProperty(exports, "nodes", {
23
- enumerable: true,
24
- get: function () { return chunkXZL6MCZJ_cjs.nodes; }
25
- });
26
- Object.defineProperty(exports, "schemaVersions", {
27
- enumerable: true,
28
- get: function () { return chunkXZL6MCZJ_cjs.schemaVersions; }
29
- });
30
- Object.defineProperty(exports, "tables", {
31
- enumerable: true,
32
- get: function () { return chunkXZL6MCZJ_cjs.tables; }
33
- });
34
- Object.defineProperty(exports, "uniques", {
35
- enumerable: true,
36
- get: function () { return chunkXZL6MCZJ_cjs.uniques; }
37
- });
38
- //# sourceMappingURL=sqlite.cjs.map
39
- //# sourceMappingURL=sqlite.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"sqlite.cjs"}
@@ -1,6 +0,0 @@
1
- export { createSqliteTables, edges, embeddings, nodes, schemaVersions, tables, uniques } from '../../../chunk-OGGLFYFA.js';
2
- import '../../../chunk-U3452TEU.js';
3
- import '../../../chunk-54WJF3DW.js';
4
- import '../../../chunk-K7SQ3SWP.js';
5
- //# sourceMappingURL=sqlite.js.map
6
- //# sourceMappingURL=sqlite.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"sqlite.js"}
@@ -1,26 +0,0 @@
1
- 'use strict';
2
-
3
- var chunkKPU6TLUV_cjs = require('../../chunk-KPU6TLUV.cjs');
4
- require('../../chunk-PW5BSBZV.cjs');
5
- var chunkXZL6MCZJ_cjs = require('../../chunk-XZL6MCZJ.cjs');
6
- require('../../chunk-44SXEVF4.cjs');
7
- require('../../chunk-JQDWEX6V.cjs');
8
- require('../../chunk-2WVFEIHR.cjs');
9
- require('../../chunk-P5CNM325.cjs');
10
-
11
-
12
-
13
- Object.defineProperty(exports, "createSqliteBackend", {
14
- enumerable: true,
15
- get: function () { return chunkKPU6TLUV_cjs.createSqliteBackend; }
16
- });
17
- Object.defineProperty(exports, "createSqliteTables", {
18
- enumerable: true,
19
- get: function () { return chunkXZL6MCZJ_cjs.createSqliteTables; }
20
- });
21
- Object.defineProperty(exports, "tables", {
22
- enumerable: true,
23
- get: function () { return chunkXZL6MCZJ_cjs.tables; }
24
- });
25
- //# sourceMappingURL=sqlite.cjs.map
26
- //# sourceMappingURL=sqlite.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"sqlite.cjs"}
@@ -1,35 +0,0 @@
1
- import { G as GraphBackend } from '../../types-WX8V9dqn.cjs';
2
- import { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
3
- import { SqliteTables } from './schema/sqlite.cjs';
4
- export { SqliteTableNames, createSqliteTables, tables } from './schema/sqlite.cjs';
5
- import 'drizzle-orm';
6
- import '../../types-DTJEu_-h.cjs';
7
- import 'zod';
8
- import '../../types-BRzHlhKC.cjs';
9
- import '../../types-DHRsi6j9.cjs';
10
- import '../../ast-D-3bOanX.cjs';
11
-
12
- type SqliteExecutionProfileHints = Readonly<{
13
- isD1?: boolean;
14
- isSync?: boolean;
15
- }>;
16
- type AnySqliteDatabase = BaseSQLiteDatabase<"sync" | "async", unknown>;
17
-
18
- /**
19
- * Options for creating a SQLite backend.
20
- */
21
- type SqliteBackendOptions = Readonly<{
22
- /**
23
- * Custom table definitions. Use createSqliteTables() to customize table names.
24
- * Defaults to standard TypeGraph table names.
25
- */
26
- tables?: SqliteTables;
27
- /**
28
- * Optional execution profile hints used to avoid runtime driver reflection.
29
- * Set `isD1: true` when using Cloudflare D1.
30
- */
31
- executionProfile?: SqliteExecutionProfileHints;
32
- }>;
33
- declare function createSqliteBackend(db: AnySqliteDatabase, options?: SqliteBackendOptions): GraphBackend;
34
-
35
- export { type SqliteBackendOptions, SqliteTables, createSqliteBackend };
@@ -1,35 +0,0 @@
1
- import { G as GraphBackend } from '../../types-DpIoePMI.js';
2
- import { BaseSQLiteDatabase } from 'drizzle-orm/sqlite-core';
3
- import { SqliteTables } from './schema/sqlite.js';
4
- export { SqliteTableNames, createSqliteTables, tables } from './schema/sqlite.js';
5
- import 'drizzle-orm';
6
- import '../../types-DTJEu_-h.js';
7
- import 'zod';
8
- import '../../types-BRzHlhKC.js';
9
- import '../../types-ZT5mlism.js';
10
- import '../../ast-CXFx6bF6.js';
11
-
12
- type SqliteExecutionProfileHints = Readonly<{
13
- isD1?: boolean;
14
- isSync?: boolean;
15
- }>;
16
- type AnySqliteDatabase = BaseSQLiteDatabase<"sync" | "async", unknown>;
17
-
18
- /**
19
- * Options for creating a SQLite backend.
20
- */
21
- type SqliteBackendOptions = Readonly<{
22
- /**
23
- * Custom table definitions. Use createSqliteTables() to customize table names.
24
- * Defaults to standard TypeGraph table names.
25
- */
26
- tables?: SqliteTables;
27
- /**
28
- * Optional execution profile hints used to avoid runtime driver reflection.
29
- * Set `isD1: true` when using Cloudflare D1.
30
- */
31
- executionProfile?: SqliteExecutionProfileHints;
32
- }>;
33
- declare function createSqliteBackend(db: AnySqliteDatabase, options?: SqliteBackendOptions): GraphBackend;
34
-
35
- export { type SqliteBackendOptions, SqliteTables, createSqliteBackend };
@@ -1,9 +0,0 @@
1
- export { createSqliteBackend } from '../../chunk-4MTYE6CF.js';
2
- import '../../chunk-6HFWKZU5.js';
3
- export { createSqliteTables, tables } from '../../chunk-OGGLFYFA.js';
4
- import '../../chunk-SJ2QMDXY.js';
5
- import '../../chunk-U3452TEU.js';
6
- import '../../chunk-54WJF3DW.js';
7
- import '../../chunk-K7SQ3SWP.js';
8
- //# sourceMappingURL=sqlite.js.map
9
- //# sourceMappingURL=sqlite.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"sqlite.js"}