@event-driven-io/dumbo 0.13.0-beta.3 → 0.13.0-beta.30

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 (91) hide show
  1. package/dist/chunk-4SM4JJJZ.js +83 -0
  2. package/dist/chunk-4SM4JJJZ.js.map +1 -0
  3. package/dist/chunk-EEKBLOCH.cjs +706 -0
  4. package/dist/chunk-EEKBLOCH.cjs.map +1 -0
  5. package/dist/{chunk-OJ34O3Q2.cjs → chunk-GVR3PSDL.cjs} +2474 -1636
  6. package/dist/chunk-GVR3PSDL.cjs.map +1 -0
  7. package/dist/chunk-HZM7GDOT.cjs +34 -0
  8. package/dist/chunk-HZM7GDOT.cjs.map +1 -0
  9. package/dist/{chunk-N7RWT46K.js → chunk-JKE6SULM.js} +2522 -1684
  10. package/dist/chunk-JKE6SULM.js.map +1 -0
  11. package/dist/chunk-MOPKHYYU.cjs +83 -0
  12. package/dist/chunk-MOPKHYYU.cjs.map +1 -0
  13. package/dist/chunk-RA2L3FQW.js +481 -0
  14. package/dist/chunk-RA2L3FQW.js.map +1 -0
  15. package/dist/chunk-UA542GT3.cjs +481 -0
  16. package/dist/chunk-UA542GT3.cjs.map +1 -0
  17. package/dist/chunk-WLWELSA2.js +34 -0
  18. package/dist/chunk-WLWELSA2.js.map +1 -0
  19. package/dist/chunk-XFEGS3YT.js +706 -0
  20. package/dist/chunk-XFEGS3YT.js.map +1 -0
  21. package/dist/cloudflare.cjs +456 -0
  22. package/dist/cloudflare.cjs.map +1 -0
  23. package/dist/cloudflare.d.cts +92 -0
  24. package/dist/cloudflare.d.ts +92 -0
  25. package/dist/cloudflare.js +456 -0
  26. package/dist/cloudflare.js.map +1 -0
  27. package/dist/{columnProcessors-DMPpTPqM.d.ts → columnProcessors-Be2uMYjS.d.cts} +1 -1
  28. package/dist/{columnProcessors-BX-sH7ah.d.cts → columnProcessors-D0ivj_SU.d.ts} +1 -1
  29. package/dist/{connectionString-B1wm0TFc.d.cts → connectionString-Dch_MIRU.d.cts} +394 -168
  30. package/dist/{connectionString-B1wm0TFc.d.ts → connectionString-Dch_MIRU.d.ts} +394 -168
  31. package/dist/index.cjs +100 -4
  32. package/dist/index.cjs.map +1 -1
  33. package/dist/index.d.cts +23 -18
  34. package/dist/index.d.ts +23 -18
  35. package/dist/index.js +105 -9
  36. package/dist/index.js.map +1 -1
  37. package/dist/pg.cjs +383 -9
  38. package/dist/pg.cjs.map +1 -1
  39. package/dist/pg.d.cts +81 -105
  40. package/dist/pg.d.ts +81 -105
  41. package/dist/pg.js +435 -61
  42. package/dist/pg.js.map +1 -1
  43. package/dist/postgresql.cjs +50 -0
  44. package/dist/postgresql.cjs.map +1 -0
  45. package/dist/postgresql.d.cts +61 -0
  46. package/dist/postgresql.d.ts +61 -0
  47. package/dist/postgresql.js +50 -0
  48. package/dist/sqlite.cjs +60 -0
  49. package/dist/sqlite.cjs.map +1 -0
  50. package/dist/{index-C2z_XBn6.d.ts → sqlite.d.cts} +69 -20
  51. package/dist/{index-C0h0c380.d.cts → sqlite.d.ts} +69 -20
  52. package/dist/sqlite.js +60 -0
  53. package/dist/sqlite3.cjs +319 -6
  54. package/dist/sqlite3.cjs.map +1 -1
  55. package/dist/sqlite3.d.cts +45 -25
  56. package/dist/sqlite3.d.ts +45 -25
  57. package/dist/sqlite3.js +335 -22
  58. package/dist/sqlite3.js.map +1 -1
  59. package/package.json +55 -33
  60. package/dist/chunk-A7TC7IOP.cjs +0 -55
  61. package/dist/chunk-A7TC7IOP.cjs.map +0 -1
  62. package/dist/chunk-F7JQ7BX7.js +0 -240
  63. package/dist/chunk-F7JQ7BX7.js.map +0 -1
  64. package/dist/chunk-I34X53VL.js +0 -688
  65. package/dist/chunk-I34X53VL.js.map +0 -1
  66. package/dist/chunk-ISNF6USX.cjs +0 -688
  67. package/dist/chunk-ISNF6USX.cjs.map +0 -1
  68. package/dist/chunk-IYEHOE4S.cjs +0 -405
  69. package/dist/chunk-IYEHOE4S.cjs.map +0 -1
  70. package/dist/chunk-L2YZQAG3.cjs +0 -240
  71. package/dist/chunk-L2YZQAG3.cjs.map +0 -1
  72. package/dist/chunk-N7RWT46K.js.map +0 -1
  73. package/dist/chunk-OJ34O3Q2.cjs.map +0 -1
  74. package/dist/chunk-TXSETOGH.js +0 -55
  75. package/dist/chunk-TXSETOGH.js.map +0 -1
  76. package/dist/chunk-XVV3OOQX.js +0 -405
  77. package/dist/chunk-XVV3OOQX.js.map +0 -1
  78. package/dist/d1.cjs +0 -277
  79. package/dist/d1.cjs.map +0 -1
  80. package/dist/d1.d.cts +0 -72
  81. package/dist/d1.d.ts +0 -72
  82. package/dist/d1.js +0 -277
  83. package/dist/d1.js.map +0 -1
  84. package/dist/pg-3ACXFMU4.cjs +0 -59
  85. package/dist/pg-3ACXFMU4.cjs.map +0 -1
  86. package/dist/pg-GHOW3XSG.js +0 -59
  87. package/dist/sqlite3-EEIKQCJR.js +0 -25
  88. package/dist/sqlite3-SE4DDYZE.cjs +0 -25
  89. package/dist/sqlite3-SE4DDYZE.cjs.map +0 -1
  90. /package/dist/{pg-GHOW3XSG.js.map → postgresql.js.map} +0 -0
  91. /package/dist/{sqlite3-EEIKQCJR.js.map → sqlite.js.map} +0 -0
