@event-driven-io/dumbo 0.13.0-beta.35 → 0.13.0-beta.36

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 (87) hide show
  1. package/dist/cloudflare.cjs +379 -434
  2. package/dist/cloudflare.cjs.map +1 -1
  3. package/dist/cloudflare.d.cts +36 -29
  4. package/dist/cloudflare.d.ts +36 -29
  5. package/dist/cloudflare.js +343 -434
  6. package/dist/cloudflare.js.map +1 -1
  7. package/dist/core-BeyC5tHn.js +519 -0
  8. package/dist/core-BeyC5tHn.js.map +1 -0
  9. package/dist/core-Bf2ujUFy.js +379 -0
  10. package/dist/core-Bf2ujUFy.js.map +1 -0
  11. package/dist/core-BgYtAxCm.cjs +3237 -0
  12. package/dist/core-BgYtAxCm.cjs.map +1 -0
  13. package/dist/core-DDo4m0Z_.js +2262 -0
  14. package/dist/core-DDo4m0Z_.js.map +1 -0
  15. package/dist/core-DmbB4qMn.cjs +656 -0
  16. package/dist/core-DmbB4qMn.cjs.map +1 -0
  17. package/dist/core-Go_IA78L.cjs +450 -0
  18. package/dist/core-Go_IA78L.cjs.map +1 -0
  19. package/dist/{connectionString-Dch_MIRU.d.cts → index-BDSQvDH2.d.cts} +1010 -922
  20. package/dist/index-BdWFmDhJ.d.cts +68 -0
  21. package/dist/index-D1jryNqo.d.ts +198 -0
  22. package/dist/index-DaP2fTEX.d.ts +67 -0
  23. package/dist/index-DqVvUav9.d.cts +198 -0
  24. package/dist/index-S_wp0Eaf.d.cts +67 -0
  25. package/dist/index-cxtbLiju.d.ts +68 -0
  26. package/dist/{connectionString-Dch_MIRU.d.ts → index-zkszkJqP.d.ts} +1010 -922
  27. package/dist/index.cjs +212 -359
  28. package/dist/index.cjs.map +1 -1
  29. package/dist/index.d.cts +3 -132
  30. package/dist/index.d.ts +3 -132
  31. package/dist/index.js +52 -361
  32. package/dist/index.js.map +1 -1
  33. package/dist/pg.cjs +366 -431
  34. package/dist/pg.cjs.map +1 -1
  35. package/dist/pg.d.cts +83 -72
  36. package/dist/pg.d.ts +83 -72
  37. package/dist/pg.js +320 -431
  38. package/dist/pg.js.map +1 -1
  39. package/dist/postgreSQLMetadata-LqX-Z_wo.cjs +118 -0
  40. package/dist/postgreSQLMetadata-LqX-Z_wo.cjs.map +1 -0
  41. package/dist/postgreSQLMetadata-zMq8yJo_.js +65 -0
  42. package/dist/postgreSQLMetadata-zMq8yJo_.js.map +1 -0
  43. package/dist/postgresql.cjs +25 -50
  44. package/dist/postgresql.d.cts +3 -61
  45. package/dist/postgresql.d.ts +3 -61
  46. package/dist/postgresql.js +4 -50
  47. package/dist/sqlite.cjs +30 -60
  48. package/dist/sqlite.d.cts +3 -190
  49. package/dist/sqlite.d.ts +3 -190
  50. package/dist/sqlite.js +4 -60
  51. package/dist/sqlite3.cjs +312 -380
  52. package/dist/sqlite3.cjs.map +1 -1
  53. package/dist/sqlite3.d.cts +79 -77
  54. package/dist/sqlite3.d.ts +79 -77
  55. package/dist/sqlite3.js +276 -378
  56. package/dist/sqlite3.js.map +1 -1
  57. package/dist/sqliteMetadata-BoQ7Sc9I.js +29 -0
  58. package/dist/sqliteMetadata-BoQ7Sc9I.js.map +1 -0
  59. package/dist/sqliteMetadata-D_2pKeCC.cjs +46 -0
  60. package/dist/sqliteMetadata-D_2pKeCC.cjs.map +1 -0
  61. package/package.json +12 -12
  62. package/dist/chunk-33P5766L.js +0 -83
  63. package/dist/chunk-33P5766L.js.map +0 -1
  64. package/dist/chunk-4MMMEDQ7.cjs +0 -2944
  65. package/dist/chunk-4MMMEDQ7.cjs.map +0 -1
  66. package/dist/chunk-6HAHSSPW.js +0 -701
  67. package/dist/chunk-6HAHSSPW.js.map +0 -1
  68. package/dist/chunk-GNH5XC6D.cjs +0 -481
  69. package/dist/chunk-GNH5XC6D.cjs.map +0 -1
  70. package/dist/chunk-H2JBS7HM.js +0 -2944
  71. package/dist/chunk-H2JBS7HM.js.map +0 -1
  72. package/dist/chunk-JIZGCEPE.cjs +0 -701
  73. package/dist/chunk-JIZGCEPE.cjs.map +0 -1
  74. package/dist/chunk-NJI6PJFZ.cjs +0 -83
  75. package/dist/chunk-NJI6PJFZ.cjs.map +0 -1
  76. package/dist/chunk-RQ3KKMTP.cjs +0 -34
  77. package/dist/chunk-RQ3KKMTP.cjs.map +0 -1
  78. package/dist/chunk-UK7MXVS2.js +0 -34
  79. package/dist/chunk-UK7MXVS2.js.map +0 -1
  80. package/dist/chunk-Y5TD53QE.js +0 -481
  81. package/dist/chunk-Y5TD53QE.js.map +0 -1
  82. package/dist/columnProcessors-Be2uMYjS.d.cts +0 -8
  83. package/dist/columnProcessors-D0ivj_SU.d.ts +0 -8
  84. package/dist/postgresql.cjs.map +0 -1
  85. package/dist/postgresql.js.map +0 -1
  86. package/dist/sqlite.cjs.map +0 -1
  87. package/dist/sqlite.js.map +0 -1
