@event-driven-io/dumbo 0.13.0-beta.2 → 0.13.0-beta.20

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 (90) hide show
  1. package/dist/chunk-3B24ORM3.js +34 -0
  2. package/dist/chunk-3B24ORM3.js.map +1 -0
  3. package/dist/chunk-FXETEUW2.cjs +34 -0
  4. package/dist/chunk-FXETEUW2.cjs.map +1 -0
  5. package/dist/chunk-JDP6VMRY.cjs +556 -0
  6. package/dist/chunk-JDP6VMRY.cjs.map +1 -0
  7. package/dist/{chunk-OJ34O3Q2.cjs → chunk-PYTHH6WO.cjs} +2161 -1639
  8. package/dist/chunk-PYTHH6WO.cjs.map +1 -0
  9. package/dist/chunk-SQXAAA3N.cjs +481 -0
  10. package/dist/chunk-SQXAAA3N.cjs.map +1 -0
  11. package/dist/chunk-U445U32Q.js +83 -0
  12. package/dist/chunk-U445U32Q.js.map +1 -0
  13. package/dist/{chunk-XVV3OOQX.js → chunk-USPL7TWB.js} +209 -58
  14. package/dist/chunk-USPL7TWB.js.map +1 -0
  15. package/dist/chunk-V3QUMPUM.js +481 -0
  16. package/dist/chunk-V3QUMPUM.js.map +1 -0
  17. package/dist/chunk-VIQJEUVF.cjs +83 -0
  18. package/dist/chunk-VIQJEUVF.cjs.map +1 -0
  19. package/dist/{chunk-N7RWT46K.js → chunk-ZH6YVE3B.js} +2132 -1610
  20. package/dist/chunk-ZH6YVE3B.js.map +1 -0
  21. package/dist/cloudflare.cjs +451 -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 +451 -0
  26. package/dist/cloudflare.js.map +1 -0
  27. package/dist/{columnProcessors-DMPpTPqM.d.ts → columnProcessors-BwcyMnUX.d.ts} +1 -1
  28. package/dist/{columnProcessors-BX-sH7ah.d.cts → columnProcessors-CO9z2XBz.d.cts} +1 -1
  29. package/dist/{connectionString-B1wm0TFc.d.cts → connectionString-DHJiGj2D.d.cts} +339 -129
  30. package/dist/{connectionString-B1wm0TFc.d.ts → connectionString-DHJiGj2D.d.ts} +339 -129
  31. package/dist/index.cjs +96 -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 +99 -7
  36. package/dist/index.js.map +1 -1
  37. package/dist/pg.cjs +375 -9
  38. package/dist/pg.cjs.map +1 -1
  39. package/dist/pg.d.cts +76 -104
  40. package/dist/pg.d.ts +76 -104
  41. package/dist/pg.js +427 -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 +56 -0
  49. package/dist/sqlite.cjs.map +1 -0
  50. package/dist/{index-C0h0c380.d.cts → sqlite.d.cts} +24 -7
  51. package/dist/{index-C2z_XBn6.d.ts → sqlite.d.ts} +24 -7
  52. package/dist/sqlite.js +56 -0
  53. package/dist/sqlite3.cjs +240 -11
  54. package/dist/sqlite3.cjs.map +1 -1
  55. package/dist/sqlite3.d.cts +38 -18
  56. package/dist/sqlite3.d.ts +38 -18
  57. package/dist/sqlite3.js +251 -22
  58. package/dist/sqlite3.js.map +1 -1
  59. package/package.json +69 -29
  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.map +0 -1
  77. package/dist/d1.cjs +0 -277
  78. package/dist/d1.cjs.map +0 -1
  79. package/dist/d1.d.cts +0 -72
  80. package/dist/d1.d.ts +0 -72
  81. package/dist/d1.js +0 -277
  82. package/dist/d1.js.map +0 -1
  83. package/dist/pg-3ACXFMU4.cjs +0 -59
  84. package/dist/pg-3ACXFMU4.cjs.map +0 -1
  85. package/dist/pg-GHOW3XSG.js +0 -59
  86. package/dist/sqlite3-EEIKQCJR.js +0 -25
  87. package/dist/sqlite3-SE4DDYZE.cjs +0 -25
  88. package/dist/sqlite3-SE4DDYZE.cjs.map +0 -1
  89. /package/dist/{pg-GHOW3XSG.js.map → postgresql.js.map} +0 -0
  90. /package/dist/{sqlite3-EEIKQCJR.js.map → sqlite.js.map} +0 -0