package/dist/sqlite.js ADDED
@@ -0,0 +1,60 @@
1
+ import {
2
+ DEFAULT_SQLITE_PRAGMA_OPTIONS,
3
+ DefaultSQLiteMigratorOptions,
4
+ InMemorySQLiteDatabase,
5
+ SQLiteConnectionString,
6
+ SQLiteDatabaseName,
7
+ isInMemoryDatabase,
8
+ isSQLiteError,
9
+ mapSqliteError,
10
+ parsePragmasFromConnectionString,
11
+ sqliteAlwaysNewConnectionPool,
12
+ sqliteAmbientClientConnection,
13
+ sqliteAmbientConnectionPool,
14
+ sqliteClientConnection,
15
+ sqliteConnection,
16
+ sqliteExecute,
17
+ sqliteFormatter,
18
+ sqlitePool,
19
+ sqlitePoolClientConnection,
20
+ sqliteSQLExecutor,
21
+ sqliteSingletonConnectionPool,
22
+ sqliteTransaction,
23
+ toSqlitePoolOptions,
24
+ transactionNestingCounter
25
+ } from "./chunk-XFEGS3YT.js";
26
+ import {
27
+ defaultSQLiteDatabase,
28
+ sqliteMetadata,
29
+ tableExists
30
+ } from "./chunk-WLWELSA2.js";
31
+ import "./chunk-JKE6SULM.js";
32
+ export {
33
+ DEFAULT_SQLITE_PRAGMA_OPTIONS,
34
+ DefaultSQLiteMigratorOptions,
35
+ InMemorySQLiteDatabase,
36
+ SQLiteConnectionString,
37
+ SQLiteDatabaseName,
38
+ defaultSQLiteDatabase,
39
+ isInMemoryDatabase,
40
+ isSQLiteError,
41
+ mapSqliteError,
42
+ parsePragmasFromConnectionString,
43
+ sqliteAlwaysNewConnectionPool,
44
+ sqliteAmbientClientConnection,
45
+ sqliteAmbientConnectionPool,
46
+ sqliteClientConnection,
47
+ sqliteConnection,
48
+ sqliteExecute,
49
+ sqliteFormatter,
50
+ sqliteMetadata,
51
+ sqlitePool,
52
+ sqlitePoolClientConnection,
53
+ sqliteSQLExecutor,
54
+ sqliteSingletonConnectionPool,
55
+ sqliteTransaction,
56
+ tableExists,
57
+ toSqlitePoolOptions,
58
+ transactionNestingCounter
59
+ };
60
+ //# sourceMappingURL=sqlite.js.map
package/dist/sqlite3.cjs CHANGED
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
2
 
3
3
 
4
4
 
@@ -6,7 +6,6 @@
6
6
 
7
7
 
8
8
 
9
- var _chunkL2YZQAG3cjs = require('./chunk-L2YZQAG3.cjs');
10
9
 
11
10
 
12
11
 
@@ -23,21 +22,331 @@ var _chunkL2YZQAG3cjs = require('./chunk-L2YZQAG3.cjs');
23
22
 
24
23
 
25
24
 
25
+ var _chunkEEKBLOCHcjs = require('./chunk-EEKBLOCH.cjs');
26
26
 
27
27
 
28
28
 
29
29
 
30
+ var _chunkHZM7GDOTcjs = require('./chunk-HZM7GDOT.cjs');
30
31
 
31
32
 
32
33
 
33
34
 
34
- var _chunkIYEHOE4Scjs = require('./chunk-IYEHOE4S.cjs');
35
- require('./chunk-A7TC7IOP.cjs');
36
- require('./chunk-OJ34O3Q2.cjs');
37
35
 
38
36
 
37
+ var _chunkGVR3PSDLcjs = require('./chunk-GVR3PSDL.cjs');
39
38
 
39
+ // src/storage/sqlite/sqlite3/connections/connection.ts
40
+ var _sqlite3 = require('sqlite3'); var _sqlite32 = _interopRequireDefault(_sqlite3);
40
41
 
