@event-driven-io/dumbo 0.13.0-beta.44 → 0.13.0-beta.45
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.d.cts +3 -1103
- package/dist/cloudflare.d.ts +3 -1103
- package/dist/index-B5krjjrh.d.ts +1699 -0
- package/dist/index-BaLXbc2l.d.ts +74 -0
- package/dist/index-BoLWBnxd.d.cts +184 -0
- package/dist/index-C9B46a1u.d.ts +184 -0
- package/dist/index-_dj3upBo.d.cts +1699 -0
- package/dist/index-kYttgYkC.d.cts +74 -0
- package/dist/index.d.cts +2 -1694
- package/dist/index.d.ts +2 -1694
- package/dist/pg.d.cts +3 -1045
- package/dist/pg.d.ts +3 -1045
- package/dist/postgresql.d.cts +3 -1037
- package/dist/postgresql.d.ts +3 -1037
- package/dist/sqlite.d.cts +3 -1103
- package/dist/sqlite.d.ts +3 -1103
- package/dist/sqlite3.d.cts +4 -1103
- package/dist/sqlite3.d.ts +4 -1103
- package/package.json +1 -1
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Bt as DatabaseLockOptions, Ea as SQLProcessor, Ht as ReleaseDatabaseLockOptions, In as DumboError, Ji as SQL, Lt as AcquireDatabaseLockMode, Rt as AcquireDatabaseLockOptions, Vi as SQLFormatter, go as SQLPlain, i as DatabaseConnectionString, jt as MigratorOptions, lo as SQLArray, mo as SQLIn, pt as DatabaseDriverType, rn as SQLExecutor, xa as DefaultSQLColumnProcessors, zt as DatabaseLock } from "./index-_dj3upBo.cjs";
|
|
2
|
+
|
|
3
|
+
//#region src/storage/postgresql/core/connections/connectionString.d.ts
|
|
4
|
+
declare const defaultPostgreSQLConnectionString: PostgreSQLConnectionString;
|
|
5
|
+
type PostgreSQLConnectionString = DatabaseConnectionString<'PostgreSQL', `postgresql://${string}` | `postgres://${string}`>;
|
|
6
|
+
declare const PostgreSQLConnectionString: (connectionString: string) => PostgreSQLConnectionString;
|
|
7
|
+
/**
|
|
8
|
+
* Parse database name from a PostgreSQL connection string
|
|
9
|
+
*/
|
|
10
|
+
declare function parseDatabaseName(str: string): string | null;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/storage/postgresql/core/errors/errorMapper.d.ts
|
|
13
|
+
/**
|
|
14
|
+
* Maps a PostgreSQL error (from the `pg` driver) to a typed DumboError
|
|
15
|
+
* based on the SQLSTATE code.
|
|
16
|
+
*
|
|
17
|
+
* SQLSTATE reference: https://www.postgresql.org/docs/current/errcodes-appendix.html
|
|
18
|
+
* Transient classification based on Npgsql's PostgresException.IsTransient.
|
|
19
|
+
*
|
|
20
|
+
* Falls back to a generic DumboError (500) if the error is not a recognized PostgreSQL error.
|
|
21
|
+
*/
|
|
22
|
+
declare const mapPostgresError: (error: unknown) => DumboError;
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region src/storage/postgresql/core/locks/advisoryLocks.d.ts
|
|
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
|
+
//#endregion
|
|
42
|
+
//#region src/storage/postgresql/core/schema/migrations.d.ts
|
|
43
|
+
declare const DefaultPostgreSQLMigratorOptions: MigratorOptions;
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/storage/postgresql/core/schema/schema.d.ts
|
|
46
|
+
declare const defaultPostgreSqlDatabase = "postgres";
|
|
47
|
+
declare const tableExistsSQL: (tableName: string) => SQL;
|
|
48
|
+
declare const tableExists: (execute: SQLExecutor, tableName: string) => Promise<boolean>;
|
|
49
|
+
declare const functionExistsSQL: (functionName: string) => SQL;
|
|
50
|
+
declare const functionExists: (execute: SQLExecutor, functionName: string) => Promise<boolean>;
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region src/storage/postgresql/core/sql/formatter/index.d.ts
|
|
53
|
+
declare const pgFormatter: SQLFormatter;
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region src/storage/postgresql/core/sql/json.d.ts
|
|
56
|
+
declare const PostgreSQLJSON: {
|
|
57
|
+
readonly field: (source: SQL, path: string) => SQL;
|
|
58
|
+
readonly path: (path: string) => SQLPlain;
|
|
59
|
+
readonly textField: (source: SQL, path: string) => SQL;
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/storage/postgresql/core/sql/processors/arrayProcessors.d.ts
|
|
63
|
+
declare const PostgreSQLArrayProcessor: SQLProcessor<SQLArray>;
|
|
64
|
+
declare const PostgreSQLExpandSQLInProcessor: SQLProcessor<SQLIn>;
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region src/storage/postgresql/core/sql/processors/columProcessors.d.ts
|
|
67
|
+
declare const postgreSQLColumnProcessors: DefaultSQLColumnProcessors;
|
|
68
|
+
//#endregion
|
|
69
|
+
//#region src/storage/postgresql/core/index.d.ts
|
|
70
|
+
type PostgreSQLDatabaseName = 'PostgreSQL';
|
|
71
|
+
declare const PostgreSQLDatabaseName = "PostgreSQL";
|
|
72
|
+
type PostgreSQLDriverType<DriverName extends string = string> = DatabaseDriverType<PostgreSQLDatabaseName, DriverName>;
|
|
73
|
+
//#endregion
|
|
74
|
+
export { parseDatabaseName as S, releaseAdvisoryLock as _, PostgreSQLExpandSQLInProcessor as a, PostgreSQLConnectionString as b, defaultPostgreSqlDatabase as c, tableExists as d, tableExistsSQL as f, advisoryLock as g, acquireAdvisoryLock as h, PostgreSQLArrayProcessor as i, functionExists as l, AdvisoryLock as m, PostgreSQLDriverType as n, PostgreSQLJSON as o, DefaultPostgreSQLMigratorOptions as p, postgreSQLColumnProcessors as r, pgFormatter as s, PostgreSQLDatabaseName as t, functionExistsSQL as u, tryAcquireAdvisoryLock as v, defaultPostgreSQLConnectionString as x, mapPostgresError as y };
|