@@ -0,0 +1,61 @@
1
+ import { f as DatabaseMetadata, e3 as DatabaseConnectionString, l as DumboError, aV as SQLExecutor, b3 as AcquireDatabaseLockOptions, b4 as ReleaseDatabaseLockOptions, b6 as DatabaseLock, b1 as DatabaseLockOptions, b2 as AcquireDatabaseLockMode, M as MigratorOptions, dt as SQL, e as SQLFormatter, a as SQLProcessor, m as SQLArray, n as SQLIn, x as DatabaseDriverType } from './connectionString-DHJiGj2D.cjs';
2
+ import { D as DefaultSQLColumnProcessors } from './columnProcessors-CO9z2XBz.cjs';
3
+
4
+ declare const postgreSQLMetadata: DatabaseMetadata<true, true, true>;
5
+
6
+ declare const defaultPostgreSQLConnectionString: PostgreSQLConnectionString;
7
+ type PostgreSQLConnectionString = DatabaseConnectionString<'PostgreSQL', `postgresql://${string}` | `postgres://${string}`>;
8
+ declare const PostgreSQLConnectionString: (connectionString: string) => PostgreSQLConnectionString;
9
+ /**
10
+ * Parse database name from a PostgreSQL connection string
11
+ */
12
+ declare function parseDatabaseName(str: string): string | null;
13
+
14
+ /**
15
+ * Maps a PostgreSQL error (from the `pg` driver) to a typed DumboError
16
+ * based on the SQLSTATE code.
17
+ *
18
+ * SQLSTATE reference: https://www.postgresql.org/docs/current/errcodes-appendix.html
19
+ * Transient classification based on Npgsql's PostgresException.IsTransient.
20
+ *
21
+ * Falls back to a generic DumboError (500) if the error is not a recognized PostgreSQL error.
22
+ */
23
+ declare const mapPostgresError: (error: unknown) => DumboError;
24
+
25
+ declare const tryAcquireAdvisoryLock: (execute: SQLExecutor, options: AcquireDatabaseLockOptions) => Promise<boolean>;
26
+ declare const releaseAdvisoryLock: (execute: SQLExecutor, options: ReleaseDatabaseLockOptions) => Promise<boolean>;
27
+ declare const acquireAdvisoryLock: (execute: SQLExecutor, options: AcquireDatabaseLockOptions) => Promise<void>;
28
+ declare const AdvisoryLock: DatabaseLock;
29
+ declare const advisoryLock: (execute: SQLExecutor, options: DatabaseLockOptions) => {
30
+ acquire: (acquireOptions?: {
31
+ mode: AcquireDatabaseLockMode;
32
+ }) => Promise<void>;
33
+ tryAcquire: (acquireOptions?: {
34
+ mode: AcquireDatabaseLockMode;
35
+ }) => Promise<boolean>;
36
+ release: () => Promise<boolean>;
37
+ withAcquire: <Result>(handle: () => Promise<Result>, acquireOptions?: {
38
+ mode: AcquireDatabaseLockMode;
39
+ }) => Promise<Result>;
40
+ };
41
+
42
+ declare const DefaultPostgreSQLMigratorOptions: MigratorOptions;
43
+
44
+ declare const defaultPostgreSqlDatabase = "postgres";
45
+ declare const tableExistsSQL: (tableName: string) => SQL;
46
+ declare const tableExists: (execute: SQLExecutor, tableName: string) => Promise<boolean>;
47
+ declare const functionExistsSQL: (functionName: string) => SQL;
48
+ declare const functionExists: (execute: SQLExecutor, functionName: string) => Promise<boolean>;
49
+
50
+ declare const pgFormatter: SQLFormatter;
51
+
52
+ declare const PostgreSQLArrayProcessor: SQLProcessor<SQLArray>;
53
+ declare const PostgreSQLExpandSQLInProcessor: SQLProcessor<SQLIn>;
54
+
55
+ declare const postgreSQLColumnProcessors: DefaultSQLColumnProcessors;
56
+
57
+ type PostgreSQLDatabaseName = 'PostgreSQL';
58
+ declare const PostgreSQLDatabaseName = "PostgreSQL";
59
+ type PostgreSQLDriverType<DriverName extends string = string> = DatabaseDriverType<PostgreSQLDatabaseName, DriverName>;
60
+
61
+ export { AdvisoryLock, DefaultPostgreSQLMigratorOptions, PostgreSQLArrayProcessor, PostgreSQLConnectionString, PostgreSQLDatabaseName, type PostgreSQLDriverType, PostgreSQLExpandSQLInProcessor, acquireAdvisoryLock, advisoryLock, defaultPostgreSQLConnectionString, defaultPostgreSqlDatabase, functionExists, functionExistsSQL, mapPostgresError, parseDatabaseName, pgFormatter, postgreSQLColumnProcessors, postgreSQLMetadata, releaseAdvisoryLock, tableExists, tableExistsSQL, tryAcquireAdvisoryLock };
@@ -0,0 +1,61 @@
1
+ import { f as DatabaseMetadata, e3 as DatabaseConnectionString, l as DumboError, aV as SQLExecutor, b3 as AcquireDatabaseLockOptions, b4 as ReleaseDatabaseLockOptions, b6 as DatabaseLock, b1 as DatabaseLockOptions, b2 as AcquireDatabaseLockMode, M as MigratorOptions, dt as SQL, e as SQLFormatter, a as SQLProcessor, m as SQLArray, n as SQLIn, x as DatabaseDriverType } from './connectionString-DHJiGj2D.js';
2
+ import { D as DefaultSQLColumnProcessors } from './columnProcessors-BwcyMnUX.js';
3
+
4
+ declare const postgreSQLMetadata: DatabaseMetadata<true, true, true>;
5
+
6
+ declare const defaultPostgreSQLConnectionString: PostgreSQLConnectionString;
7
+ type PostgreSQLConnectionString = DatabaseConnectionString<'PostgreSQL', `postgresql://${string}` | `postgres://${string}`>;
8
+ declare const PostgreSQLConnectionString: (connectionString: string) => PostgreSQLConnectionString;
9
+ /**
10
+ * Parse database name from a PostgreSQL connection string
11
+ */
12
+ declare function parseDatabaseName(str: string): string | null;
13
+
14
+ /**
15
+ * Maps a PostgreSQL error (from the `pg` driver) to a typed DumboError
16
+ * based on the SQLSTATE code.
17
+ *
18
+ * SQLSTATE reference: https://www.postgresql.org/docs/current/errcodes-appendix.html
19
+ * Transient classification based on Npgsql's PostgresException.IsTransient.
20
+ *
21
+ * Falls back to a generic DumboError (500) if the error is not a recognized PostgreSQL error.
22
+ */
23
+ declare const mapPostgresError: (error: unknown) => DumboError;
24
+
25
+ declare const tryAcquireAdvisoryLock: (execute: SQLExecutor, options: AcquireDatabaseLockOptions) => Promise<boolean>;
26
+ declare const releaseAdvisoryLock: (execute: SQLExecutor, options: ReleaseDatabaseLockOptions) => Promise<boolean>;
27
+ declare const acquireAdvisoryLock: (execute: SQLExecutor, options: AcquireDatabaseLockOptions) => Promise<void>;
28
+ declare const AdvisoryLock: DatabaseLock;
29
+ declare const advisoryLock: (execute: SQLExecutor, options: DatabaseLockOptions) => {
30
+ acquire: (acquireOptions?: {
31
+ mode: AcquireDatabaseLockMode;
32
+ }) => Promise<void>;
33
+ tryAcquire: (acquireOptions?: {
34
+ mode: AcquireDatabaseLockMode;
35
+ }) => Promise<boolean>;
36
+ release: () => Promise<boolean>;
37
+ withAcquire: <Result>(handle: () => Promise<Result>, acquireOptions?: {
38
+ mode: AcquireDatabaseLockMode;
39
+ }) => Promise<Result>;
40
+ };
41
+
42
+ declare const DefaultPostgreSQLMigratorOptions: MigratorOptions;
43
+
44
+ declare const defaultPostgreSqlDatabase = "postgres";
45
+ declare const tableExistsSQL: (tableName: string) => SQL;
46
+ declare const tableExists: (execute: SQLExecutor, tableName: string) => Promise<boolean>;
47
+ declare const functionExistsSQL: (functionName: string) => SQL;
48
+ declare const functionExists: (execute: SQLExecutor, functionName: string) => Promise<boolean>;
49
+
50
+ declare const pgFormatter: SQLFormatter;
51
+
52
+ declare const PostgreSQLArrayProcessor: SQLProcessor<SQLArray>;
53
+ declare const PostgreSQLExpandSQLInProcessor: SQLProcessor<SQLIn>;
54
+
55
+ declare const postgreSQLColumnProcessors: DefaultSQLColumnProcessors;
56
+
57
+ type PostgreSQLDatabaseName = 'PostgreSQL';
58
+ declare const PostgreSQLDatabaseName = "PostgreSQL";
59
+ type PostgreSQLDriverType<DriverName extends string = string> = DatabaseDriverType<PostgreSQLDatabaseName, DriverName>;
60
+
61
+ export { AdvisoryLock, DefaultPostgreSQLMigratorOptions, PostgreSQLArrayProcessor, PostgreSQLConnectionString, PostgreSQLDatabaseName, type PostgreSQLDriverType, PostgreSQLExpandSQLInProcessor, acquireAdvisoryLock, advisoryLock, defaultPostgreSQLConnectionString, defaultPostgreSqlDatabase, functionExists, functionExistsSQL, mapPostgresError, parseDatabaseName, pgFormatter, postgreSQLColumnProcessors, postgreSQLMetadata, releaseAdvisoryLock, tableExists, tableExistsSQL, tryAcquireAdvisoryLock };
@@ -0,0 +1,50 @@
1
+ import {
2
+ AdvisoryLock,
3
+ DefaultPostgreSQLMigratorOptions,
4
+ PostgreSQLArrayProcessor,
5
+ PostgreSQLDatabaseName,
6
+ PostgreSQLExpandSQLInProcessor,
7
+ acquireAdvisoryLock,
8
+ advisoryLock,
9
+ mapPostgresError,
10
+ pgFormatter,
11
+ postgreSQLColumnProcessors,
12
+ releaseAdvisoryLock,
13
+ tryAcquireAdvisoryLock
14
+ } from "./chunk-V3QUMPUM.js";
15
+ import {
16
+ PostgreSQLConnectionString,
17
+ defaultPostgreSQLConnectionString,
18
+ defaultPostgreSqlDatabase,
19
+ functionExists,
20
+ functionExistsSQL,
21
+ parseDatabaseName,
22
+ postgreSQLMetadata,
23
+ tableExists,
24
+ tableExistsSQL
25
+ } from "./chunk-U445U32Q.js";
26
+ import "./chunk-ZH6YVE3B.js";
27
+ export {
28
+ AdvisoryLock,
29
+ DefaultPostgreSQLMigratorOptions,
30
+ PostgreSQLArrayProcessor,
31
+ PostgreSQLConnectionString,
32
+ PostgreSQLDatabaseName,
33
+ PostgreSQLExpandSQLInProcessor,
34
+ acquireAdvisoryLock,
35
+ advisoryLock,
36
+ defaultPostgreSQLConnectionString,
37
+ defaultPostgreSqlDatabase,
38
+ functionExists,
39
+ functionExistsSQL,
40
+ mapPostgresError,
41
+ parseDatabaseName,
42
+ pgFormatter,
43
+ postgreSQLColumnProcessors,
44
+ postgreSQLMetadata,
45
+ releaseAdvisoryLock,
46
+ tableExists,
47
+ tableExistsSQL,
48
+ tryAcquireAdvisoryLock
49
+ };
50
+ //# sourceMappingURL=postgresql.js.map
@@ -0,0 +1,56 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+ var _chunkJDP6VMRYcjs = require('./chunk-JDP6VMRY.cjs');
24
+
25
+
26
+
27
+
28
+ var _chunkFXETEUW2cjs = require('./chunk-FXETEUW2.cjs');
29
+ require('./chunk-PYTHH6WO.cjs');
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+ exports.DefaultSQLiteMigratorOptions = _chunkJDP6VMRYcjs.DefaultSQLiteMigratorOptions; exports.InMemorySQLiteDatabase = _chunkJDP6VMRYcjs.InMemorySQLiteDatabase; exports.SQLiteConnectionString = _chunkJDP6VMRYcjs.SQLiteConnectionString; exports.SQLiteDatabaseName = _chunkJDP6VMRYcjs.SQLiteDatabaseName; exports.defaultSQLiteDatabase = _chunkFXETEUW2cjs.defaultSQLiteDatabase; exports.isInMemoryDatabase = _chunkJDP6VMRYcjs.isInMemoryDatabase; exports.isSQLiteError = _chunkJDP6VMRYcjs.isSQLiteError; exports.mapSqliteError = _chunkJDP6VMRYcjs.mapSqliteError; exports.sqliteAlwaysNewConnectionPool = _chunkJDP6VMRYcjs.sqliteAlwaysNewConnectionPool; exports.sqliteAmbientClientConnection = _chunkJDP6VMRYcjs.sqliteAmbientClientConnection; exports.sqliteAmbientConnectionPool = _chunkJDP6VMRYcjs.sqliteAmbientConnectionPool; exports.sqliteClientConnection = _chunkJDP6VMRYcjs.sqliteClientConnection; exports.sqliteConnection = _chunkJDP6VMRYcjs.sqliteConnection; exports.sqliteExecute = _chunkJDP6VMRYcjs.sqliteExecute; exports.sqliteFormatter = _chunkJDP6VMRYcjs.sqliteFormatter; exports.sqliteMetadata = _chunkFXETEUW2cjs.sqliteMetadata; exports.sqlitePool = _chunkJDP6VMRYcjs.sqlitePool; exports.sqlitePoolClientConnection = _chunkJDP6VMRYcjs.sqlitePoolClientConnection; exports.sqliteSQLExecutor = _chunkJDP6VMRYcjs.sqliteSQLExecutor; exports.sqliteSingletonConnectionPool = _chunkJDP6VMRYcjs.sqliteSingletonConnectionPool; exports.sqliteTransaction = _chunkJDP6VMRYcjs.sqliteTransaction; exports.tableExists = _chunkFXETEUW2cjs.tableExists; exports.toSqlitePoolOptions = _chunkJDP6VMRYcjs.toSqlitePoolOptions; exports.transactionNestingCounter = _chunkJDP6VMRYcjs.transactionNestingCounter;
56
+ //# sourceMappingURL=sqlite.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/Pongo/Pongo/src/packages/dumbo/dist/sqlite.cjs"],"names":[],"mappings":"AAAA;AACE;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,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;AACF,6pDAAC","file":"/home/runner/work/Pongo/Pongo/src/packages/dumbo/dist/sqlite.cjs"}
@@ -1,4 +1,6 @@
1
- import { dv as DatabaseConnectionString, ar as SQLCommandOptions, as as SQLExecutor, v as AnyConnection, D as DatabaseTransaction, a as DatabaseTransactionOptions, C as Connection, B as ConnectionOptions, w as InferDriverTypeFromConnection, x as InferDbClientFromConnection, G as InitTransaction, c as DbSQLExecutor, S as SQLFormatter, b as ConnectionPool, cy as JSONSerializer, M as MigratorOptions, cU as SQL, q as DatabaseDriverType } from './connectionString-B1wm0TFc.cjs';
1
+ import { f as DatabaseMetadata, e3 as DatabaseConnectionString, aR as SQLCommandOptions, aS as BatchSQLCommandOptions, aV as SQLExecutor, A as AnyConnection, j as DatabaseTransaction, c as DatabaseTransactionOptions, C as Connection, O as ConnectionOptions, H as InferDriverTypeFromConnection, K as InferDbClientFromConnection, J as JSONSerializer, R as InitTransaction, l as DumboError, k as DbSQLExecutor, e as SQLFormatter, h as ConnectionPool, M as MigratorOptions, x as DatabaseDriverType } from './connectionString-DHJiGj2D.cjs';
2
+
3
+ declare const sqliteMetadata: DatabaseMetadata<false, false, false>;
2
4
 