42
+ // src/storage/sqlite/core/connections/pragmas.ts
43
+ var mergePragmaOptions = (connectionString, userOptions) => {
44
+ const connectionStringPragmas = _chunkEEKBLOCHcjs.parsePragmasFromConnectionString.call(void 0, connectionString);
45
+ return {
46
+ ..._chunkEEKBLOCHcjs.DEFAULT_SQLITE_PRAGMA_OPTIONS,
47
+ ...connectionStringPragmas,
48
+ ...userOptions
49
+ };
50
+ };
51
+ var buildConnectionPragmaStatements = (pragmas) => [
52
+ // busy_timeout FIRST - enables waiting on locks for subsequent operations
53
+ { pragma: "busy_timeout", value: pragmas.busy_timeout },
54
+ { pragma: "synchronous", value: pragmas.synchronous },
55
+ { pragma: "cache_size", value: pragmas.cache_size },
56
+ { pragma: "foreign_keys", value: pragmas.foreign_keys ? "ON" : "OFF" },
57
+ { pragma: "temp_store", value: pragmas.temp_store }
58
+ ];
59
+ var buildDatabasePragmaStatements = (pragmas) => [
60
+ { pragma: "journal_mode", value: pragmas.journal_mode }
61
+ ];
62
+
63
+ // src/storage/sqlite/sqlite3/connections/connection.ts
64
+ var SQLite3DriverType = "SQLite:sqlite3";
65
+ var applyPragma = (database, pragma, value) => {
66
+ return new Promise((resolve, reject) => {
67
+ database.run(`PRAGMA ${pragma} = ${value};`, (err) => {
68
+ if (err) reject(err);
69
+ else resolve();
70
+ });
71
+ });
72
+ };
73
+ var queryPragma = (database, pragma) => new Promise((resolve, reject) => {
74
+ database.get(
75
+ `PRAGMA ${pragma};`,
76
+ (err, row) => {
77
+ if (err) reject(err);
78
+ else resolve(_nullishCoalesce(_optionalChain([row, 'optionalAccess', _ => _[pragma]]), () => ( "")));
79
+ }
80
+ );
81
+ });
82
+ var applyPragmas = (database, pragmas) => pragmas.reduce(
83
+ (promise, { pragma, value }) => promise.then(() => applyPragma(database, pragma, value)),
84
+ Promise.resolve()
85
+ );
86
+ var sqlite3Client = (options) => {
87
+ let db;
88
+ let isClosed = false;
89
+ const { serializer } = options;
90
+ const connectionString = _nullishCoalesce(_nullishCoalesce(options.fileName, () => ( options.connectionString)), () => ( _chunkEEKBLOCHcjs.InMemorySQLiteDatabase));
91
+ const finalPragmas = mergePragmaOptions(
92
+ String(connectionString),
93
+ options.pragmaOptions
94
+ );
95
+ const connectionPragmas = buildConnectionPragmaStatements(finalPragmas);
96
+ const connect = () => db ? Promise.resolve() : new Promise((resolve, reject) => {
97
+ try {
98
+ db = new _sqlite32.default.Database(
99
+ connectionString,
100
+ _sqlite32.default.OPEN_URI | _sqlite32.default.OPEN_READWRITE | _sqlite32.default.OPEN_CREATE,
101
+ (err) => {
102
+ if (err) {
103
+ reject(err);
104
+ return;
105
+ }
106
+ const busyTimeout = _nullishCoalesce(finalPragmas.busy_timeout, () => ( _chunkEEKBLOCHcjs.DEFAULT_SQLITE_PRAGMA_OPTIONS.busy_timeout));
107
+ db.configure("busyTimeout", busyTimeout);
108
+ applyPragmas(
109
+ db,
110
+ connectionPragmas.filter((p) => p.pragma !== "busy_timeout")
111
+ ).then(async () => {
112
+ if (options.skipDatabasePragmas) return;
113
+ const databasePragmas = buildDatabasePragmaStatements(finalPragmas);
114
+ for (const { pragma, value } of databasePragmas) {
115
+ const current = await queryPragma(db, pragma);
116
+ if (current.toUpperCase() !== String(value).toUpperCase()) {
117
+ await applyPragma(db, pragma, value);
118
+ }
119
+ }
120
+ }).then(() => resolve()).catch(reject);
121
+ }
122
+ );
123
+ } catch (error) {
124
+ reject(error);
125
+ }
126
+ });
127
+ const executeQuery = (sql, params) => new Promise((resolve, reject) => {
128
+ try {
129
+ db.all(sql, _nullishCoalesce(params, () => ( [])), (err, result) => {
130
+ if (err) {
131
+ reject(err);
132
+ return;
133
+ }
134
+ resolve(result);
135
+ });
136
+ } catch (error) {
137
+ reject(error);
138
+ }
139
+ });
140
+ const executeCommand = (sql, params, options2) => new Promise((resolve, reject) => {
141
+ try {
142
+ if (_optionalChain([options2, 'optionalAccess', _2 => _2.ignoreChangesCount]) === true) {
143
+ db.run(
144
+ sql,
145
+ _nullishCoalesce(params, () => ( [])),
146
+ function(err, rows) {
147
+ if (err) {
148
+ reject(err);
149
+ return;
150
+ }
151
+ resolve({
152
+ rowCount: 0,
153
+ rows: _nullishCoalesce(rows, () => ( []))
154
+ });
155
+ }
156
+ );
157
+ return;
158
+ }
159
+ db.serialize(() => {
160
+ let hasFailed = false;
161
+ let resultRows = [];
162
+ db.all(sql, _nullishCoalesce(params, () => ( [])), (err, rows) => {
163
+ if (err) {
164
+ hasFailed = true;
165
+ return reject(err);
166
+ }
167
+ resultRows = rows;
168
+ });
169
+ db.get(
170
+ "SELECT changes() as changes",
171
+ (err, row) => {
172
+ if (hasFailed) return;
173
+ if (err) return reject(err);
174
+ resolve({
175
+ rowCount: _nullishCoalesce(_optionalChain([row, 'optionalAccess', _3 => _3.changes]), () => ( 0)),
176
+ rows: resultRows
177
+ });
178
+ }
179
+ );
180
+ });
181
+ } catch (error) {
182
+ reject(error);
183
+ }
184
+ });
185
+ return {
186
+ connect,
187
+ close: async () => {
188
+ if (isClosed) {
189
+ return;
190
+ }
191
+ isClosed = true;
192
+ if (db) {
193
+ try {
194
+ await new Promise((resolve, reject) => {
195
+ db.close((err) => {
196
+ if (err) {
197
+ reject(err);
198
+ return;
199
+ }
200
+ resolve();
201
+ });
202
+ });
203
+ } catch (error) {
204
+ throw _chunkEEKBLOCHcjs.mapSqliteError.call(void 0, error);
205
+ }
206
+ }
207
+ },
208
+ query: async (sql, _options) => {
209
+ try {
210
+ const { query, params } = _chunkEEKBLOCHcjs.sqliteFormatter.format(sql, {
211
+ serializer
212
+ });
213
+ const result = await executeQuery(
214
+ query,
215
+ params
216
+ );
217
+ return { rowCount: result.length, rows: result };
218
+ } catch (error) {
219
+ throw _chunkEEKBLOCHcjs.mapSqliteError.call(void 0, error);
220
+ }
221
+ },
222
+ batchQuery: async (sqls, _options) => {
223
+ try {
224
+ const results = [];
225
+ for (const sql of sqls) {
226
+ const { query, params } = _chunkEEKBLOCHcjs.sqliteFormatter.format(sql, {
227
+ serializer
228
+ });
229
+ const result = await executeQuery(
230
+ query,
231
+ params
232
+ );
233
+ results.push({ rowCount: result.length, rows: result });
234
+ }
235
+ return results;
236
+ } catch (error) {
237
+ throw _chunkEEKBLOCHcjs.mapSqliteError.call(void 0, error);
238
+ }
239
+ },
240
+ command: async (sql, options2) => {
241
+ try {
242
+ const { query, params } = _chunkEEKBLOCHcjs.sqliteFormatter.format(sql, {
243
+ serializer
244
+ });
245
+ return await executeCommand(
246
+ query,
247
+ params,
248
+ options2
249
+ );
250
+ } catch (error) {
251
+ throw _chunkEEKBLOCHcjs.mapSqliteError.call(void 0, error);
252
+ }
253
+ },
254
+ batchCommand: async (sqls, options2) => {
255
+ try {
256
+ const results = [];
257
+ for (let i = 0; i < sqls.length; i++) {
258
+ const { query, params } = _chunkEEKBLOCHcjs.sqliteFormatter.format(sqls[i], {
259
+ serializer
260
+ });
261
+ const result = await executeCommand(
262
+ query,
263
+ params,
264
+ options2
265
+ );
266
+ results.push(result);
267
+ if (_optionalChain([options2, 'optionalAccess', _4 => _4.assertChanges]) && (_nullishCoalesce(result.rowCount, () => ( 0))) === 0) {
268
+ throw new (0, _chunkGVR3PSDLcjs.BatchCommandNoChangesError)(i);
269
+ }
270
+ }
271
+ return results;
272
+ } catch (error) {
273
+ throw _chunkEEKBLOCHcjs.mapSqliteError.call(void 0, error);
274
+ }
275
+ }
276
+ };
277
+ };
278
+ var checkConnection = async (fileName, serializer) => {
279
+ const client = sqlite3Client({
280
+ fileName,
281
+ serializer
282
+ });
283
+ try {
284
+ await client.query(_chunkGVR3PSDLcjs.SQL`SELECT 1`);
285
+ return { successful: true };
286
+ } catch (error) {
287
+ const code = error instanceof Error && "code" in error && typeof error.code === "string" ? error.code : void 0;
288
+ return {
289
+ successful: false,
290
+ errorType: code === "SQLITE_CANTOPEN" ? "ConnectionRefused" : code === "SQLITE_AUTH" ? "Authentication" : "Unknown",
291
+ code,
292
+ error
293
+ };
294
+ } finally {
295
+ await client.close();
296
+ }
297
+ };
298
+ var sqlite3Connection = (options) => _chunkEEKBLOCHcjs.sqliteConnection.call(void 0, {
299
+ type: "Client",
300
+ driverType: SQLite3DriverType,
301
+ sqliteClientFactory: (connectionOptions) => {
302
+ if ("client" in connectionOptions && connectionOptions.client) {
303
+ return connectionOptions.client;
304
+ }
305
+ return sqlite3Client({
306
+ ...connectionOptions,
307
+ serializer: options.serializer
308
+ });
309
+ },
310
+ connectionOptions: options,
311
+ serializer: options.serializer
312
+ });
313
+
314
+ // src/storage/sqlite/sqlite3/index.ts
315
+ var sqlite3Pool = (options) => _chunkEEKBLOCHcjs.sqlitePool.call(void 0,
316
+ _chunkEEKBLOCHcjs.toSqlitePoolOptions.call(void 0, {
317
+ ...options,
318
+ driverType: SQLite3DriverType,
319
+ ..."connection" in options ? {} : {
320
+ connectionOptions: options,
321
+ sqliteConnectionFactory: (opts) => sqlite3Connection({
322
+ ...opts,
323
+ serializer: _nullishCoalesce(options.serializer, () => ( _chunkGVR3PSDLcjs.JSONSerializer))
324
+ })
325
+ }
326
+ })
327
+ );
328
+ var tryParseConnectionString = (connectionString) => {
329
+ try {
330
+ return _chunkEEKBLOCHcjs.SQLiteConnectionString.call(void 0, connectionString);
331
+ } catch (e) {
332
+ return null;
333
+ }
334
+ };
335
+ var sqlite3DumboDriver = {
336
+ driverType: SQLite3DriverType,
337
+ createPool: (options) => sqlite3Pool(options),
338
+ sqlFormatter: _chunkEEKBLOCHcjs.sqliteFormatter,
339
+ defaultMigratorOptions: _chunkEEKBLOCHcjs.DefaultSQLiteMigratorOptions,
340
+ canHandle: _chunkGVR3PSDLcjs.canHandleDriverWithConnectionString.call(void 0,
341
+ SQLite3DriverType,
342
+ tryParseConnectionString
343
+ ),
344
+ databaseMetadata: _chunkHZM7GDOTcjs.sqliteMetadata
345
+ };
346
+ var useSqlite3DumboDriver = () => {
347
+ _chunkGVR3PSDLcjs.dumboDatabaseDriverRegistry.register(SQLite3DriverType, sqlite3DumboDriver);
348
+ };
349
+ useSqlite3DumboDriver();
41
350
 
42
351
 
43
352
 
