@encore.dev/sdk 2.0.0-beta.15 → 2.0.0-beta.16
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/README.md +111 -101
- package/app_meta.ts +56 -54
- package/config/config.ts +60 -57
- package/config/secrets.ts +45 -52
- package/config/value.ts +23 -26
- package/cron/mod.ts +28 -29
- package/dist/app_meta.d.ts +52 -50
- package/dist/app_meta.d.ts.map +1 -1
- package/dist/app_meta.js +2 -2
- package/dist/app_meta.js.map +1 -1
- package/dist/config/config.d.ts +58 -55
- package/dist/config/config.d.ts.map +1 -1
- package/dist/config/config.js +8 -9
- package/dist/config/config.js.map +1 -1
- package/dist/config/secrets.d.ts +45 -52
- package/dist/config/secrets.d.ts.map +1 -1
- package/dist/config/secrets.js +8 -9
- package/dist/config/secrets.js.map +1 -1
- package/dist/config/value.d.ts +20 -23
- package/dist/config/value.d.ts.map +1 -1
- package/dist/config/value.js +20 -23
- package/dist/config/value.js.map +1 -1
- package/dist/cron/mod.d.ts +26 -27
- package/dist/cron/mod.d.ts.map +1 -1
- package/dist/cron/mod.js +13 -14
- package/dist/cron/mod.js.map +1 -1
- package/dist/frontends/mod.d.ts +20 -19
- package/dist/frontends/mod.d.ts.map +1 -1
- package/dist/frontends/mod.js +20 -19
- package/dist/frontends/mod.js.map +1 -1
- package/dist/gateway/errors.d.ts +28 -30
- package/dist/gateway/errors.d.ts.map +1 -1
- package/dist/gateway/errors.js +29 -31
- package/dist/gateway/errors.js.map +1 -1
- package/dist/gateway/match.d.ts +54 -54
- package/dist/gateway/match.d.ts.map +1 -1
- package/dist/gateway/match.js +56 -56
- package/dist/gateway/match.js.map +1 -1
- package/dist/gateway/middleware.d.ts +62 -64
- package/dist/gateway/middleware.d.ts.map +1 -1
- package/dist/gateway/middleware.js +1 -1
- package/dist/gateway/middleware.js.map +1 -1
- package/dist/gateway/mod.d.ts +64 -67
- package/dist/gateway/mod.d.ts.map +1 -1
- package/dist/gateway/mod.js +72 -76
- package/dist/gateway/mod.js.map +1 -1
- package/dist/gateway/request.d.ts +138 -134
- package/dist/gateway/request.d.ts.map +1 -1
- package/dist/gateway/request.js +117 -108
- package/dist/gateway/request.js.map +1 -1
- package/dist/gateway/serve.d.ts +29 -34
- package/dist/gateway/serve.d.ts.map +1 -1
- package/dist/gateway/serve.js +51 -56
- package/dist/gateway/serve.js.map +1 -1
- package/dist/gateways/mod.d.ts +23 -21
- package/dist/gateways/mod.d.ts.map +1 -1
- package/dist/gateways/mod.js +25 -23
- package/dist/gateways/mod.js.map +1 -1
- package/dist/internal/runtime/napi/napi.cjs +1 -1
- package/dist/internal/runtime/napi/napi.d.cts +10 -3
- package/dist/internal/runtime/shutdown.d.ts +75 -57
- package/dist/internal/runtime/shutdown.d.ts.map +1 -1
- package/dist/internal/runtime/shutdown.js +88 -84
- package/dist/internal/runtime/shutdown.js.map +1 -1
- package/dist/log/logger.d.ts +43 -37
- package/dist/log/logger.d.ts.map +1 -1
- package/dist/log/logger.js +26 -25
- package/dist/log/logger.js.map +1 -1
- package/dist/metrics/mod.d.ts +133 -114
- package/dist/metrics/mod.d.ts.map +1 -1
- package/dist/metrics/mod.js +109 -101
- package/dist/metrics/mod.js.map +1 -1
- package/dist/otel.d.ts +6 -3
- package/dist/otel.d.ts.map +1 -1
- package/dist/otel.js +6 -3
- package/dist/otel.js.map +1 -1
- package/dist/pubsub/subscription.d.ts +88 -116
- package/dist/pubsub/subscription.d.ts.map +1 -1
- package/dist/pubsub/subscription.js +14 -17
- package/dist/pubsub/subscription.js.map +1 -1
- package/dist/pubsub/topic.d.ts +86 -113
- package/dist/pubsub/topic.d.ts.map +1 -1
- package/dist/pubsub/topic.js +68 -82
- package/dist/pubsub/topic.js.map +1 -1
- package/dist/reqctx/mod.d.ts +83 -86
- package/dist/reqctx/mod.d.ts.map +1 -1
- package/dist/reqctx/mod.js +39 -41
- package/dist/reqctx/mod.js.map +1 -1
- package/dist/services/index.d.ts +76 -75
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +73 -71
- package/dist/services/index.js.map +1 -1
- package/dist/shutdown/mod.d.ts +26 -25
- package/dist/shutdown/mod.d.ts.map +1 -1
- package/dist/shutdown/mod.js +26 -25
- package/dist/shutdown/mod.js.map +1 -1
- package/dist/storage/clickhouse/database.d.ts +113 -115
- package/dist/storage/clickhouse/database.d.ts.map +1 -1
- package/dist/storage/clickhouse/database.js +65 -79
- package/dist/storage/clickhouse/database.js.map +1 -1
- package/dist/storage/clickhouse/errors.d.ts +25 -26
- package/dist/storage/clickhouse/errors.d.ts.map +1 -1
- package/dist/storage/clickhouse/errors.js +15 -17
- package/dist/storage/clickhouse/errors.js.map +1 -1
- package/dist/storage/clickhouse/mod.d.ts +10 -10
- package/dist/storage/clickhouse/mod.js +10 -10
- package/dist/storage/objects/bucket.d.ts +196 -225
- package/dist/storage/objects/bucket.d.ts.map +1 -1
- package/dist/storage/objects/bucket.js +71 -84
- package/dist/storage/objects/bucket.js.map +1 -1
- package/dist/storage/objects/error.d.ts +4 -4
- package/dist/storage/objects/error.js +4 -4
- package/dist/storage/postgres/database.d.ts +124 -149
- package/dist/storage/postgres/database.d.ts.map +1 -1
- package/dist/storage/postgres/database.js +98 -135
- package/dist/storage/postgres/database.js.map +1 -1
- package/dist/storage/postgres/errors.d.ts +42 -48
- package/dist/storage/postgres/errors.d.ts.map +1 -1
- package/dist/storage/postgres/errors.js +44 -51
- package/dist/storage/postgres/errors.js.map +1 -1
- package/dist/storage/postgres/interval.d.ts +19 -19
- package/dist/storage/postgres/interval.d.ts.map +1 -1
- package/dist/storage/postgres/interval.js +21 -21
- package/dist/storage/postgres/interval.js.map +1 -1
- package/dist/storage/redis/bitfield.d.ts +48 -23
- package/dist/storage/redis/bitfield.d.ts.map +1 -1
- package/dist/storage/redis/bitfield.js +38 -19
- package/dist/storage/redis/bitfield.js.map +1 -1
- package/dist/storage/redis/command.d.ts +16 -12
- package/dist/storage/redis/command.d.ts.map +1 -1
- package/dist/storage/redis/command.js +16 -12
- package/dist/storage/redis/command.js.map +1 -1
- package/dist/storage/redis/commands.d.ts +99 -100
- package/dist/storage/redis/commands.d.ts.map +1 -1
- package/dist/storage/redis/commands.js +84 -85
- package/dist/storage/redis/commands.js.map +1 -1
- package/dist/storage/redis/database.d.ts +138 -122
- package/dist/storage/redis/database.d.ts.map +1 -1
- package/dist/storage/redis/database.js +120 -101
- package/dist/storage/redis/database.js.map +1 -1
- package/dist/storage/redis/mod.d.ts +52 -48
- package/dist/storage/redis/mod.d.ts.map +1 -1
- package/dist/storage/redis/mod.js +52 -48
- package/dist/storage/redis/mod.js.map +1 -1
- package/dist/storage/redis/options.d.ts +26 -24
- package/dist/storage/redis/options.d.ts.map +1 -1
- package/dist/storage/redis/options.js.map +1 -1
- package/dist/storage/redis/pubsub.d.ts +16 -16
- package/dist/storage/redis/pubsub.d.ts.map +1 -1
- package/dist/storage/redis/pubsub.js +14 -14
- package/dist/storage/redis/pubsub.js.map +1 -1
- package/dist/storage/redis/reply.d.ts +80 -72
- package/dist/storage/redis/reply.d.ts.map +1 -1
- package/dist/storage/redis/reply.js +53 -46
- package/dist/storage/redis/reply.js.map +1 -1
- package/dist/storage/redis/scan.d.ts +4 -4
- package/dist/storage/redis/scan.d.ts.map +1 -1
- package/dist/storage/redis/scan.js +6 -6
- package/dist/storage/redis/scan.js.map +1 -1
- package/dist/storage/redis/script.d.ts +28 -21
- package/dist/storage/redis/script.d.ts.map +1 -1
- package/dist/storage/redis/script.js +29 -22
- package/dist/storage/redis/script.js.map +1 -1
- package/dist/storage/redis/target.d.ts +17 -1
- package/dist/storage/redis/target.d.ts.map +1 -1
- package/dist/storage/redis/target.js +30 -1
- package/dist/storage/redis/target.js.map +1 -1
- package/dist/storage/redis/wire.d.ts +6 -6
- package/dist/storage/redis/wire.d.ts.map +1 -1
- package/dist/storage/redis/wire.js +6 -6
- package/dist/storage/redis/wire.js.map +1 -1
- package/dist/testing/mod.d.ts +83 -88
- package/dist/testing/mod.d.ts.map +1 -1
- package/dist/testing/mod.js +75 -81
- package/dist/testing/mod.js.map +1 -1
- package/dist/testing/playwright.d.ts +28 -32
- package/dist/testing/playwright.d.ts.map +1 -1
- package/dist/testing/playwright.js +22 -27
- package/dist/testing/playwright.js.map +1 -1
- package/dist/testing/puppeteer.d.ts +11 -12
- package/dist/testing/puppeteer.d.ts.map +1 -1
- package/dist/testing/puppeteer.js +17 -18
- package/dist/testing/puppeteer.js.map +1 -1
- package/dist/testing/system.d.ts +72 -90
- package/dist/testing/system.d.ts.map +1 -1
- package/dist/testing/system.js +90 -107
- package/dist/testing/system.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/frontends/mod.test.ts +6 -2
- package/frontends/mod.ts +20 -19
- package/gateway/errors.ts +30 -32
- package/gateway/match.ts +61 -57
- package/gateway/middleware.ts +62 -64
- package/gateway/mod.ts +73 -76
- package/gateway/request.ts +143 -140
- package/gateway/serve.ts +58 -63
- package/gateways/mod.ts +25 -23
- package/internal/runtime/napi/napi.cjs +1 -1
- package/internal/runtime/napi/napi.d.cts +10 -3
- package/internal/runtime/shutdown.ts +113 -101
- package/log/logger.test.ts +8 -0
- package/log/logger.ts +48 -45
- package/metrics/mod.ts +138 -122
- package/otel.ts +6 -3
- package/package.json +1 -1
- package/pubsub/subscription.ts +93 -123
- package/pubsub/topic.ts +96 -130
- package/reqctx/mod.ts +83 -86
- package/services/index.ts +78 -78
- package/shutdown/mod.ts +26 -25
- package/storage/clickhouse/database.ts +115 -129
- package/storage/clickhouse/errors.ts +27 -29
- package/storage/clickhouse/mod.ts +10 -10
- package/storage/objects/bucket.ts +209 -239
- package/storage/objects/error.ts +4 -4
- package/storage/postgres/database.ts +131 -164
- package/storage/postgres/errors.ts +45 -52
- package/storage/postgres/interval.ts +21 -21
- package/storage/redis/bitfield.ts +51 -26
- package/storage/redis/command.ts +16 -12
- package/storage/redis/commands.ts +99 -100
- package/storage/redis/database.ts +145 -123
- package/storage/redis/mod.ts +52 -48
- package/storage/redis/options.ts +26 -24
- package/storage/redis/pubsub.ts +14 -14
- package/storage/redis/redis.test.ts +17 -2
- package/storage/redis/reply.ts +85 -77
- package/storage/redis/scan.ts +6 -6
- package/storage/redis/script.ts +29 -22
- package/storage/redis/target.ts +34 -1
- package/storage/redis/wire.ts +8 -8
- package/testing/mod.ts +99 -105
- package/testing/playwright.ts +32 -37
- package/testing/puppeteer.ts +22 -23
- package/testing/system.ts +117 -133
|
@@ -5,74 +5,68 @@ import * as runtime from '../../internal/runtime/mod.js';
|
|
|
5
5
|
import { StringLiteral } from '../../internal/utils/constraints.js';
|
|
6
6
|
import type { Interval } from './interval.js';
|
|
7
7
|
/**
|
|
8
|
-
* Configures how database migrations are managed for a
|
|
8
|
+
* Configures how database migrations are managed for a {@link Database}.
|
|
9
9
|
*/
|
|
10
10
|
export interface MigrationsConfig {
|
|
11
11
|
path: string;
|
|
12
12
|
source?: 'prisma' | 'drizzle' | 'drizzle/v1';
|
|
13
13
|
}
|
|
14
14
|
/**
|
|
15
|
-
* Configuration for a
|
|
15
|
+
* Configuration options for declaring a PostgreSQL {@link Database}.
|
|
16
16
|
*/
|
|
17
17
|
export interface DatabaseConfig {
|
|
18
18
|
migrations?: string | MigrationsConfig;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
20
|
+
* Static string-literal tags that classify the database for policy checks
|
|
21
|
+
* (e.g. `{data: "pci"}`). Keys and values may contain lowercase letters,
|
|
22
|
+
* digits, `_`, and `-`, up to 63 characters. Keys must start with a letter
|
|
23
|
+
* and cannot start with the reserved prefix `encore`. At most 32 tags.
|
|
24
24
|
*/
|
|
25
25
|
tags?: Record<string, string>;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* A single query result row, keyed by column name.
|
|
29
29
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
30
|
+
* Column types map to JavaScript values as follows:
|
|
31
|
+
* - Integers and floats decode to `number`, except `int8` values outside the
|
|
32
|
+
* safe integer range (±(2^53−1)), which decode to `bigint` to avoid
|
|
33
|
+
* precision loss.
|
|
34
|
+
* - `numeric` decodes to `Decimal`, `interval` to an ISO 8601 string (e.g.
|
|
35
|
+
* `'P1Y2M3DT4H5M6.5S'`; see {@link Interval}), `timestamp`/`timestamptz` to
|
|
36
|
+
* `Date`, and `bytea` to `ArrayBuffer`.
|
|
37
|
+
* - Types without a dedicated decoder (`money`, `timetz`, ranges, `bit`,
|
|
38
|
+
* `xml`, `tsvector`, and extension types) decode to PostgreSQL text strings
|
|
39
|
+
* (or string arrays for array columns) and accept string parameters.
|
|
38
40
|
*/
|
|
39
41
|
export type Row = Record<string, any>;
|
|
40
|
-
/**
|
|
42
|
+
/** Parameter value accepted in query template literals and raw queries. */
|
|
41
43
|
export type Primitive = string | string[] | number | number[] | boolean | boolean[] | Buffer | Date | Date[] | Interval | Interval[] | Record<string, any> | Record<string, any>[] | BigInt | BigInt[] | null | undefined;
|
|
42
44
|
type SQLQueryExecutor = runtime.SQLConn | runtime.SQLDatabase | runtime.Transaction;
|
|
43
|
-
/**
|
|
45
|
+
/** Result of an `exec` statement, with an exact affected-row count even beyond `Number.MAX_SAFE_INTEGER`. */
|
|
44
46
|
export interface ExecResult {
|
|
45
47
|
rowsAffected: bigint;
|
|
46
48
|
}
|
|
47
|
-
/** Base class containing shared query
|
|
49
|
+
/** Base class containing shared query and execution methods. */
|
|
48
50
|
declare class BaseQueryExecutor<I extends SQLQueryExecutor = SQLQueryExecutor> {
|
|
49
51
|
private readonly handle;
|
|
50
|
-
/**
|
|
51
|
-
* the current test's instance of it, in test mode.
|
|
52
|
-
* @internal */
|
|
52
|
+
/** Native handle or lazy per-test resolver. @internal */
|
|
53
53
|
constructor(handle: I | (() => I));
|
|
54
|
-
/**
|
|
54
|
+
/** Native handle on which statements execute. */
|
|
55
55
|
protected get impl(): I;
|
|
56
56
|
/**
|
|
57
|
-
*
|
|
58
|
-
* with
|
|
59
|
-
*
|
|
60
|
-
* It returns an async generator, that allows iterating over the results
|
|
61
|
-
* in a streaming fashion using `for await`.
|
|
57
|
+
* Streams rows from a parameterized tagged-template SQL query, replacing
|
|
58
|
+
* `${value}` placeholders with `$1`, `$2`, ... to prevent SQL injection.
|
|
59
|
+
* Iterate over results with `for await`.
|
|
62
60
|
*
|
|
63
61
|
* @example
|
|
64
|
-
*
|
|
65
62
|
* const email = "foo@example.com";
|
|
66
|
-
* const result = database.query`SELECT id FROM users WHERE email=${email}
|
|
67
|
-
*
|
|
68
|
-
* This produces the query: "SELECT id FROM users WHERE email=$1".
|
|
63
|
+
* const result = database.query`SELECT id FROM users WHERE email=${email}`;
|
|
64
|
+
* // Executes: "SELECT id FROM users WHERE email=$1"
|
|
69
65
|
*/
|
|
70
66
|
query<T extends Row = Record<string, any>>(strings: TemplateStringsArray, ...params: Primitive[]): AsyncGenerator<T>;
|
|
71
67
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
* It returns an async generator, that allows iterating over the results
|
|
75
|
-
* in a streaming fashion using `for await`.
|
|
68
|
+
* Streams rows from a raw parameterized SQL query using `$1`, `$2`, ...
|
|
69
|
+
* placeholders. Iterate over results with `for await`.
|
|
76
70
|
*
|
|
77
71
|
* @example
|
|
78
72
|
* const query = "SELECT id FROM users WHERE email=$1";
|
|
@@ -82,72 +76,64 @@ declare class BaseQueryExecutor<I extends SQLQueryExecutor = SQLQueryExecutor> {
|
|
|
82
76
|
* }
|
|
83
77
|
*
|
|
84
78
|
* @param query - The raw SQL query string.
|
|
85
|
-
* @param params -
|
|
86
|
-
* @returns An async generator
|
|
79
|
+
* @param params - Positional parameters for the query.
|
|
80
|
+
* @returns An async generator yielding rows from the query result.
|
|
87
81
|
*/
|
|
88
82
|
rawQuery<T extends Row = Record<string, any>>(query: string, ...params: Primitive[]): AsyncGenerator<T>;
|
|
89
83
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
93
|
-
* It returns an array of all results.
|
|
84
|
+
* Executes a parameterized tagged-template SQL query and collects all rows
|
|
85
|
+
* into an array.
|
|
94
86
|
*
|
|
95
87
|
* @example
|
|
96
|
-
*
|
|
97
88
|
* const email = "foo@example.com";
|
|
98
|
-
* const
|
|
99
|
-
*
|
|
100
|
-
* This produces the query: "SELECT id FROM users WHERE email=$1".
|
|
89
|
+
* const rows = await database.queryAll`SELECT id FROM users WHERE email=${email}`;
|
|
101
90
|
*/
|
|
102
91
|
queryAll<T extends Row = Record<string, any>>(strings: TemplateStringsArray, ...params: Primitive[]): Promise<T[]>;
|
|
103
92
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* It returns an array of all results.
|
|
93
|
+
* Executes a raw parameterized SQL query and collects all rows into an array.
|
|
107
94
|
*
|
|
108
95
|
* @example
|
|
109
|
-
*
|
|
110
96
|
* const query = "SELECT id FROM users WHERE email=$1";
|
|
111
97
|
* const email = "foo@example.com";
|
|
112
98
|
* const rows = await database.rawQueryAll(query, email);
|
|
113
99
|
*/
|
|
114
100
|
rawQueryAll<T extends Row = Record<string, any>>(query: string, ...params: Primitive[]): Promise<T[]>;
|
|
115
101
|
/**
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
102
|
+
* Executes a parameterized tagged-template SQL query expecting at most one
|
|
103
|
+
* row. Returns `null` if no rows match, or throws {@link TooManyRowsError}
|
|
104
|
+
* if more than one row matches.
|
|
119
105
|
*
|
|
120
106
|
* @example
|
|
121
107
|
* const email = "foo@example.com";
|
|
122
|
-
* const
|
|
108
|
+
* const row = await database.queryRow`SELECT id FROM users WHERE email=${email}`;
|
|
123
109
|
*/
|
|
124
110
|
queryRow<T extends Row = Record<string, any>>(strings: TemplateStringsArray, ...params: Primitive[]): Promise<T | null>;
|
|
125
111
|
/**
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
*
|
|
112
|
+
* Executes a raw parameterized SQL query expecting at most one row. Returns
|
|
113
|
+
* `null` if no rows match, or throws {@link TooManyRowsError} if more than
|
|
114
|
+
* one row matches.
|
|
129
115
|
*
|
|
130
116
|
* @example
|
|
131
117
|
* const query = "SELECT id FROM users WHERE email=$1";
|
|
132
118
|
* const email = "foo@example.com";
|
|
133
119
|
* const result = await database.rawQueryRow(query, email);
|
|
134
|
-
* console.log(result);
|
|
135
120
|
*
|
|
136
121
|
* @param query - The raw SQL query string.
|
|
137
|
-
* @param params -
|
|
138
|
-
* @returns A promise
|
|
122
|
+
* @param params - Positional parameters for the query.
|
|
123
|
+
* @returns A promise resolving to the single matching row or `null`.
|
|
139
124
|
*/
|
|
140
125
|
rawQueryRow<T extends Row = Record<string, any>>(query: string, ...params: Primitive[]): Promise<T | null>;
|
|
141
126
|
/**
|
|
142
|
-
*
|
|
127
|
+
* Executes a parameterized tagged-template statement and returns the
|
|
128
|
+
* affected row count.
|
|
143
129
|
*
|
|
144
130
|
* @example
|
|
145
131
|
* const email = "foo@example.com";
|
|
146
|
-
* const result = database.exec`DELETE FROM users WHERE email=${email}
|
|
132
|
+
* const result = await database.exec`DELETE FROM users WHERE email=${email}`;
|
|
147
133
|
*/
|
|
148
134
|
exec(strings: TemplateStringsArray, ...params: Primitive[]): Promise<ExecResult>;
|
|
149
135
|
/**
|
|
150
|
-
*
|
|
136
|
+
* Executes a raw parameterized statement and returns the affected row count.
|
|
151
137
|
*
|
|
152
138
|
* @example
|
|
153
139
|
* const query = "DELETE FROM users WHERE email=$1";
|
|
@@ -155,142 +141,137 @@ declare class BaseQueryExecutor<I extends SQLQueryExecutor = SQLQueryExecutor> {
|
|
|
155
141
|
* await database.rawExec(query, email);
|
|
156
142
|
*
|
|
157
143
|
* @param query - The raw SQL query string.
|
|
158
|
-
* @param params -
|
|
159
|
-
* @returns The affected
|
|
144
|
+
* @param params - Positional parameters for the statement.
|
|
145
|
+
* @returns The affected row count after the statement completes.
|
|
160
146
|
*/
|
|
161
147
|
rawExec(query: string, ...params: Primitive[]): Promise<ExecResult>;
|
|
162
148
|
}
|
|
163
|
-
/**
|
|
149
|
+
/** PostgreSQL transaction isolation level. */
|
|
164
150
|
export type IsolationLevel = 'read_committed' | 'repeatable_read' | 'serializable';
|
|
165
151
|
/**
|
|
166
|
-
*
|
|
167
|
-
* `read_committed`, read-write
|
|
152
|
+
* Options for starting a PostgreSQL transaction. Unspecified options use the
|
|
153
|
+
* database defaults (`read_committed`, read-write — or read-only on a read
|
|
154
|
+
* handle — and non-deferrable).
|
|
168
155
|
*/
|
|
169
156
|
export interface TransactionOptions {
|
|
170
157
|
isolation?: IsolationLevel;
|
|
171
158
|
/**
|
|
172
|
-
*
|
|
173
|
-
*
|
|
174
|
-
* throws a `TypeError` on one.
|
|
159
|
+
* Starts the transaction as `READ ONLY` (`true`) or `READ WRITE` (`false`).
|
|
160
|
+
* Passing `false` on a read handle throws a `TypeError`.
|
|
175
161
|
*/
|
|
176
162
|
readOnly?: boolean;
|
|
177
163
|
/**
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
*
|
|
164
|
+
* Starts the transaction as `DEFERRABLE` (`true`) or `NOT DEFERRABLE`
|
|
165
|
+
* (`false`). Applies only to serializable read-only transactions, allowing
|
|
166
|
+
* them to wait for a safe snapshot instead of failing with serialization
|
|
167
|
+
* errors.
|
|
181
168
|
*/
|
|
182
169
|
deferrable?: boolean;
|
|
183
170
|
}
|
|
184
171
|
/**
|
|
185
|
-
* A query handle
|
|
186
|
-
*
|
|
187
|
-
*
|
|
172
|
+
* A scoped query handle safe to pass into application or library code. Obtain
|
|
173
|
+
* one with `read()`, `write()`, `admin()`, `acquire()`, or `begin()`.
|
|
174
|
+
* {@link Database} deliberately does not extend `Queryable`.
|
|
188
175
|
*/
|
|
189
176
|
export declare abstract class Queryable<I extends SQLQueryExecutor = SQLQueryExecutor> extends BaseQueryExecutor<I> {
|
|
190
177
|
private readonly queryableBrand;
|
|
191
178
|
}
|
|
192
|
-
/** Options for
|
|
179
|
+
/** Options for {@link Database.read}. */
|
|
193
180
|
export interface ReadOptions {
|
|
194
181
|
/**
|
|
195
|
-
*
|
|
196
|
-
*
|
|
182
|
+
* Route reads to the primary instance instead of a read replica. When
|
|
183
|
+
* omitted, Encore uses a read-replica pool if one is configured.
|
|
197
184
|
*/
|
|
198
185
|
primary?: boolean;
|
|
199
186
|
}
|
|
200
187
|
/**
|
|
201
|
-
* A database handle with access recorded by Encore
|
|
188
|
+
* A database handle with an access level recorded statically by Encore at its
|
|
189
|
+
* creation site (`read()`, `write()`, or `admin()`).
|
|
202
190
|
*
|
|
203
|
-
*
|
|
204
|
-
*
|
|
205
|
-
*
|
|
206
|
-
*
|
|
207
|
-
* or admin handle runs read-write.
|
|
191
|
+
* Read handles execute on read-only connections where writes fail with a
|
|
192
|
+
* `DatabaseError` (`code: "read_only_transaction"`, SQLSTATE 25006), and any
|
|
193
|
+
* transactions or connections they create are also read-only. Write and admin
|
|
194
|
+
* handles execute read-write.
|
|
208
195
|
*
|
|
209
|
-
*
|
|
210
|
-
*
|
|
211
|
-
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
196
|
+
* When no dedicated read-only pool is configured, read handles share the
|
|
197
|
+
* primary pool with `default_transaction_read_only = on` (which guards against
|
|
198
|
+
* accidental writes, though explicit `SET default_transaction_read_only = off`
|
|
199
|
+
* would lift it); with a dedicated read-only pool, the database role itself
|
|
200
|
+
* enforces read-only permissions.
|
|
214
201
|
*/
|
|
215
202
|
export declare class DatabaseRef extends Queryable<runtime.SQLDatabase> {
|
|
216
203
|
/** @internal */
|
|
217
204
|
constructor(impl: runtime.SQLDatabase | (() => runtime.SQLDatabase));
|
|
218
205
|
/**
|
|
219
|
-
*
|
|
220
|
-
*
|
|
221
|
-
*
|
|
222
|
-
*
|
|
223
|
-
* `primary` is set), and otherwise to the primary. Either way its session
|
|
224
|
-
* is read-only (`default_transaction_read_only` is on), so a write fails
|
|
225
|
-
* with SQLSTATE 25006 until SQL on it turns that off; through the
|
|
226
|
-
* read-only pool, its role refuses writes still.
|
|
206
|
+
* PostgreSQL connection string for connecting with an external client using
|
|
207
|
+
* this handle's access level. Write/admin handles connect read-write; read
|
|
208
|
+
* handles connect to the read-only replica pool if configured (unless
|
|
209
|
+
* `primary: true` was passed) with `default_transaction_read_only` enabled.
|
|
227
210
|
*/
|
|
228
211
|
get connectionString(): string;
|
|
229
212
|
/**
|
|
230
|
-
* Acquires a
|
|
231
|
-
* See {@link Database.acquire}.
|
|
213
|
+
* Acquires a dedicated connection from the pool with this handle's access
|
|
214
|
+
* level. See {@link Database.acquire}.
|
|
232
215
|
*/
|
|
233
216
|
acquire(): Promise<Connection>;
|
|
234
217
|
/**
|
|
235
|
-
* Begins a transaction with this handle's access
|
|
236
|
-
*
|
|
218
|
+
* Begins a transaction with this handle's access level (always read-only for
|
|
219
|
+
* read handles). See {@link Database.begin}.
|
|
237
220
|
*/
|
|
238
221
|
begin(options?: TransactionOptions): Promise<Transaction>;
|
|
239
222
|
}
|
|
240
223
|
/**
|
|
241
|
-
*
|
|
242
|
-
*
|
|
224
|
+
* Declares a PostgreSQL database. Encore provisions the database, runs its
|
|
225
|
+
* migrations, and returns this handle.
|
|
243
226
|
*
|
|
244
|
-
*
|
|
245
|
-
*
|
|
227
|
+
* To reference an existing database without declaring a duplicate, use
|
|
228
|
+
* {@link Database.named}.
|
|
246
229
|
*/
|
|
247
230
|
export declare class Database extends BaseQueryExecutor<runtime.SQLDatabase> {
|
|
248
|
-
/**
|
|
231
|
+
/** Cached read handles, created on first use. */
|
|
249
232
|
private reader?;
|
|
250
233
|
private primaryReader?;
|
|
251
234
|
private readonly dbName;
|
|
252
235
|
constructor(name: string, _cfg?: DatabaseConfig);
|
|
253
236
|
/**
|
|
254
|
-
*
|
|
255
|
-
*
|
|
237
|
+
* References an existing database by name. Use `new Database(name)` to
|
|
238
|
+
* declare a new database.
|
|
256
239
|
*/
|
|
257
240
|
static named<name extends string>(name: StringLiteral<name>): Database;
|
|
258
241
|
/**
|
|
259
|
-
*
|
|
260
|
-
*
|
|
261
|
-
*
|
|
242
|
+
* Returns a read-only handle. Queries run on read-only connections (routed
|
|
243
|
+
* to a read replica when available unless `options.primary` is `true`), and
|
|
244
|
+
* write statements fail.
|
|
262
245
|
*/
|
|
263
246
|
read(options?: ReadOptions): DatabaseRef;
|
|
264
|
-
/**
|
|
247
|
+
/** Returns a read-write handle. */
|
|
265
248
|
write(): DatabaseRef;
|
|
266
|
-
/**
|
|
249
|
+
/** Returns an admin handle with read, write, and admin access. */
|
|
267
250
|
admin(): DatabaseRef;
|
|
268
251
|
private ref;
|
|
269
252
|
/**
|
|
270
|
-
* Returns
|
|
271
|
-
* read-
|
|
272
|
-
* {@link DatabaseRef.connectionString}.
|
|
253
|
+
* Returns a read-write PostgreSQL connection string for external clients.
|
|
254
|
+
* For a read-only connection string, use {@link DatabaseRef.connectionString}.
|
|
273
255
|
*/
|
|
274
256
|
get connectionString(): string;
|
|
275
257
|
/**
|
|
276
|
-
* Acquires a
|
|
258
|
+
* Acquires a dedicated connection from the pool.
|
|
277
259
|
*
|
|
278
|
-
* When
|
|
279
|
-
*
|
|
280
|
-
* `SET ROLE`
|
|
281
|
-
*
|
|
282
|
-
*
|
|
283
|
-
*
|
|
284
|
-
*
|
|
285
|
-
* @returns
|
|
260
|
+
* When closed or garbage-collected, the connection is returned to the pool.
|
|
261
|
+
* Session settings and roles changed directly via `SET`, `set_config`, or
|
|
262
|
+
* `SET ROLE` are reset before reuse (changes made inside stored functions or
|
|
263
|
+
* procedures are not tracked automatically). To scope a setting such as a
|
|
264
|
+
* tenant ID for row-level security to one unit of work, use
|
|
265
|
+
* `set_config(name, value, true)` inside a transaction.
|
|
266
|
+
*
|
|
267
|
+
* @returns A dedicated {@link Connection} implementing `AsyncDisposable`.
|
|
286
268
|
*/
|
|
287
269
|
acquire(): Promise<Connection>;
|
|
288
270
|
/**
|
|
289
271
|
* Begins a database transaction.
|
|
290
272
|
*
|
|
291
|
-
* Prefer
|
|
292
|
-
*
|
|
293
|
-
* the variable goes out of scope:
|
|
273
|
+
* Prefer `await using`, which automatically rolls back the transaction if
|
|
274
|
+
* neither `commit()` nor `rollback()` is called before leaving the scope:
|
|
294
275
|
*
|
|
295
276
|
* ```ts
|
|
296
277
|
* await using tx = await db.begin();
|
|
@@ -298,61 +279,55 @@ export declare class Database extends BaseQueryExecutor<runtime.SQLDatabase> {
|
|
|
298
279
|
* await tx.commit();
|
|
299
280
|
* ```
|
|
300
281
|
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* `options` sets the transaction's isolation level and whether it is
|
|
305
|
-
* read-only or deferrable:
|
|
282
|
+
* Otherwise, always call `commit()` or `rollback()` explicitly to avoid
|
|
283
|
+
* leaked transactions. Pass `options` to configure isolation level,
|
|
284
|
+
* read-only mode, or deferrability:
|
|
306
285
|
*
|
|
307
286
|
* ```ts
|
|
308
287
|
* await using tx = await db.begin({isolation: 'serializable'});
|
|
309
288
|
* ```
|
|
310
289
|
*
|
|
311
|
-
* @returns
|
|
290
|
+
* @returns A {@link Transaction} implementing `AsyncDisposable`.
|
|
312
291
|
*/
|
|
313
292
|
begin(options?: TransactionOptions): Promise<Transaction>;
|
|
314
293
|
}
|
|
315
294
|
/**
|
|
316
|
-
* Represents
|
|
295
|
+
* Represents an active database transaction.
|
|
317
296
|
*
|
|
318
|
-
* `
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
* out of scope:
|
|
297
|
+
* Implements `AsyncDisposable` for use with `await using`, automatically
|
|
298
|
+
* rolling back if neither `commit()` nor `rollback()` is called before leaving
|
|
299
|
+
* the scope:
|
|
322
300
|
*
|
|
323
301
|
* ```ts
|
|
324
302
|
* await using tx = await db.begin();
|
|
325
303
|
* await tx.exec`INSERT INTO ...`;
|
|
326
304
|
* await tx.commit();
|
|
327
305
|
* ```
|
|
328
|
-
*
|
|
329
|
-
* If you can't use `await using`, make sure to always call `commit` or
|
|
330
|
-
* `rollback` yourself to prevent hanging transactions.
|
|
331
306
|
*/
|
|
332
307
|
export declare class Transaction extends Queryable<runtime.Transaction> implements AsyncDisposable {
|
|
333
308
|
private done;
|
|
334
309
|
/** @internal */
|
|
335
310
|
constructor(impl: runtime.Transaction);
|
|
336
311
|
/**
|
|
337
|
-
*
|
|
312
|
+
* Commits the transaction.
|
|
338
313
|
*/
|
|
339
314
|
commit(): Promise<void>;
|
|
340
315
|
/**
|
|
341
|
-
*
|
|
316
|
+
* Rolls back the transaction.
|
|
342
317
|
*/
|
|
343
318
|
rollback(): Promise<void>;
|
|
344
319
|
[Symbol.asyncDispose](): Promise<void>;
|
|
345
320
|
}
|
|
346
321
|
/**
|
|
347
|
-
* Represents a dedicated connection
|
|
322
|
+
* Represents a dedicated PostgreSQL connection acquired from the pool.
|
|
348
323
|
*/
|
|
349
324
|
export declare class Connection extends Queryable<runtime.SQLConn> implements AsyncDisposable {
|
|
350
325
|
/** @internal */
|
|
351
326
|
constructor(impl: runtime.SQLConn);
|
|
352
327
|
/**
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
*
|
|
328
|
+
* Begins a transaction that exclusively borrows this connection until it
|
|
329
|
+
* completes (always read-only on connections acquired from a read handle).
|
|
330
|
+
* See {@link Database.begin}.
|
|
356
331
|
*/
|
|
357
332
|
begin(options?: TransactionOptions): Promise<Transaction>;
|
|
358
333
|
[Symbol.asyncDispose](): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../../storage/postgres/database.ts"],"names":[],"mappings":";;;AACA,OAAO,KAAK,OAAO,MAAM,4BAA4B,CAAC;AAEtD,OAAO,EAAC,aAAa,EAAC,MAAM,kCAAkC,CAAC;AAE/D,OAAO,KAAK,EAAC,QAAQ,EAAC,MAAM,YAAY,CAAC;AAEzC;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAA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