3
5
  type SQLiteConnectionString = DatabaseConnectionString<'SQLite', `file:${string}` | `:memory:` | `/${string}` | `./${string}`>;
4
6
  declare const SQLiteConnectionString: (connectionString: string) => SQLiteConnectionString;
@@ -6,6 +8,7 @@ declare const SQLiteConnectionString: (connectionString: string) => SQLiteConnec
6
8
  type SQLiteCommandOptions = SQLCommandOptions & {
7
9
  ignoreChangesCount?: boolean;
8
10
  };
11
+ type BatchSQLiteCommandOptions = SQLiteCommandOptions & BatchSQLCommandOptions;
9
12
  type SQLiteParameters = object | string | bigint | number | boolean | null;
10
13
  type SQLiteClient = {
11
14
  connect: () => Promise<void>;
@@ -32,12 +35,14 @@ type SQLiteClientConnectionDefinitionOptions<SQLiteConnectionType extends AnySQL
32
35
  type: 'Client';
33
36
  sqliteClientFactory: SQLiteClientFactory<InferDbClientFromConnection<SQLiteConnectionType>, ConnectionOptions>;
34
37
  connectionOptions: SQLiteConnectionOptions<SQLiteConnectionType>;
38
+ serializer: JSONSerializer;
35
39
  };