@@ -68,5 +377,9 @@ require('./chunk-OJ34O3Q2.cjs');
68
377
 
69
378
 
70
379
 
71
- exports.DefaultSQLiteMigratorOptions = _chunkIYEHOE4Scjs.DefaultSQLiteMigratorOptions; exports.InMemorySQLiteDatabase = _chunkIYEHOE4Scjs.InMemorySQLiteDatabase; exports.SQLite3DriverType = _chunkL2YZQAG3cjs.SQLite3DriverType; exports.SQLiteConnectionString = _chunkIYEHOE4Scjs.SQLiteConnectionString; exports.SQLiteDatabaseName = _chunkIYEHOE4Scjs.SQLiteDatabaseName; exports.checkConnection = _chunkL2YZQAG3cjs.checkConnection; exports.connectionPool = _chunkL2YZQAG3cjs.sqlite3Pool; exports.databaseDriver = _chunkL2YZQAG3cjs.sqlite3DatabaseDriver; exports.defaultPostgreSqlDatabase = _chunkIYEHOE4Scjs.defaultPostgreSqlDatabase; exports.isInMemoryDatabase = _chunkIYEHOE4Scjs.isInMemoryDatabase; exports.isSQLiteError = _chunkIYEHOE4Scjs.isSQLiteError; exports.sqlite3Client = _chunkL2YZQAG3cjs.sqlite3Client; exports.sqlite3Connection = _chunkL2YZQAG3cjs.sqlite3Connection; exports.sqlite3DatabaseDriver = _chunkL2YZQAG3cjs.sqlite3DatabaseDriver; exports.sqlite3Pool = _chunkL2YZQAG3cjs.sqlite3Pool; exports.sqliteAlwaysNewConnectionPool = _chunkIYEHOE4Scjs.sqliteAlwaysNewConnectionPool; exports.sqliteAmbientClientConnection = _chunkIYEHOE4Scjs.sqliteAmbientClientConnection; exports.sqliteAmbientConnectionPool = _chunkIYEHOE4Scjs.sqliteAmbientConnectionPool; exports.sqliteClient = _chunkL2YZQAG3cjs.sqlite3Client; exports.sqliteClientConnection = _chunkIYEHOE4Scjs.sqliteClientConnection; exports.sqliteConnection = _chunkIYEHOE4Scjs.sqliteConnection; exports.sqliteExecute = _chunkIYEHOE4Scjs.sqliteExecute; exports.sqliteFormatter = _chunkIYEHOE4Scjs.sqliteFormatter; exports.sqlitePool = _chunkIYEHOE4Scjs.sqlitePool; exports.sqlitePoolClientConnection = _chunkIYEHOE4Scjs.sqlitePoolClientConnection; exports.sqliteSQLExecutor = _chunkIYEHOE4Scjs.sqliteSQLExecutor; exports.sqliteSingletonConnectionPool = _chunkIYEHOE4Scjs.sqliteSingletonConnectionPool; exports.sqliteTransaction = _chunkIYEHOE4Scjs.sqliteTransaction; exports.tableExists = _chunkIYEHOE4Scjs.tableExists; exports.tableExistsSQL = _chunkIYEHOE4Scjs.tableExistsSQL; exports.toSqlitePoolOptions = _chunkIYEHOE4Scjs.toSqlitePoolOptions; exports.transactionNestingCounter = _chunkIYEHOE4Scjs.transactionNestingCounter; exports.useSqlite3DatabaseDriver = _chunkL2YZQAG3cjs.useSqlite3DatabaseDriver;
380
+
381
+
382
+
383
+
384
+ exports.DEFAULT_SQLITE_PRAGMA_OPTIONS = _chunkEEKBLOCHcjs.DEFAULT_SQLITE_PRAGMA_OPTIONS; exports.DefaultSQLiteMigratorOptions = _chunkEEKBLOCHcjs.DefaultSQLiteMigratorOptions; exports.InMemorySQLiteDatabase = _chunkEEKBLOCHcjs.InMemorySQLiteDatabase; exports.SQLite3DriverType = SQLite3DriverType; exports.SQLiteConnectionString = _chunkEEKBLOCHcjs.SQLiteConnectionString; exports.SQLiteDatabaseName = _chunkEEKBLOCHcjs.SQLiteDatabaseName; exports.checkConnection = checkConnection; exports.defaultSQLiteDatabase = _chunkHZM7GDOTcjs.defaultSQLiteDatabase; exports.isInMemoryDatabase = _chunkEEKBLOCHcjs.isInMemoryDatabase; exports.isSQLiteError = _chunkEEKBLOCHcjs.isSQLiteError; exports.mapSqliteError = _chunkEEKBLOCHcjs.mapSqliteError; exports.parsePragmasFromConnectionString = _chunkEEKBLOCHcjs.parsePragmasFromConnectionString; exports.sqlite3Client = sqlite3Client; exports.sqlite3Connection = sqlite3Connection; exports.sqlite3DumboDriver = sqlite3DumboDriver; exports.sqlite3Pool = sqlite3Pool; exports.sqliteAlwaysNewConnectionPool = _chunkEEKBLOCHcjs.sqliteAlwaysNewConnectionPool; exports.sqliteAmbientClientConnection = _chunkEEKBLOCHcjs.sqliteAmbientClientConnection; exports.sqliteAmbientConnectionPool = _chunkEEKBLOCHcjs.sqliteAmbientConnectionPool; exports.sqliteClientConnection = _chunkEEKBLOCHcjs.sqliteClientConnection; exports.sqliteConnection = _chunkEEKBLOCHcjs.sqliteConnection; exports.sqliteExecute = _chunkEEKBLOCHcjs.sqliteExecute; exports.sqliteFormatter = _chunkEEKBLOCHcjs.sqliteFormatter; exports.sqliteMetadata = _chunkHZM7GDOTcjs.sqliteMetadata; exports.sqlitePool = _chunkEEKBLOCHcjs.sqlitePool; exports.sqlitePoolClientConnection = _chunkEEKBLOCHcjs.sqlitePoolClientConnection; exports.sqliteSQLExecutor = _chunkEEKBLOCHcjs.sqliteSQLExecutor; exports.sqliteSingletonConnectionPool = _chunkEEKBLOCHcjs.sqliteSingletonConnectionPool; exports.sqliteTransaction = _chunkEEKBLOCHcjs.sqliteTransaction; exports.tableExists = _chunkHZM7GDOTcjs.tableExists; exports.toSqlitePoolOptions = _chunkEEKBLOCHcjs.toSqlitePoolOptions; exports.transactionNestingCounter = _chunkEEKBLOCHcjs.transactionNestingCounter; exports.useSqlite3DumboDriver = useSqlite3DumboDriver;
72
385
  //# sourceMappingURL=sqlite3.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/Pongo/Pongo/src/packages/dumbo/dist/sqlite3.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,iuEAAC","file":"/home/runner/work/Pongo/Pongo/src/packages/dumbo/dist/sqlite3.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/Pongo/Pongo/src/packages/dumbo/dist/sqlite3.cjs","../src/storage/sqlite/sqlite3/connections/connection.ts","../src/storage/sqlite/core/connections/pragmas.ts","../src/storage/sqlite/sqlite3/index.ts"],"names":["options"],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACtCA,oFAA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AAA;AAAA,EACT;AACF,CAAA;AAEO,IAAM,mBAAA,EAAqB;AAAA,EAChC,UAAA,EAAY,iBAAA;AAAA,EACZ,UAAA,EAAY,CAAC,OAAA,EAAA,GAAY,WAAA,CAAY,OAA8B,CAAA;AAAA,EACnE,YAAA,EAAc,iCAAA;AAAA,EACd,sBAAA,EAAwB,8CAAA;AAAA,EACxB,SAAA,EAAW,mEAAA;AAAA,IACT,iBAAA;AAAA,IACA;AAAA,EACF,CAAA;AAAA,EACA,gBAAA,EAAkB;AACpB,CAAA;AAMO,IAAM,sBAAA,EAAwB,CAAA,EAAA,GAAM;AACzC,EAAA,6CAAA,CAA4B,QAAA,CAAS,iBAAA,EAAmB,kBAAkB,CAAA;AAC5E,CAAA;AAMA,qBAAA,CAAsB,CAAA;AHwQtB;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,gpEAAC","file":"/home/runner/work/Pongo/Pongo/src/packages/dumbo/dist/sqlite3.cjs","sourcesContent":[null,"import sqlite3 from 'sqlite3';\nimport type { JSONSerializer } from '../../../../core';\nimport {\n BatchCommandNoChangesError,\n SQL,\n type Connection,\n type QueryResult,\n type QueryResultRow,\n type SQLQueryOptions,\n} from '../../../../core';\nimport { mapSqliteError } from '../../core/errors/errorMapper';\nimport type {\n SQLiteClient,\n SQLiteClientOrPoolClient,\n SQLiteConnectionOptions,\n SQLiteDriverType,\n SQLiteFileNameOrConnectionString,\n SQLiteTransaction,\n SQLiteTransactionOptions,\n} from '../../core';\nimport {\n DEFAULT_SQLITE_PRAGMA_OPTIONS,\n InMemorySQLiteDatabase,\n sqliteConnection,\n type BatchSQLiteCommandOptions,\n type SQLiteClientOptions,\n type SQLiteCommandOptions,\n type SQLiteParameters,\n} from '../../core/connections';\nimport {\n buildConnectionPragmaStatements,\n buildDatabasePragmaStatements,\n mergePragmaOptions,\n} from '../../core/connections/pragmas';\nimport { sqliteFormatter } from '../../core/sql/formatter';\n\nexport type SQLite3DriverType = SQLiteDriverType<'sqlite3'>;\nexport const SQLite3DriverType: SQLite3DriverType = 'SQLite:sqlite3';\n\nexport type ConnectionCheckResult =\n | { successful: true }\n | {\n successful: false;\n code: string | undefined;\n errorType: 'ConnectionRefused' | 'Authentication' | 'Unknown';\n error: unknown;\n };\n\nexport type SQLite3ClientOptions = SQLiteClientOptions &\n SQLiteFileNameOrConnectionString;\n\nexport type SQLite3Client = SQLiteClientOrPoolClient;\n\nexport type SQLite3ConnectionOptions = SQLiteConnectionOptions &\n ((SQLite3ClientOptions & { client?: never }) | { client: SQLite3Client });\n\nexport type SQLite3Connection<\n ClientType extends SQLiteClientOrPoolClient = SQLiteClientOrPoolClient,\n> = Connection<\n SQLite3Connection,\n SQLite3DriverType,\n ClientType,\n SQLiteTransaction<SQLite3Connection, SQLiteTransactionOptions>\n>;\n\nconst applyPragma = (\n database: sqlite3.Database,\n pragma: string,\n value: string | number,\n) => {\n return new Promise<void>((resolve, reject) => {\n database.run(`PRAGMA ${pragma} = ${value};`, (err) => {\n if (err) reject(err);\n else resolve();\n });\n });\n};\n\nconst queryPragma = (\n database: sqlite3.Database,\n pragma: string,\n): Promise<string> =>\n new Promise((resolve, reject) => {\n database.get(\n `PRAGMA ${pragma};`,\n (err: Error | null, row: { [key: string]: string } | null) => {\n if (err) reject(err);\n else resolve(row?.[pragma] ?? '');\n },\n );\n });\n\nconst applyPragmas = (\n database: sqlite3.Database,\n pragmas: Array<{ pragma: string; value: string | number }>,\n) =>\n pragmas.reduce(\n (promise, { pragma, value }) =>\n promise.then(() => applyPragma(database, pragma, value)),\n Promise.resolve(),\n );\n\nexport const sqlite3Client = (\n options: SQLite3ClientOptions & {\n serializer: JSONSerializer;\n },\n): SQLiteClient => {\n let db: sqlite3.Database;\n\n let isClosed = false;\n\n const { serializer } = options;\n\n const connectionString =\n options.fileName ?? options.connectionString ?? InMemorySQLiteDatabase;\n\n const finalPragmas = mergePragmaOptions(\n String(connectionString),\n options.pragmaOptions,\n );\n\n const connectionPragmas = buildConnectionPragmaStatements(finalPragmas);\n\n const connect: () => Promise<void> = () =>\n db\n ? Promise.resolve()\n : new Promise((resolve, reject) => {\n try {\n db = new sqlite3.Database(\n connectionString,\n sqlite3.OPEN_URI | sqlite3.OPEN_READWRITE | sqlite3.OPEN_CREATE,\n (err) => {\n if (err) {\n reject(err);\n return;\n }\n\n const busyTimeout =\n finalPragmas.busy_timeout ??\n DEFAULT_SQLITE_PRAGMA_OPTIONS.busy_timeout!;\n\n db.configure('busyTimeout', busyTimeout);\n\n applyPragmas(\n db,\n connectionPragmas.filter((p) => p.pragma !== 'busy_timeout'),\n )\n .then(async () => {\n if (options.skipDatabasePragmas) return;\n\n const databasePragmas =\n buildDatabasePragmaStatements(finalPragmas);\n for (const { pragma, value } of databasePragmas) {\n const current = await queryPragma(db, pragma);\n if (\n current.toUpperCase() !== String(value).toUpperCase()\n ) {\n await applyPragma(db, pragma, value);\n }\n }\n })\n .then(() => resolve())\n .catch(reject);\n },\n );\n\n // Apply connection-level pragmas first (busy_timeout is first)\n } catch (error) {\n reject(error as Error);\n }\n });\n\n const executeQuery = <T>(\n sql: string,\n params?: SQLiteParameters[],\n ): Promise<T[]> =>\n new Promise((resolve, reject) => {\n try {\n db.all(sql, params ?? [], (err: Error | null, result: T[]) => {\n if (err) {\n reject(err);\n return;\n }\n\n resolve(result);\n });\n } catch (error) {\n reject(error as Error);\n }\n });\n\n const executeCommand = <Result extends QueryResultRow = QueryResultRow>(\n sql: string,\n params?: SQLiteParameters[],\n options?: SQLiteCommandOptions,\n ): Promise<QueryResult<Result>> =>\n new Promise((resolve, reject) => {\n try {\n if (options?.ignoreChangesCount === true) {\n db.run(\n sql,\n params ?? [],\n function (err: Error | null, rows: Result[]) {\n if (err) {\n reject(err);\n return;\n }\n resolve({\n rowCount: 0,\n rows: rows ?? [],\n });\n },\n );\n return;\n }\n // OD: 2026-01-21\n // This is needed as SQLite does not return changes count properly\n // We need to query it separately with SELECT changes()\n // This may be fixed eventually in sqlite3 library as Node.js team did here:\n // https://github.com/nodejs/node/issues/57344\n // But for now, we do it manually, as a workaround\n // We also serialize it to avoid race conditions\n db.serialize(() => {\n let hasFailed = false;\n let resultRows: Result[] = [];\n\n db.all(sql, params ?? [], (err, rows: Result[]) => {\n if (err) {\n hasFailed = true;\n return reject(err);\n }\n resultRows = rows;\n });\n\n db.get(\n 'SELECT changes() as changes',\n (err, row: { changes: number } | null) => {\n // If the first query failed, we exit immediately.\n // The promise is already rejected; we don't want to touch it.\n if (hasFailed) return;\n\n if (err) return reject(err);\n\n resolve({\n rowCount: row?.changes ?? 0,\n rows: resultRows,\n });\n },\n );\n });\n } catch (error) {\n reject(error as Error);\n }\n });\n\n return {\n connect,\n close: async (): Promise<void> => {\n if (isClosed) {\n return;\n }\n isClosed = true;\n if (db) {\n try {\n await new Promise<void>((resolve, reject) => {\n db.close((err: Error | null) => {\n if (err) {\n reject(err);\n return;\n }\n resolve();\n });\n });\n } catch (error) {\n throw mapSqliteError(error);\n }\n }\n },\n query: async <Result extends QueryResultRow = QueryResultRow>(\n sql: SQL,\n _options?: SQLQueryOptions,\n ): Promise<QueryResult<Result>> => {\n try {\n const { query, params } = sqliteFormatter.format(sql, {\n serializer,\n });\n const result = await executeQuery<Result>(\n query,\n params as SQLiteParameters[],\n );\n return { rowCount: result.length, rows: result };\n } catch (error) {\n throw mapSqliteError(error);\n }\n },\n batchQuery: async <Result extends QueryResultRow = QueryResultRow>(\n sqls: SQL[],\n _options?: SQLQueryOptions,\n ): Promise<QueryResult<Result>[]> => {\n try {\n const results: QueryResult<Result>[] = [];\n for (const sql of sqls) {\n const { query, params } = sqliteFormatter.format(sql, {\n serializer,\n });\n const result = await executeQuery<Result>(\n query,\n params as SQLiteParameters[],\n );\n results.push({ rowCount: result.length, rows: result });\n }\n return results;\n } catch (error) {\n throw mapSqliteError(error);\n }\n },\n command: async <Result extends QueryResultRow = QueryResultRow>(\n sql: SQL,\n options?: SQLiteCommandOptions,\n ): Promise<QueryResult<Result>> => {\n try {\n const { query, params } = sqliteFormatter.format(sql, {\n serializer,\n });\n\n return await executeCommand<Result>(\n query,\n params as SQLiteParameters[],\n options,\n );\n } catch (error) {\n throw mapSqliteError(error);\n }\n },\n batchCommand: async <Result extends QueryResultRow = QueryResultRow>(\n sqls: SQL[],\n options?: BatchSQLiteCommandOptions,\n ): Promise<QueryResult<Result>[]> => {\n try {\n const results: QueryResult<Result>[] = [];\n\n for (let i = 0; i < sqls.length; i++) {\n const { query, params } = sqliteFormatter.format(sqls[i]!, {\n serializer,\n });\n const result = await executeCommand<Result>(\n query,\n params as SQLiteParameters[],\n options,\n );\n results.push(result);\n\n if (options?.assertChanges && (result.rowCount ?? 0) === 0) {\n throw new BatchCommandNoChangesError(i);\n }\n }\n return results;\n } catch (error) {\n throw mapSqliteError(error);\n }\n },\n };\n};\n\nexport const checkConnection = async (\n fileName: string,\n serializer: JSONSerializer,\n): Promise<ConnectionCheckResult> => {\n const client = sqlite3Client({\n fileName,\n serializer,\n });\n\n try {\n await client.query(SQL`SELECT 1`);\n return { successful: true };\n } catch (error) {\n const code =\n error instanceof Error &&\n 'code' in error &&\n typeof error.code === 'string'\n ? error.code\n : undefined;\n\n return {\n successful: false,\n errorType:\n code === 'SQLITE_CANTOPEN'\n ? 'ConnectionRefused'\n : code === 'SQLITE_AUTH'\n ? 'Authentication'\n : 'Unknown',\n code,\n error,\n };\n } finally {\n await client.close();\n }\n};\n\nexport const sqlite3Connection = (\n options: SQLite3ConnectionOptions & { serializer: JSONSerializer },\n) =>\n sqliteConnection<SQLite3Connection, SQLite3ConnectionOptions>({\n type: 'Client',\n driverType: SQLite3DriverType,\n sqliteClientFactory: (connectionOptions) => {\n if ('client' in connectionOptions && connectionOptions.client) {\n return connectionOptions.client;\n }\n return sqlite3Client({\n ...connectionOptions,\n serializer: options.serializer,\n });\n },\n connectionOptions: options,\n serializer: options.serializer,\n });\n","import { parsePragmasFromConnectionString } from './connectionString';\nimport {\n DEFAULT_SQLITE_PRAGMA_OPTIONS,\n type SQLitePragmaOptions,\n} from './index';\n\nexport const mergePragmaOptions = (\n connectionString: string,\n userOptions?: Partial<SQLitePragmaOptions>,\n): SQLitePragmaOptions => {\n const connectionStringPragmas =\n parsePragmasFromConnectionString(connectionString);\n\n return {\n ...DEFAULT_SQLITE_PRAGMA_OPTIONS,\n ...connectionStringPragmas,\n ...userOptions,\n };\n};\n\nexport const buildConnectionPragmaStatements = (\n pragmas: SQLitePragmaOptions,\n): Array<{ pragma: string; value: string | number }> => [\n // busy_timeout FIRST - enables waiting on locks for subsequent operations\n { pragma: 'busy_timeout', value: pragmas.busy_timeout! },\n { pragma: 'synchronous', value: pragmas.synchronous! },\n { pragma: 'cache_size', value: pragmas.cache_size! },\n { pragma: 'foreign_keys', value: pragmas.foreign_keys ? 'ON' : 'OFF' },\n { pragma: 'temp_store', value: pragmas.temp_store! },\n];\n\nexport const buildDatabasePragmaStatements = (\n pragmas: SQLitePragmaOptions,\n): Array<{ pragma: string; value: string | number }> => [\n { pragma: 'journal_mode', value: pragmas.journal_mode! },\n];\n","export * from './connections';\nimport {\n canHandleDriverWithConnectionString,\n dumboDatabaseDriverRegistry,\n JSONSerializer,\n type DumboConnectionOptions,\n type DumboDatabaseDriver,\n} from '../../../core';\nimport {\n DefaultSQLiteMigratorOptions,\n SQLiteConnectionString,\n sqliteFormatter,\n sqliteMetadata,\n sqlitePool,\n toSqlitePoolOptions,\n type SQLitePool,\n type SQLitePoolOptions,\n} from '../core';\nimport {\n sqlite3Connection,\n SQLite3DriverType,\n type SQLite3Connection,\n type SQLite3ConnectionOptions,\n} from './connections';\n\nexport type SQLite3DumboOptions = Omit<\n SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>,\n 'driverType'\n> &\n SQLite3ConnectionOptions & { serializer?: JSONSerializer };\n\nexport type SQLite3PoolOptions = SQLite3DumboOptions;\n\nexport type Sqlite3Pool = SQLitePool<SQLite3Connection>;\n\nexport const sqlite3Pool = (options: SQLite3DumboOptions) =>\n sqlitePool(\n toSqlitePoolOptions({\n ...options,\n driverType: SQLite3DriverType,\n ...('connection' in options\n ? {}\n : {\n connectionOptions: options as SQLite3ConnectionOptions,\n sqliteConnectionFactory: (opts: SQLite3ConnectionOptions) =>\n sqlite3Connection({\n ...opts,\n serializer: options.serializer ?? JSONSerializer,\n }),\n }),\n }),\n );\n\nconst tryParseConnectionString = (connectionString: string) => {\n try {\n return SQLiteConnectionString(connectionString);\n } catch {\n return null;\n }\n};\n\nexport const sqlite3DumboDriver = {\n driverType: SQLite3DriverType,\n createPool: (options) => sqlite3Pool(options as SQLite3DumboOptions),\n sqlFormatter: sqliteFormatter,\n defaultMigratorOptions: DefaultSQLiteMigratorOptions,\n canHandle: canHandleDriverWithConnectionString(\n SQLite3DriverType,\n tryParseConnectionString,\n ),\n databaseMetadata: sqliteMetadata,\n} satisfies DumboDatabaseDriver<\n SQLite3Connection,\n SQLite3DumboOptions,\n Sqlite3Pool\n>;\n\nexport const useSqlite3DumboDriver = () => {\n dumboDatabaseDriverRegistry.register(SQLite3DriverType, sqlite3DumboDriver);\n};\n\nexport type SQLite3DumboConnectionOptions = DumboConnectionOptions<\n typeof sqlite3DumboDriver\n> & { connectionString: string | SQLiteConnectionString };\n\nuseSqlite3DumboDriver();\n\nexport * from './connections';\nexport * from './formatter';\nexport * from './transactions';\n"]}
