@nicia-ai/typegraph 0.25.0 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/postgres/index.cjs +167 -71
- package/dist/backend/postgres/index.cjs.map +1 -1
- package/dist/backend/postgres/index.d.cts +6 -8
- package/dist/backend/postgres/index.d.ts +6 -8
- package/dist/backend/postgres/index.js +119 -27
- package/dist/backend/postgres/index.js.map +1 -1
- package/dist/backend/sqlite/index.cjs +16 -15
- package/dist/backend/sqlite/index.d.cts +11 -26
- package/dist/backend/sqlite/index.d.ts +11 -26
- package/dist/backend/sqlite/index.js +6 -5
- package/dist/backend/sqlite/libsql.cjs +9 -8
- package/dist/backend/sqlite/libsql.cjs.map +1 -1
- package/dist/backend/sqlite/libsql.d.cts +4 -3
- package/dist/backend/sqlite/libsql.d.ts +4 -3
- package/dist/backend/sqlite/libsql.js +6 -5
- package/dist/backend/sqlite/libsql.js.map +1 -1
- package/dist/backend/sqlite/local.cjs +11 -10
- package/dist/backend/sqlite/local.cjs.map +1 -1
- package/dist/backend/sqlite/local.d.cts +4 -3
- package/dist/backend/sqlite/local.d.ts +4 -3
- package/dist/backend/sqlite/local.js +6 -5
- package/dist/backend/sqlite/local.js.map +1 -1
- package/dist/{chunk-LVCSL6A3.js → chunk-3W6AIFT2.js} +11 -34
- package/dist/chunk-3W6AIFT2.js.map +1 -0
- package/dist/chunk-4FJVSF3K.cjs +12 -0
- package/dist/{chunk-D2GO3RBL.cjs.map → chunk-4FJVSF3K.cjs.map} +1 -1
- package/dist/{chunk-7W3KAMVQ.cjs → chunk-4TJI44WP.cjs} +94 -119
- package/dist/chunk-4TJI44WP.cjs.map +1 -0
- package/dist/chunk-5H3BAMTB.js +32 -0
- package/dist/chunk-5H3BAMTB.js.map +1 -0
- package/dist/{chunk-OJ6IQVZG.js → chunk-DDVA4QBA.js} +177 -37
- package/dist/chunk-DDVA4QBA.js.map +1 -0
- package/dist/{chunk-7CDXX3QZ.cjs → chunk-DN4RUDF3.cjs} +2 -2
- package/dist/chunk-DN4RUDF3.cjs.map +1 -0
- package/dist/{chunk-NHQWXSTS.js → chunk-E5ROA3MN.js} +3 -3
- package/dist/{chunk-NHQWXSTS.js.map → chunk-E5ROA3MN.js.map} +1 -1
- package/dist/{chunk-FPCOUJSL.js → chunk-ENXJLDRK.js} +2 -2
- package/dist/chunk-ENXJLDRK.js.map +1 -0
- package/dist/chunk-IUIWCFG3.cjs +36 -0
- package/dist/chunk-IUIWCFG3.cjs.map +1 -0
- package/dist/{chunk-EG6TJ3I5.js → chunk-OYLF3IC7.js} +3 -3
- package/dist/{chunk-EG6TJ3I5.js.map → chunk-OYLF3IC7.js.map} +1 -1
- package/dist/{chunk-JTI5WT4P.cjs → chunk-PN37HVAV.cjs} +32 -10
- package/dist/chunk-PN37HVAV.cjs.map +1 -0
- package/dist/{chunk-RCAJZG67.cjs → chunk-PYJOBZR3.cjs} +10 -10
- package/dist/{chunk-RCAJZG67.cjs.map → chunk-PYJOBZR3.cjs.map} +1 -1
- package/dist/{chunk-WI5VRP3X.js → chunk-RF5EUQWS.js} +371 -47
- package/dist/chunk-RF5EUQWS.js.map +1 -0
- package/dist/{chunk-ZEMNF3QK.cjs → chunk-RVT2N4RF.cjs} +209 -69
- package/dist/chunk-RVT2N4RF.cjs.map +1 -0
- package/dist/{chunk-4BOWVUGQ.js → chunk-TSGBRPNE.js} +3 -3
- package/dist/{chunk-4BOWVUGQ.js.map → chunk-TSGBRPNE.js.map} +1 -1
- package/dist/{chunk-O2P3KAUT.cjs → chunk-TVUARC7S.cjs} +445 -110
- package/dist/chunk-TVUARC7S.cjs.map +1 -0
- package/dist/{chunk-DOTEN2FG.js → chunk-U5ROKVRF.js} +26 -3
- package/dist/chunk-U5ROKVRF.js.map +1 -0
- package/dist/{chunk-E5JZSEGJ.cjs → chunk-WFUN6DCM.cjs} +8 -8
- package/dist/{chunk-E5JZSEGJ.cjs.map → chunk-WFUN6DCM.cjs.map} +1 -1
- package/dist/{chunk-W5MTHMTE.cjs → chunk-YEDQLNVE.cjs} +26 -2
- package/dist/chunk-YEDQLNVE.cjs.map +1 -0
- package/dist/{chunk-YZZBDCLV.js → chunk-ZTREJOGB.js} +32 -11
- package/dist/chunk-ZTREJOGB.js.map +1 -0
- package/dist/{ddl-B2jjLjpR.d.cts → ddl-9kw8UADK.d.ts} +697 -29
- package/dist/{ddl-DpaeAKPp.d.ts → ddl-Cw82BPM4.d.cts} +697 -29
- package/dist/{extension-types-D07e_NTw.d.cts → extension-types-B78CZfA5.d.cts} +1 -1
- package/dist/{extension-types-D07e_NTw.d.ts → extension-types-B78CZfA5.d.ts} +1 -1
- package/dist/graph-extension/index.cjs +18 -18
- package/dist/graph-extension/index.d.cts +4 -4
- package/dist/graph-extension/index.d.ts +4 -4
- package/dist/graph-extension/index.js +3 -3
- package/dist/{index-CT6nvtxL.d.cts → index-Bilw0pYm.d.cts} +34 -3
- package/dist/{index-DQheiVQV.d.ts → index-CWdBFWbI.d.ts} +34 -3
- package/dist/index.cjs +460 -361
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -11
- package/dist/index.d.ts +13 -11
- package/dist/index.js +131 -36
- package/dist/index.js.map +1 -1
- package/dist/indexes/index.cjs +13 -13
- package/dist/indexes/index.d.cts +5 -5
- package/dist/indexes/index.d.ts +5 -5
- package/dist/indexes/index.js +1 -1
- package/dist/interchange/index.cjs +7 -7
- package/dist/interchange/index.d.cts +7 -5
- package/dist/interchange/index.d.ts +7 -5
- package/dist/interchange/index.js +2 -2
- package/dist/{manager-BpjBW1JK.d.cts → manager-Aqzmztkb.d.cts} +11 -3
- package/dist/{manager-BKaPQbns.d.ts → manager-C3LxzPcX.d.ts} +11 -3
- package/dist/{materialize-indexes-BB9N5uQl.d.cts → materialize-indexes-BQfaAZKA.d.cts} +1 -1
- package/dist/{materialize-indexes-BYpU2RKh.d.ts → materialize-indexes-DFavFQah.d.ts} +1 -1
- package/dist/profiler/index.d.cts +9 -7
- package/dist/profiler/index.d.ts +9 -7
- package/dist/schema/index.cjs +28 -27
- package/dist/schema/index.cjs.map +1 -1
- package/dist/schema/index.d.cts +9 -7
- package/dist/schema/index.d.ts +9 -7
- package/dist/schema/index.js +6 -5
- package/dist/schema/index.js.map +1 -1
- package/dist/{sqlite-Myo8e3Lr.d.cts → sqlite-BvSEbybu.d.cts} +320 -1
- package/dist/{sqlite-CU3j6rc7.d.ts → sqlite-GKvcDPVn.d.ts} +320 -1
- package/dist/{store-BAGuOHDh.d.cts → store-CiS_AGNH.d.ts} +112 -4
- package/dist/{store-De98Lod4.d.ts → store-DbQLsSor.d.cts} +112 -4
- package/dist/{types-CYga3lZp.d.cts → types-CF7nDH3q.d.cts} +2 -2
- package/dist/{types-BLmJq4wI.d.ts → types-Cars4JZ1.d.ts} +2 -2
- package/dist/{types--0EslBx5.d.cts → types-DZPBXZOK.d.cts} +275 -8
- package/dist/{types-BNWYZ-0-.d.ts → types-Dzkr0Eqi.d.ts} +275 -8
- package/dist/{where-m1uWsdua.d.cts → where-BmtjfWuS.d.cts} +2 -2
- package/dist/{where-CluR73rs.d.ts → where-kk1Zz2En.d.ts} +2 -2
- package/package.json +3 -1
- package/dist/chunk-7CDXX3QZ.cjs.map +0 -1
- package/dist/chunk-7W3KAMVQ.cjs.map +0 -1
- package/dist/chunk-D2GO3RBL.cjs +0 -12
- package/dist/chunk-DOTEN2FG.js.map +0 -1
- package/dist/chunk-FPCOUJSL.js.map +0 -1
- package/dist/chunk-JTI5WT4P.cjs.map +0 -1
- package/dist/chunk-LVCSL6A3.js.map +0 -1
- package/dist/chunk-O2P3KAUT.cjs.map +0 -1
- package/dist/chunk-OJ6IQVZG.js.map +0 -1
- package/dist/chunk-W5MTHMTE.cjs.map +0 -1
- package/dist/chunk-WI5VRP3X.js.map +0 -1
- package/dist/chunk-YZZBDCLV.js.map +0 -1
- package/dist/chunk-ZEMNF3QK.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as drizzle_orm_sqlite_core from 'drizzle-orm/sqlite-core';
|
|
2
|
-
import { I as IndexDeclaration } from './types-
|
|
2
|
+
import { I as IndexDeclaration } from './types-Dzkr0Eqi.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Table name configuration.
|
|
@@ -12,6 +12,7 @@ type SqliteTableNames = Readonly<{
|
|
|
12
12
|
embeddings: string;
|
|
13
13
|
fulltext: string;
|
|
14
14
|
indexMaterializations: string;
|
|
15
|
+
contributionMaterializations: string;
|
|
15
16
|
kindRemovals: string;
|
|
16
17
|
reconciliationMarkers: string;
|
|
17
18
|
}>;
|
|
@@ -1066,6 +1067,165 @@ declare function createSqliteTables(names?: Partial<SqliteTableNames>, options?:
|
|
|
1066
1067
|
};
|
|
1067
1068
|
dialect: "sqlite";
|
|
1068
1069
|
}>;
|
|
1070
|
+
readonly contributionMaterializations: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
1071
|
+
name: string;
|
|
1072
|
+
schema: undefined;
|
|
1073
|
+
columns: {
|
|
1074
|
+
graphId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1075
|
+
name: "graph_id";
|
|
1076
|
+
tableName: string;
|
|
1077
|
+
dataType: "string";
|
|
1078
|
+
columnType: "SQLiteText";
|
|
1079
|
+
data: string;
|
|
1080
|
+
driverParam: string;
|
|
1081
|
+
notNull: true;
|
|
1082
|
+
hasDefault: false;
|
|
1083
|
+
isPrimaryKey: false;
|
|
1084
|
+
isAutoincrement: false;
|
|
1085
|
+
hasRuntimeDefault: false;
|
|
1086
|
+
enumValues: [string, ...string[]];
|
|
1087
|
+
baseColumn: never;
|
|
1088
|
+
identity: undefined;
|
|
1089
|
+
generated: undefined;
|
|
1090
|
+
}, {}, {
|
|
1091
|
+
length: number | undefined;
|
|
1092
|
+
}>;
|
|
1093
|
+
logicalName: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1094
|
+
name: "logical_name";
|
|
1095
|
+
tableName: string;
|
|
1096
|
+
dataType: "string";
|
|
1097
|
+
columnType: "SQLiteText";
|
|
1098
|
+
data: string;
|
|
1099
|
+
driverParam: string;
|
|
1100
|
+
notNull: true;
|
|
1101
|
+
hasDefault: false;
|
|
1102
|
+
isPrimaryKey: false;
|
|
1103
|
+
isAutoincrement: false;
|
|
1104
|
+
hasRuntimeDefault: false;
|
|
1105
|
+
enumValues: [string, ...string[]];
|
|
1106
|
+
baseColumn: never;
|
|
1107
|
+
identity: undefined;
|
|
1108
|
+
generated: undefined;
|
|
1109
|
+
}, {}, {
|
|
1110
|
+
length: number | undefined;
|
|
1111
|
+
}>;
|
|
1112
|
+
owner: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1113
|
+
name: "owner";
|
|
1114
|
+
tableName: string;
|
|
1115
|
+
dataType: "string";
|
|
1116
|
+
columnType: "SQLiteText";
|
|
1117
|
+
data: string;
|
|
1118
|
+
driverParam: string;
|
|
1119
|
+
notNull: true;
|
|
1120
|
+
hasDefault: false;
|
|
1121
|
+
isPrimaryKey: false;
|
|
1122
|
+
isAutoincrement: false;
|
|
1123
|
+
hasRuntimeDefault: false;
|
|
1124
|
+
enumValues: [string, ...string[]];
|
|
1125
|
+
baseColumn: never;
|
|
1126
|
+
identity: undefined;
|
|
1127
|
+
generated: undefined;
|
|
1128
|
+
}, {}, {
|
|
1129
|
+
length: number | undefined;
|
|
1130
|
+
}>;
|
|
1131
|
+
tableName: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1132
|
+
name: "table_name";
|
|
1133
|
+
tableName: string;
|
|
1134
|
+
dataType: "string";
|
|
1135
|
+
columnType: "SQLiteText";
|
|
1136
|
+
data: string;
|
|
1137
|
+
driverParam: string;
|
|
1138
|
+
notNull: true;
|
|
1139
|
+
hasDefault: false;
|
|
1140
|
+
isPrimaryKey: false;
|
|
1141
|
+
isAutoincrement: false;
|
|
1142
|
+
hasRuntimeDefault: false;
|
|
1143
|
+
enumValues: [string, ...string[]];
|
|
1144
|
+
baseColumn: never;
|
|
1145
|
+
identity: undefined;
|
|
1146
|
+
generated: undefined;
|
|
1147
|
+
}, {}, {
|
|
1148
|
+
length: number | undefined;
|
|
1149
|
+
}>;
|
|
1150
|
+
signature: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1151
|
+
name: "signature";
|
|
1152
|
+
tableName: string;
|
|
1153
|
+
dataType: "string";
|
|
1154
|
+
columnType: "SQLiteText";
|
|
1155
|
+
data: string;
|
|
1156
|
+
driverParam: string;
|
|
1157
|
+
notNull: true;
|
|
1158
|
+
hasDefault: false;
|
|
1159
|
+
isPrimaryKey: false;
|
|
1160
|
+
isAutoincrement: false;
|
|
1161
|
+
hasRuntimeDefault: false;
|
|
1162
|
+
enumValues: [string, ...string[]];
|
|
1163
|
+
baseColumn: never;
|
|
1164
|
+
identity: undefined;
|
|
1165
|
+
generated: undefined;
|
|
1166
|
+
}, {}, {
|
|
1167
|
+
length: number | undefined;
|
|
1168
|
+
}>;
|
|
1169
|
+
materializedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1170
|
+
name: "materialized_at";
|
|
1171
|
+
tableName: string;
|
|
1172
|
+
dataType: "string";
|
|
1173
|
+
columnType: "SQLiteText";
|
|
1174
|
+
data: string;
|
|
1175
|
+
driverParam: string;
|
|
1176
|
+
notNull: false;
|
|
1177
|
+
hasDefault: false;
|
|
1178
|
+
isPrimaryKey: false;
|
|
1179
|
+
isAutoincrement: false;
|
|
1180
|
+
hasRuntimeDefault: false;
|
|
1181
|
+
enumValues: [string, ...string[]];
|
|
1182
|
+
baseColumn: never;
|
|
1183
|
+
identity: undefined;
|
|
1184
|
+
generated: undefined;
|
|
1185
|
+
}, {}, {
|
|
1186
|
+
length: number | undefined;
|
|
1187
|
+
}>;
|
|
1188
|
+
lastAttemptedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1189
|
+
name: "last_attempted_at";
|
|
1190
|
+
tableName: string;
|
|
1191
|
+
dataType: "string";
|
|
1192
|
+
columnType: "SQLiteText";
|
|
1193
|
+
data: string;
|
|
1194
|
+
driverParam: string;
|
|
1195
|
+
notNull: true;
|
|
1196
|
+
hasDefault: false;
|
|
1197
|
+
isPrimaryKey: false;
|
|
1198
|
+
isAutoincrement: false;
|
|
1199
|
+
hasRuntimeDefault: false;
|
|
1200
|
+
enumValues: [string, ...string[]];
|
|
1201
|
+
baseColumn: never;
|
|
1202
|
+
identity: undefined;
|
|
1203
|
+
generated: undefined;
|
|
1204
|
+
}, {}, {
|
|
1205
|
+
length: number | undefined;
|
|
1206
|
+
}>;
|
|
1207
|
+
lastError: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
1208
|
+
name: "last_error";
|
|
1209
|
+
tableName: string;
|
|
1210
|
+
dataType: "string";
|
|
1211
|
+
columnType: "SQLiteText";
|
|
1212
|
+
data: string;
|
|
1213
|
+
driverParam: string;
|
|
1214
|
+
notNull: false;
|
|
1215
|
+
hasDefault: false;
|
|
1216
|
+
isPrimaryKey: false;
|
|
1217
|
+
isAutoincrement: false;
|
|
1218
|
+
hasRuntimeDefault: false;
|
|
1219
|
+
enumValues: [string, ...string[]];
|
|
1220
|
+
baseColumn: never;
|
|
1221
|
+
identity: undefined;
|
|
1222
|
+
generated: undefined;
|
|
1223
|
+
}, {}, {
|
|
1224
|
+
length: number | undefined;
|
|
1225
|
+
}>;
|
|
1226
|
+
};
|
|
1227
|
+
dialect: "sqlite";
|
|
1228
|
+
}>;
|
|
1069
1229
|
readonly kindRemovals: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
1070
1230
|
name: string;
|
|
1071
1231
|
schema: undefined;
|
|
@@ -2295,6 +2455,165 @@ declare const tables: {
|
|
|
2295
2455
|
};
|
|
2296
2456
|
dialect: "sqlite";
|
|
2297
2457
|
}>;
|
|
2458
|
+
readonly contributionMaterializations: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
2459
|
+
name: string;
|
|
2460
|
+
schema: undefined;
|
|
2461
|
+
columns: {
|
|
2462
|
+
graphId: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2463
|
+
name: "graph_id";
|
|
2464
|
+
tableName: string;
|
|
2465
|
+
dataType: "string";
|
|
2466
|
+
columnType: "SQLiteText";
|
|
2467
|
+
data: string;
|
|
2468
|
+
driverParam: string;
|
|
2469
|
+
notNull: true;
|
|
2470
|
+
hasDefault: false;
|
|
2471
|
+
isPrimaryKey: false;
|
|
2472
|
+
isAutoincrement: false;
|
|
2473
|
+
hasRuntimeDefault: false;
|
|
2474
|
+
enumValues: [string, ...string[]];
|
|
2475
|
+
baseColumn: never;
|
|
2476
|
+
identity: undefined;
|
|
2477
|
+
generated: undefined;
|
|
2478
|
+
}, {}, {
|
|
2479
|
+
length: number | undefined;
|
|
2480
|
+
}>;
|
|
2481
|
+
logicalName: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2482
|
+
name: "logical_name";
|
|
2483
|
+
tableName: string;
|
|
2484
|
+
dataType: "string";
|
|
2485
|
+
columnType: "SQLiteText";
|
|
2486
|
+
data: string;
|
|
2487
|
+
driverParam: string;
|
|
2488
|
+
notNull: true;
|
|
2489
|
+
hasDefault: false;
|
|
2490
|
+
isPrimaryKey: false;
|
|
2491
|
+
isAutoincrement: false;
|
|
2492
|
+
hasRuntimeDefault: false;
|
|
2493
|
+
enumValues: [string, ...string[]];
|
|
2494
|
+
baseColumn: never;
|
|
2495
|
+
identity: undefined;
|
|
2496
|
+
generated: undefined;
|
|
2497
|
+
}, {}, {
|
|
2498
|
+
length: number | undefined;
|
|
2499
|
+
}>;
|
|
2500
|
+
owner: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2501
|
+
name: "owner";
|
|
2502
|
+
tableName: string;
|
|
2503
|
+
dataType: "string";
|
|
2504
|
+
columnType: "SQLiteText";
|
|
2505
|
+
data: string;
|
|
2506
|
+
driverParam: string;
|
|
2507
|
+
notNull: true;
|
|
2508
|
+
hasDefault: false;
|
|
2509
|
+
isPrimaryKey: false;
|
|
2510
|
+
isAutoincrement: false;
|
|
2511
|
+
hasRuntimeDefault: false;
|
|
2512
|
+
enumValues: [string, ...string[]];
|
|
2513
|
+
baseColumn: never;
|
|
2514
|
+
identity: undefined;
|
|
2515
|
+
generated: undefined;
|
|
2516
|
+
}, {}, {
|
|
2517
|
+
length: number | undefined;
|
|
2518
|
+
}>;
|
|
2519
|
+
tableName: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2520
|
+
name: "table_name";
|
|
2521
|
+
tableName: string;
|
|
2522
|
+
dataType: "string";
|
|
2523
|
+
columnType: "SQLiteText";
|
|
2524
|
+
data: string;
|
|
2525
|
+
driverParam: string;
|
|
2526
|
+
notNull: true;
|
|
2527
|
+
hasDefault: false;
|
|
2528
|
+
isPrimaryKey: false;
|
|
2529
|
+
isAutoincrement: false;
|
|
2530
|
+
hasRuntimeDefault: false;
|
|
2531
|
+
enumValues: [string, ...string[]];
|
|
2532
|
+
baseColumn: never;
|
|
2533
|
+
identity: undefined;
|
|
2534
|
+
generated: undefined;
|
|
2535
|
+
}, {}, {
|
|
2536
|
+
length: number | undefined;
|
|
2537
|
+
}>;
|
|
2538
|
+
signature: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2539
|
+
name: "signature";
|
|
2540
|
+
tableName: string;
|
|
2541
|
+
dataType: "string";
|
|
2542
|
+
columnType: "SQLiteText";
|
|
2543
|
+
data: string;
|
|
2544
|
+
driverParam: string;
|
|
2545
|
+
notNull: true;
|
|
2546
|
+
hasDefault: false;
|
|
2547
|
+
isPrimaryKey: false;
|
|
2548
|
+
isAutoincrement: false;
|
|
2549
|
+
hasRuntimeDefault: false;
|
|
2550
|
+
enumValues: [string, ...string[]];
|
|
2551
|
+
baseColumn: never;
|
|
2552
|
+
identity: undefined;
|
|
2553
|
+
generated: undefined;
|
|
2554
|
+
}, {}, {
|
|
2555
|
+
length: number | undefined;
|
|
2556
|
+
}>;
|
|
2557
|
+
materializedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2558
|
+
name: "materialized_at";
|
|
2559
|
+
tableName: string;
|
|
2560
|
+
dataType: "string";
|
|
2561
|
+
columnType: "SQLiteText";
|
|
2562
|
+
data: string;
|
|
2563
|
+
driverParam: string;
|
|
2564
|
+
notNull: false;
|
|
2565
|
+
hasDefault: false;
|
|
2566
|
+
isPrimaryKey: false;
|
|
2567
|
+
isAutoincrement: false;
|
|
2568
|
+
hasRuntimeDefault: false;
|
|
2569
|
+
enumValues: [string, ...string[]];
|
|
2570
|
+
baseColumn: never;
|
|
2571
|
+
identity: undefined;
|
|
2572
|
+
generated: undefined;
|
|
2573
|
+
}, {}, {
|
|
2574
|
+
length: number | undefined;
|
|
2575
|
+
}>;
|
|
2576
|
+
lastAttemptedAt: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2577
|
+
name: "last_attempted_at";
|
|
2578
|
+
tableName: string;
|
|
2579
|
+
dataType: "string";
|
|
2580
|
+
columnType: "SQLiteText";
|
|
2581
|
+
data: string;
|
|
2582
|
+
driverParam: string;
|
|
2583
|
+
notNull: true;
|
|
2584
|
+
hasDefault: false;
|
|
2585
|
+
isPrimaryKey: false;
|
|
2586
|
+
isAutoincrement: false;
|
|
2587
|
+
hasRuntimeDefault: false;
|
|
2588
|
+
enumValues: [string, ...string[]];
|
|
2589
|
+
baseColumn: never;
|
|
2590
|
+
identity: undefined;
|
|
2591
|
+
generated: undefined;
|
|
2592
|
+
}, {}, {
|
|
2593
|
+
length: number | undefined;
|
|
2594
|
+
}>;
|
|
2595
|
+
lastError: drizzle_orm_sqlite_core.SQLiteColumn<{
|
|
2596
|
+
name: "last_error";
|
|
2597
|
+
tableName: string;
|
|
2598
|
+
dataType: "string";
|
|
2599
|
+
columnType: "SQLiteText";
|
|
2600
|
+
data: string;
|
|
2601
|
+
driverParam: string;
|
|
2602
|
+
notNull: false;
|
|
2603
|
+
hasDefault: false;
|
|
2604
|
+
isPrimaryKey: false;
|
|
2605
|
+
isAutoincrement: false;
|
|
2606
|
+
hasRuntimeDefault: false;
|
|
2607
|
+
enumValues: [string, ...string[]];
|
|
2608
|
+
baseColumn: never;
|
|
2609
|
+
identity: undefined;
|
|
2610
|
+
generated: undefined;
|
|
2611
|
+
}, {}, {
|
|
2612
|
+
length: number | undefined;
|
|
2613
|
+
}>;
|
|
2614
|
+
};
|
|
2615
|
+
dialect: "sqlite";
|
|
2616
|
+
}>;
|
|
2298
2617
|
readonly kindRemovals: drizzle_orm_sqlite_core.SQLiteTableWithColumns<{
|
|
2299
2618
|
name: string;
|
|
2300
2619
|
schema: undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
import { K as KindRegistry, G as GraphDef, t as EdgeKinds, w as NodeKinds, s as AllNodeTypes, c as SchemaManagerOptions, d as SchemaValidationResult } from './manager-
|
|
4
|
-
import { A as AnyEdgeType, N as NodeType, T as TemporalMode,
|
|
2
|
+
import { p as SqlDialect, ah as SqlSchema, F as FulltextStrategy, ax as ValueType, ay as PredicateExpression, az as VectorMetricType, a0 as FulltextQueryMode, Q as QueryAst, J as JsonPointer, L as FieldRef, ac as ParameterRef, G as GraphBackend, al as TransactionBackend, a5 as JsonPointerInput, am as TraversalExpansion, aA as Traversal, aB as NodePredicate, aC as ProjectedField, ab as OrderSpec, aD as GroupBySpec, a3 as HybridFusionOptions, aE as RecursiveCyclePolicy, aF as TraversalDirection$1, aG as EdgeRow, aH as NodeRow, U as AdoptedTransaction, K as AggregateExpr, aI as SelectiveField, aJ as ComposableQuery, aK as SetOperationType, aL as SetOperation, ag as SortDirection, m as JsonSchema, aM as VectorMetric } from './types-Dzkr0Eqi.js';
|
|
3
|
+
import { K as KindRegistry, G as GraphDef, t as EdgeKinds, w as NodeKinds, s as AllNodeTypes, c as SchemaManagerOptions, d as SchemaValidationResult } from './manager-C3LxzPcX.js';
|
|
4
|
+
import { A as AnyEdgeType, N as NodeType, T as TemporalMode, e as EdgeType, E as EdgeRegistration, h as EdgeId, m as NodeId, b as NodeRegistration, K as KindEntity, f as Cardinality, k as EndpointExistence, d as KindAnnotations, o as UniquenessScope, g as Collation, G as GraphExtension } from './extension-types-B78CZfA5.js';
|
|
5
5
|
import { SQL } from 'drizzle-orm';
|
|
6
|
-
import { b as MaterializeIndexesOptions, M as MaterializeIndexesResult } from './materialize-indexes-
|
|
6
|
+
import { b as MaterializeIndexesOptions, M as MaterializeIndexesResult } from './materialize-indexes-DFavFQah.js';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Embedding type for vector search.
|
|
@@ -1615,6 +1615,41 @@ type GraphEdgeCollections<G extends GraphDef> = {
|
|
|
1615
1615
|
* Provides the same `tx.nodes.*` and `tx.edges.*` API as the Store,
|
|
1616
1616
|
* but operations are executed within the transaction scope.
|
|
1617
1617
|
*
|
|
1618
|
+
* `tx.sql` is the raw Drizzle handle **bound to this same
|
|
1619
|
+
* transaction** — use it to write the caller's own relational tables
|
|
1620
|
+
* inside the graph-owned transaction so both layers commit or roll
|
|
1621
|
+
* back together (the graph-owned counterpart of
|
|
1622
|
+
* {@link Store.withTransaction}, where the caller owns the boundary):
|
|
1623
|
+
*
|
|
1624
|
+
* ```typescript
|
|
1625
|
+
* await store.transaction(async (tx) => {
|
|
1626
|
+
* await tx.nodes.Document.update(documentId, props);
|
|
1627
|
+
* // `tx.sql` is the `AdoptedTransaction` union — cast to your
|
|
1628
|
+
* // concrete Drizzle database type at the call site.
|
|
1629
|
+
* const sqlTx = tx.sql as NodePgDatabase;
|
|
1630
|
+
* await sqlTx.insert(documentVersions).values(versionRow);
|
|
1631
|
+
* await sqlTx.insert(changeEvents).values(eventRow);
|
|
1632
|
+
* });
|
|
1633
|
+
* ```
|
|
1634
|
+
*
|
|
1635
|
+
* Per-backend semantics:
|
|
1636
|
+
* - **Postgres / libsql** (async drivers): `tx.sql` is the Drizzle
|
|
1637
|
+
* transaction handle. Using the outer `db` instead would write on a
|
|
1638
|
+
* *different* connection and silently escape the transaction — so
|
|
1639
|
+
* `tx.sql` is a correctness requirement there.
|
|
1640
|
+
* - **better-sqlite3**: the single connection, framed by TypeGraph's
|
|
1641
|
+
* `BEGIN`/`COMMIT`/`ROLLBACK`.
|
|
1642
|
+
* - **Durable Objects (`do-sqlite`)**: the bound Drizzle handle; the
|
|
1643
|
+
* storage transaction is ambient, so writing the outer `db` also
|
|
1644
|
+
* enlists — `tx.sql` is the explicit, portable form.
|
|
1645
|
+
*
|
|
1646
|
+
* It is `undefined` only on the non-transactional fallback
|
|
1647
|
+
* (`backend.capabilities.transactions === false` — e.g. Cloudflare
|
|
1648
|
+
* D1, `drizzle-orm/neon-http`), where `store.transaction()` runs the
|
|
1649
|
+
* callback with no atomicity and there is no transaction to enlist.
|
|
1650
|
+
* Its type is the `AdoptedTransaction` union; cast to your concrete
|
|
1651
|
+
* Drizzle database type at the call site.
|
|
1652
|
+
*
|
|
1618
1653
|
* @example
|
|
1619
1654
|
* ```typescript
|
|
1620
1655
|
* await store.transaction(async (tx) => {
|
|
@@ -1627,6 +1662,7 @@ type GraphEdgeCollections<G extends GraphDef> = {
|
|
|
1627
1662
|
type TransactionContext<G extends GraphDef> = Readonly<{
|
|
1628
1663
|
nodes: GraphNodeCollections<G>;
|
|
1629
1664
|
edges: GraphEdgeCollections<G>;
|
|
1665
|
+
sql?: AdoptedTransaction;
|
|
1630
1666
|
}>;
|
|
1631
1667
|
/**
|
|
1632
1668
|
* Replace branded `NodeId` / `EdgeId` with plain `string` in each
|
|
@@ -3341,6 +3377,12 @@ declare class Store<G extends GraphDef> {
|
|
|
3341
3377
|
* The transaction context provides the same collection API as the Store:
|
|
3342
3378
|
* - `tx.nodes.Person.create(...)` - Create a node
|
|
3343
3379
|
* - `tx.edges.worksAt.create(...)` - Create an edge
|
|
3380
|
+
* - `tx.sql` - the raw Drizzle handle **bound to this same
|
|
3381
|
+
* transaction**, for writing the caller's own relational tables in
|
|
3382
|
+
* the same atomic boundary (the graph-owned counterpart of
|
|
3383
|
+
* {@link Store.withTransaction}). See {@link TransactionContext}
|
|
3384
|
+
* for per-backend semantics; it is `undefined` only on the
|
|
3385
|
+
* non-transactional fallback.
|
|
3344
3386
|
*
|
|
3345
3387
|
* @example
|
|
3346
3388
|
* ```typescript
|
|
@@ -3355,6 +3397,16 @@ declare class Store<G extends GraphDef> {
|
|
|
3355
3397
|
* });
|
|
3356
3398
|
* ```
|
|
3357
3399
|
*
|
|
3400
|
+
* @example Cross-store write via `tx.sql` (graph-owned boundary):
|
|
3401
|
+
* ```typescript
|
|
3402
|
+
* await store.transaction(async (tx) => {
|
|
3403
|
+
* await tx.nodes.Document.update(documentId, props);
|
|
3404
|
+
* // cast `tx.sql` to your concrete Drizzle database type
|
|
3405
|
+
* const sqlTx = tx.sql as NodePgDatabase;
|
|
3406
|
+
* await sqlTx.insert(documentVersions).values(versionRow);
|
|
3407
|
+
* });
|
|
3408
|
+
* ```
|
|
3409
|
+
*
|
|
3358
3410
|
* **Backends without transactions.** When `backend.capabilities.transactions`
|
|
3359
3411
|
* is `false` (Cloudflare D1, `drizzle-orm/neon-http`), this method runs the
|
|
3360
3412
|
* callback against the same backend used outside `transaction()` — writes
|
|
@@ -3371,6 +3423,62 @@ declare class Store<G extends GraphDef> {
|
|
|
3371
3423
|
* ```
|
|
3372
3424
|
*/
|
|
3373
3425
|
transaction<T>(fn: (tx: TransactionContext<G>) => Promise<T>): Promise<T>;
|
|
3426
|
+
/**
|
|
3427
|
+
* Adopts a caller-owned, already-open Drizzle transaction so the graph
|
|
3428
|
+
* store and the caller's relational writes commit or roll back as one
|
|
3429
|
+
* Postgres/SQLite transaction (#134).
|
|
3430
|
+
*
|
|
3431
|
+
* Use this when the **relational layer owns the transaction**: the
|
|
3432
|
+
* caller has opened a transaction and needs TypeGraph writes enlisted
|
|
3433
|
+
* on the *same* connection. Unlike {@link transaction}, this opens no
|
|
3434
|
+
* transaction — the caller's transaction is the single commit/rollback
|
|
3435
|
+
* boundary.
|
|
3436
|
+
*
|
|
3437
|
+
* `withTransaction` is driver-agnostic; how the caller opens the
|
|
3438
|
+
* transaction is not. **Async drivers** (node-postgres,
|
|
3439
|
+
* `neon-serverless` Pool, libsql) use `db.transaction(async …)`.
|
|
3440
|
+
* **Synchronous `better-sqlite3`** cannot — its driver rejects an
|
|
3441
|
+
* `async` transaction callback (`Transaction function cannot return a
|
|
3442
|
+
* promise`) and the async continuation would run outside the
|
|
3443
|
+
* rolled-back transaction — so the caller opens the transaction with
|
|
3444
|
+
* explicit `BEGIN`/`COMMIT`/`ROLLBACK` on the single connection
|
|
3445
|
+
* instead. See the "Cross-Store Transactions" recipe for both shapes.
|
|
3446
|
+
*
|
|
3447
|
+
* The returned context reuses this store's already-resolved
|
|
3448
|
+
* schema/registry: it runs **no** schema bootstrap, `evolve`, or
|
|
3449
|
+
* migration, and emits **no DDL** inside the caller's transaction.
|
|
3450
|
+
* Fulltext operations assert the durable materialization marker (a
|
|
3451
|
+
* cached SELECT) and throw {@link StoreNotInitializedError} on a
|
|
3452
|
+
* missing/stale/failed marker rather than migrating mid-transaction —
|
|
3453
|
+
* so boot the parent store via `createStoreWithSchema` once at
|
|
3454
|
+
* startup.
|
|
3455
|
+
*
|
|
3456
|
+
* @example
|
|
3457
|
+
* ```typescript
|
|
3458
|
+
* // Async driver (Postgres / libsql):
|
|
3459
|
+
* await db.transaction(async (sqlTx) => {
|
|
3460
|
+
* const connector = await createConnectorRow(sqlTx, input); // Drizzle
|
|
3461
|
+
* const txStore = store.withTransaction(sqlTx);
|
|
3462
|
+
* await txStore.nodes.ArtifactSource.create({ // TypeGraph
|
|
3463
|
+
* connectorId: connector.id,
|
|
3464
|
+
* });
|
|
3465
|
+
* }); // one COMMIT / ROLLBACK across both layers
|
|
3466
|
+
* ```
|
|
3467
|
+
*
|
|
3468
|
+
* @throws {ConfigurationError} when the backend cannot adopt an
|
|
3469
|
+
* external transaction — either it is not a Drizzle Postgres/SQLite
|
|
3470
|
+
* backend, or `backend.capabilities.transactions` is `false`
|
|
3471
|
+
* (`drizzle-orm/neon-http`, Cloudflare D1, SQLite
|
|
3472
|
+
* `transactionMode: "none"`). A non-atomic fallback is deliberately
|
|
3473
|
+
* not offered here: the caller's relational write *would* still
|
|
3474
|
+
* commit, defeating the purpose of cross-store atomicity.
|
|
3475
|
+
* @throws {StoreNotInitializedError} at point of use, when a fulltext
|
|
3476
|
+
* operation on the returned context observes a missing/stale/failed
|
|
3477
|
+
* durable materialization marker (parent store not booted via
|
|
3478
|
+
* `createStoreWithSchema`). Rolls back the caller's transaction
|
|
3479
|
+
* without emitting any DDL.
|
|
3480
|
+
*/
|
|
3481
|
+
withTransaction(externalTx: AdoptedTransaction): TransactionContext<G>;
|
|
3374
3482
|
/**
|
|
3375
3483
|
* Hard-deletes all data for this graph from the database.
|
|
3376
3484
|
*
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import {
|
|
3
|
-
import { K as KindRegistry, G as GraphDef, t as EdgeKinds, w as NodeKinds, s as AllNodeTypes, c as SchemaManagerOptions, d as SchemaValidationResult } from './manager-
|
|
4
|
-
import { A as AnyEdgeType, N as NodeType, T as TemporalMode,
|
|
2
|
+
import { p as SqlDialect, ah as SqlSchema, F as FulltextStrategy, ax as ValueType, ay as PredicateExpression, az as VectorMetricType, a0 as FulltextQueryMode, Q as QueryAst, J as JsonPointer, L as FieldRef, ac as ParameterRef, G as GraphBackend, al as TransactionBackend, a5 as JsonPointerInput, am as TraversalExpansion, aA as Traversal, aB as NodePredicate, aC as ProjectedField, ab as OrderSpec, aD as GroupBySpec, a3 as HybridFusionOptions, aE as RecursiveCyclePolicy, aF as TraversalDirection$1, aG as EdgeRow, aH as NodeRow, U as AdoptedTransaction, K as AggregateExpr, aI as SelectiveField, aJ as ComposableQuery, aK as SetOperationType, aL as SetOperation, ag as SortDirection, m as JsonSchema, aM as VectorMetric } from './types-DZPBXZOK.cjs';
|
|
3
|
+
import { K as KindRegistry, G as GraphDef, t as EdgeKinds, w as NodeKinds, s as AllNodeTypes, c as SchemaManagerOptions, d as SchemaValidationResult } from './manager-Aqzmztkb.cjs';
|
|
4
|
+
import { A as AnyEdgeType, N as NodeType, T as TemporalMode, e as EdgeType, E as EdgeRegistration, h as EdgeId, m as NodeId, b as NodeRegistration, K as KindEntity, f as Cardinality, k as EndpointExistence, d as KindAnnotations, o as UniquenessScope, g as Collation, G as GraphExtension } from './extension-types-B78CZfA5.cjs';
|
|
5
5
|
import { SQL } from 'drizzle-orm';
|
|
6
|
-
import { b as MaterializeIndexesOptions, M as MaterializeIndexesResult } from './materialize-indexes-
|
|
6
|
+
import { b as MaterializeIndexesOptions, M as MaterializeIndexesResult } from './materialize-indexes-BQfaAZKA.cjs';
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Embedding type for vector search.
|
|
@@ -1615,6 +1615,41 @@ type GraphEdgeCollections<G extends GraphDef> = {
|
|
|
1615
1615
|
* Provides the same `tx.nodes.*` and `tx.edges.*` API as the Store,
|
|
1616
1616
|
* but operations are executed within the transaction scope.
|
|
1617
1617
|
*
|
|
1618
|
+
* `tx.sql` is the raw Drizzle handle **bound to this same
|
|
1619
|
+
* transaction** — use it to write the caller's own relational tables
|
|
1620
|
+
* inside the graph-owned transaction so both layers commit or roll
|
|
1621
|
+
* back together (the graph-owned counterpart of
|
|
1622
|
+
* {@link Store.withTransaction}, where the caller owns the boundary):
|
|
1623
|
+
*
|
|
1624
|
+
* ```typescript
|
|
1625
|
+
* await store.transaction(async (tx) => {
|
|
1626
|
+
* await tx.nodes.Document.update(documentId, props);
|
|
1627
|
+
* // `tx.sql` is the `AdoptedTransaction` union — cast to your
|
|
1628
|
+
* // concrete Drizzle database type at the call site.
|
|
1629
|
+
* const sqlTx = tx.sql as NodePgDatabase;
|
|
1630
|
+
* await sqlTx.insert(documentVersions).values(versionRow);
|
|
1631
|
+
* await sqlTx.insert(changeEvents).values(eventRow);
|
|
1632
|
+
* });
|
|
1633
|
+
* ```
|
|
1634
|
+
*
|
|
1635
|
+
* Per-backend semantics:
|
|
1636
|
+
* - **Postgres / libsql** (async drivers): `tx.sql` is the Drizzle
|
|
1637
|
+
* transaction handle. Using the outer `db` instead would write on a
|
|
1638
|
+
* *different* connection and silently escape the transaction — so
|
|
1639
|
+
* `tx.sql` is a correctness requirement there.
|
|
1640
|
+
* - **better-sqlite3**: the single connection, framed by TypeGraph's
|
|
1641
|
+
* `BEGIN`/`COMMIT`/`ROLLBACK`.
|
|
1642
|
+
* - **Durable Objects (`do-sqlite`)**: the bound Drizzle handle; the
|
|
1643
|
+
* storage transaction is ambient, so writing the outer `db` also
|
|
1644
|
+
* enlists — `tx.sql` is the explicit, portable form.
|
|
1645
|
+
*
|
|
1646
|
+
* It is `undefined` only on the non-transactional fallback
|
|
1647
|
+
* (`backend.capabilities.transactions === false` — e.g. Cloudflare
|
|
1648
|
+
* D1, `drizzle-orm/neon-http`), where `store.transaction()` runs the
|
|
1649
|
+
* callback with no atomicity and there is no transaction to enlist.
|
|
1650
|
+
* Its type is the `AdoptedTransaction` union; cast to your concrete
|
|
1651
|
+
* Drizzle database type at the call site.
|
|
1652
|
+
*
|
|
1618
1653
|
* @example
|
|
1619
1654
|
* ```typescript
|
|
1620
1655
|
* await store.transaction(async (tx) => {
|
|
@@ -1627,6 +1662,7 @@ type GraphEdgeCollections<G extends GraphDef> = {
|
|
|
1627
1662
|
type TransactionContext<G extends GraphDef> = Readonly<{
|
|
1628
1663
|
nodes: GraphNodeCollections<G>;
|
|
1629
1664
|
edges: GraphEdgeCollections<G>;
|
|
1665
|
+
sql?: AdoptedTransaction;
|
|
1630
1666
|
}>;
|
|
1631
1667
|
/**
|
|
1632
1668
|
* Replace branded `NodeId` / `EdgeId` with plain `string` in each
|
|
@@ -3341,6 +3377,12 @@ declare class Store<G extends GraphDef> {
|
|
|
3341
3377
|
* The transaction context provides the same collection API as the Store:
|
|
3342
3378
|
* - `tx.nodes.Person.create(...)` - Create a node
|
|
3343
3379
|
* - `tx.edges.worksAt.create(...)` - Create an edge
|
|
3380
|
+
* - `tx.sql` - the raw Drizzle handle **bound to this same
|
|
3381
|
+
* transaction**, for writing the caller's own relational tables in
|
|
3382
|
+
* the same atomic boundary (the graph-owned counterpart of
|
|
3383
|
+
* {@link Store.withTransaction}). See {@link TransactionContext}
|
|
3384
|
+
* for per-backend semantics; it is `undefined` only on the
|
|
3385
|
+
* non-transactional fallback.
|
|
3344
3386
|
*
|
|
3345
3387
|
* @example
|
|
3346
3388
|
* ```typescript
|
|
@@ -3355,6 +3397,16 @@ declare class Store<G extends GraphDef> {
|
|
|
3355
3397
|
* });
|
|
3356
3398
|
* ```
|
|
3357
3399
|
*
|
|
3400
|
+
* @example Cross-store write via `tx.sql` (graph-owned boundary):
|
|
3401
|
+
* ```typescript
|
|
3402
|
+
* await store.transaction(async (tx) => {
|
|
3403
|
+
* await tx.nodes.Document.update(documentId, props);
|
|
3404
|
+
* // cast `tx.sql` to your concrete Drizzle database type
|
|
3405
|
+
* const sqlTx = tx.sql as NodePgDatabase;
|
|
3406
|
+
* await sqlTx.insert(documentVersions).values(versionRow);
|
|
3407
|
+
* });
|
|
3408
|
+
* ```
|
|
3409
|
+
*
|
|
3358
3410
|
* **Backends without transactions.** When `backend.capabilities.transactions`
|
|
3359
3411
|
* is `false` (Cloudflare D1, `drizzle-orm/neon-http`), this method runs the
|
|
3360
3412
|
* callback against the same backend used outside `transaction()` — writes
|
|
@@ -3371,6 +3423,62 @@ declare class Store<G extends GraphDef> {
|
|
|
3371
3423
|
* ```
|
|
3372
3424
|
*/
|
|
3373
3425
|
transaction<T>(fn: (tx: TransactionContext<G>) => Promise<T>): Promise<T>;
|
|
3426
|
+
/**
|
|
3427
|
+
* Adopts a caller-owned, already-open Drizzle transaction so the graph
|
|
3428
|
+
* store and the caller's relational writes commit or roll back as one
|
|
3429
|
+
* Postgres/SQLite transaction (#134).
|
|
3430
|
+
*
|
|
3431
|
+
* Use this when the **relational layer owns the transaction**: the
|
|
3432
|
+
* caller has opened a transaction and needs TypeGraph writes enlisted
|
|
3433
|
+
* on the *same* connection. Unlike {@link transaction}, this opens no
|
|
3434
|
+
* transaction — the caller's transaction is the single commit/rollback
|
|
3435
|
+
* boundary.
|
|
3436
|
+
*
|
|
3437
|
+
* `withTransaction` is driver-agnostic; how the caller opens the
|
|
3438
|
+
* transaction is not. **Async drivers** (node-postgres,
|
|
3439
|
+
* `neon-serverless` Pool, libsql) use `db.transaction(async …)`.
|
|
3440
|
+
* **Synchronous `better-sqlite3`** cannot — its driver rejects an
|
|
3441
|
+
* `async` transaction callback (`Transaction function cannot return a
|
|
3442
|
+
* promise`) and the async continuation would run outside the
|
|
3443
|
+
* rolled-back transaction — so the caller opens the transaction with
|
|
3444
|
+
* explicit `BEGIN`/`COMMIT`/`ROLLBACK` on the single connection
|
|
3445
|
+
* instead. See the "Cross-Store Transactions" recipe for both shapes.
|
|
3446
|
+
*
|
|
3447
|
+
* The returned context reuses this store's already-resolved
|
|
3448
|
+
* schema/registry: it runs **no** schema bootstrap, `evolve`, or
|
|
3449
|
+
* migration, and emits **no DDL** inside the caller's transaction.
|
|
3450
|
+
* Fulltext operations assert the durable materialization marker (a
|
|
3451
|
+
* cached SELECT) and throw {@link StoreNotInitializedError} on a
|
|
3452
|
+
* missing/stale/failed marker rather than migrating mid-transaction —
|
|
3453
|
+
* so boot the parent store via `createStoreWithSchema` once at
|
|
3454
|
+
* startup.
|
|
3455
|
+
*
|
|
3456
|
+
* @example
|
|
3457
|
+
* ```typescript
|
|
3458
|
+
* // Async driver (Postgres / libsql):
|
|
3459
|
+
* await db.transaction(async (sqlTx) => {
|
|
3460
|
+
* const connector = await createConnectorRow(sqlTx, input); // Drizzle
|
|
3461
|
+
* const txStore = store.withTransaction(sqlTx);
|
|
3462
|
+
* await txStore.nodes.ArtifactSource.create({ // TypeGraph
|
|
3463
|
+
* connectorId: connector.id,
|
|
3464
|
+
* });
|
|
3465
|
+
* }); // one COMMIT / ROLLBACK across both layers
|
|
3466
|
+
* ```
|
|
3467
|
+
*
|
|
3468
|
+
* @throws {ConfigurationError} when the backend cannot adopt an
|
|
3469
|
+
* external transaction — either it is not a Drizzle Postgres/SQLite
|
|
3470
|
+
* backend, or `backend.capabilities.transactions` is `false`
|
|
3471
|
+
* (`drizzle-orm/neon-http`, Cloudflare D1, SQLite
|
|
3472
|
+
* `transactionMode: "none"`). A non-atomic fallback is deliberately
|
|
3473
|
+
* not offered here: the caller's relational write *would* still
|
|
3474
|
+
* commit, defeating the purpose of cross-store atomicity.
|
|
3475
|
+
* @throws {StoreNotInitializedError} at point of use, when a fulltext
|
|
3476
|
+
* operation on the returned context observes a missing/stale/failed
|
|
3477
|
+
* durable materialization marker (parent store not booted via
|
|
3478
|
+
* `createStoreWithSchema`). Rolls back the caller's transaction
|
|
3479
|
+
* without emitting any DDL.
|
|
3480
|
+
*/
|
|
3481
|
+
withTransaction(externalTx: AdoptedTransaction): TransactionContext<G>;
|
|
3374
3482
|
/**
|
|
3375
3483
|
* Hard-deletes all data for this graph from the database.
|
|
3376
3484
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as KindEntity } from './extension-types-
|
|
2
|
-
import { J as JsonPointer } from './types
|
|
1
|
+
import { K as KindEntity } from './extension-types-B78CZfA5.cjs';
|
|
2
|
+
import { J as JsonPointer } from './types-DZPBXZOK.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* QueryProfiler types.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { K as KindEntity } from './extension-types-
|
|
2
|
-
import { J as JsonPointer } from './types-
|
|
1
|
+
import { K as KindEntity } from './extension-types-B78CZfA5.js';
|
|
2
|
+
import { J as JsonPointer } from './types-Dzkr0Eqi.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* QueryProfiler types.
|