36
40
  type SQLitePoolConnectionDefinitionOptions<SQLiteConnectionType extends AnySQLitePoolClientConnection = AnySQLitePoolClientConnection, ConnectionOptions = SQLiteConnectionOptions> = {
37
41
  driverType: InferDriverTypeFromConnection<SQLiteConnectionType>;
38
42
  type: 'PoolClient';
39
43
  sqliteClientFactory: SQLiteClientFactory<InferDbClientFromConnection<SQLiteConnectionType>, ConnectionOptions>;
40
44
  connectionOptions: SQLiteConnectionOptions<SQLiteConnectionType>;
45
+ serializer: JSONSerializer;
41
46
  };
42
47
  type SQLiteConnectionDefinitionOptions<SQLiteConnectionType extends AnySQLitePoolClientConnection = AnySQLitePoolClientConnection, ClientOptions = SQLiteClientOptions> = SQLiteClientConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions> | SQLitePoolConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions>;
43
48
  type SQLiteConnectionFactory<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions = SQLiteConnectionOptions> = (options: ConnectionOptions) => SQLiteConnectionType;
@@ -53,6 +58,8 @@ type SqliteAmbientClientConnectionOptions<SQLiteConnectionType extends AnySQLite
53
58
  client: InferDbClientFromConnection<SQLiteConnectionType>;