@@ -1,6 +1,6 @@
1
- import { a as SQLiteDriverType, B as SQLiteClientOptions, G as SQLiteFileNameOrConnectionString, i as SQLiteClientOrPoolClient, b as SQLiteConnectionOptions, $ as SQLiteTransaction, S as SQLiteClient, P as SQLitePoolOptions, Q as SQLitePool, C as SQLiteConnectionString } from './index-C0h0c380.cjs';
2
- export { A as AnySQLiteClientConnection, p as AnySQLiteConnection, o as AnySQLitePoolClientConnection, W as DefaultSQLiteMigratorOptions, I as InMemorySQLiteDatabase, N as SQLiteAlwaysNewConnectionPool, J as SQLiteAmbientConnectionPool, l as SQLiteClientConnection, q as SQLiteClientConnectionDefinitionOptions, h as SQLiteClientFactory, e as SQLiteCommandOptions, n as SQLiteConnection, s as SQLiteConnectionDefinitionOptions, t as SQLiteConnectionFactory, c as SQLiteDatabaseName, d as SQLiteDatabaseType, j as SQLiteError, f as SQLiteParameters, g as SQLitePoolClient, m as SQLitePoolClientConnection, r as SQLitePoolConnectionDefinitionOptions, R as SQLitePoolFactoryOptions, E as SQLiteSQLExecutor, L as SQLiteSingletonConnectionPool, v as SqliteAmbientClientConnectionOptions, T as TransactionNestingCounter, X as defaultPostgreSqlDatabase, H as isInMemoryDatabase, k as isSQLiteError, O as sqliteAlwaysNewConnectionPool, w as sqliteAmbientClientConnection, K as sqliteAmbientConnectionPool, x as sqliteClientConnection, z as sqliteConnection, D as sqliteExecute, _ as sqliteFormatter, V as sqlitePool, y as sqlitePoolClientConnection, F as sqliteSQLExecutor, M as sqliteSingletonConnectionPool, a0 as sqliteTransaction, Z as tableExists, Y as tableExistsSQL, U as toSqlitePoolOptions, u as transactionNestingCounter } from './index-C0h0c380.cjs';
3
- import { C as Connection, a as DatabaseTransactionOptions, d as DumboDatabaseDriver, e as Dumbo, S as SQLFormatter, M as MigratorOptions, f as DumboConnectionOptions } from './connectionString-B1wm0TFc.cjs';
1
+ import { SQLiteClientOrPoolClient, SQLiteClientOptions, SQLiteFileNameOrConnectionString, SQLiteDriverType, SQLiteTransaction, SQLiteTransactionOptions, SQLiteConnectionOptions, SQLiteClient, SQLitePoolOptions, SQLitePool, AnySQLiteConnection, SQLiteConnectionString } from './sqlite.cjs';
2
+ export { AnySQLiteClientConnection, AnySQLitePoolClientConnection, BatchSQLiteCommandOptions, DEFAULT_SQLITE_PRAGMA_OPTIONS, DefaultSQLiteMigratorOptions, InMemorySQLiteDatabase, SQLiteAlwaysNewConnectionPool, SQLiteAmbientConnectionPool, SQLiteClientConnection, SQLiteClientConnectionDefinitionOptions, SQLiteClientFactory, SQLiteCommandOptions, SQLiteConnection, SQLiteConnectionDefinitionOptions, SQLiteConnectionFactory, SQLiteDatabaseName, SQLiteDatabaseType, SQLiteError, SQLiteErrorMapper, SQLiteParameters, SQLitePoolClient, SQLitePoolClientConnection, SQLitePoolConnectionDefinitionOptions, SQLitePoolFactoryOptions, SQLitePragmaOptions, SQLiteSQLExecutor, SQLiteSingletonConnectionPool, SQLiteTransactionMode, SqliteAmbientClientConnectionOptions, TransactionNestingCounter, defaultSQLiteDatabase, isInMemoryDatabase, isSQLiteError, mapSqliteError, parsePragmasFromConnectionString, sqliteAlwaysNewConnectionPool, sqliteAmbientClientConnection, sqliteAmbientConnectionPool, sqliteClientConnection, sqliteConnection, sqliteExecute, sqliteFormatter, sqliteMetadata, sqlitePool, sqlitePoolClientConnection, sqliteSQLExecutor, sqliteSingletonConnectionPool, sqliteTransaction, tableExists, toSqlitePoolOptions, transactionNestingCounter } from './sqlite.cjs';
3
+ import { C as Connection, J as JSONSerializer, c as DumboConnectionOptions, d as DumboDatabaseDriver, e as ConnectionOptions, f as SQLFormatter, M as MigratorOptions, g as DatabaseMetadata } from './connectionString-Dch_MIRU.cjs';
4
4
 
