@event-driven-io/dumbo 0.13.0-beta.4 → 0.13.0-beta.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cloudflare.cjs +397 -0
- package/dist/cloudflare.cjs.map +1 -0
- package/dist/cloudflare.d.cts +99 -0
- package/dist/cloudflare.d.ts +99 -0
- package/dist/cloudflare.js +361 -0
- package/dist/cloudflare.js.map +1 -0
- package/dist/core-BMeDuqBQ.js +2265 -0
- package/dist/core-BMeDuqBQ.js.map +1 -0
- package/dist/core-BPNgo5b6.js +379 -0
- package/dist/core-BPNgo5b6.js.map +1 -0
- package/dist/core-CIVu4cNp.cjs +588 -0
- package/dist/core-CIVu4cNp.cjs.map +1 -0
- package/dist/core-D5W_5J8k.cjs +3246 -0
- package/dist/core-D5W_5J8k.cjs.map +1 -0
- package/dist/core-DqUjje4u.cjs +450 -0
- package/dist/core-DqUjje4u.cjs.map +1 -0
- package/dist/core-gu5fi784.js +451 -0
- package/dist/core-gu5fi784.js.map +1 -0
- package/dist/{index-C2z_XBn6.d.ts → index-B-q2er0S.d.cts} +122 -75
- package/dist/{index-C0h0c380.d.cts → index-B5qbt5nP.d.ts} +122 -75
- package/dist/index-BJJAkyuJ.d.ts +68 -0
- package/dist/index-CRbkvVjT.d.ts +1587 -0
- package/dist/index-Cmdlb0KP.d.cts +1587 -0
- package/dist/index-D7qxqMf9.d.cts +67 -0
- package/dist/index-DtRCGhFP.d.cts +68 -0
- package/dist/index-m5LDyNNF.d.ts +67 -0
- package/dist/index.cjs +219 -270
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -127
- package/dist/index.d.ts +3 -127
- package/dist/index.js +56 -269
- package/dist/index.js.map +1 -1
- package/dist/pg.cjs +373 -659
- package/dist/pg.cjs.map +1 -1
- package/dist/pg.d.cts +140 -153
- package/dist/pg.d.ts +140 -153
- package/dist/pg.js +326 -658
- package/dist/pg.js.map +1 -1
- package/dist/postgreSQLMetadata-Khf1e9CT.js +65 -0
- package/dist/postgreSQLMetadata-Khf1e9CT.js.map +1 -0
- package/dist/postgreSQLMetadata-Ri_p5u6i.cjs +118 -0
- package/dist/postgreSQLMetadata-Ri_p5u6i.cjs.map +1 -0
- package/dist/postgresql.cjs +25 -0
- package/dist/postgresql.d.cts +3 -0
- package/dist/postgresql.d.ts +3 -0
- package/dist/postgresql.js +4 -0
- package/dist/sqlite.cjs +30 -0
- package/dist/sqlite.d.cts +3 -0
- package/dist/sqlite.d.ts +3 -0
- package/dist/sqlite.js +4 -0
- package/dist/sqlite3.cjs +437 -273
- package/dist/sqlite3.cjs.map +1 -1
- package/dist/sqlite3.d.cts +92 -70
- package/dist/sqlite3.d.ts +92 -70
- package/dist/sqlite3.js +402 -272
- package/dist/sqlite3.js.map +1 -1
- package/dist/sqliteMetadata-CpmoZxqb.cjs +46 -0
- package/dist/sqliteMetadata-CpmoZxqb.cjs.map +1 -0
- package/dist/sqliteMetadata-viYmVwA5.js +29 -0
- package/dist/sqliteMetadata-viYmVwA5.js.map +1 -0
- package/package.json +60 -37
- package/dist/chunk-32AL3EAS.cjs +0 -47
- package/dist/chunk-32AL3EAS.cjs.map +0 -1
- package/dist/chunk-6IHCIJ7S.js +0 -47
- package/dist/chunk-6IHCIJ7S.js.map +0 -1
- package/dist/chunk-IYEHOE4S.cjs +0 -405
- package/dist/chunk-IYEHOE4S.cjs.map +0 -1
- package/dist/chunk-N7RWT46K.js +0 -2011
- package/dist/chunk-N7RWT46K.js.map +0 -1
- package/dist/chunk-OJ34O3Q2.cjs +0 -2011
- package/dist/chunk-OJ34O3Q2.cjs.map +0 -1
- package/dist/chunk-XVV3OOQX.js +0 -405
- package/dist/chunk-XVV3OOQX.js.map +0 -1
- package/dist/columnProcessors-BX-sH7ah.d.cts +0 -8
- package/dist/columnProcessors-DMPpTPqM.d.ts +0 -8
- package/dist/connectionString-B1wm0TFc.d.cts +0 -1271
- package/dist/connectionString-B1wm0TFc.d.ts +0 -1271
- package/dist/d1.cjs +0 -277
- package/dist/d1.cjs.map +0 -1
- package/dist/d1.d.cts +0 -72
- package/dist/d1.d.ts +0 -72
- package/dist/d1.js +0 -277
- package/dist/d1.js.map +0 -1
package/dist/pg.d.ts
CHANGED
|
@@ -1,171 +1,158 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { D as Connection, E as AnyConnection, Gt as DbSQLExecutor, K as DatabaseTransaction, co as JSONSerializer, ft as DumboDatabaseDriver, oo as JSONSerializationOptions, p as ConnectionPool, q as DatabaseTransactionOptions, r as postgreSQLMetadata } from "./index-CRbkvVjT.js";
|
|
2
|
+
import { _ as tryAcquireAdvisoryLock, a as PostgreSQLExpandSQLInProcessor, b as defaultPostgreSQLConnectionString, c as functionExists, d as tableExistsSQL, f as DefaultPostgreSQLMigratorOptions, g as releaseAdvisoryLock, h as advisoryLock, i as PostgreSQLArrayProcessor, l as functionExistsSQL, m as acquireAdvisoryLock, n as PostgreSQLDriverType, o as pgFormatter, p as AdvisoryLock, r as postgreSQLColumnProcessors, s as defaultPostgreSqlDatabase, t as PostgreSQLDatabaseName, u as tableExists, v as mapPostgresError, x as parseDatabaseName, y as PostgreSQLConnectionString } from "./index-BJJAkyuJ.js";
|
|
3
|
+
import pg from "pg";
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
type
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
declare const tryAcquireAdvisoryLock: (execute: SQLExecutor, options: AcquireDatabaseLockOptions) => Promise<boolean>;
|
|
11
|
-
declare const releaseAdvisoryLock: (execute: SQLExecutor, options: ReleaseDatabaseLockOptions) => Promise<boolean>;
|
|
12
|
-
declare const acquireAdvisoryLock: (execute: SQLExecutor, options: AcquireDatabaseLockOptions) => Promise<void>;
|
|
13
|
-
declare const AdvisoryLock: DatabaseLock;
|
|
14
|
-
declare const advisoryLock: (execute: SQLExecutor, options: DatabaseLockOptions) => {
|
|
15
|
-
acquire: (acquireOptions?: {
|
|
16
|
-
mode: AcquireDatabaseLockMode;
|
|
17
|
-
}) => Promise<void>;
|
|
18
|
-
tryAcquire: (acquireOptions?: {
|
|
19
|
-
mode: AcquireDatabaseLockMode;
|
|
20
|
-
}) => Promise<boolean>;
|
|
21
|
-
release: () => Promise<boolean>;
|
|
22
|
-
withAcquire: <Result>(handle: () => Promise<Result>, acquireOptions?: {
|
|
23
|
-
mode: AcquireDatabaseLockMode;
|
|
24
|
-
}) => Promise<Result>;
|
|
5
|
+
//#region src/storage/postgresql/pg/connections/transaction.d.ts
|
|
6
|
+
type PgTransaction = DatabaseTransaction<PgConnection, PgTransactionOptions>;
|
|
7
|
+
type PgIsolationLevel = 'READ UNCOMMITTED' | 'READ COMMITTED' | 'REPEATABLE READ' | 'SERIALIZABLE';
|
|
8
|
+
type PgTransactionOptions = DatabaseTransactionOptions & {
|
|
9
|
+
isolationLevel?: PgIsolationLevel;
|
|
25
10
|
};
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
declare const
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
type
|
|
40
|
-
|
|
41
|
-
type
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
type
|
|
46
|
-
type
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
type
|
|
51
|
-
|
|
52
|
-
type NodePostgresPoolClientOptions = {
|
|
53
|
-
type: 'PoolClient';
|
|
54
|
-
connect: () => Promise<NodePostgresPoolClient>;
|
|
55
|
-
close: (client: NodePostgresPoolClient) => Promise<void>;
|
|
11
|
+
declare const pgTransaction: <ConnectionType extends AnyConnection = AnyConnection>(connection: () => ConnectionType, serializer: JSONSerializer) => <DbClient extends PgPoolOrClient = PgPoolOrClient>(getClient: Promise<DbClient>, options?: {
|
|
12
|
+
close: (client: DbClient, error?: unknown) => Promise<void>;
|
|
13
|
+
} & PgTransactionOptions) => DatabaseTransaction<ConnectionType>;
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/storage/postgresql/pg/connections/connection.d.ts
|
|
16
|
+
type PgDriverType = PostgreSQLDriverType<'pg'>;
|
|
17
|
+
declare const PgDriverType: PgDriverType;
|
|
18
|
+
type PgPoolClient = pg.PoolClient;
|
|
19
|
+
type PgClient = pg.Client;
|
|
20
|
+
type PgClientOrPoolClient = PgPoolClient | PgClient;
|
|
21
|
+
type PgPoolOrClient = pg.Pool | PgPoolClient | PgClient;
|
|
22
|
+
type PgClientConnection = Connection<PgClientConnection, PgDriverType, PgClient, DatabaseTransaction<PgClientConnection, PgTransactionOptions>>;
|
|
23
|
+
type PgPoolClientConnection = Connection<PgPoolClientConnection, PgDriverType, PgPoolClient, DatabaseTransaction<PgPoolClientConnection, PgTransactionOptions>>;
|
|
24
|
+
type PgConnection = PgPoolClientConnection | PgClientConnection;
|
|
25
|
+
type PgPoolClientOptions = {
|
|
26
|
+
type: 'PoolClient';
|
|
27
|
+
connect: () => Promise<PgPoolClient>;
|
|
28
|
+
close: (client: PgPoolClient) => Promise<void>;
|
|
29
|
+
};
|
|
30
|
+
type PgClientOptions = {
|
|
31
|
+
type: 'Client';
|
|
32
|
+
connect: () => Promise<PgClient>;
|
|
33
|
+
close: (client: PgClient) => Promise<void>;
|
|
34
|
+
};
|
|
35
|
+
type PgClientConnectionOptions = PgClientOptions & {
|
|
36
|
+
serializer: JSONSerializer;
|
|
56
37
|
};
|
|
57
|
-
type
|
|
58
|
-
|
|
59
|
-
connect: () => Promise<NodePostgresClient>;
|
|
60
|
-
close: (client: NodePostgresClient) => Promise<void>;
|
|
38
|
+
type PgPoolClientConnectionOptions = PgPoolClientOptions & {
|
|
39
|
+
serializer: JSONSerializer;
|
|
61
40
|
};
|
|
62
|
-
declare const
|
|
63
|
-
declare const
|
|
64
|
-
|
|
65
|
-
declare function
|
|
41
|
+
declare const pgClientConnection: (options: PgClientConnectionOptions) => PgClientConnection;
|
|
42
|
+
declare const pgPoolClientConnection: (options: PgPoolClientConnectionOptions) => PgPoolClientConnection;
|
|
43
|
+
type PgConnectionOptions = PgPoolClientConnectionOptions | PgClientConnectionOptions;
|
|
44
|
+
declare function pgConnection(options: PgPoolClientConnectionOptions): PgPoolClientConnection;
|
|
45
|
+
declare function pgConnection(options: PgClientConnectionOptions): PgClientConnection;
|
|
66
46
|
type ConnectionCheckResult = {
|
|
67
|
-
|
|
47
|
+
successful: true;
|
|
68
48
|
} | {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
49
|
+
successful: false;
|
|
50
|
+
code: string | undefined;
|
|
51
|
+
errorType: 'ConnectionRefused' | 'Authentication' | 'Unknown';
|
|
52
|
+
error: unknown;
|
|
73
53
|
};
|
|
74
54
|
declare const checkConnection: (connectionString: string) => Promise<ConnectionCheckResult>;
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
type
|
|
78
|
-
type
|
|
79
|
-
type
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
}) =>
|
|
90
|
-
declare const
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/storage/postgresql/pg/connections/pool.d.ts
|
|
57
|
+
type PgNativePool = ConnectionPool<PgPoolClientConnection>;
|
|
58
|
+
type PgAmbientClientPool = ConnectionPool<PgClientConnection>;
|
|
59
|
+
type PgAmbientConnectionPool = ConnectionPool<PgPoolClientConnection | PgClientConnection>;
|
|
60
|
+
type PgPool = PgNativePool | PgAmbientClientPool | PgAmbientConnectionPool;
|
|
61
|
+
declare const pgNativePool: (options: {
|
|
62
|
+
connectionString: string;
|
|
63
|
+
database?: string | undefined;
|
|
64
|
+
serializer: JSONSerializer;
|
|
65
|
+
}) => PgNativePool;
|
|
66
|
+
declare const pgAmbientNativePool: (options: {
|
|
67
|
+
pool: pg.Pool;
|
|
68
|
+
serializer: JSONSerializer;
|
|
69
|
+
}) => PgNativePool;
|
|
70
|
+
declare const pgAmbientConnectionPool: (options: {
|
|
71
|
+
connection: PgPoolClientConnection | PgClientConnection;
|
|
72
|
+
}) => PgAmbientConnectionPool;
|
|
73
|
+
declare const pgClientPool: (options: {
|
|
74
|
+
connectionString: string;
|
|
75
|
+
database?: string | undefined;
|
|
76
|
+
serializer: JSONSerializer;
|
|
77
|
+
}) => PgAmbientClientPool;
|
|
78
|
+
declare const pgAmbientClientPool: (options: {
|
|
79
|
+
client: pg.Client;
|
|
80
|
+
serializer: JSONSerializer;
|
|
81
|
+
}) => PgAmbientClientPool;
|
|
82
|
+
type PgPoolPooledOptions = {
|
|
83
|
+
connectionString: string;
|
|
84
|
+
database?: string;
|
|
85
|
+
pooled: true;
|
|
86
|
+
pool: pg.Pool;
|
|
102
87
|
} | {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
88
|
+
connectionString: string;
|
|
89
|
+
database?: string;
|
|
90
|
+
pool: pg.Pool;
|
|
106
91
|
} | {
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
92
|
+
connectionString: string;
|
|
93
|
+
database?: string;
|
|
94
|
+
pooled: true;
|
|
110
95
|
} | {
|
|
111
|
-
|
|
112
|
-
|
|
96
|
+
connectionString: string;
|
|
97
|
+
database?: string;
|
|
113
98
|
};
|
|
114
|
-
type
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
99
|
+
type PgPoolNotPooledOptions = {
|
|
100
|
+
connectionString: string;
|
|
101
|
+
database?: string;
|
|
102
|
+
pooled: false;
|
|
103
|
+
client: pg.Client;
|
|
119
104
|
} | {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
105
|
+
connectionString: string;
|
|
106
|
+
database?: string;
|
|
107
|
+
client: pg.Client;
|
|
123
108
|
} | {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
109
|
+
connectionString: string;
|
|
110
|
+
database?: string;
|
|
111
|
+
pooled: false;
|
|
127
112
|
} | {
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
};
|
|
133
|
-
type NodePostgresPoolOptions = (NodePostgresPoolPooledOptions | NodePostgresPoolNotPooledOptions) & {
|
|
134
|
-
serializer?: JSONSerializer;
|
|
113
|
+
connectionString: string;
|
|
114
|
+
database?: string;
|
|
115
|
+
connection: PgPoolClientConnection | PgClientConnection;
|
|
116
|
+
pooled?: false;
|
|
135
117
|
};
|
|
136
|
-
|
|
137
|
-
declare function
|
|
138
|
-
declare
|
|
139
|
-
declare const
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
118
|
+
type PgPoolOptions = (PgPoolPooledOptions | PgPoolNotPooledOptions) & JSONSerializationOptions;
|
|
119
|
+
declare function pgPool(options: PgPoolPooledOptions): PgNativePool;
|
|
120
|
+
declare function pgPool(options: PgPoolNotPooledOptions): PgAmbientClientPool;
|
|
121
|
+
declare const getPgPool: (connectionStringOrOptions: string | pg.PoolConfig) => pg.Pool;
|
|
122
|
+
declare const endPgPool: ({
|
|
123
|
+
connectionString,
|
|
124
|
+
database,
|
|
125
|
+
force
|
|
126
|
+
}: {
|
|
127
|
+
connectionString: string;
|
|
128
|
+
database?: string | undefined;
|
|
129
|
+
force?: boolean;
|
|
143
130
|
}) => Promise<void>;
|
|
144
131
|
declare const onEndPool: (lookupKey: string, pool: pg.Pool) => Promise<void>;
|
|
145
|
-
declare const
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
declare const
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
declare const
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
132
|
+
declare const endAllPgPools: () => Promise<void[]>;
|
|
133
|
+
//#endregion
|
|
134
|
+
//#region src/storage/postgresql/pg/execute/execute.d.ts
|
|
135
|
+
declare const isPgNativePool: (poolOrClient: pg.Pool | pg.PoolClient | pg.Client) => poolOrClient is pg.Pool;
|
|
136
|
+
declare const isPgClient: (poolOrClient: pg.Pool | pg.PoolClient | pg.Client) => poolOrClient is pg.Client;
|
|
137
|
+
declare const isPgPoolClient: (poolOrClient: pg.Pool | pg.PoolClient | pg.Client) => poolOrClient is pg.PoolClient;
|
|
138
|
+
declare const pgExecute: <Result = void>(poolOrClient: pg.Pool | pg.PoolClient | pg.Client, handle: (client: pg.PoolClient | pg.Client) => Promise<Result>) => Promise<Result>;
|
|
139
|
+
type PgSQLExecutor = DbSQLExecutor<PgDriverType, PgClientOrPoolClient>;
|
|
140
|
+
declare const pgSQLExecutor: ({
|
|
141
|
+
serializer
|
|
142
|
+
}: {
|
|
143
|
+
serializer: JSONSerializer;
|
|
144
|
+
}) => PgSQLExecutor;
|
|
145
|
+
//#endregion
|
|
146
|
+
//#region src/storage/postgresql/pg/serialization/index.d.ts
|
|
147
|
+
declare const setPgTypeParser: (client: pg.Client | pg.PoolClient, options?: {
|
|
148
|
+
parseBigInts?: boolean;
|
|
149
|
+
serializer: JSONSerializer;
|
|
150
|
+
}) => void;
|
|
151
|
+
//#endregion
|
|
152
|
+
//#region src/storage/postgresql/pg/index.d.ts
|
|
153
|
+
declare const pgDumboDriver: DumboDatabaseDriver<PgConnection, PgPoolOptions, PgPool>;
|
|
154
|
+
declare const usePgDumboDriver: () => void;
|
|
155
|
+
type PgDumboOptions = PgPoolOptions;
|
|
156
|
+
//#endregion
|
|
157
|
+
export { AdvisoryLock, ConnectionCheckResult, DefaultPostgreSQLMigratorOptions, PgAmbientClientPool, PgAmbientConnectionPool, PgClient, PgClientConnection, PgClientConnectionOptions, PgClientOptions, PgClientOrPoolClient, PgConnection, PgConnectionOptions, PgDriverType, PgDumboOptions, PgIsolationLevel, PgNativePool, PgPool, PgPoolClient, PgPoolClientConnection, PgPoolClientConnectionOptions, PgPoolClientOptions, PgPoolNotPooledOptions, PgPoolOptions, PgPoolOrClient, PgPoolPooledOptions, PgSQLExecutor, PgTransaction, PgTransactionOptions, PostgreSQLArrayProcessor, PostgreSQLConnectionString, PostgreSQLDatabaseName, PostgreSQLDriverType, PostgreSQLExpandSQLInProcessor, acquireAdvisoryLock, advisoryLock, checkConnection, defaultPostgreSQLConnectionString, defaultPostgreSqlDatabase, endAllPgPools, endPgPool, functionExists, functionExistsSQL, getPgPool, isPgClient, isPgNativePool, isPgPoolClient, mapPostgresError, onEndPool, parseDatabaseName, pgAmbientClientPool, pgAmbientConnectionPool, pgAmbientNativePool, pgClientConnection, pgClientPool, pgConnection, pgDumboDriver, pgExecute, pgFormatter, pgNativePool, pgPool, pgPoolClientConnection, pgSQLExecutor, pgTransaction, postgreSQLColumnProcessors, postgreSQLMetadata, releaseAdvisoryLock, setPgTypeParser, tableExists, tableExistsSQL, tryAcquireAdvisoryLock, usePgDumboDriver };
|
|
158
|
+
//# sourceMappingURL=pg.d.ts.map
|