54
59
  initTransaction?: InitTransaction<SQLiteConnectionType, TransactionType, TransactionOptionsType>;
55
60
  allowNestedTransactions?: boolean;
61
+ serializer: JSONSerializer;
62
+ errorMapper?: SQLiteErrorMapper;
56
63
  };
57
64
  declare const sqliteAmbientClientConnection: <SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection>(options: SqliteAmbientClientConnectionOptions<SQLiteConnectionType>) => SQLiteConnectionType;
58
65
  declare const sqliteClientConnection: <SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection, ClientOptions = SQLiteClientOptions>(options: SQLiteClientConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions>) => SQLiteConnectionType;
@@ -62,9 +69,20 @@ type InMemorySQLiteDatabase = ':memory:';
62
69
  declare const InMemorySQLiteDatabase: SQLiteConnectionString;
63
70
  type SQLiteClientOptions = {};
64
71
 
72
+ /**
73
+ * Maps a SQLite error (from the `sqlite3` / node-sqlite3 driver) to a typed
74
+ * DumboError based on the SQLite result code.
75
+ *
76
+ * Result code reference: https://www.sqlite.org/rescode.html
77
+ *
78
+ * Falls back to a generic DumboError (500) if the error is not a recognized SQLite error.
79
+ */
80
+ declare const mapSqliteError: (error: unknown) => DumboError;
81
+
82
+ type SQLiteErrorMapper = (error: unknown) => DumboError;
65
83
  declare const sqliteExecute: <Result = void>(database: SQLiteClient, handle: (client: SQLiteClient) => Promise<Result>) => Promise<Result>;
66
84
  type SQLiteSQLExecutor<DriverType extends SQLiteDriverType = SQLiteDriverType> = DbSQLExecutor<DriverType, SQLiteClient>;
67
- declare const sqliteSQLExecutor: <DriverType extends SQLiteDriverType = SQLiteDriverType>(driverType: DriverType, formatter?: SQLFormatter) => SQLiteSQLExecutor<DriverType>;
85
+ declare const sqliteSQLExecutor: <DriverType extends SQLiteDriverType = SQLiteDriverType>(driverType: DriverType, serializer: JSONSerializer, formatter?: SQLFormatter, errorMapper?: SQLiteErrorMapper) => SQLiteSQLExecutor<DriverType>;
68
86
 