5
5
  type SQLite3DriverType = SQLiteDriverType<'sqlite3'>;
6
6
  declare const SQLite3DriverType: SQLite3DriverType;
@@ -19,66 +19,86 @@ type SQLite3ConnectionOptions = SQLiteConnectionOptions & ((SQLite3ClientOptions
19
19
  }) | {
20
20
  client: SQLite3Client;
21
21
  });
22
- type SQLite3Connection<ClientType extends SQLiteClientOrPoolClient = SQLiteClientOrPoolClient> = Connection<SQLite3Connection, SQLite3DriverType, ClientType, SQLiteTransaction<SQLite3Connection>, DatabaseTransactionOptions>;
23
- declare const sqlite3Client: (options: SQLite3ClientOptions) => SQLiteClient;
24
- declare const checkConnection: (fileName: string) => Promise<ConnectionCheckResult>;
25
- declare const sqlite3Connection: (options: SQLite3ConnectionOptions) => SQLite3Connection<SQLiteClientOrPoolClient>;
22
+ type SQLite3Connection<ClientType extends SQLiteClientOrPoolClient = SQLiteClientOrPoolClient> = Connection<SQLite3Connection, SQLite3DriverType, ClientType, SQLiteTransaction<SQLite3Connection, SQLiteTransactionOptions>>;
23
+ declare const sqlite3Client: (options: SQLite3ClientOptions & {
24
+ serializer: JSONSerializer;
25
+ }) => SQLiteClient;
26
+ declare const checkConnection: (fileName: string, serializer: JSONSerializer) => Promise<ConnectionCheckResult>;
27
+ declare const sqlite3Connection: (options: SQLite3ConnectionOptions & {
28
+ serializer: JSONSerializer;
29
+ }) => SQLite3Connection<SQLiteClientOrPoolClient>;
26
30
 