package/dist/sqlite.cjs CHANGED
@@ -1,60 +1,30 @@
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
-
24
-
25
- var _chunkJIZGCEPEcjs = require('./chunk-JIZGCEPE.cjs');
26
-
27
-
28
-
29
-
30
- var _chunkRQ3KKMTPcjs = require('./chunk-RQ3KKMTP.cjs');
31
- require('./chunk-4MMMEDQ7.cjs');
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
- exports.DEFAULT_SQLITE_PRAGMA_OPTIONS = _chunkJIZGCEPEcjs.DEFAULT_SQLITE_PRAGMA_OPTIONS; exports.DefaultSQLiteMigratorOptions = _chunkJIZGCEPEcjs.DefaultSQLiteMigratorOptions; exports.InMemorySQLiteDatabase = _chunkJIZGCEPEcjs.InMemorySQLiteDatabase; exports.SQLiteConnectionString = _chunkJIZGCEPEcjs.SQLiteConnectionString; exports.SQLiteDatabaseName = _chunkJIZGCEPEcjs.SQLiteDatabaseName; exports.defaultSQLiteDatabase = _chunkRQ3KKMTPcjs.defaultSQLiteDatabase; exports.isInMemoryDatabase = _chunkJIZGCEPEcjs.isInMemoryDatabase; exports.isSQLiteError = _chunkJIZGCEPEcjs.isSQLiteError; exports.mapSqliteError = _chunkJIZGCEPEcjs.mapSqliteError; exports.parsePragmasFromConnectionString = _chunkJIZGCEPEcjs.parsePragmasFromConnectionString; exports.sqliteAlwaysNewConnectionPool = _chunkJIZGCEPEcjs.sqliteAlwaysNewConnectionPool; exports.sqliteAmbientClientConnection = _chunkJIZGCEPEcjs.sqliteAmbientClientConnection; exports.sqliteAmbientConnectionPool = _chunkJIZGCEPEcjs.sqliteAmbientConnectionPool; exports.sqliteClientConnection = _chunkJIZGCEPEcjs.sqliteClientConnection; exports.sqliteConnection = _chunkJIZGCEPEcjs.sqliteConnection; exports.sqliteExecute = _chunkJIZGCEPEcjs.sqliteExecute; exports.sqliteFormatter = _chunkJIZGCEPEcjs.sqliteFormatter; exports.sqliteMetadata = _chunkRQ3KKMTPcjs.sqliteMetadata; exports.sqlitePool = _chunkJIZGCEPEcjs.sqlitePool; exports.sqlitePoolClientConnection = _chunkJIZGCEPEcjs.sqlitePoolClientConnection; exports.sqliteSQLExecutor = _chunkJIZGCEPEcjs.sqliteSQLExecutor; exports.sqliteSingletonConnectionPool = _chunkJIZGCEPEcjs.sqliteSingletonConnectionPool; exports.sqliteTransaction = _chunkJIZGCEPEcjs.sqliteTransaction; exports.tableExists = _chunkRQ3KKMTPcjs.tableExists; exports.toSqlitePoolOptions = _chunkJIZGCEPEcjs.toSqlitePoolOptions; exports.transactionNestingCounter = _chunkJIZGCEPEcjs.transactionNestingCounter;
60
- //# sourceMappingURL=sqlite.cjs.map
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+ const require_sqliteMetadata = require('./sqliteMetadata-D_2pKeCC.cjs');
3
+ const require_core = require('./core-DmbB4qMn.cjs');
4
+
5
+ exports.DEFAULT_SQLITE_PRAGMA_OPTIONS = require_core.DEFAULT_SQLITE_PRAGMA_OPTIONS;
6
+ exports.DefaultSQLiteMigratorOptions = require_core.DefaultSQLiteMigratorOptions;
7
+ exports.InMemorySQLiteDatabase = require_core.InMemorySQLiteDatabase;
8
+ exports.SQLiteConnectionString = require_core.SQLiteConnectionString;
9
+ exports.SQLiteDatabaseName = require_core.SQLiteDatabaseName;
10
+ exports.defaultSQLiteDatabase = require_sqliteMetadata.defaultSQLiteDatabase;
11
+ exports.isInMemoryDatabase = require_core.isInMemoryDatabase;
12
+ exports.isSQLiteError = require_core.isSQLiteError;
13
+ exports.mapSqliteError = require_core.mapSqliteError;
14
+ exports.parsePragmasFromConnectionString = require_core.parsePragmasFromConnectionString;
15
+ exports.sqliteAlwaysNewConnectionPool = require_core.sqliteAlwaysNewConnectionPool;
16
+ exports.sqliteAmbientClientConnection = require_core.sqliteAmbientClientConnection;
17
+ exports.sqliteAmbientConnectionPool = require_core.sqliteAmbientConnectionPool;
18
+ exports.sqliteClientConnection = require_core.sqliteClientConnection;
19
+ exports.sqliteConnection = require_core.sqliteConnection;
20
+ exports.sqliteExecute = require_core.sqliteExecute;
21
+ exports.sqliteFormatter = require_core.sqliteFormatter;
22
+ exports.sqliteMetadata = require_sqliteMetadata.sqliteMetadata;
23
+ exports.sqlitePool = require_core.sqlitePool;
24
+ exports.sqlitePoolClientConnection = require_core.sqlitePoolClientConnection;
25
+ exports.sqliteSQLExecutor = require_core.sqliteSQLExecutor;
26
+ exports.sqliteSingletonConnectionPool = require_core.sqliteSingletonConnectionPool;
27
+ exports.sqliteTransaction = require_core.sqliteTransaction;
28
+ exports.tableExists = require_sqliteMetadata.tableExists;
29
+ exports.toSqlitePoolOptions = require_core.toSqlitePoolOptions;
30
+ exports.transactionNestingCounter = require_core.transactionNestingCounter;
package/dist/sqlite.d.cts CHANGED
@@ -1,190 +1,3 @@
1
- import { g as DatabaseMetadata, m as DumboError, l as DbSQLExecutor, J as JSONSerializer, f as SQLFormatter, h as DatabaseTransactionOptions, i as DatabaseTransaction, bg as InferDbClientFromConnection, bn as InferTransactionFromConnection, aE as DatabaseConnectionString, A as AnyConnection, ch as SQLExecutor, C as Connection, ce as SQLCommandOptions, aa as BatchSQLCommandOptions, e as ConnectionOptions, bi as InferDriverTypeFromConnection, bq as InitTransaction, j as ConnectionPool, M as MigratorOptions, x as DatabaseDriverType } from './connectionString-Dch_MIRU.cjs';
2
-
3
- declare const sqliteMetadata: DatabaseMetadata<false, false, false>;
4
-
5
- type SQLiteErrorMapper = (error: unknown) => DumboError;
6
- declare const sqliteExecute: <Result = void>(database: SQLiteClient, handle: (client: SQLiteClient) => Promise<Result>) => Promise<Result>;
7
- type SQLiteSQLExecutor<DriverType extends SQLiteDriverType = SQLiteDriverType> = DbSQLExecutor<DriverType, SQLiteClient>;
8
- declare const sqliteSQLExecutor: <DriverType extends SQLiteDriverType = SQLiteDriverType>(driverType: DriverType, serializer: JSONSerializer, formatter?: SQLFormatter, errorMapper?: SQLiteErrorMapper) => SQLiteSQLExecutor<DriverType>;
9
-
10
- type SQLiteTransaction<ConnectionType extends AnySQLiteConnection = AnySQLiteConnection, TransactionOptions extends SQLiteTransactionOptions = SQLiteTransactionOptions> = DatabaseTransaction<ConnectionType, TransactionOptions>;
11
- type SQLiteTransactionMode = 'DEFERRED' | 'IMMEDIATE' | 'EXCLUSIVE';
12
- type SQLiteTransactionOptions = DatabaseTransactionOptions & {
13
- mode?: SQLiteTransactionMode;
14
- useSavepoints?: boolean;
15
- };
16
- declare const sqliteTransaction: <ConnectionType extends AnySQLiteConnection = AnySQLiteConnection>(driverType: ConnectionType["driverType"], connection: () => ConnectionType, allowNestedTransactions: boolean, serializer: JSONSerializer, defaultTransactionMode?: "IMMEDIATE" | "DEFERRED" | "EXCLUSIVE") => (getClient: Promise<InferDbClientFromConnection<ConnectionType>>, options?: {
17
- close: (client: InferDbClientFromConnection<ConnectionType>, error?: unknown) => Promise<void>;
18
- } & SQLiteTransactionOptions) => InferTransactionFromConnection<ConnectionType>;
19
-
20
- type SQLitePragmaOptions = {
21
- journal_mode?: 'DELETE' | 'TRUNCATE' | 'PERSIST' | 'MEMORY' | 'WAL' | 'OFF';
22
- synchronous?: 'OFF' | 'NORMAL' | 'FULL' | 'EXTRA';
23
- cache_size?: number;
24
- foreign_keys?: boolean;
25
- temp_store?: 'DEFAULT' | 'FILE' | 'MEMORY';
26
- busy_timeout?: number;
27
- mmap_size?: number;
28
- };
29
- type SQLiteConnectionString = DatabaseConnectionString<'SQLite', `file:${string}` | `:memory:` | `/${string}` | `./${string}`>;
30
- declare const SQLiteConnectionString: (connectionString: string) => SQLiteConnectionString;
31
- declare const parsePragmasFromConnectionString: (connectionString: string | SQLiteConnectionString) => Partial<SQLitePragmaOptions>;
32
-
33
- type SQLiteCommandOptions = SQLCommandOptions & {
34
- ignoreChangesCount?: boolean;
35
- };
36
- type BatchSQLiteCommandOptions = SQLiteCommandOptions & BatchSQLCommandOptions;
37
- type SQLiteParameters = object | string | bigint | number | boolean | null;
38
- type SQLiteClient = {
39
- connect: () => Promise<void>;
40
- close: () => Promise<void>;
41
- } & SQLExecutor;
42
- type SQLitePoolClient = {
43
- release: () => void;
44
- } & SQLExecutor;
45
- type SQLiteClientFactory<SQLiteClientType extends SQLiteClient = SQLiteClient, ClientOptions = SQLiteClientOptions> = (options: ClientOptions) => SQLiteClientType;
46
- type SQLiteClientOrPoolClient = SQLitePoolClient | SQLiteClient;
47
- interface SQLiteError extends Error {
48
- errno: number;
49
- }
50
- declare const isSQLiteError: (error: unknown) => error is SQLiteError;
51
- type SQLiteClientConnection<Self extends AnyConnection = AnyConnection, DriverType extends SQLiteDriverType = SQLiteDriverType, SQLiteClientType extends SQLiteClient = SQLiteClient, TransactionType extends DatabaseTransaction<Self> = DatabaseTransaction<Self>> = Connection<Self, DriverType, SQLiteClientType, TransactionType>;
52
- type SQLitePoolClientConnection<Self extends AnyConnection = AnyConnection, DriverType extends SQLiteDriverType = SQLiteDriverType, SQLitePoolClientType extends SQLitePoolClient = SQLitePoolClient, TransactionType extends DatabaseTransaction<Self> = DatabaseTransaction<Self>> = Connection<Self, DriverType, SQLitePoolClientType, TransactionType>;
53
- type SQLiteConnection<Self extends AnyConnection = AnyConnection, DriverType extends SQLiteDriverType = SQLiteDriverType, SQLiteClientType extends SQLiteClientOrPoolClient = SQLiteClient | SQLitePoolClient, TransactionType extends DatabaseTransaction<Self> = DatabaseTransaction<Self>> = (SQLiteClientType extends SQLiteClient ? SQLiteClientConnection<Self, DriverType, SQLiteClientType, TransactionType> : never) | (SQLiteClientType extends SQLitePoolClient ? SQLitePoolClientConnection<Self, DriverType, SQLiteClientType, TransactionType> : never);
54
- type AnySQLiteClientConnection = SQLiteClientConnection<any, any>;
55
- type AnySQLitePoolClientConnection = SQLitePoolClientConnection<any, any, any, any>;
56
- type AnySQLiteConnection = SQLiteConnection<any, any, any, any>;
57
- type SQLiteConnectionOptions<ConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = ConnectionOptions<ConnectionType> & SQLiteClientOptions;
58
- type SQLiteClientConnectionDefinitionOptions<SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection, ConnectionOptions = SQLiteConnectionOptions> = {
59
- driverType: InferDriverTypeFromConnection<SQLiteConnectionType>;
60
- type: 'Client';
61
- sqliteClientFactory: SQLiteClientFactory<InferDbClientFromConnection<SQLiteConnectionType>, ConnectionOptions>;
62
- connectionOptions: SQLiteConnectionOptions<SQLiteConnectionType>;
63
- serializer: JSONSerializer;
64
- };
65
- type SQLitePoolConnectionDefinitionOptions<SQLiteConnectionType extends AnySQLitePoolClientConnection = AnySQLitePoolClientConnection, ConnectionOptions = SQLiteConnectionOptions> = {
66
- driverType: InferDriverTypeFromConnection<SQLiteConnectionType>;
67
- type: 'PoolClient';
68
- sqliteClientFactory: SQLiteClientFactory<InferDbClientFromConnection<SQLiteConnectionType>, ConnectionOptions>;
69
- connectionOptions: SQLiteConnectionOptions<SQLiteConnectionType>;
70
- serializer: JSONSerializer;
71
- };
72
- type SQLiteConnectionDefinitionOptions<SQLiteConnectionType extends AnySQLitePoolClientConnection = AnySQLitePoolClientConnection, ClientOptions = SQLiteClientOptions> = SQLiteClientConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions> | SQLitePoolConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions>;
73
- type SQLiteConnectionFactory<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions = SQLiteConnectionOptions> = (options: ConnectionOptions) => SQLiteConnectionType;
74
- type TransactionNestingCounter = {
75
- increment: () => void;
76
- decrement: () => void;
77
- reset: () => void;
78
- level: number;
79
- };
80
- declare const transactionNestingCounter: () => TransactionNestingCounter;
81
- type SqliteAmbientClientConnectionOptions<SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection> = {
82
- driverType: SQLiteConnectionType['driverType'];
83
- client: InferDbClientFromConnection<SQLiteConnectionType>;
84
- initTransaction?: InitTransaction<SQLiteConnectionType>;
85
- allowNestedTransactions?: boolean;
86
- defaultTransactionMode?: SQLiteTransactionMode;
87
- serializer: JSONSerializer;
88
- errorMapper?: SQLiteErrorMapper;
89
- };
90
- declare const sqliteAmbientClientConnection: <SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection>(options: SqliteAmbientClientConnectionOptions<SQLiteConnectionType>) => SQLiteConnectionType;
91
- declare const sqliteClientConnection: <SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection, ClientOptions = SQLiteClientOptions>(options: SQLiteClientConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions>) => SQLiteConnectionType;
92
- declare const sqlitePoolClientConnection: <SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection, ClientOptions = SQLiteClientOptions>(options: SQLitePoolConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions>) => SQLiteConnectionType;
93
- declare function sqliteConnection<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ClientOptions = SQLiteClientOptions>(options: SQLiteConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions>): SQLiteConnectionType;
94
- type InMemorySQLiteDatabase = ':memory:';
95
- declare const InMemorySQLiteDatabase: SQLiteConnectionString;
96
-
97
- declare const DEFAULT_SQLITE_PRAGMA_OPTIONS: SQLitePragmaOptions;
98
- type SQLiteClientOptions = {
99
- pragmaOptions?: Partial<SQLitePragmaOptions>;
100
- defaultTransactionMode?: SQLiteTransactionMode;
101
- skipDatabasePragmas?: boolean;
102
- readonly?: boolean;
103
- };
104
-
105
- /**
106
- * Maps a SQLite error (from the `sqlite3` / node-sqlite3 driver) to a typed
107
- * DumboError based on the SQLite result code.
108
- *
109
- * Result code reference: https://www.sqlite.org/rescode.html
110
- *
111
- * Falls back to a generic DumboError (500) if the error is not a recognized SQLite error.
112
- */
113
- declare const mapSqliteError: (error: unknown) => DumboError;
114
-
115
- type SQLiteDualPoolOptions<SQLiteConnectionType extends AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions> = {
116
- driverType: SQLiteConnectionType['driverType'];
117
- dual?: true;
118
- singleton?: false;
119
- pooled?: true;
120
- connection?: never;
121
- readerPoolSize?: number;
122
- sqliteConnectionFactory: SQLiteConnectionFactory<SQLiteConnectionType, ConnectionOptions>;
123
- connectionOptions?: ConnectionOptions;
124
- };
125
-
126
- type SQLiteFileNameOrConnectionString = {
127
- fileName: string | SQLiteConnectionString;
128
- connectionString?: never;
129
- } | {
130
- connectionString: string | SQLiteConnectionString;
131
- fileName?: never;
132
- };
133
- declare const isInMemoryDatabase: (options: Record<string, unknown>) => boolean;
134
- type SQLiteAmbientConnectionPool<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = ConnectionPool<SQLiteConnectionType>;
135
- type SQLiteAmbientConnectionPoolOptions<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = {
136
- singleton?: true;
137
- pooled?: false;
138
- sqliteConnectionFactory?: never;
139
- connection: SQLiteConnectionType;
140
- connectionOptions?: never;
141
- };
142
- declare const sqliteAmbientConnectionPool: <SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection>(options: {
143
- driverType: SQLiteConnectionType["driverType"];
144
- } & SQLiteAmbientConnectionPoolOptions<SQLiteConnectionType["driverType"]>) => SQLiteAmbientConnectionPool<SQLiteConnectionType["driverType"]>;
145
- type SQLiteSingletonConnectionPoolOptions<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions = SQLiteConnectionOptions> = {
146
- singleton: true;
147
- pooled?: true;
148
- sqliteConnectionFactory: SQLiteConnectionFactory<SQLiteConnectionType, ConnectionOptions>;
149
- connection?: never;
150
- connectionOptions: ConnectionOptions;
151
- };
152
- type SQLiteSingletonConnectionPool<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = ConnectionPool<SQLiteConnectionType>;
153
- declare const sqliteSingletonConnectionPool: <SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions & Record<string, unknown> = SQLiteConnectionOptions & Record<string, unknown>>(options: {
154
- driverType: SQLiteConnectionType["driverType"];
155
- } & SQLiteSingletonConnectionPoolOptions<SQLiteConnectionType, ConnectionOptions>) => SQLiteSingletonConnectionPool<SQLiteConnectionType>;
156
- type SQLiteAlwaysNewPoolOptions<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions = SQLiteConnectionOptions> = {
157
- singleton?: false;
158
- pooled?: true;
159
- sqliteConnectionFactory: SQLiteConnectionFactory<SQLiteConnectionType, ConnectionOptions>;
160
- connection?: never;
161
- connectionOptions: ConnectionOptions;
162
- };
163
- type SQLiteAlwaysNewConnectionPool<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = ConnectionPool<SQLiteConnectionType>;
164
- declare const sqliteAlwaysNewConnectionPool: <SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions & Record<string, unknown> = SQLiteConnectionOptions & Record<string, unknown>>(options: {
165
- driverType: SQLiteConnectionType["driverType"];
166
- } & SQLiteAlwaysNewPoolOptions<SQLiteConnectionType, ConnectionOptions>) => SQLiteAlwaysNewConnectionPool<SQLiteConnectionType>;
167
- type SQLitePoolOptions<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions = SQLiteConnectionOptions> = (SQLiteAlwaysNewPoolOptions<SQLiteConnectionType, ConnectionOptions> | SQLiteSingletonConnectionPoolOptions<SQLiteConnectionType, ConnectionOptions> | SQLiteAmbientConnectionPoolOptions<SQLiteConnectionType> | SQLiteDualPoolOptions<SQLiteConnectionType, ConnectionOptions>) & {
168
- driverType: SQLiteConnectionType['driverType'];
169
- serializer?: JSONSerializer;
170
- };
171
- type SQLitePool<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = SQLiteAmbientConnectionPool<SQLiteConnectionType> | SQLiteSingletonConnectionPool<SQLiteConnectionType> | SQLiteAlwaysNewConnectionPool<SQLiteConnectionType>;
172
- type SQLitePoolFactoryOptions<SQLiteConnectionType extends AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions> = Omit<SQLitePoolOptions<SQLiteConnectionType, ConnectionOptions>, 'singleton'> & {
173
- singleton?: boolean;
174
- };
175
- declare const toSqlitePoolOptions: <SQLiteConnectionType extends AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions>(options: SQLitePoolFactoryOptions<SQLiteConnectionType, ConnectionOptions>) => SQLitePoolOptions<SQLiteConnectionType, ConnectionOptions>;
176
- declare function sqlitePool<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions = SQLiteConnectionOptions>(options: SQLitePoolOptions<SQLiteConnectionType, ConnectionOptions>): SQLitePool<SQLiteConnectionType>;
177
-
178
- declare const DefaultSQLiteMigratorOptions: MigratorOptions;
179
-
180
- declare const defaultSQLiteDatabase = ":memory:";
181
- declare const tableExists: (execute: SQLExecutor, tableName: string) => Promise<boolean>;
182
-
183
- declare const sqliteFormatter: SQLFormatter;
184
-
185
- type SQLiteDatabaseName = 'SQLite';
186
- declare const SQLiteDatabaseName = "SQLite";
187
- type SQLiteDriverType<DriverName extends string = string> = DatabaseDriverType<SQLiteDatabaseName, DriverName>;
188
- type SQLiteDatabaseType = 'SQLite';
189
-
190
- export { type AnySQLiteClientConnection, type AnySQLiteConnection, type AnySQLitePoolClientConnection, type BatchSQLiteCommandOptions, DEFAULT_SQLITE_PRAGMA_OPTIONS, 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 SQLitePragmaOptions, type SQLiteSQLExecutor, type SQLiteSingletonConnectionPool, type SQLiteTransaction, type SQLiteTransactionMode, type SQLiteTransactionOptions, type SqliteAmbientClientConnectionOptions, type TransactionNestingCounter, defaultSQLiteDatabase, isInMemoryDatabase, isSQLiteError, mapSqliteError, parsePragmasFromConnectionString, sqliteAlwaysNewConnectionPool, sqliteAmbientClientConnection, sqliteAmbientConnectionPool, sqliteClientConnection, sqliteConnection, sqliteExecute, sqliteFormatter, sqliteMetadata, sqlitePool, sqlitePoolClientConnection, sqliteSQLExecutor, sqliteSingletonConnectionPool, sqliteTransaction, tableExists, toSqlitePoolOptions, transactionNestingCounter };
1
+ import { n as sqliteMetadata } from "./index-BDSQvDH2.cjs";
2
+ import { $ as SQLitePragmaOptions, A as SQLiteClientConnectionDefinitionOptions, B as SQLiteParameters, C as AnySQLiteConnection, D as InMemorySQLiteDatabase, E as DEFAULT_SQLITE_PRAGMA_OPTIONS, F as SQLiteConnection, G as TransactionNestingCounter, H as SQLitePoolClientConnection, I as SQLiteConnectionDefinitionOptions, J as sqliteClientConnection, K as isSQLiteError, L as SQLiteConnectionFactory, M as SQLiteClientOptions, N as SQLiteClientOrPoolClient, O as SQLiteClient, P as SQLiteCommandOptions, Q as SQLiteConnectionString, R as SQLiteConnectionOptions, S as AnySQLiteClientConnection, T as BatchSQLiteCommandOptions, U as SQLitePoolConnectionDefinitionOptions, V as SQLitePoolClient, W as SqliteAmbientClientConnectionOptions, X as sqlitePoolClientConnection, Y as sqliteConnection, Z as transactionNestingCounter, _ as sqliteAmbientConnectionPool, a as defaultSQLiteDatabase, at as SQLiteErrorMapper, b as toSqlitePoolOptions, c as SQLiteAlwaysNewConnectionPool, ct as sqliteSQLExecutor, d as SQLitePool, et as parsePragmasFromConnectionString, f as SQLitePoolFactoryOptions, g as sqliteAlwaysNewConnectionPool, h as isInMemoryDatabase, i as sqliteFormatter, it as sqliteTransaction, j as SQLiteClientFactory, k as SQLiteClientConnection, l as SQLiteAmbientConnectionPool, m as SQLiteSingletonConnectionPool, n as SQLiteDatabaseType, nt as SQLiteTransactionMode, o as tableExists, ot as SQLiteSQLExecutor, p as SQLitePoolOptions, q as sqliteAmbientClientConnection, r as SQLiteDriverType, rt as SQLiteTransactionOptions, s as DefaultSQLiteMigratorOptions, st as sqliteExecute, t as SQLiteDatabaseName, tt as SQLiteTransaction, u as SQLiteFileNameOrConnectionString, v as sqlitePool, w as AnySQLitePoolClientConnection, x as mapSqliteError, y as sqliteSingletonConnectionPool, z as SQLiteError } from "./index-DqVvUav9.cjs";
3
+ export { AnySQLiteClientConnection, AnySQLiteConnection, AnySQLitePoolClientConnection, BatchSQLiteCommandOptions, DEFAULT_SQLITE_PRAGMA_OPTIONS, DefaultSQLiteMigratorOptions, InMemorySQLiteDatabase, SQLiteAlwaysNewConnectionPool, SQLiteAmbientConnectionPool, SQLiteClient, SQLiteClientConnection, SQLiteClientConnectionDefinitionOptions, SQLiteClientFactory, SQLiteClientOptions, SQLiteClientOrPoolClient, SQLiteCommandOptions, SQLiteConnection, SQLiteConnectionDefinitionOptions, SQLiteConnectionFactory, SQLiteConnectionOptions, SQLiteConnectionString, SQLiteDatabaseName, SQLiteDatabaseType, SQLiteDriverType, SQLiteError, SQLiteErrorMapper, SQLiteFileNameOrConnectionString, SQLiteParameters, SQLitePool, SQLitePoolClient, SQLitePoolClientConnection, SQLitePoolConnectionDefinitionOptions, SQLitePoolFactoryOptions, SQLitePoolOptions, SQLitePragmaOptions, SQLiteSQLExecutor, SQLiteSingletonConnectionPool, SQLiteTransaction, SQLiteTransactionMode, SQLiteTransactionOptions, SqliteAmbientClientConnectionOptions, TransactionNestingCounter, defaultSQLiteDatabase, isInMemoryDatabase, isSQLiteError, mapSqliteError, parsePragmasFromConnectionString, sqliteAlwaysNewConnectionPool, sqliteAmbientClientConnection, sqliteAmbientConnectionPool, sqliteClientConnection, sqliteConnection, sqliteExecute, sqliteFormatter, sqliteMetadata, sqlitePool, sqlitePoolClientConnection, sqliteSQLExecutor, sqliteSingletonConnectionPool, sqliteTransaction, tableExists, toSqlitePoolOptions, transactionNestingCounter };
package/dist/sqlite.d.ts CHANGED
@@ -1,190 +1,3 @@
1
- import { g as DatabaseMetadata, m as DumboError, l as DbSQLExecutor, J as JSONSerializer, f as SQLFormatter, h as DatabaseTransactionOptions, i as DatabaseTransaction, bg as InferDbClientFromConnection, bn as InferTransactionFromConnection, aE as DatabaseConnectionString, A as AnyConnection, ch as SQLExecutor, C as Connection, ce as SQLCommandOptions, aa as BatchSQLCommandOptions, e as ConnectionOptions, bi as InferDriverTypeFromConnection, bq as InitTransaction, j as ConnectionPool, M as MigratorOptions, x as DatabaseDriverType } from './connectionString-Dch_MIRU.js';
2
-
3
- declare const sqliteMetadata: DatabaseMetadata<false, false, false>;
4
-
5
- type SQLiteErrorMapper = (error: unknown) => DumboError;
6
- declare const sqliteExecute: <Result = void>(database: SQLiteClient, handle: (client: SQLiteClient) => Promise<Result>) => Promise<Result>;
7
- type SQLiteSQLExecutor<DriverType extends SQLiteDriverType = SQLiteDriverType> = DbSQLExecutor<DriverType, SQLiteClient>;
8
- declare const sqliteSQLExecutor: <DriverType extends SQLiteDriverType = SQLiteDriverType>(driverType: DriverType, serializer: JSONSerializer, formatter?: SQLFormatter, errorMapper?: SQLiteErrorMapper) => SQLiteSQLExecutor<DriverType>;
9
-
10
- type SQLiteTransaction<ConnectionType extends AnySQLiteConnection = AnySQLiteConnection, TransactionOptions extends SQLiteTransactionOptions = SQLiteTransactionOptions> = DatabaseTransaction<ConnectionType, TransactionOptions>;
11
- type SQLiteTransactionMode = 'DEFERRED' | 'IMMEDIATE' | 'EXCLUSIVE';
12
- type SQLiteTransactionOptions = DatabaseTransactionOptions & {
13
- mode?: SQLiteTransactionMode;
14
- useSavepoints?: boolean;
15
- };
16
- declare const sqliteTransaction: <ConnectionType extends AnySQLiteConnection = AnySQLiteConnection>(driverType: ConnectionType["driverType"], connection: () => ConnectionType, allowNestedTransactions: boolean, serializer: JSONSerializer, defaultTransactionMode?: "IMMEDIATE" | "DEFERRED" | "EXCLUSIVE") => (getClient: Promise<InferDbClientFromConnection<ConnectionType>>, options?: {
17
- close: (client: InferDbClientFromConnection<ConnectionType>, error?: unknown) => Promise<void>;
18
- } & SQLiteTransactionOptions) => InferTransactionFromConnection<ConnectionType>;
19
-
20
- type SQLitePragmaOptions = {
21
- journal_mode?: 'DELETE' | 'TRUNCATE' | 'PERSIST' | 'MEMORY' | 'WAL' | 'OFF';
22
- synchronous?: 'OFF' | 'NORMAL' | 'FULL' | 'EXTRA';
23
- cache_size?: number;
24
- foreign_keys?: boolean;
25
- temp_store?: 'DEFAULT' | 'FILE' | 'MEMORY';
26
- busy_timeout?: number;
27
- mmap_size?: number;
28
- };
29
- type SQLiteConnectionString = DatabaseConnectionString<'SQLite', `file:${string}` | `:memory:` | `/${string}` | `./${string}`>;
30
- declare const SQLiteConnectionString: (connectionString: string) => SQLiteConnectionString;
31
- declare const parsePragmasFromConnectionString: (connectionString: string | SQLiteConnectionString) => Partial<SQLitePragmaOptions>;
32
-
33
- type SQLiteCommandOptions = SQLCommandOptions & {
34
- ignoreChangesCount?: boolean;
35
- };
36
- type BatchSQLiteCommandOptions = SQLiteCommandOptions & BatchSQLCommandOptions;
37
- type SQLiteParameters = object | string | bigint | number | boolean | null;
38
- type SQLiteClient = {
39
- connect: () => Promise<void>;
40
- close: () => Promise<void>;
41
- } & SQLExecutor;
42
- type SQLitePoolClient = {
43
- release: () => void;
44
- } & SQLExecutor;
45
- type SQLiteClientFactory<SQLiteClientType extends SQLiteClient = SQLiteClient, ClientOptions = SQLiteClientOptions> = (options: ClientOptions) => SQLiteClientType;
46
- type SQLiteClientOrPoolClient = SQLitePoolClient | SQLiteClient;
47
- interface SQLiteError extends Error {
48
- errno: number;
49
- }
50
- declare const isSQLiteError: (error: unknown) => error is SQLiteError;
51
- type SQLiteClientConnection<Self extends AnyConnection = AnyConnection, DriverType extends SQLiteDriverType = SQLiteDriverType, SQLiteClientType extends SQLiteClient = SQLiteClient, TransactionType extends DatabaseTransaction<Self> = DatabaseTransaction<Self>> = Connection<Self, DriverType, SQLiteClientType, TransactionType>;
52
- type SQLitePoolClientConnection<Self extends AnyConnection = AnyConnection, DriverType extends SQLiteDriverType = SQLiteDriverType, SQLitePoolClientType extends SQLitePoolClient = SQLitePoolClient, TransactionType extends DatabaseTransaction<Self> = DatabaseTransaction<Self>> = Connection<Self, DriverType, SQLitePoolClientType, TransactionType>;
53
- type SQLiteConnection<Self extends AnyConnection = AnyConnection, DriverType extends SQLiteDriverType = SQLiteDriverType, SQLiteClientType extends SQLiteClientOrPoolClient = SQLiteClient | SQLitePoolClient, TransactionType extends DatabaseTransaction<Self> = DatabaseTransaction<Self>> = (SQLiteClientType extends SQLiteClient ? SQLiteClientConnection<Self, DriverType, SQLiteClientType, TransactionType> : never) | (SQLiteClientType extends SQLitePoolClient ? SQLitePoolClientConnection<Self, DriverType, SQLiteClientType, TransactionType> : never);
54
- type AnySQLiteClientConnection = SQLiteClientConnection<any, any>;
55
- type AnySQLitePoolClientConnection = SQLitePoolClientConnection<any, any, any, any>;
56
- type AnySQLiteConnection = SQLiteConnection<any, any, any, any>;
57
- type SQLiteConnectionOptions<ConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = ConnectionOptions<ConnectionType> & SQLiteClientOptions;
58
- type SQLiteClientConnectionDefinitionOptions<SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection, ConnectionOptions = SQLiteConnectionOptions> = {
59
- driverType: InferDriverTypeFromConnection<SQLiteConnectionType>;
60
- type: 'Client';
61
- sqliteClientFactory: SQLiteClientFactory<InferDbClientFromConnection<SQLiteConnectionType>, ConnectionOptions>;
62
- connectionOptions: SQLiteConnectionOptions<SQLiteConnectionType>;
63
- serializer: JSONSerializer;
64
- };
65
- type SQLitePoolConnectionDefinitionOptions<SQLiteConnectionType extends AnySQLitePoolClientConnection = AnySQLitePoolClientConnection, ConnectionOptions = SQLiteConnectionOptions> = {
66
- driverType: InferDriverTypeFromConnection<SQLiteConnectionType>;
67
- type: 'PoolClient';
68
- sqliteClientFactory: SQLiteClientFactory<InferDbClientFromConnection<SQLiteConnectionType>, ConnectionOptions>;
69
- connectionOptions: SQLiteConnectionOptions<SQLiteConnectionType>;
70
- serializer: JSONSerializer;
71
- };
72
- type SQLiteConnectionDefinitionOptions<SQLiteConnectionType extends AnySQLitePoolClientConnection = AnySQLitePoolClientConnection, ClientOptions = SQLiteClientOptions> = SQLiteClientConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions> | SQLitePoolConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions>;
73
- type SQLiteConnectionFactory<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions = SQLiteConnectionOptions> = (options: ConnectionOptions) => SQLiteConnectionType;
74
- type TransactionNestingCounter = {
75
- increment: () => void;
76
- decrement: () => void;
77
- reset: () => void;
78
- level: number;
79
- };
80
- declare const transactionNestingCounter: () => TransactionNestingCounter;
81
- type SqliteAmbientClientConnectionOptions<SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection> = {
82
- driverType: SQLiteConnectionType['driverType'];
83
- client: InferDbClientFromConnection<SQLiteConnectionType>;
84
- initTransaction?: InitTransaction<SQLiteConnectionType>;
85
- allowNestedTransactions?: boolean;
86
- defaultTransactionMode?: SQLiteTransactionMode;
87
- serializer: JSONSerializer;
88
- errorMapper?: SQLiteErrorMapper;
89
- };
90
- declare const sqliteAmbientClientConnection: <SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection>(options: SqliteAmbientClientConnectionOptions<SQLiteConnectionType>) => SQLiteConnectionType;
91
- declare const sqliteClientConnection: <SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection, ClientOptions = SQLiteClientOptions>(options: SQLiteClientConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions>) => SQLiteConnectionType;
92
- declare const sqlitePoolClientConnection: <SQLiteConnectionType extends AnySQLiteClientConnection = AnySQLiteClientConnection, ClientOptions = SQLiteClientOptions>(options: SQLitePoolConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions>) => SQLiteConnectionType;
93
- declare function sqliteConnection<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ClientOptions = SQLiteClientOptions>(options: SQLiteConnectionDefinitionOptions<SQLiteConnectionType, ClientOptions>): SQLiteConnectionType;
94
- type InMemorySQLiteDatabase = ':memory:';
95
- declare const InMemorySQLiteDatabase: SQLiteConnectionString;
96
-
97
- declare const DEFAULT_SQLITE_PRAGMA_OPTIONS: SQLitePragmaOptions;
98
- type SQLiteClientOptions = {
99
- pragmaOptions?: Partial<SQLitePragmaOptions>;
100
- defaultTransactionMode?: SQLiteTransactionMode;
101
- skipDatabasePragmas?: boolean;
102
- readonly?: boolean;
103
- };
104
-
105
- /**
106
- * Maps a SQLite error (from the `sqlite3` / node-sqlite3 driver) to a typed
107
- * DumboError based on the SQLite result code.
108
- *
109
- * Result code reference: https://www.sqlite.org/rescode.html
110
- *
111
- * Falls back to a generic DumboError (500) if the error is not a recognized SQLite error.
112
- */
113
- declare const mapSqliteError: (error: unknown) => DumboError;
114
-
115
- type SQLiteDualPoolOptions<SQLiteConnectionType extends AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions> = {
116
- driverType: SQLiteConnectionType['driverType'];
117
- dual?: true;
118
- singleton?: false;
119
- pooled?: true;
120
- connection?: never;
121
- readerPoolSize?: number;
122
- sqliteConnectionFactory: SQLiteConnectionFactory<SQLiteConnectionType, ConnectionOptions>;
123
- connectionOptions?: ConnectionOptions;
124
- };
125
-
126
- type SQLiteFileNameOrConnectionString = {
127
- fileName: string | SQLiteConnectionString;
128
- connectionString?: never;
129
- } | {
130
- connectionString: string | SQLiteConnectionString;
131
- fileName?: never;
132
- };
133
- declare const isInMemoryDatabase: (options: Record<string, unknown>) => boolean;
134
- type SQLiteAmbientConnectionPool<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = ConnectionPool<SQLiteConnectionType>;
135
- type SQLiteAmbientConnectionPoolOptions<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = {
136
- singleton?: true;
137
- pooled?: false;
138
- sqliteConnectionFactory?: never;
139
- connection: SQLiteConnectionType;
140
- connectionOptions?: never;
141
- };
142
- declare const sqliteAmbientConnectionPool: <SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection>(options: {
143
- driverType: SQLiteConnectionType["driverType"];
144
- } & SQLiteAmbientConnectionPoolOptions<SQLiteConnectionType["driverType"]>) => SQLiteAmbientConnectionPool<SQLiteConnectionType["driverType"]>;
145
- type SQLiteSingletonConnectionPoolOptions<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions = SQLiteConnectionOptions> = {
146
- singleton: true;
147
- pooled?: true;
148
- sqliteConnectionFactory: SQLiteConnectionFactory<SQLiteConnectionType, ConnectionOptions>;
149
- connection?: never;
150
- connectionOptions: ConnectionOptions;
151
- };
152
- type SQLiteSingletonConnectionPool<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = ConnectionPool<SQLiteConnectionType>;
153
- declare const sqliteSingletonConnectionPool: <SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions & Record<string, unknown> = SQLiteConnectionOptions & Record<string, unknown>>(options: {
154
- driverType: SQLiteConnectionType["driverType"];
155
- } & SQLiteSingletonConnectionPoolOptions<SQLiteConnectionType, ConnectionOptions>) => SQLiteSingletonConnectionPool<SQLiteConnectionType>;
156
- type SQLiteAlwaysNewPoolOptions<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions = SQLiteConnectionOptions> = {
157
- singleton?: false;
158
- pooled?: true;
159
- sqliteConnectionFactory: SQLiteConnectionFactory<SQLiteConnectionType, ConnectionOptions>;
160
- connection?: never;
161
- connectionOptions: ConnectionOptions;
162
- };
163
- type SQLiteAlwaysNewConnectionPool<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = ConnectionPool<SQLiteConnectionType>;
164
- declare const sqliteAlwaysNewConnectionPool: <SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions & Record<string, unknown> = SQLiteConnectionOptions & Record<string, unknown>>(options: {
165
- driverType: SQLiteConnectionType["driverType"];
166
- } & SQLiteAlwaysNewPoolOptions<SQLiteConnectionType, ConnectionOptions>) => SQLiteAlwaysNewConnectionPool<SQLiteConnectionType>;
167
- type SQLitePoolOptions<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions = SQLiteConnectionOptions> = (SQLiteAlwaysNewPoolOptions<SQLiteConnectionType, ConnectionOptions> | SQLiteSingletonConnectionPoolOptions<SQLiteConnectionType, ConnectionOptions> | SQLiteAmbientConnectionPoolOptions<SQLiteConnectionType> | SQLiteDualPoolOptions<SQLiteConnectionType, ConnectionOptions>) & {
168
- driverType: SQLiteConnectionType['driverType'];
169
- serializer?: JSONSerializer;
170
- };
171
- type SQLitePool<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection> = SQLiteAmbientConnectionPool<SQLiteConnectionType> | SQLiteSingletonConnectionPool<SQLiteConnectionType> | SQLiteAlwaysNewConnectionPool<SQLiteConnectionType>;
172
- type SQLitePoolFactoryOptions<SQLiteConnectionType extends AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions> = Omit<SQLitePoolOptions<SQLiteConnectionType, ConnectionOptions>, 'singleton'> & {
173
- singleton?: boolean;
174
- };
175
- declare const toSqlitePoolOptions: <SQLiteConnectionType extends AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions>(options: SQLitePoolFactoryOptions<SQLiteConnectionType, ConnectionOptions>) => SQLitePoolOptions<SQLiteConnectionType, ConnectionOptions>;
176
- declare function sqlitePool<SQLiteConnectionType extends AnySQLiteConnection = AnySQLiteConnection, ConnectionOptions extends SQLiteConnectionOptions = SQLiteConnectionOptions>(options: SQLitePoolOptions<SQLiteConnectionType, ConnectionOptions>): SQLitePool<SQLiteConnectionType>;
177
-
178
- declare const DefaultSQLiteMigratorOptions: MigratorOptions;
179
-
180
- declare const defaultSQLiteDatabase = ":memory:";
181
- declare const tableExists: (execute: SQLExecutor, tableName: string) => Promise<boolean>;
182
-
183
- declare const sqliteFormatter: SQLFormatter;
184
-
185
- type SQLiteDatabaseName = 'SQLite';
186
- declare const SQLiteDatabaseName = "SQLite";
187
- type SQLiteDriverType<DriverName extends string = string> = DatabaseDriverType<SQLiteDatabaseName, DriverName>;
188
- type SQLiteDatabaseType = 'SQLite';
189
-
190
- export { type AnySQLiteClientConnection, type AnySQLiteConnection, type AnySQLitePoolClientConnection, type BatchSQLiteCommandOptions, DEFAULT_SQLITE_PRAGMA_OPTIONS, 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 SQLitePragmaOptions, type SQLiteSQLExecutor, type SQLiteSingletonConnectionPool, type SQLiteTransaction, type SQLiteTransactionMode, type SQLiteTransactionOptions, type SqliteAmbientClientConnectionOptions, type TransactionNestingCounter, defaultSQLiteDatabase, isInMemoryDatabase, isSQLiteError, mapSqliteError, parsePragmasFromConnectionString, sqliteAlwaysNewConnectionPool, sqliteAmbientClientConnection, sqliteAmbientConnectionPool, sqliteClientConnection, sqliteConnection, sqliteExecute, sqliteFormatter, sqliteMetadata, sqlitePool, sqlitePoolClientConnection, sqliteSQLExecutor, sqliteSingletonConnectionPool, sqliteTransaction, tableExists, toSqlitePoolOptions, transactionNestingCounter };
1
+ import { n as sqliteMetadata } from "./index-zkszkJqP.js";
2
+ import { $ as SQLitePragmaOptions, A as SQLiteClientConnectionDefinitionOptions, B as SQLiteParameters, C as AnySQLiteConnection, D as InMemorySQLiteDatabase, E as DEFAULT_SQLITE_PRAGMA_OPTIONS, F as SQLiteConnection, G as TransactionNestingCounter, H as SQLitePoolClientConnection, I as SQLiteConnectionDefinitionOptions, J as sqliteClientConnection, K as isSQLiteError, L as SQLiteConnectionFactory, M as SQLiteClientOptions, N as SQLiteClientOrPoolClient, O as SQLiteClient, P as SQLiteCommandOptions, Q as SQLiteConnectionString, R as SQLiteConnectionOptions, S as AnySQLiteClientConnection, T as BatchSQLiteCommandOptions, U as SQLitePoolConnectionDefinitionOptions, V as SQLitePoolClient, W as SqliteAmbientClientConnectionOptions, X as sqlitePoolClientConnection, Y as sqliteConnection, Z as transactionNestingCounter, _ as sqliteAmbientConnectionPool, a as defaultSQLiteDatabase, at as SQLiteErrorMapper, b as toSqlitePoolOptions, c as SQLiteAlwaysNewConnectionPool, ct as sqliteSQLExecutor, d as SQLitePool, et as parsePragmasFromConnectionString, f as SQLitePoolFactoryOptions, g as sqliteAlwaysNewConnectionPool, h as isInMemoryDatabase, i as sqliteFormatter, it as sqliteTransaction, j as SQLiteClientFactory, k as SQLiteClientConnection, l as SQLiteAmbientConnectionPool, m as SQLiteSingletonConnectionPool, n as SQLiteDatabaseType, nt as SQLiteTransactionMode, o as tableExists, ot as SQLiteSQLExecutor, p as SQLitePoolOptions, q as sqliteAmbientClientConnection, r as SQLiteDriverType, rt as SQLiteTransactionOptions, s as DefaultSQLiteMigratorOptions, st as sqliteExecute, t as SQLiteDatabaseName, tt as SQLiteTransaction, u as SQLiteFileNameOrConnectionString, v as sqlitePool, w as AnySQLitePoolClientConnection, x as mapSqliteError, y as sqliteSingletonConnectionPool, z as SQLiteError } from "./index-D1jryNqo.js";
3
+ export { AnySQLiteClientConnection, AnySQLiteConnection, AnySQLitePoolClientConnection, BatchSQLiteCommandOptions, DEFAULT_SQLITE_PRAGMA_OPTIONS, DefaultSQLiteMigratorOptions, InMemorySQLiteDatabase, SQLiteAlwaysNewConnectionPool, SQLiteAmbientConnectionPool, SQLiteClient, SQLiteClientConnection, SQLiteClientConnectionDefinitionOptions, SQLiteClientFactory, SQLiteClientOptions, SQLiteClientOrPoolClient, SQLiteCommandOptions, SQLiteConnection, SQLiteConnectionDefinitionOptions, SQLiteConnectionFactory, SQLiteConnectionOptions, SQLiteConnectionString, SQLiteDatabaseName, SQLiteDatabaseType, SQLiteDriverType, SQLiteError, SQLiteErrorMapper, SQLiteFileNameOrConnectionString, SQLiteParameters, SQLitePool, SQLitePoolClient, SQLitePoolClientConnection, SQLitePoolConnectionDefinitionOptions, SQLitePoolFactoryOptions, SQLitePoolOptions, SQLitePragmaOptions, SQLiteSQLExecutor, SQLiteSingletonConnectionPool, SQLiteTransaction, SQLiteTransactionMode, SQLiteTransactionOptions, SqliteAmbientClientConnectionOptions, TransactionNestingCounter, defaultSQLiteDatabase, isInMemoryDatabase, isSQLiteError, mapSqliteError, parsePragmasFromConnectionString, sqliteAlwaysNewConnectionPool, sqliteAmbientClientConnection, sqliteAmbientConnectionPool, sqliteClientConnection, sqliteConnection, sqliteExecute, sqliteFormatter, sqliteMetadata, sqlitePool, sqlitePoolClientConnection, sqliteSQLExecutor, sqliteSingletonConnectionPool, sqliteTransaction, tableExists, toSqlitePoolOptions, transactionNestingCounter };
package/dist/sqlite.js CHANGED
@@ -1,60 +1,4 @@
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-6HAHSSPW.js";
26
- import {
27
- defaultSQLiteDatabase,
28
- sqliteMetadata,
29
- tableExists
30
- } from "./chunk-UK7MXVS2.js";
31
- import "./chunk-H2JBS7HM.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
1
+ import { n as defaultSQLiteDatabase, r as tableExists, t as sqliteMetadata } from "./sqliteMetadata-BoQ7Sc9I.js";
2
+ import { C as mapSqliteError, S as sqliteFormatter, _ as SQLiteConnectionString, a as sqliteAmbientConnectionPool, b as sqliteExecute, c as toSqlitePoolOptions, d as isSQLiteError, f as sqliteAmbientClientConnection, g as transactionNestingCounter, h as sqlitePoolClientConnection, i as sqliteAlwaysNewConnectionPool, l as DEFAULT_SQLITE_PRAGMA_OPTIONS, m as sqliteConnection, n as DefaultSQLiteMigratorOptions, o as sqlitePool, p as sqliteClientConnection, r as isInMemoryDatabase, s as sqliteSingletonConnectionPool, t as SQLiteDatabaseName, u as InMemorySQLiteDatabase, v as parsePragmasFromConnectionString, x as sqliteSQLExecutor, y as sqliteTransaction } from "./core-BeyC5tHn.js";
3
+
4
+ export { DEFAULT_SQLITE_PRAGMA_OPTIONS, DefaultSQLiteMigratorOptions, InMemorySQLiteDatabase, SQLiteConnectionString, SQLiteDatabaseName, defaultSQLiteDatabase, isInMemoryDatabase, isSQLiteError, mapSqliteError, parsePragmasFromConnectionString, sqliteAlwaysNewConnectionPool, sqliteAmbientClientConnection, sqliteAmbientConnectionPool, sqliteClientConnection, sqliteConnection, sqliteExecute, sqliteFormatter, sqliteMetadata, sqlitePool, sqlitePoolClientConnection, sqliteSQLExecutor, sqliteSingletonConnectionPool, sqliteTransaction, tableExists, toSqlitePoolOptions, transactionNestingCounter };