69
87
  type SQLiteFileNameOrConnectionString = {
70
88
  fileName: string | SQLiteConnectionString;
@@ -120,14 +138,13 @@ declare function sqlitePool<SQLiteConnectionType extends AnySQLiteConnection = A
120
138
 
121
139
  declare const DefaultSQLiteMigratorOptions: MigratorOptions;
122
140
 
123
- declare const defaultPostgreSqlDatabase = "postgres";
124
- declare const tableExistsSQL: (tableName: string) => SQL;
125
- declare const tableExists: (pool: ConnectionPool, tableName: string) => Promise<boolean>;
141
+ declare const defaultSQLiteDatabase = ":memory:";
142
+ declare const tableExists: (execute: SQLExecutor, tableName: string) => Promise<boolean>;
126
143
 
127
144
  declare const sqliteFormatter: SQLFormatter;
128
145
 
129
146
  type SQLiteTransaction<ConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = DatabaseTransaction<ConnectionType>;
130
- declare const sqliteTransaction: <ConnectionType extends AnySQLiteConnection = AnySQLiteConnection>(driverType: ConnectionType["driverType"], connection: () => ConnectionType, allowNestedTransactions: boolean) => (getClient: Promise<InferDbClientFromConnection<ConnectionType>>, options?: {
147
+ declare const sqliteTransaction: <ConnectionType extends AnySQLiteConnection = AnySQLiteConnection>(driverType: ConnectionType["driverType"], connection: () => ConnectionType, allowNestedTransactions: boolean, serializer: JSONSerializer) => (getClient: Promise<InferDbClientFromConnection<ConnectionType>>, options?: {
131
148
  close: (client: InferDbClientFromConnection<ConnectionType>, error?: unknown) => Promise<void>;
132
149
  } & DatabaseTransactionOptions) => DatabaseTransaction<ConnectionType>;
133
150
 
@@ -136,4 +153,4 @@ declare const SQLiteDatabaseName = "SQLite";
136
153
  type SQLiteDriverType<DriverName extends string = string> = DatabaseDriverType<SQLiteDatabaseName, DriverName>;
137
154
  type SQLiteDatabaseType = 'SQLite';
138
155
 
139
- export { type SQLiteTransaction as $, type AnySQLiteClientConnection as A, type SQLiteClientOptions as B, SQLiteConnectionString as C, sqliteExecute as D, type SQLiteSQLExecutor as E, sqliteSQLExecutor as F, type SQLiteFileNameOrConnectionString as G, isInMemoryDatabase as H, InMemorySQLiteDatabase as I, type SQLiteAmbientConnectionPool as J, sqliteAmbientConnectionPool as K, type SQLiteSingletonConnectionPool as L, sqliteSingletonConnectionPool as M, type SQLiteAlwaysNewConnectionPool as N, sqliteAlwaysNewConnectionPool as O, type SQLitePoolOptions as P, type SQLitePool as Q, type SQLitePoolFactoryOptions as R, type SQLiteClient as S, type TransactionNestingCounter as T, toSqlitePoolOptions as U, sqlitePool as V, DefaultSQLiteMigratorOptions as W, defaultPostgreSqlDatabase as X, tableExistsSQL as Y, tableExists as Z, sqliteFormatter as _, type SQLiteDriverType as a, sqliteTransaction as a0, type SQLiteConnectionOptions as b, SQLiteDatabaseName as c, type SQLiteDatabaseType as d, type SQLiteCommandOptions as e, type SQLiteParameters as f, type SQLitePoolClient as g, type SQLiteClientFactory as h, type SQLiteClientOrPoolClient as i, type SQLiteError as j, isSQLiteError as k, type SQLiteClientConnection as l, type SQLitePoolClientConnection as m, type SQLiteConnection as n, type AnySQLitePoolClientConnection as o, type AnySQLiteConnection as p, type SQLiteClientConnectionDefinitionOptions as q, type SQLitePoolConnectionDefinitionOptions as r, type SQLiteConnectionDefinitionOptions as s, type SQLiteConnectionFactory as t, transactionNestingCounter as u, type SqliteAmbientClientConnectionOptions as v, sqliteAmbientClientConnection as w, sqliteClientConnection as x, sqlitePoolClientConnection as y, sqliteConnection as z };
156
+ export { type AnySQLiteClientConnection, type AnySQLiteConnection, type AnySQLitePoolClientConnection, type BatchSQLiteCommandOptions, DefaultSQLiteMigratorOptions, InMemorySQLiteDatabase, type SQLiteAlwaysNewConnectionPool, type SQLiteAmbientConnectionPool, type SQLiteClient, type SQLiteClientConnection, type SQLiteClientConnectionDefinitionOptions, type SQLiteClientFactory, type SQLiteClientOptions, type SQLiteClientOrPoolClient, type SQLiteCommandOptions, type SQLiteConnection, type SQLiteConnectionDefinitionOptions, type SQLiteConnectionFactory, type SQLiteConnectionOptions, SQLiteConnectionString, SQLiteDatabaseName, type SQLiteDatabaseType, type SQLiteDriverType, type SQLiteError, type SQLiteErrorMapper, type SQLiteFileNameOrConnectionString, type SQLiteParameters, type SQLitePool, type SQLitePoolClient, type SQLitePoolClientConnection, type SQLitePoolConnectionDefinitionOptions, type SQLitePoolFactoryOptions, type SQLitePoolOptions, type SQLiteSQLExecutor, type SQLiteSingletonConnectionPool, type SQLiteTransaction, type SqliteAmbientClientConnectionOptions, type TransactionNestingCounter, defaultSQLiteDatabase, isInMemoryDatabase, isSQLiteError, mapSqliteError, sqliteAlwaysNewConnectionPool, sqliteAmbientClientConnection, sqliteAmbientConnectionPool, sqliteClientConnection, sqliteConnection, sqliteExecute, sqliteFormatter, sqliteMetadata, sqlitePool, sqlitePoolClientConnection, sqliteSQLExecutor, sqliteSingletonConnectionPool, sqliteTransaction, tableExists, toSqlitePoolOptions, transactionNestingCounter };
@@ -1,4 +1,6 @@
1
- import { dv as DatabaseConnectionString, ar as SQLCommandOptions, as as SQLExecutor, v as AnyConnection, D as DatabaseTransaction, a as DatabaseTransactionOptions, C as Connection, B as ConnectionOptions, w as InferDriverTypeFromConnection, x as InferDbClientFromConnection, G as InitTransaction, c as DbSQLExecutor, S as SQLFormatter, b as ConnectionPool, cy as JSONSerializer, M as MigratorOptions, cU as SQL, q as DatabaseDriverType } from './connectionString-B1wm0TFc.js';
1
+ import { f as DatabaseMetadata, e3 as DatabaseConnectionString, aR as SQLCommandOptions, aS as BatchSQLCommandOptions, aV as SQLExecutor, A as AnyConnection, j as DatabaseTransaction, c as DatabaseTransactionOptions, C as Connection, O as ConnectionOptions, H as InferDriverTypeFromConnection, K as InferDbClientFromConnection, J as JSONSerializer, R as InitTransaction, l as DumboError, k as DbSQLExecutor, e as SQLFormatter, h as ConnectionPool, M as MigratorOptions, x as DatabaseDriverType } from './connectionString-DHJiGj2D.js';
2
+
3
+ declare const sqliteMetadata: DatabaseMetadata<false, false, false>;
2
4
 
3
5
  type SQLiteConnectionString = DatabaseConnectionString<'SQLite', `file:${string}` | `:memory:` | `/${string}` | `./${string}`>;
4
6
  declare const SQLiteConnectionString: (connectionString: string) => SQLiteConnectionString;
@@ -6,6 +8,7 @@ declare const SQLiteConnectionString: (connectionString: string) => SQLiteConnec
6
8
  type SQLiteCommandOptions = SQLCommandOptions & {
7
9
  ignoreChangesCount?: boolean;
8
10
  };
11
+ type BatchSQLiteCommandOptions = SQLiteCommandOptions & BatchSQLCommandOptions;
9
12
  type SQLiteParameters = object | string | bigint | number | boolean | null;
10
13
  type SQLiteClient = {
11
14
  connect: () => Promise<void>;
@@ -32,12 +35,14 @@ type SQLiteClientConnectionDefinitionOptions<SQLiteConnectionType extends AnySQL
32
35
  type: 'Client';
33
36
  sqliteClientFactory: SQLiteClientFactory<InferDbClientFromConnection<SQLiteConnectionType>, ConnectionOptions>;
34
37
  connectionOptions: SQLiteConnectionOptions<SQLiteConnectionType>;
38
+ serializer: JSONSerializer;
35
39
  };
36
40
  type SQLitePoolConnectionDefinitionOptions<SQLiteConnectionType extends AnySQLitePoolClientConnection = AnySQLitePoolClientConnection, ConnectionOptions = SQLiteConnectionOptions> = {
37
41
  driverType: InferDriverTypeFromConnection<SQLiteConnectionType>;
38
42
  type: 'PoolClient';
39
43
  sqliteClientFactory: SQLiteClientFactory<InferDbClientFromConnection<SQLiteConnectionType>, ConnectionOptions>;
40
44
  connectionOptions: SQLiteConnectionOptions<SQLiteConnectionType>;
45
+ serializer: JSONSerializer;
41
46
  };
42
47
  type SQLiteConnectionDefinitionOptions<SQLiteConnectionType extends AnySQLitePoolClientConnection = AnySQLitePoolClientConnection, ClientOptions = SQLiteClientOptions> = SQLiteClientConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions> | SQLitePoolConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions>;
43
48
  type SQLiteConnectionFactory<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions = SQLiteConnectionOptions> = (options: ConnectionOptions) => SQLiteConnectionType;
@@ -53,6 +58,8 @@ type SqliteAmbientClientConnectionOptions<SQLiteConnectionType extends AnySQLite
53
58
  client: InferDbClientFromConnection<SQLiteConnectionType>;
54
59
  initTransaction?: InitTransaction<SQLiteConnectionType, TransactionType, TransactionOptionsType>;
55
60
  allowNestedTransactions?: boolean;
61
+ serializer: JSONSerializer;
62
+ errorMapper?: SQLiteErrorMapper;
56
63
  };
57
64
  declare const sqliteAmbientClientConnection: <SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection>(options: SqliteAmbientClientConnectionOptions<SQLiteConnectionType>) => SQLiteConnectionType;
58
65
  declare const sqliteClientConnection: <SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection, ClientOptions = SQLiteClientOptions>(options: SQLiteClientConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions>) => SQLiteConnectionType;
@@ -62,9 +69,20 @@ type InMemorySQLiteDatabase = ':memory:';
62
69
  declare const InMemorySQLiteDatabase: SQLiteConnectionString;
63
70
  type SQLiteClientOptions = {};
64
71
 
72
+ /**
73
+ * Maps a SQLite error (from the `sqlite3` / node-sqlite3 driver) to a typed
74
+ * DumboError based on the SQLite result code.
75
+ *
76
+ * Result code reference: https://www.sqlite.org/rescode.html
77
+ *
78
+ * Falls back to a generic DumboError (500) if the error is not a recognized SQLite error.
79
+ */
80
+ declare const mapSqliteError: (error: unknown) => DumboError;
81
+
82
+ type SQLiteErrorMapper = (error: unknown) => DumboError;
65
83
  declare const sqliteExecute: <Result = void>(database: SQLiteClient, handle: (client: SQLiteClient) => Promise<Result>) => Promise<Result>;
66
84
  type SQLiteSQLExecutor<DriverType extends SQLiteDriverType = SQLiteDriverType> = DbSQLExecutor<DriverType, SQLiteClient>;
67
- declare const sqliteSQLExecutor: <DriverType extends SQLiteDriverType = SQLiteDriverType>(driverType: DriverType, formatter?: SQLFormatter) => SQLiteSQLExecutor<DriverType>;
85
+ declare const sqliteSQLExecutor: <DriverType extends SQLiteDriverType = SQLiteDriverType>(driverType: DriverType, serializer: JSONSerializer, formatter?: SQLFormatter, errorMapper?: SQLiteErrorMapper) => SQLiteSQLExecutor<DriverType>;
68
86
 
69
87
  type SQLiteFileNameOrConnectionString = {
70
88
  fileName: string | SQLiteConnectionString;
@@ -120,14 +138,13 @@ declare function sqlitePool<SQLiteConnectionType extends AnySQLiteConnection = A
120
138
 
121
139
  declare const DefaultSQLiteMigratorOptions: MigratorOptions;
122
140
 
123
- declare const defaultPostgreSqlDatabase = "postgres";
124
- declare const tableExistsSQL: (tableName: string) => SQL;
125
- declare const tableExists: (pool: ConnectionPool, tableName: string) => Promise<boolean>;
141
+ declare const defaultSQLiteDatabase = ":memory:";
142
+ declare const tableExists: (execute: SQLExecutor, tableName: string) => Promise<boolean>;
126
143
 
127
144
  declare const sqliteFormatter: SQLFormatter;
128
145
 
129
146
  type SQLiteTransaction<ConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = DatabaseTransaction<ConnectionType>;
130
- declare const sqliteTransaction: <ConnectionType extends AnySQLiteConnection = AnySQLiteConnection>(driverType: ConnectionType["driverType"], connection: () => ConnectionType, allowNestedTransactions: boolean) => (getClient: Promise<InferDbClientFromConnection<ConnectionType>>, options?: {
147
+ declare const sqliteTransaction: <ConnectionType extends AnySQLiteConnection = AnySQLiteConnection>(driverType: ConnectionType["driverType"], connection: () => ConnectionType, allowNestedTransactions: boolean, serializer: JSONSerializer) => (getClient: Promise<InferDbClientFromConnection<ConnectionType>>, options?: {
131
148
  close: (client: InferDbClientFromConnection<ConnectionType>, error?: unknown) => Promise<void>;
132
149
  } & DatabaseTransactionOptions) => DatabaseTransaction<ConnectionType>;
133
150
 
@@ -136,4 +153,4 @@ declare const SQLiteDatabaseName = "SQLite";
136
153
  type SQLiteDriverType<DriverName extends string = string> = DatabaseDriverType<SQLiteDatabaseName, DriverName>;
137
154
  type SQLiteDatabaseType = 'SQLite';
138
155
 
139
- export { type SQLiteTransaction as $, type AnySQLiteClientConnection as A, type SQLiteClientOptions as B, SQLiteConnectionString as C, sqliteExecute as D, type SQLiteSQLExecutor as E, sqliteSQLExecutor as F, type SQLiteFileNameOrConnectionString as G, isInMemoryDatabase as H, InMemorySQLiteDatabase as I, type SQLiteAmbientConnectionPool as J, sqliteAmbientConnectionPool as K, type SQLiteSingletonConnectionPool as L, sqliteSingletonConnectionPool as M, type SQLiteAlwaysNewConnectionPool as N, sqliteAlwaysNewConnectionPool as O, type SQLitePoolOptions as P, type SQLitePool as Q, type SQLitePoolFactoryOptions as R, type SQLiteClient as S, type TransactionNestingCounter as T, toSqlitePoolOptions as U, sqlitePool as V, DefaultSQLiteMigratorOptions as W, defaultPostgreSqlDatabase as X, tableExistsSQL as Y, tableExists as Z, sqliteFormatter as _, type SQLiteDriverType as a, sqliteTransaction as a0, type SQLiteConnectionOptions as b, SQLiteDatabaseName as c, type SQLiteDatabaseType as d, type SQLiteCommandOptions as e, type SQLiteParameters as f, type SQLitePoolClient as g, type SQLiteClientFactory as h, type SQLiteClientOrPoolClient as i, type SQLiteError as j, isSQLiteError as k, type SQLiteClientConnection as l, type SQLitePoolClientConnection as m, type SQLiteConnection as n, type AnySQLitePoolClientConnection as o, type AnySQLiteConnection as p, type SQLiteClientConnectionDefinitionOptions as q, type SQLitePoolConnectionDefinitionOptions as r, type SQLiteConnectionDefinitionOptions as s, type SQLiteConnectionFactory as t, transactionNestingCounter as u, type SqliteAmbientClientConnectionOptions as v, sqliteAmbientClientConnection as w, sqliteClientConnection as x, sqlitePoolClientConnection as y, sqliteConnection as z };
156
+ export { type AnySQLiteClientConnection, type AnySQLiteConnection, type AnySQLitePoolClientConnection, type BatchSQLiteCommandOptions, DefaultSQLiteMigratorOptions, InMemorySQLiteDatabase, type SQLiteAlwaysNewConnectionPool, type SQLiteAmbientConnectionPool, type SQLiteClient, type SQLiteClientConnection, type SQLiteClientConnectionDefinitionOptions, type SQLiteClientFactory, type SQLiteClientOptions, type SQLiteClientOrPoolClient, type SQLiteCommandOptions, type SQLiteConnection, type SQLiteConnectionDefinitionOptions, type SQLiteConnectionFactory, type SQLiteConnectionOptions, SQLiteConnectionString, SQLiteDatabaseName, type SQLiteDatabaseType, type SQLiteDriverType, type SQLiteError, type SQLiteErrorMapper, type SQLiteFileNameOrConnectionString, type SQLiteParameters, type SQLitePool, type SQLitePoolClient, type SQLitePoolClientConnection, type SQLitePoolConnectionDefinitionOptions, type SQLitePoolFactoryOptions, type SQLitePoolOptions, type SQLiteSQLExecutor, type SQLiteSingletonConnectionPool, type SQLiteTransaction, type SqliteAmbientClientConnectionOptions, type TransactionNestingCounter, defaultSQLiteDatabase, isInMemoryDatabase, isSQLiteError, mapSqliteError, sqliteAlwaysNewConnectionPool, sqliteAmbientClientConnection, sqliteAmbientConnectionPool, sqliteClientConnection, sqliteConnection, sqliteExecute, sqliteFormatter, sqliteMetadata, sqlitePool, sqlitePoolClientConnection, sqliteSQLExecutor, sqliteSingletonConnectionPool, sqliteTransaction, tableExists, toSqlitePoolOptions, transactionNestingCounter };
package/dist/sqlite.js ADDED
@@ -0,0 +1,56 @@
1
+ import {
2
+ DefaultSQLiteMigratorOptions,
3
+ InMemorySQLiteDatabase,
4
+ SQLiteConnectionString,
5
+ SQLiteDatabaseName,
6
+ isInMemoryDatabase,
7
+ isSQLiteError,
8
+ mapSqliteError,
9
+ sqliteAlwaysNewConnectionPool,
10
+ sqliteAmbientClientConnection,
11
+ sqliteAmbientConnectionPool,
12
+ sqliteClientConnection,
13
+ sqliteConnection,
14
+ sqliteExecute,
15
+ sqliteFormatter,
16
+ sqlitePool,
17
+ sqlitePoolClientConnection,
18
+ sqliteSQLExecutor,
19
+ sqliteSingletonConnectionPool,
20
+ sqliteTransaction,
21
+ toSqlitePoolOptions,
22
+ transactionNestingCounter
23
+ } from "./chunk-USPL7TWB.js";
24
+ import {
25
+ defaultSQLiteDatabase,
26
+ sqliteMetadata,
27
+ tableExists
28
+ } from "./chunk-3B24ORM3.js";
29
+ import "./chunk-ZH6YVE3B.js";
30
+ export {
31
+ DefaultSQLiteMigratorOptions,
32
+ InMemorySQLiteDatabase,
33
+ SQLiteConnectionString,
34
+ SQLiteDatabaseName,
35
+ defaultSQLiteDatabase,
36
+ isInMemoryDatabase,
37
+ isSQLiteError,
38
+ mapSqliteError,
39
+ sqliteAlwaysNewConnectionPool,
40
+ sqliteAmbientClientConnection,
41
+ sqliteAmbientConnectionPool,
42
+ sqliteClientConnection,
43
+ sqliteConnection,
44
+ sqliteExecute,
45
+ sqliteFormatter,
46
+ sqliteMetadata,
47
+ sqlitePool,
48
+ sqlitePoolClientConnection,
49
+ sqliteSQLExecutor,
50
+ sqliteSingletonConnectionPool,
51
+ sqliteTransaction,
52
+ tableExists,
53
+ toSqlitePoolOptions,
54
+ transactionNestingCounter
55
+ };
56
+ //# sourceMappingURL=sqlite.js.map