27
- type SQLite3DumboOptions = Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, 'driverType'> & SQLite3ConnectionOptions;
31
+ type SQLite3DumboOptions = Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, 'driverType'> & SQLite3ConnectionOptions & {
32
+ serializer?: JSONSerializer;
33
+ };
34
+ type SQLite3PoolOptions = SQLite3DumboOptions;
35
+ type Sqlite3Pool = SQLitePool<SQLite3Connection>;
28
36
  declare const sqlite3Pool: (options: SQLite3DumboOptions) => SQLitePool<SQLite3Connection>;
29
- declare const sqlite3DatabaseDriver: {
37
+ declare const sqlite3DumboDriver: {
30
38
  driverType: "SQLite:sqlite3";
31
39
  createPool: (options: ({
32
- driver?: DumboDatabaseDriver<SQLite3Connection, SQLite3DumboOptions, Dumbo<"SQLite:sqlite3", SQLite3Connection>>;
40
+ driver?: DumboDatabaseDriver<SQLite3Connection, SQLite3DumboOptions, Sqlite3Pool>;
33
41
  driverType?: "SQLite:sqlite3";
34
- } & Omit<Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, "driverType"> & SQLiteConnectionOptions & {
42
+ } & Omit<Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, "driverType"> & ConnectionOptions<AnySQLiteConnection> & SQLiteClientOptions & {
35
43
  fileName: string | SQLiteConnectionString;
36
44
  connectionString?: never;
37
45
  } & {
38
46
  client?: never;
47
+ } & {
48
+ serializer?: JSONSerializer;
39
49
  }, "driverType" | "driver" | "connectionString">) | ({
40
- driver?: DumboDatabaseDriver<SQLite3Connection, SQLite3DumboOptions, Dumbo<"SQLite:sqlite3", SQLite3Connection>>;
50
+ driver?: DumboDatabaseDriver<SQLite3Connection, SQLite3DumboOptions, Sqlite3Pool>;
41
51
  driverType?: "SQLite:sqlite3";
42
- } & Omit<Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, "driverType"> & SQLiteConnectionOptions & {
52
+ } & Omit<Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, "driverType"> & ConnectionOptions<AnySQLiteConnection> & SQLiteClientOptions & {
43
53
  connectionString: string | SQLiteConnectionString;
44
54
  fileName?: never;
45
55
  } & {
46
56
  client?: never;
57
+ } & {
58
+ serializer?: JSONSerializer;
47
59
  }, "driverType" | "driver" | "connectionString">) | ({
48
- driver?: DumboDatabaseDriver<SQLite3Connection, SQLite3DumboOptions, Dumbo<"SQLite:sqlite3", SQLite3Connection>>;
60
+ driver?: DumboDatabaseDriver<SQLite3Connection, SQLite3DumboOptions, Sqlite3Pool>;
49
61
  driverType?: "SQLite:sqlite3";
50
- } & Omit<Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, "driverType"> & SQLiteConnectionOptions & {
62
+ } & Omit<Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, "driverType"> & ConnectionOptions<AnySQLiteConnection> & SQLiteClientOptions & {
51
63
  client: SQLite3Client;
64
+ } & {
65
+ serializer?: JSONSerializer;
52
66
  }, "driverType" | "driver" | "connectionString">)) => SQLitePool<SQLite3Connection>;
53
67
  sqlFormatter: SQLFormatter;
54
68
  defaultMigratorOptions: MigratorOptions;
55
- getDatabaseNameOrDefault: () => SQLiteConnectionString;
56
69
  canHandle: (options: ({
57
- driver?: DumboDatabaseDriver<SQLite3Connection, SQLite3DumboOptions, Dumbo<"SQLite:sqlite3", SQLite3Connection>>;
70
+ driver?: DumboDatabaseDriver<SQLite3Connection, SQLite3DumboOptions, Sqlite3Pool>;
58
71
  driverType?: "SQLite:sqlite3";
59
- } & Omit<Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, "driverType"> & SQLiteConnectionOptions & {
72
+ } & Omit<Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, "driverType"> & ConnectionOptions<AnySQLiteConnection> & SQLiteClientOptions & {
60
73
  fileName: string | SQLiteConnectionString;
61
74
  connectionString?: never;
62
75
  } & {
63
76
  client?: never;
77
+ } & {
78
+ serializer?: JSONSerializer;
64
79
  }, "driverType" | "driver" | "connectionString">) | ({
65
- driver?: DumboDatabaseDriver<SQLite3Connection, SQLite3DumboOptions, Dumbo<"SQLite:sqlite3", SQLite3Connection>>;
80
+ driver?: DumboDatabaseDriver<SQLite3Connection, SQLite3DumboOptions, Sqlite3Pool>;
66
81
  driverType?: "SQLite:sqlite3";
67
- } & Omit<Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, "driverType"> & SQLiteConnectionOptions & {
82
+ } & Omit<Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, "driverType"> & ConnectionOptions<AnySQLiteConnection> & SQLiteClientOptions & {
68
83
  connectionString: string | SQLiteConnectionString;
69
84
  fileName?: never;
70
85
  } & {
71
86
  client?: never;
87
+ } & {
88
+ serializer?: JSONSerializer;
72
89
  }, "driverType" | "driver" | "connectionString">) | ({
73
- driver?: DumboDatabaseDriver<SQLite3Connection, SQLite3DumboOptions, Dumbo<"SQLite:sqlite3", SQLite3Connection>>;
90
+ driver?: DumboDatabaseDriver<SQLite3Connection, SQLite3DumboOptions, Sqlite3Pool>;
74
91
  driverType?: "SQLite:sqlite3";
75
- } & Omit<Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, "driverType"> & SQLiteConnectionOptions & {
92
+ } & Omit<Omit<SQLitePoolOptions<SQLite3Connection, SQLite3ConnectionOptions>, "driverType"> & ConnectionOptions<AnySQLiteConnection> & SQLiteClientOptions & {
76
93
  client: SQLite3Client;
94
+ } & {
95
+ serializer?: JSONSerializer;
77
96
  }, "driverType" | "driver" | "connectionString">)) => boolean;
97
+ databaseMetadata: DatabaseMetadata<false, false, false>;
78
98
  };
79
- declare const useSqlite3DatabaseDriver: () => void;
80
- type SQLite3DumboConnectionOptions = DumboConnectionOptions<typeof sqlite3DatabaseDriver> & {
99
+ declare const useSqlite3DumboDriver: () => void;
100
+ type SQLite3DumboConnectionOptions = DumboConnectionOptions<typeof sqlite3DumboDriver> & {
81
101
  connectionString: string | SQLiteConnectionString;
82
102
  };
83
103
 
84
- export { type ConnectionCheckResult, type SQLite3Client, type SQLite3ClientOptions, type SQLite3Connection, type SQLite3ConnectionOptions, SQLite3DriverType, type SQLite3DumboConnectionOptions, type SQLite3DumboOptions, SQLiteClient, SQLiteClientOptions, SQLiteClientOrPoolClient, SQLiteConnectionOptions, SQLiteConnectionString, SQLiteDriverType, SQLiteFileNameOrConnectionString, SQLitePool, SQLitePoolOptions, SQLiteTransaction, checkConnection, sqlite3Pool as connectionPool, sqlite3DatabaseDriver as databaseDriver, sqlite3Client, sqlite3Connection, sqlite3DatabaseDriver, sqlite3Pool, sqlite3Client as sqliteClient, useSqlite3DatabaseDriver };
104
+ export { AnySQLiteConnection, type ConnectionCheckResult, type SQLite3Client, type SQLite3ClientOptions, type SQLite3Connection, type SQLite3ConnectionOptions, SQLite3DriverType, type SQLite3DumboConnectionOptions, type SQLite3DumboOptions, type SQLite3PoolOptions, SQLiteClient, SQLiteClientOptions, SQLiteClientOrPoolClient, SQLiteConnectionOptions, SQLiteConnectionString, SQLiteDriverType, SQLiteFileNameOrConnectionString, SQLitePool, SQLitePoolOptions, SQLiteTransaction, SQLiteTransactionOptions, type Sqlite3Pool, checkConnection, sqlite3Client, sqlite3Connection, sqlite3DumboDriver, sqlite3Pool, useSqlite3DumboDriver };