@event-driven-io/dumbo 0.13.0-beta.3 → 0.13.0-beta.31
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/chunk-4SM4JJJZ.js +83 -0
- package/dist/chunk-4SM4JJJZ.js.map +1 -0
- package/dist/chunk-EEKBLOCH.cjs +706 -0
- package/dist/chunk-EEKBLOCH.cjs.map +1 -0
- package/dist/{chunk-OJ34O3Q2.cjs → chunk-GVR3PSDL.cjs} +2474 -1636
- package/dist/chunk-GVR3PSDL.cjs.map +1 -0
- package/dist/chunk-HZM7GDOT.cjs +34 -0
- package/dist/chunk-HZM7GDOT.cjs.map +1 -0
- package/dist/{chunk-N7RWT46K.js → chunk-JKE6SULM.js} +2522 -1684
- package/dist/chunk-JKE6SULM.js.map +1 -0
- package/dist/chunk-MOPKHYYU.cjs +83 -0
- package/dist/chunk-MOPKHYYU.cjs.map +1 -0
- package/dist/chunk-RA2L3FQW.js +481 -0
- package/dist/chunk-RA2L3FQW.js.map +1 -0
- package/dist/chunk-UA542GT3.cjs +481 -0
- package/dist/chunk-UA542GT3.cjs.map +1 -0
- package/dist/chunk-WLWELSA2.js +34 -0
- package/dist/chunk-WLWELSA2.js.map +1 -0
- package/dist/chunk-XFEGS3YT.js +706 -0
- package/dist/chunk-XFEGS3YT.js.map +1 -0
- package/dist/cloudflare.cjs +456 -0
- package/dist/cloudflare.cjs.map +1 -0
- package/dist/cloudflare.d.cts +92 -0
- package/dist/cloudflare.d.ts +92 -0
- package/dist/cloudflare.js +456 -0
- package/dist/cloudflare.js.map +1 -0
- package/dist/{columnProcessors-DMPpTPqM.d.ts → columnProcessors-Be2uMYjS.d.cts} +1 -1
- package/dist/{columnProcessors-BX-sH7ah.d.cts → columnProcessors-D0ivj_SU.d.ts} +1 -1
- package/dist/{connectionString-B1wm0TFc.d.cts → connectionString-Dch_MIRU.d.cts} +394 -168
- package/dist/{connectionString-B1wm0TFc.d.ts → connectionString-Dch_MIRU.d.ts} +394 -168
- package/dist/index.cjs +100 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +23 -18
- package/dist/index.d.ts +23 -18
- package/dist/index.js +105 -9
- package/dist/index.js.map +1 -1
- package/dist/pg.cjs +383 -9
- package/dist/pg.cjs.map +1 -1
- package/dist/pg.d.cts +81 -105
- package/dist/pg.d.ts +81 -105
- package/dist/pg.js +435 -61
- package/dist/pg.js.map +1 -1
- package/dist/postgresql.cjs +50 -0
- package/dist/postgresql.cjs.map +1 -0
- package/dist/postgresql.d.cts +61 -0
- package/dist/postgresql.d.ts +61 -0
- package/dist/postgresql.js +50 -0
- package/dist/sqlite.cjs +60 -0
- package/dist/sqlite.cjs.map +1 -0
- package/dist/{index-C2z_XBn6.d.ts → sqlite.d.cts} +69 -20
- package/dist/{index-C0h0c380.d.cts → sqlite.d.ts} +69 -20
- package/dist/sqlite.js +60 -0
- package/dist/sqlite3.cjs +319 -6
- package/dist/sqlite3.cjs.map +1 -1
- package/dist/sqlite3.d.cts +45 -25
- package/dist/sqlite3.d.ts +45 -25
- package/dist/sqlite3.js +335 -22
- package/dist/sqlite3.js.map +1 -1
- package/package.json +55 -33
- package/dist/chunk-A7TC7IOP.cjs +0 -55
- package/dist/chunk-A7TC7IOP.cjs.map +0 -1
- package/dist/chunk-F7JQ7BX7.js +0 -240
- package/dist/chunk-F7JQ7BX7.js.map +0 -1
- package/dist/chunk-I34X53VL.js +0 -688
- package/dist/chunk-I34X53VL.js.map +0 -1
- package/dist/chunk-ISNF6USX.cjs +0 -688
- package/dist/chunk-ISNF6USX.cjs.map +0 -1
- package/dist/chunk-IYEHOE4S.cjs +0 -405
- package/dist/chunk-IYEHOE4S.cjs.map +0 -1
- package/dist/chunk-L2YZQAG3.cjs +0 -240
- package/dist/chunk-L2YZQAG3.cjs.map +0 -1
- package/dist/chunk-N7RWT46K.js.map +0 -1
- package/dist/chunk-OJ34O3Q2.cjs.map +0 -1
- package/dist/chunk-TXSETOGH.js +0 -55
- package/dist/chunk-TXSETOGH.js.map +0 -1
- package/dist/chunk-XVV3OOQX.js +0 -405
- package/dist/chunk-XVV3OOQX.js.map +0 -1
- 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-3ACXFMU4.cjs +0 -59
- package/dist/pg-3ACXFMU4.cjs.map +0 -1
- package/dist/pg-GHOW3XSG.js +0 -59
- package/dist/sqlite3-EEIKQCJR.js +0 -25
- package/dist/sqlite3-SE4DDYZE.cjs +0 -25
- package/dist/sqlite3-SE4DDYZE.cjs.map +0 -1
- /package/dist/{pg-GHOW3XSG.js.map → postgresql.js.map} +0 -0
- /package/dist/{sqlite3-EEIKQCJR.js.map → sqlite.js.map} +0 -0
|
@@ -1,3 +1,72 @@
|
|
|
1
|
+
type JSONSerializerOptions = {
|
|
2
|
+
parseDates?: boolean;
|
|
3
|
+
parseBigInts?: boolean;
|
|
4
|
+
failOnBigIntSerialization?: boolean;
|
|
5
|
+
useDefaultDateSerialization?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type JSONSerializeOptions = {
|
|
8
|
+
replacer?: JSONReplacer;
|
|
9
|
+
} & JSONSerializerOptions;
|
|
10
|
+
type JSONDeserializeOptions = {
|
|
11
|
+
reviver?: JSONReviver;
|
|
12
|
+
} & JSONSerializerOptions;
|
|
13
|
+
type JSONCodecSerializationOptions<SerializeOptions extends JSONSerializeOptions = JSONSerializeOptions, DeserializeOptions extends JSONDeserializeOptions = JSONDeserializeOptions> = {
|
|
14
|
+
serializer?: JSONSerializer<SerializeOptions, DeserializeOptions>;
|
|
15
|
+
serializerOptions?: never;
|
|
16
|
+
} | {
|
|
17
|
+
serializer?: never;
|
|
18
|
+
serializerOptions?: JSONSerializerOptions;
|
|
19
|
+
};
|
|
20
|
+
type JSONSerializationOptions<SerializeOptions extends JSONSerializeOptions = JSONSerializeOptions, DeserializeOptions extends JSONDeserializeOptions = JSONDeserializeOptions> = {
|
|
21
|
+
serialization?: {
|
|
22
|
+
serializer?: JSONSerializer<SerializeOptions, DeserializeOptions>;
|
|
23
|
+
options?: JSONSerializeOptions | JSONDeserializeOptions;
|
|
24
|
+
} | undefined;
|
|
25
|
+
};
|
|
26
|
+
type JSONCodecOptions<T, Payload = T, SerializeOptions extends JSONSerializeOptions = JSONSerializeOptions, DeserializeOptions extends JSONDeserializeOptions = JSONDeserializeOptions> = JSONCodecSerializationOptions<SerializeOptions, DeserializeOptions> & {
|
|
27
|
+
upcast?: (document: Payload) => T;
|
|
28
|
+
downcast?: (document: T) => Payload;
|
|
29
|
+
};
|
|
30
|
+
type JSONReviverContext = {
|
|
31
|
+
source: string;
|
|
32
|
+
};
|
|
33
|
+
declare const composeJSONReplacers: (...replacers: (JSONReplacer | undefined)[]) => JSONReplacer | undefined;
|
|
34
|
+
declare const composeJSONRevivers: (...revivers: (JSONReviver | undefined)[]) => JSONReviver | undefined;
|
|
35
|
+
type JSONReplacer = (this: any, key: string, value: any) => any;
|
|
36
|
+
declare const JSONReplacer: (opts?: JSONSerializeOptions) => JSONReplacer | undefined;
|
|
37
|
+
type JSONReviver = (this: any, key: string, value: any, context: JSONReviverContext) => any;
|
|
38
|
+
declare const JSONReviver: (opts?: JSONDeserializeOptions) => JSONReviver | undefined;
|
|
39
|
+
declare const JSONReplacers: {
|
|
40
|
+
bigInt: JSONReplacer;
|
|
41
|
+
date: JSONReplacer;
|
|
42
|
+
};
|
|
43
|
+
declare const JSONRevivers: {
|
|
44
|
+
bigInt: JSONReviver;
|
|
45
|
+
date: JSONReviver;
|
|
46
|
+
};
|
|
47
|
+
declare const jsonSerializer: (options?: JSONSerializerOptions & JSONDeserializeOptions & JSONSerializeOptions) => JSONSerializer;
|
|
48
|
+
interface JSONSerializer<SerializeOptions extends JSONSerializeOptions = JSONSerializeOptions, DeserializeOptions extends JSONDeserializeOptions = JSONDeserializeOptions> extends Serializer<string, SerializeOptions, DeserializeOptions> {
|
|
49
|
+
serialize<T>(object: T, options?: SerializeOptions): string;
|
|
50
|
+
deserialize<T>(payload: string, options?: DeserializeOptions): T;
|
|
51
|
+
}
|
|
52
|
+
declare const JSONSerializer: JSONSerializer & {
|
|
53
|
+
from: <SerializeOptions extends JSONSerializeOptions = JSONSerializeOptions, DeserializeOptions extends JSONDeserializeOptions = JSONDeserializeOptions>(options?: JSONSerializationOptions<SerializeOptions, DeserializeOptions>) => JSONSerializer<SerializeOptions, DeserializeOptions>;
|
|
54
|
+
};
|
|
55
|
+
interface JSONCodec<T, SerializeOptions extends JSONSerializeOptions = JSONSerializeOptions, DeserializeOptions extends JSONDeserializeOptions = JSONDeserializeOptions> extends SerializationCodec<T, string, SerializeOptions, DeserializeOptions> {
|
|
56
|
+
encode(object: T, options?: SerializeOptions): string;
|
|
57
|
+
decode(payload: string, options?: DeserializeOptions): T;
|
|
58
|
+
}
|
|
59
|
+
declare const JSONCodec: <T, Payload = T, SerializeOptions extends JSONSerializeOptions = JSONSerializeOptions, DeserializeOptions extends JSONDeserializeOptions = JSONDeserializeOptions>(options: JSONCodecOptions<T, Payload, SerializeOptions, DeserializeOptions>) => JSONCodec<T, SerializeOptions, DeserializeOptions>;
|
|
60
|
+
|
|
61
|
+
interface Serializer<Payload, SerializeOptions extends Record<string, unknown> = Record<string, unknown>, DeserializeOptions extends Record<string, unknown> = SerializeOptions> {
|
|
62
|
+
serialize<T>(object: T, options?: SerializeOptions): Payload;
|
|
63
|
+
deserialize<T>(payload: Payload, options?: DeserializeOptions): T;
|
|
64
|
+
}
|
|
65
|
+
interface SerializationCodec<T, Payload, SerializeOptions extends Record<string, unknown> = Record<string, unknown>, DeserializeOptions extends Record<string, unknown> = SerializeOptions> {
|
|
66
|
+
encode(object: T, options?: SerializeOptions): Payload;
|
|
67
|
+
decode(payload: Payload, options?: DeserializeOptions): T;
|
|
68
|
+
}
|
|
69
|
+
|
|
1
70
|
interface ParametrizedSQL {
|
|
2
71
|
query: string;
|
|
3
72
|
params: unknown[];
|
|
@@ -49,22 +118,29 @@ declare const SQLLiteral: {
|
|
|
49
118
|
check: (token: unknown) => token is SQLLiteral;
|
|
50
119
|
type: "SQL_LITERAL";
|
|
51
120
|
};
|
|
121
|
+
type SQLArrayMode = 'params' | 'native';
|
|
52
122
|
type SQLArray = SQLToken<'SQL_ARRAY', {
|
|
53
123
|
value: unknown[];
|
|
124
|
+
mode?: SQLArrayMode;
|
|
54
125
|
}>;
|
|
55
126
|
declare const SQLArray: {
|
|
56
|
-
from: (input: unknown[]
|
|
127
|
+
from: (input: unknown[] | {
|
|
128
|
+
value: unknown[];
|
|
129
|
+
mode?: SQLArrayMode;
|
|
130
|
+
}) => SQLArray;
|
|
57
131
|
check: (token: unknown) => token is SQLArray;
|
|
58
132
|
type: "SQL_ARRAY";
|
|
59
133
|
};
|
|
60
134
|
type SQLIn = SQLToken<'SQL_IN', {
|
|
61
135
|
column: SQLIdentifier;
|
|
62
136
|
values: SQLArray;
|
|
137
|
+
mode?: SQLArrayMode;
|
|
63
138
|
}>;
|
|
64
139
|
declare const SQLIn: {
|
|
65
140
|
from: (input: {
|
|
66
141
|
column: string;
|
|
67
142
|
values: unknown[];
|
|
143
|
+
mode?: SQLArrayMode;
|
|
68
144
|
}) => SQLIn;
|
|
69
145
|
check: (token: unknown) => token is SQLIn;
|
|
70
146
|
type: "SQL_IN";
|
|
@@ -248,7 +324,7 @@ declare const SQLColumnToken: {
|
|
|
248
324
|
type: "SQL_COLUMN";
|
|
249
325
|
};
|
|
250
326
|
|
|
251
|
-
type MapSQLParamValue = (value: unknown, options?: MapSQLParamValueOptions) => unknown;
|
|
327
|
+
type MapSQLParamValue = (value: unknown, serializer: JSONSerializer, options?: MapSQLParamValueOptions) => unknown;
|
|
252
328
|
interface MapSQLParamValueOptions {
|
|
253
329
|
mapBoolean?: (value: boolean) => unknown;
|
|
254
330
|
mapArray?: (array: unknown[], mapValue: MapSQLParamValue) => unknown[];
|
|
@@ -283,12 +359,13 @@ interface SQLValueMapper {
|
|
|
283
359
|
mapIdentifier: (value: string) => string;
|
|
284
360
|
}
|
|
285
361
|
declare const SQLValueMapper: (options?: MapSQLParamValueOptions) => SQLValueMapper;
|
|
286
|
-
declare function mapSQLParamValue(value: unknown, options?: MapSQLParamValueOptions): unknown;
|
|
362
|
+
declare function mapSQLParamValue(value: unknown, serializer: JSONSerializer, options?: MapSQLParamValueOptions): unknown;
|
|
287
363
|
|
|
288
364
|
type SQLProcessorContext = {
|
|
289
365
|
mapper: SQLValueMapper;
|
|
290
366
|
builder: ParametrizedSQLBuilder;
|
|
291
367
|
processorsRegistry: SQLProcessorsReadonlyRegistry;
|
|
368
|
+
serializer: JSONSerializer;
|
|
292
369
|
};
|
|
293
370
|
type AnySQLProcessor = SQLProcessor<any>;
|
|
294
371
|
type SQLProcessorOptions<Token extends AnySQLToken = AnySQLToken> = {
|
|
@@ -328,7 +405,12 @@ declare namespace SQL {
|
|
|
328
405
|
export var merge: (sqls: SQL[], separator?: string) => SQL;
|
|
329
406
|
export var format: (sql: SQL | SQL[], formatter: SQLFormatter, options?: FormatSQLOptions) => ParametrizedSQL;
|
|
330
407
|
export var describe: (sql: SQL | SQL[], formatter: SQLFormatter, options?: FormatSQLOptions) => string;
|
|
331
|
-
var _a: (column: string, values: unknown[]
|
|
408
|
+
var _a: (column: string, values: unknown[], options?: {
|
|
409
|
+
mode?: SQLArrayMode;
|
|
410
|
+
}) => SQLIn;
|
|
411
|
+
export var array: (values: unknown[], options?: {
|
|
412
|
+
mode?: SQLArrayMode;
|
|
413
|
+
}) => SQLArray;
|
|
332
414
|
export var identifier: (input: string) => SQLIdentifier;
|
|
333
415
|
export var plain: (input: string) => SQLPlain;
|
|
334
416
|
export var check: {
|
|
@@ -348,19 +430,22 @@ declare namespace SQL {
|
|
|
348
430
|
};
|
|
349
431
|
export { _a as in };
|
|
350
432
|
}
|
|
433
|
+
declare function RawSQL(strings: TemplateStringsArray, ...values: unknown[]): SQL;
|
|
351
434
|
declare const isSQL: (value: unknown) => value is SQL;
|
|
352
435
|
|
|
436
|
+
type FormatContext = Partial<SQLProcessorContext> & Pick<SQLProcessorContext, 'serializer'>;
|
|
353
437
|
type FormatSQLOptions = {
|
|
354
438
|
mapper?: MapSQLParamValueOptions;
|
|
355
439
|
processorsRegistry?: SQLProcessorsReadonlyRegistry;
|
|
440
|
+
serializer?: JSONSerializer;
|
|
356
441
|
};
|
|
357
442
|
type SQLFormatterOptions = Partial<Omit<SQLFormatter, 'valueMapper'>> & {
|
|
358
443
|
valueMapper?: MapSQLParamValueOptions;
|
|
359
444
|
processorsRegistry?: SQLProcessorsReadonlyRegistry;
|
|
360
445
|
};
|
|
361
446
|
interface SQLFormatter {
|
|
362
|
-
format: (sql: SQL | SQL[], context
|
|
363
|
-
describe: (sql: SQL | SQL[], context
|
|
447
|
+
format: (sql: SQL | SQL[], context: FormatContext) => ParametrizedSQL;
|
|
448
|
+
describe: (sql: SQL | SQL[], context: FormatContext) => string;
|
|
364
449
|
valueMapper: SQLValueMapper;
|
|
365
450
|
}
|
|
366
451
|
declare const SQLFormatter: ({ format, describe, valueMapper: valueMapperOptions, processorsRegistry, }: SQLFormatterOptions) => SQLFormatter;
|
|
@@ -369,8 +454,8 @@ declare global {
|
|
|
369
454
|
}
|
|
370
455
|
declare const registerFormatter: (dialect: string, formatter: SQLFormatter) => void;
|
|
371
456
|
declare const getFormatter: (dialect: string) => SQLFormatter;
|
|
372
|
-
declare function formatSQL(sql: SQL | SQL[], formatter: SQLFormatter, context?: FormatSQLOptions): ParametrizedSQL;
|
|
373
|
-
declare const describeSQL: (sql: SQL | SQL[], formatter: SQLFormatter, options?: FormatSQLOptions) => string;
|
|
457
|
+
declare function formatSQL(sql: SQL | SQL[], formatter: SQLFormatter, serializer: JSONSerializer, context?: FormatSQLOptions): ParametrizedSQL;
|
|
458
|
+
declare const describeSQL: (sql: SQL | SQL[], formatter: SQLFormatter, serializer: JSONSerializer, options?: FormatSQLOptions) => string;
|
|
374
459
|
|
|
375
460
|
type MigrationStyle = 'None' | 'CreateOrUpdate';
|
|
376
461
|
type SQLMigration = {
|
|
@@ -833,6 +918,235 @@ type ValidateDatabaseSchemas<Schemas extends DatabaseSchemas> = MapRecordCollect
|
|
|
833
918
|
}> extends infer Results ? AnyTypeValidationFailed<Results> extends true ? TypeValidationError<UnwrapTypeValidationErrors<Results extends readonly AnyTypeValidationError[] ? Results : never>> : TypeValidationSuccess : TypeValidationSuccess;
|
|
834
919
|
type ValidateDatabaseSchemasWithMessages<Schemas extends DatabaseSchemas> = FormatValidationErrors<ValidateDatabaseSchemas<Schemas>>;
|
|
835
920
|
|
|
921
|
+
declare class DumboError extends Error {
|
|
922
|
+
static readonly ErrorCode: number;
|
|
923
|
+
static readonly ErrorType: string;
|
|
924
|
+
errorCode: number;
|
|
925
|
+
errorType: string;
|
|
926
|
+
innerError: Error | undefined;
|
|
927
|
+
constructor(options?: {
|
|
928
|
+
errorCode: number;
|
|
929
|
+
errorType?: string;
|
|
930
|
+
message?: string | undefined;
|
|
931
|
+
innerError?: Error | undefined;
|
|
932
|
+
} | string | number);
|
|
933
|
+
static isInstanceOf<ErrorType extends DumboError = DumboError>(error: unknown, options?: {
|
|
934
|
+
errorCode?: number;
|
|
935
|
+
errorType?: string;
|
|
936
|
+
}): error is ErrorType;
|
|
937
|
+
}
|
|
938
|
+
declare class ConcurrencyError extends DumboError {
|
|
939
|
+
static readonly ErrorCode: number;
|
|
940
|
+
static readonly ErrorType: string;
|
|
941
|
+
constructor(message?: string, innerError?: Error);
|
|
942
|
+
}
|
|
943
|
+
declare class TransientDatabaseError extends DumboError {
|
|
944
|
+
static readonly ErrorCode: number;
|
|
945
|
+
static readonly ErrorType: string;
|
|
946
|
+
constructor(message?: string, innerError?: Error);
|
|
947
|
+
}
|
|
948
|
+
declare class ConnectionError extends TransientDatabaseError {
|
|
949
|
+
static readonly ErrorCode: number;
|
|
950
|
+
static readonly ErrorType: string;
|
|
951
|
+
constructor(message?: string, innerError?: Error);
|
|
952
|
+
}
|
|
953
|
+
declare class SerializationError extends TransientDatabaseError {
|
|
954
|
+
static readonly ErrorCode: number;
|
|
955
|
+
static readonly ErrorType: string;
|
|
956
|
+
constructor(message?: string, innerError?: Error);
|
|
957
|
+
}
|
|
958
|
+
declare class DeadlockError extends TransientDatabaseError {
|
|
959
|
+
static readonly ErrorCode: number;
|
|
960
|
+
static readonly ErrorType: string;
|
|
961
|
+
constructor(message?: string, innerError?: Error);
|
|
962
|
+
}
|
|
963
|
+
declare class LockNotAvailableError extends TransientDatabaseError {
|
|
964
|
+
static readonly ErrorCode: number;
|
|
965
|
+
static readonly ErrorType: string;
|
|
966
|
+
constructor(message?: string, innerError?: Error);
|
|
967
|
+
}
|
|
968
|
+
declare class InsufficientResourcesError extends TransientDatabaseError {
|
|
969
|
+
static readonly ErrorCode: number;
|
|
970
|
+
static readonly ErrorType: string;
|
|
971
|
+
constructor(message?: string, innerError?: Error);
|
|
972
|
+
}
|
|
973
|
+
declare class SystemError extends TransientDatabaseError {
|
|
974
|
+
static readonly ErrorCode: number;
|
|
975
|
+
static readonly ErrorType: string;
|
|
976
|
+
constructor(message?: string, innerError?: Error);
|
|
977
|
+
}
|
|
978
|
+
declare class AdminShutdownError extends TransientDatabaseError {
|
|
979
|
+
static readonly ErrorCode: number;
|
|
980
|
+
static readonly ErrorType: string;
|
|
981
|
+
constructor(message?: string, innerError?: Error);
|
|
982
|
+
}
|
|
983
|
+
declare class QueryCanceledError extends TransientDatabaseError {
|
|
984
|
+
static readonly ErrorCode: number;
|
|
985
|
+
static readonly ErrorType: string;
|
|
986
|
+
constructor(message?: string, innerError?: Error);
|
|
987
|
+
}
|
|
988
|
+
declare class IntegrityConstraintViolationError extends DumboError {
|
|
989
|
+
static readonly ErrorCode: number;
|
|
990
|
+
static readonly ErrorType: string;
|
|
991
|
+
constructor(message?: string, innerError?: Error);
|
|
992
|
+
}
|
|
993
|
+
declare class UniqueConstraintError extends IntegrityConstraintViolationError {
|
|
994
|
+
static readonly ErrorCode: number;
|
|
995
|
+
static readonly ErrorType: string;
|
|
996
|
+
constructor(message?: string, innerError?: Error);
|
|
997
|
+
}
|
|
998
|
+
declare class ForeignKeyViolationError extends IntegrityConstraintViolationError {
|
|
999
|
+
static readonly ErrorCode: number;
|
|
1000
|
+
static readonly ErrorType: string;
|
|
1001
|
+
constructor(message?: string, innerError?: Error);
|
|
1002
|
+
}
|
|
1003
|
+
declare class NotNullViolationError extends IntegrityConstraintViolationError {
|
|
1004
|
+
static readonly ErrorCode: number;
|
|
1005
|
+
static readonly ErrorType: string;
|
|
1006
|
+
constructor(message?: string, innerError?: Error);
|
|
1007
|
+
}
|
|
1008
|
+
declare class CheckViolationError extends IntegrityConstraintViolationError {
|
|
1009
|
+
static readonly ErrorCode: number;
|
|
1010
|
+
static readonly ErrorType: string;
|
|
1011
|
+
constructor(message?: string, innerError?: Error);
|
|
1012
|
+
}
|
|
1013
|
+
declare class ExclusionViolationError extends IntegrityConstraintViolationError {
|
|
1014
|
+
static readonly ErrorCode: number;
|
|
1015
|
+
static readonly ErrorType: string;
|
|
1016
|
+
constructor(message?: string, innerError?: Error);
|
|
1017
|
+
}
|
|
1018
|
+
declare class DataError extends DumboError {
|
|
1019
|
+
static readonly ErrorCode: number;
|
|
1020
|
+
static readonly ErrorType: string;
|
|
1021
|
+
constructor(message?: string, innerError?: Error);
|
|
1022
|
+
}
|
|
1023
|
+
declare class InvalidOperationError extends DumboError {
|
|
1024
|
+
static readonly ErrorCode: number;
|
|
1025
|
+
static readonly ErrorType: string;
|
|
1026
|
+
constructor(message?: string, innerError?: Error);
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
interface QueryResultRow {
|
|
1030
|
+
[column: string]: any;
|
|
1031
|
+
}
|
|
1032
|
+
type QueryResult<Result extends QueryResultRow = QueryResultRow> = {
|
|
1033
|
+
rowCount: number | null;
|
|
1034
|
+
rows: Result[];
|
|
1035
|
+
};
|
|
1036
|
+
|
|
1037
|
+
declare const mapColumnToJSON: (column: string, serializer: JSONSerializer, options?: JSONDeserializeOptions) => {
|
|
1038
|
+
[x: string]: (value: unknown) => unknown;
|
|
1039
|
+
};
|
|
1040
|
+
declare const mapColumnToBigint: (column: string) => {
|
|
1041
|
+
[x: string]: (value: unknown) => unknown;
|
|
1042
|
+
};
|
|
1043
|
+
declare const mapColumnToDate: (column: string) => {
|
|
1044
|
+
[x: string]: (value: unknown) => unknown;
|
|
1045
|
+
};
|
|
1046
|
+
declare const mapSQLQueryResult: <T>(result: T, mapping: SQLQueryResultColumnMapping) => T;
|
|
1047
|
+
type SQLQueryResultColumnMapping = {
|
|
1048
|
+
[column: string]: (value: unknown) => unknown;
|
|
1049
|
+
};
|
|
1050
|
+
type SQLQueryOptions = {
|
|
1051
|
+
timeoutMs?: number | undefined;
|
|
1052
|
+
mapping?: SQLQueryResultColumnMapping;
|
|
1053
|
+
};
|
|
1054
|
+
type SQLCommandOptions = {
|
|
1055
|
+
timeoutMs?: number | undefined;
|
|
1056
|
+
mapping?: SQLQueryResultColumnMapping;
|
|
1057
|
+
};
|
|
1058
|
+
type BatchSQLCommandOptions = SQLCommandOptions & {
|
|
1059
|
+
assertChanges?: boolean;
|
|
1060
|
+
};
|
|
1061
|
+
declare class BatchCommandNoChangesError extends DumboError {
|
|
1062
|
+
readonly statementIndex: number;
|
|
1063
|
+
constructor(statementIndex: number);
|
|
1064
|
+
}
|
|
1065
|
+
type DbSQLExecutorOptions = {
|
|
1066
|
+
serializer: JSONSerializer;
|
|
1067
|
+
};
|
|
1068
|
+
interface DbSQLExecutor<DriverType extends DatabaseDriverType = DatabaseDriverType, DbClient = unknown> {
|
|
1069
|
+
driverType: DriverType;
|
|
1070
|
+
query<Result extends QueryResultRow = QueryResultRow>(client: DbClient, sql: SQL, options?: SQLQueryOptions): Promise<QueryResult<Result>>;
|
|
1071
|
+
batchQuery<Result extends QueryResultRow = QueryResultRow>(client: DbClient, sqls: SQL[], options?: SQLQueryOptions): Promise<QueryResult<Result>[]>;
|
|
1072
|
+
command<Result extends QueryResultRow = QueryResultRow>(client: DbClient, sql: SQL, options?: SQLCommandOptions): Promise<QueryResult<Result>>;
|
|
1073
|
+
batchCommand<Result extends QueryResultRow = QueryResultRow>(client: DbClient, sqls: SQL[], options?: BatchSQLCommandOptions): Promise<QueryResult<Result>[]>;
|
|
1074
|
+
formatter: SQLFormatter;
|
|
1075
|
+
}
|
|
1076
|
+
interface SQLExecutor {
|
|
1077
|
+
query<Result extends QueryResultRow = QueryResultRow>(sql: SQL, options?: SQLQueryOptions): Promise<QueryResult<Result>>;
|
|
1078
|
+
batchQuery<Result extends QueryResultRow = QueryResultRow>(sqls: SQL[], options?: SQLQueryOptions): Promise<QueryResult<Result>[]>;
|
|
1079
|
+
command<Result extends QueryResultRow = QueryResultRow>(sql: SQL, options?: SQLCommandOptions): Promise<QueryResult<Result>>;
|
|
1080
|
+
batchCommand<Result extends QueryResultRow = QueryResultRow>(sqls: SQL[], options?: BatchSQLCommandOptions): Promise<QueryResult<Result>[]>;
|
|
1081
|
+
}
|
|
1082
|
+
interface WithSQLExecutor {
|
|
1083
|
+
execute: SQLExecutor;
|
|
1084
|
+
}
|
|
1085
|
+
declare const sqlExecutor: <DbClient = unknown, DbExecutor extends DbSQLExecutor = DbSQLExecutor>(sqlExecutor: DbExecutor, options: {
|
|
1086
|
+
connect: () => Promise<DbClient>;
|
|
1087
|
+
close?: (client: DbClient, error?: unknown) => Promise<void>;
|
|
1088
|
+
}) => SQLExecutor;
|
|
1089
|
+
declare const sqlExecutorInNewConnection: <ConnectionType extends Connection>(options: {
|
|
1090
|
+
driverType: ConnectionType["driverType"];
|
|
1091
|
+
connection: () => Promise<ConnectionType>;
|
|
1092
|
+
}) => SQLExecutor;
|
|
1093
|
+
declare const sqlExecutorInAmbientConnection: <ConnectionType extends Connection>(options: {
|
|
1094
|
+
driverType: ConnectionType["driverType"];
|
|
1095
|
+
connection: () => Promise<ConnectionType>;
|
|
1096
|
+
}) => SQLExecutor;
|
|
1097
|
+
declare const executeInNewDbClient: <DbClient = unknown, Result = unknown>(handle: (client: DbClient) => Promise<Result>, options: {
|
|
1098
|
+
connect: () => Promise<DbClient>;
|
|
1099
|
+
close?: (client: DbClient, error?: unknown) => Promise<void>;
|
|
1100
|
+
}) => Promise<Result>;
|
|
1101
|
+
declare const executeInNewConnection: <ConnectionType extends Connection, Result>(handle: (connection: ConnectionType) => Promise<Result>, options: {
|
|
1102
|
+
connection: () => Promise<ConnectionType>;
|
|
1103
|
+
}) => Promise<Result>;
|
|
1104
|
+
declare const executeInAmbientConnection: <ConnectionType extends Connection, Result>(handle: (connection: ConnectionType) => Promise<Result>, options: {
|
|
1105
|
+
connection: () => Promise<ConnectionType>;
|
|
1106
|
+
}) => Promise<Result>;
|
|
1107
|
+
|
|
1108
|
+
interface DatabaseCapabilities<SupportsMultipleDatabases extends boolean, SupportsSchemas extends boolean, SupportsFunctions extends boolean> {
|
|
1109
|
+
readonly supportsMultipleDatabases: SupportsMultipleDatabases;
|
|
1110
|
+
readonly supportsSchemas: SupportsSchemas;
|
|
1111
|
+
readonly supportsFunctions: SupportsFunctions;
|
|
1112
|
+
}
|
|
1113
|
+
type DatabaseMetadata<SupportsMultipleDatabases extends boolean = boolean, SupportsSchemas extends boolean = boolean, SupportsFunctions extends boolean = boolean> = {
|
|
1114
|
+
readonly databaseType: DatabaseType;
|
|
1115
|
+
readonly capabilities: DatabaseCapabilities<SupportsMultipleDatabases, SupportsSchemas, SupportsFunctions>;
|
|
1116
|
+
readonly tableExists: (pool: SQLExecutor, tableName: string) => Promise<boolean>;
|
|
1117
|
+
} & (SupportsMultipleDatabases extends true ? {
|
|
1118
|
+
readonly defaultDatabaseName: string;
|
|
1119
|
+
readonly parseDatabaseName: (connectionString?: string) => string | undefined;
|
|
1120
|
+
} : {
|
|
1121
|
+
readonly defaultDatabaseName?: never;
|
|
1122
|
+
readonly parseDatabaseName?: never;
|
|
1123
|
+
}) & (SupportsFunctions extends true ? {
|
|
1124
|
+
readonly functionExists: (pool: SQLExecutor, functionName: string) => Promise<boolean>;
|
|
1125
|
+
} : {
|
|
1126
|
+
readonly functionExists?: (pool: SQLExecutor, functionName: string) => Promise<boolean>;
|
|
1127
|
+
});
|
|
1128
|
+
declare const DumboDatabaseMetadataRegistry: () => {
|
|
1129
|
+
register: (databaseType: DatabaseType, info: DatabaseMetadata | (() => Promise<DatabaseMetadata>)) => void;
|
|
1130
|
+
tryResolve: (databaseType: DatabaseType) => Promise<DatabaseMetadata | null>;
|
|
1131
|
+
tryGet: (databaseType: DatabaseType) => DatabaseMetadata | null;
|
|
1132
|
+
has: (databaseType: DatabaseType) => boolean;
|
|
1133
|
+
readonly databaseTypes: DatabaseType[];
|
|
1134
|
+
};
|
|
1135
|
+
declare global {
|
|
1136
|
+
var dumboDatabaseMetadataRegistry: ReturnType<typeof DumboDatabaseMetadataRegistry>;
|
|
1137
|
+
}
|
|
1138
|
+
declare const dumboDatabaseMetadataRegistry: {
|
|
1139
|
+
register: (databaseType: DatabaseType, info: DatabaseMetadata | (() => Promise<DatabaseMetadata>)) => void;
|
|
1140
|
+
tryResolve: (databaseType: DatabaseType) => Promise<DatabaseMetadata | null>;
|
|
1141
|
+
tryGet: (databaseType: DatabaseType) => DatabaseMetadata | null;
|
|
1142
|
+
has: (databaseType: DatabaseType) => boolean;
|
|
1143
|
+
readonly databaseTypes: DatabaseType[];
|
|
1144
|
+
};
|
|
1145
|
+
declare const getDatabaseMetadata: (driverType: DatabaseDriverType) => DatabaseMetadata | null;
|
|
1146
|
+
declare const resolveDatabaseMetadata: (driverType: DatabaseDriverType, driverOverride?: DatabaseMetadata) => Promise<DatabaseMetadata | null>;
|
|
1147
|
+
declare const getDefaultDatabase: (driverType: DatabaseDriverType) => string | undefined;
|
|
1148
|
+
declare const getDefaultDatabaseAsync: (driverType: DatabaseDriverType) => Promise<string | undefined>;
|
|
1149
|
+
|
|
836
1150
|
declare const DEFAULT_DATABASE_SCHEMA_NAME = "__default_database_schema__";
|
|
837
1151
|
declare function dumboDatabaseSchema<const Tables extends DatabaseSchemaTables = DatabaseSchemaTables>(tables: Tables): DatabaseSchemaSchemaComponent<Tables, typeof DEFAULT_DATABASE_SCHEMA_NAME>;
|
|
838
1152
|
declare function dumboDatabaseSchema<const Tables extends DatabaseSchemaTables = DatabaseSchemaTables, const SchemaName extends string = string>(schemaName: SchemaName, tables: Tables, options?: SchemaComponentOptions): DatabaseSchemaSchemaComponent<Tables, SchemaName>;
|
|
@@ -956,15 +1270,21 @@ type MigratorOptions = {
|
|
|
956
1270
|
options?: Omit<DatabaseLockOptions, 'lockId'> & Partial<Pick<DatabaseLockOptions, 'lockId'>>;
|
|
957
1271
|
};
|
|
958
1272
|
dryRun?: boolean | undefined;
|
|
1273
|
+
ignoreMigrationHashMismatch?: boolean | undefined;
|
|
1274
|
+
migrationTimeoutMs?: number | undefined;
|
|
1275
|
+
};
|
|
1276
|
+
type RunSQLMigrationsResult = {
|
|
1277
|
+
applied: SQLMigration[];
|
|
1278
|
+
skipped: SQLMigration[];
|
|
959
1279
|
};
|
|
960
|
-
declare const runSQLMigrations: (pool: Dumbo, migrations: ReadonlyArray<SQLMigration>, partialOptions?: Partial<MigratorOptions>) => Promise<
|
|
1280
|
+
declare const runSQLMigrations: (pool: Dumbo, migrations: ReadonlyArray<SQLMigration>, partialOptions?: Partial<MigratorOptions>) => Promise<RunSQLMigrationsResult>;
|
|
961
1281
|
declare const combineMigrations: (...migration: Pick<SQLMigration, "sqls">[]) => SQL[];
|
|
962
1282
|
|
|
963
1283
|
interface DumboDatabaseDriver<ConnectionType extends AnyConnection = AnyConnection, DriverOptions extends unknown = unknown, DumboType extends Dumbo<ConnectionType['driverType'], ConnectionType> = Dumbo<ConnectionType['driverType'], ConnectionType>> {
|
|
964
1284
|
readonly driverType: ConnectionType['driverType'];
|
|
965
1285
|
readonly sqlFormatter: SQLFormatter;
|
|
966
1286
|
readonly defaultMigratorOptions: MigratorOptions;
|
|
967
|
-
|
|
1287
|
+
readonly databaseMetadata: DatabaseMetadata;
|
|
968
1288
|
createPool(options: DumboConnectionOptions<this>): DumboType;
|
|
969
1289
|
canHandle(options: DumboConnectionOptions<this>): boolean;
|
|
970
1290
|
}
|
|
@@ -1018,223 +1338,129 @@ declare function getDatabaseDriverName<T extends DatabaseType>(databaseDriverTyp
|
|
|
1018
1338
|
*/
|
|
1019
1339
|
declare function getDatabaseType<T extends DatabaseType>(databaseDriverType: DatabaseDriverType<T>): DatabaseType;
|
|
1020
1340
|
|
|
1021
|
-
interface
|
|
1022
|
-
[column: string]: any;
|
|
1023
|
-
}
|
|
1024
|
-
type QueryResult<Result extends QueryResultRow = QueryResultRow> = {
|
|
1025
|
-
rowCount: number | null;
|
|
1026
|
-
rows: Result[];
|
|
1027
|
-
};
|
|
1028
|
-
|
|
1029
|
-
type JSONSerializerOptions = {
|
|
1030
|
-
disableBigIntSerialization?: boolean;
|
|
1031
|
-
};
|
|
1032
|
-
type JSONSerializeOptions = {
|
|
1033
|
-
replacer?: JSONReplacer;
|
|
1034
|
-
} & JSONSerializerOptions;
|
|
1035
|
-
type JSONDeserializeOptions = {
|
|
1036
|
-
reviver?: JSONReviver;
|
|
1037
|
-
} & JSONSerializerOptions;
|
|
1038
|
-
type JSONObjectCodecOptions<SerializeOptions = JSONSerializeOptions, DeserializeOptions = JSONDeserializeOptions> = {
|
|
1039
|
-
serializer?: JSONSerializer<SerializeOptions, DeserializeOptions>;
|
|
1040
|
-
} | {
|
|
1041
|
-
serializerOptions?: JSONSerializerOptions;
|
|
1042
|
-
};
|
|
1043
|
-
declare const composeJSONReplacers: (...replacers: JSONReplacer[]) => JSONReplacer;
|
|
1044
|
-
declare const composeJSONRevivers: (...revivers: JSONReviver[]) => JSONReviver;
|
|
1045
|
-
type JSONReplacer = (this: any, key: string, value: any) => any;
|
|
1046
|
-
declare const JSONReplacer: (opts?: JSONSerializeOptions) => JSONReplacer | undefined;
|
|
1047
|
-
type JSONReviver = (this: any, key: string, value: any) => any;
|
|
1048
|
-
declare const JSONReviver: (opts?: JSONDeserializeOptions) => JSONReviver | undefined;
|
|
1049
|
-
declare const JSONReplacers: {
|
|
1050
|
-
bigInt: JSONReplacer;
|
|
1051
|
-
};
|
|
1052
|
-
declare const JSONRevivers: {
|
|
1053
|
-
bigInt: JSONReviver;
|
|
1054
|
-
};
|
|
1055
|
-
declare const jsonSerializer: (options?: JSONSerializerOptions) => JSONSerializer;
|
|
1056
|
-
interface JSONSerializer<SerializeOptions = JSONSerializeOptions, DeserializeOptions = JSONDeserializeOptions> extends Serializer<string, SerializeOptions, DeserializeOptions> {
|
|
1057
|
-
serialize<T>(object: T, options?: SerializeOptions): string;
|
|
1058
|
-
deserialize<T>(payload: string, options?: DeserializeOptions): T;
|
|
1059
|
-
}
|
|
1060
|
-
declare const JSONSerializer: JSONSerializer<JSONSerializeOptions, JSONDeserializeOptions>;
|
|
1061
|
-
declare const RawJSONSerializer: JSONSerializer<JSONSerializeOptions, JSONDeserializeOptions>;
|
|
1062
|
-
interface JSONObjectCodec<T, SerializeOptions = JSONSerializeOptions, DeserializeOptions = JSONDeserializeOptions> extends ObjectCodec<T, string> {
|
|
1063
|
-
encode(object: T, options?: SerializeOptions): string;
|
|
1064
|
-
decode(payload: string, options?: DeserializeOptions): T;
|
|
1065
|
-
}
|
|
1066
|
-
declare const JSONObjectCodec: <T, SerializeOptions = JSONSerializeOptions, DeserializeOptions = JSONDeserializeOptions>(options: JSONObjectCodecOptions<SerializeOptions, DeserializeOptions>) => JSONObjectCodec<T, SerializeOptions, DeserializeOptions>;
|
|
1067
|
-
|
|
1068
|
-
interface Serializer<Payload, SerializeOptions = never, DeserializeOptions = SerializeOptions> {
|
|
1069
|
-
serialize<T>(object: T, options?: SerializeOptions): Payload;
|
|
1070
|
-
deserialize<T>(payload: Payload, options?: DeserializeOptions): T;
|
|
1071
|
-
}
|
|
1072
|
-
interface ObjectCodec<T, Payload> {
|
|
1073
|
-
encode(object: T): Payload;
|
|
1074
|
-
decode(payload: Payload): T;
|
|
1075
|
-
}
|
|
1076
|
-
|
|
1077
|
-
declare const mapColumnToJSON: (column: string, options?: JSONDeserializeOptions) => {
|
|
1078
|
-
[x: string]: (value: unknown) => unknown;
|
|
1079
|
-
};
|
|
1080
|
-
declare const mapColumnToBigint: (column: string) => {
|
|
1081
|
-
[x: string]: (value: unknown) => unknown;
|
|
1082
|
-
};
|
|
1083
|
-
declare const mapSQLQueryResult: <T>(result: T, mapping: SQLQueryResultColumnMapping) => T;
|
|
1084
|
-
type SQLQueryResultColumnMapping = {
|
|
1085
|
-
[column: string]: (value: unknown) => unknown;
|
|
1086
|
-
};
|
|
1087
|
-
type SQLQueryOptions = {
|
|
1088
|
-
timeoutMs?: number;
|
|
1089
|
-
mapping?: SQLQueryResultColumnMapping;
|
|
1090
|
-
};
|
|
1091
|
-
type SQLCommandOptions = {
|
|
1092
|
-
timeoutMs?: number;
|
|
1093
|
-
mapping?: SQLQueryResultColumnMapping;
|
|
1094
|
-
};
|
|
1095
|
-
interface DbSQLExecutor<DriverType extends DatabaseDriverType = DatabaseDriverType, DbClient = unknown> {
|
|
1096
|
-
driverType: DriverType;
|
|
1097
|
-
query<Result extends QueryResultRow = QueryResultRow>(client: DbClient, sql: SQL, options?: SQLQueryOptions): Promise<QueryResult<Result>>;
|
|
1098
|
-
batchQuery<Result extends QueryResultRow = QueryResultRow>(client: DbClient, sqls: SQL[], options?: SQLQueryOptions): Promise<QueryResult<Result>[]>;
|
|
1099
|
-
command<Result extends QueryResultRow = QueryResultRow>(client: DbClient, sql: SQL, options?: SQLCommandOptions): Promise<QueryResult<Result>>;
|
|
1100
|
-
batchCommand<Result extends QueryResultRow = QueryResultRow>(client: DbClient, sqls: SQL[], options?: SQLCommandOptions): Promise<QueryResult<Result>[]>;
|
|
1101
|
-
formatter: SQLFormatter;
|
|
1102
|
-
}
|
|
1103
|
-
interface SQLExecutor {
|
|
1104
|
-
query<Result extends QueryResultRow = QueryResultRow>(sql: SQL, options?: SQLQueryOptions): Promise<QueryResult<Result>>;
|
|
1105
|
-
batchQuery<Result extends QueryResultRow = QueryResultRow>(sqls: SQL[], options?: SQLQueryOptions): Promise<QueryResult<Result>[]>;
|
|
1106
|
-
command<Result extends QueryResultRow = QueryResultRow>(sql: SQL, options?: SQLCommandOptions): Promise<QueryResult<Result>>;
|
|
1107
|
-
batchCommand<Result extends QueryResultRow = QueryResultRow>(sqls: SQL[], options?: SQLCommandOptions): Promise<QueryResult<Result>[]>;
|
|
1108
|
-
}
|
|
1109
|
-
interface WithSQLExecutor {
|
|
1110
|
-
execute: SQLExecutor;
|
|
1111
|
-
}
|
|
1112
|
-
declare const sqlExecutor: <DbClient = unknown, DbExecutor extends DbSQLExecutor = DbSQLExecutor>(sqlExecutor: DbExecutor, options: {
|
|
1113
|
-
connect: () => Promise<DbClient>;
|
|
1114
|
-
close?: (client: DbClient, error?: unknown) => Promise<void>;
|
|
1115
|
-
}) => SQLExecutor;
|
|
1116
|
-
declare const sqlExecutorInNewConnection: <ConnectionType extends Connection>(options: {
|
|
1117
|
-
driverType: ConnectionType["driverType"];
|
|
1118
|
-
connection: () => Promise<ConnectionType>;
|
|
1119
|
-
}) => SQLExecutor;
|
|
1120
|
-
declare const sqlExecutorInAmbientConnection: <ConnectionType extends Connection>(options: {
|
|
1121
|
-
driverType: ConnectionType["driverType"];
|
|
1122
|
-
connection: () => Promise<ConnectionType>;
|
|
1123
|
-
}) => SQLExecutor;
|
|
1124
|
-
declare const executeInNewDbClient: <DbClient = unknown, Result = unknown>(handle: (client: DbClient) => Promise<Result>, options: {
|
|
1125
|
-
connect: () => Promise<DbClient>;
|
|
1126
|
-
close?: (client: DbClient, error?: unknown) => Promise<void>;
|
|
1127
|
-
}) => Promise<Result>;
|
|
1128
|
-
declare const executeInNewConnection: <ConnectionType extends Connection, Result>(handle: (connection: ConnectionType) => Promise<Result>, options: {
|
|
1129
|
-
connection: () => Promise<ConnectionType>;
|
|
1130
|
-
}) => Promise<Result>;
|
|
1131
|
-
declare const executeInAmbientConnection: <ConnectionType extends Connection, Result>(handle: (connection: ConnectionType) => Promise<Result>, options: {
|
|
1132
|
-
connection: () => Promise<ConnectionType>;
|
|
1133
|
-
}) => Promise<Result>;
|
|
1134
|
-
|
|
1135
|
-
interface DatabaseTransaction<ConnectionType extends AnyConnection = AnyConnection> extends WithSQLExecutor {
|
|
1341
|
+
interface DatabaseTransaction<ConnectionType extends AnyConnection = AnyConnection, TransactionOptionsType extends DatabaseTransactionOptions = DatabaseTransactionOptions> extends WithSQLExecutor {
|
|
1136
1342
|
driverType: ConnectionType['driverType'];
|
|
1137
1343
|
connection: ConnectionType;
|
|
1138
1344
|
begin: () => Promise<void>;
|
|
1139
1345
|
commit: () => Promise<void>;
|
|
1140
1346
|
rollback: (error?: unknown) => Promise<void>;
|
|
1347
|
+
_transactionOptions: TransactionOptionsType;
|
|
1141
1348
|
}
|
|
1142
|
-
type AnyDatabaseTransaction = DatabaseTransaction<any>;
|
|
1349
|
+
type AnyDatabaseTransaction = DatabaseTransaction<any, any>;
|
|
1143
1350
|
type DatabaseTransactionOptions = {
|
|
1144
1351
|
allowNestedTransactions?: boolean;
|
|
1352
|
+
readonly?: boolean;
|
|
1145
1353
|
};
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1354
|
+
type InferTransactionOptionsFromTransaction<C extends AnyDatabaseTransaction> = C extends DatabaseTransaction<any, infer TO> ? TO : never;
|
|
1355
|
+
interface WithDatabaseTransactionFactory<ConnectionType extends AnyConnection = AnyConnection> {
|
|
1356
|
+
transaction: (options?: InferTransactionOptionsFromConnection<ConnectionType>) => InferTransactionFromConnection<ConnectionType>;
|
|
1357
|
+
withTransaction: <Result = never>(handle: (transaction: InferTransactionFromConnection<ConnectionType>) => Promise<TransactionResult<Result> | Result>, options?: InferTransactionOptionsFromConnection<ConnectionType>) => Promise<Result>;
|
|
1149
1358
|
}
|
|
1150
1359
|
type TransactionResult<Result> = {
|
|
1151
1360
|
success: boolean;
|
|
1152
1361
|
result: Result;
|
|
1153
1362
|
};
|
|
1154
1363
|
declare const executeInTransaction: <DatabaseTransactionType extends AnyDatabaseTransaction = AnyDatabaseTransaction, Result = void>(transaction: DatabaseTransactionType, handle: (transaction: DatabaseTransactionType) => Promise<TransactionResult<Result> | Result>) => Promise<Result>;
|
|
1155
|
-
declare const transactionFactoryWithDbClient: <ConnectionType extends AnyConnection = AnyConnection
|
|
1364
|
+
declare const transactionFactoryWithDbClient: <ConnectionType extends AnyConnection = AnyConnection>(connect: () => Promise<InferDbClientFromConnection<ConnectionType>>, initTransaction: (client: Promise<InferDbClientFromConnection<ConnectionType>>, options?: InferTransactionOptionsFromConnection<ConnectionType> & {
|
|
1156
1365
|
close: (client: InferDbClientFromConnection<ConnectionType>, error?: unknown) => Promise<void>;
|
|
1157
|
-
}) =>
|
|
1158
|
-
declare const transactionFactoryWithNewConnection: <ConnectionType extends AnyConnection = AnyConnection
|
|
1366
|
+
}) => InferTransactionFromConnection<ConnectionType>) => WithDatabaseTransactionFactory<ConnectionType>;
|
|
1367
|
+
declare const transactionFactoryWithNewConnection: <ConnectionType extends AnyConnection = AnyConnection>(connect: () => ConnectionType) => WithDatabaseTransactionFactory<ConnectionType>;
|
|
1159
1368
|
declare const transactionFactoryWithAmbientConnection: <ConnectionType extends AnyConnection = AnyConnection>(connect: () => ConnectionType) => WithDatabaseTransactionFactory<ConnectionType>;
|
|
1369
|
+
declare const transactionFactoryWithAsyncAmbientConnection: <ConnectionType extends AnyConnection = AnyConnection>(driverType: ConnectionType["driverType"], connect: () => Promise<ConnectionType>, close?: (connection: ConnectionType) => void | Promise<void>) => WithDatabaseTransactionFactory<ConnectionType>;
|
|
1160
1370
|
|
|
1161
|
-
interface Connection<Self extends AnyConnection = AnyConnection, DriverType extends DatabaseDriverType = DatabaseDriverType, DbClient = unknown, TransactionType extends DatabaseTransaction<Self> = DatabaseTransaction<Self
|
|
1371
|
+
interface Connection<Self extends AnyConnection = AnyConnection, DriverType extends DatabaseDriverType = DatabaseDriverType, DbClient = unknown, TransactionType extends DatabaseTransaction<Self, any> = DatabaseTransaction<Self, any>> extends WithSQLExecutor, WithDatabaseTransactionFactory<Self> {
|
|
1162
1372
|
driverType: DriverType;
|
|
1163
1373
|
open: () => Promise<DbClient>;
|
|
1164
1374
|
close: () => Promise<void>;
|
|
1375
|
+
_transactionType: TransactionType;
|
|
1165
1376
|
}
|
|
1166
|
-
type AnyConnection = Connection<AnyConnection, DatabaseDriverType, unknown, AnyDatabaseTransaction
|
|
1167
|
-
type InferDriverTypeFromConnection<C extends AnyConnection> = C extends Connection<any, infer DT, any, any
|
|
1168
|
-
type InferDbClientFromConnection<C extends AnyConnection> = C extends Connection<any, any, infer DC, any
|
|
1169
|
-
type InferTransactionFromConnection<C extends AnyConnection> = C extends Connection<any, any, any, infer DT
|
|
1170
|
-
type InferTransactionOptionsFromConnection<C extends AnyConnection> = C
|
|
1377
|
+
type AnyConnection = Connection<AnyConnection, DatabaseDriverType, unknown, AnyDatabaseTransaction>;
|
|
1378
|
+
type InferDriverTypeFromConnection<C extends AnyConnection> = C extends Connection<any, infer DT, any, any> ? DT : never;
|
|
1379
|
+
type InferDbClientFromConnection<C extends AnyConnection> = C extends Connection<any, any, infer DC, any> ? DC : never;
|
|
1380
|
+
type InferTransactionFromConnection<C extends AnyConnection> = C extends Connection<any, any, any, infer DT> ? DT : never;
|
|
1381
|
+
type InferTransactionOptionsFromConnection<C extends AnyConnection> = InferTransactionOptionsFromTransaction<InferTransactionFromConnection<C>>;
|
|
1171
1382
|
type ConnectionOptions<ConnectionType extends AnyConnection = AnyConnection> = {
|
|
1172
1383
|
driverType?: ConnectionType['driverType'];
|
|
1173
1384
|
transactionOptions?: InferTransactionOptionsFromConnection<ConnectionType>;
|
|
1174
1385
|
};
|
|
1175
1386
|
type ConnectionFactory<ConnectionType extends AnyConnection = AnyConnection> = (options: ConnectionOptions<ConnectionType>) => ConnectionType;
|
|
1387
|
+
type WithConnectionOptions = {
|
|
1388
|
+
readonly?: boolean;
|
|
1389
|
+
};
|
|
1176
1390
|
interface WithConnectionFactory<ConnectionType extends AnyConnection = AnyConnection> {
|
|
1177
|
-
connection: () => Promise<ConnectionType>;
|
|
1178
|
-
withConnection: <Result = unknown>(handle: (connection: ConnectionType) => Promise<Result
|
|
1391
|
+
connection: (options?: WithConnectionOptions) => Promise<ConnectionType>;
|
|
1392
|
+
withConnection: <Result = unknown>(handle: (connection: ConnectionType) => Promise<Result>, options?: WithConnectionOptions) => Promise<Result>;
|
|
1179
1393
|
}
|
|
1180
|
-
type InitTransaction<ConnectionType extends AnyConnection = AnyConnection
|
|
1394
|
+
type InitTransaction<ConnectionType extends AnyConnection = AnyConnection> = (connection: () => ConnectionType) => (client: Promise<InferDbClientFromConnection<ConnectionType>>, options?: InferTransactionOptionsFromConnection<ConnectionType> & {
|
|
1181
1395
|
close: (client: InferDbClientFromConnection<ConnectionType>, error?: unknown) => Promise<void>;
|
|
1182
|
-
}) =>
|
|
1183
|
-
type CreateConnectionOptions<ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor
|
|
1396
|
+
}) => InferTransactionFromConnection<ConnectionType>;
|
|
1397
|
+
type CreateConnectionOptions<ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor> = {
|
|
1184
1398
|
driverType: InferDriverTypeFromConnection<ConnectionType>;
|
|
1185
1399
|
connect: () => Promise<InferDbClientFromConnection<ConnectionType>>;
|
|
1186
1400
|
close: (client: InferDbClientFromConnection<ConnectionType>) => Promise<void>;
|
|
1187
|
-
initTransaction: InitTransaction<ConnectionType
|
|
1188
|
-
|
|
1401
|
+
initTransaction: InitTransaction<ConnectionType>;
|
|
1402
|
+
serializer: JSONSerializer;
|
|
1403
|
+
executor: (options: DbSQLExecutorOptions) => Executor;
|
|
1189
1404
|
};
|
|
1190
|
-
type CreateAmbientConnectionOptions<ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor
|
|
1405
|
+
type CreateAmbientConnectionOptions<ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor> = {
|
|
1191
1406
|
driverType: InferDriverTypeFromConnection<ConnectionType>;
|
|
1192
1407
|
client: InferDbClientFromConnection<ConnectionType>;
|
|
1193
|
-
|
|
1194
|
-
|
|
1408
|
+
serializer: JSONSerializer;
|
|
1409
|
+
initTransaction: InitTransaction<ConnectionType>;
|
|
1410
|
+
executor: (options: DbSQLExecutorOptions) => Executor;
|
|
1195
1411
|
};
|
|
1196
|
-
declare const createAmbientConnection: <ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor
|
|
1197
|
-
type CreateSingletonConnectionOptions<ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor
|
|
1412
|
+
declare const createAmbientConnection: <ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor>(options: CreateAmbientConnectionOptions<ConnectionType, Executor>) => ConnectionType;
|
|
1413
|
+
type CreateSingletonConnectionOptions<ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor> = {
|
|
1198
1414
|
driverType: InferDriverTypeFromConnection<ConnectionType>;
|
|
1199
1415
|
connect: () => Promise<InferDbClientFromConnection<ConnectionType>>;
|
|
1200
1416
|
close: (client: InferDbClientFromConnection<ConnectionType>) => Promise<void>;
|
|
1201
|
-
initTransaction: InitTransaction<ConnectionType
|
|
1202
|
-
|
|
1417
|
+
initTransaction: InitTransaction<ConnectionType>;
|
|
1418
|
+
serializer: JSONSerializer;
|
|
1419
|
+
executor: (options: DbSQLExecutorOptions) => Executor;
|
|
1203
1420
|
};
|
|
1204
|
-
declare const createSingletonConnection: <ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor
|
|
1205
|
-
type CreateTransientConnectionOptions<ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor
|
|
1421
|
+
declare const createSingletonConnection: <ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor>(options: CreateSingletonConnectionOptions<ConnectionType, Executor>) => ConnectionType;
|
|
1422
|
+
type CreateTransientConnectionOptions<ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor> = {
|
|
1206
1423
|
driverType: InferDriverTypeFromConnection<ConnectionType>;
|
|
1207
1424
|
open: () => Promise<InferDbClientFromConnection<ConnectionType>>;
|
|
1208
1425
|
close: () => Promise<void>;
|
|
1209
|
-
initTransaction: InitTransaction<ConnectionType
|
|
1210
|
-
|
|
1426
|
+
initTransaction: InitTransaction<ConnectionType>;
|
|
1427
|
+
serializer: JSONSerializer;
|
|
1428
|
+
executor: (options: DbSQLExecutorOptions) => Executor;
|
|
1211
1429
|
};
|
|
1212
|
-
declare const createTransientConnection: <ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor
|
|
1213
|
-
declare const createConnection: <ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor
|
|
1430
|
+
declare const createTransientConnection: <ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor>(options: CreateTransientConnectionOptions<ConnectionType, Executor>) => ConnectionType;
|
|
1431
|
+
declare const createConnection: <ConnectionType extends AnyConnection = AnyConnection, Executor extends DbSQLExecutor = DbSQLExecutor>(options: CreateConnectionOptions<ConnectionType, Executor>) => ConnectionType;
|
|
1214
1432
|
|
|
1215
|
-
interface ConnectionPool<ConnectionType extends AnyConnection = AnyConnection
|
|
1433
|
+
interface ConnectionPool<ConnectionType extends AnyConnection = AnyConnection> extends WithSQLExecutor, WithConnectionFactory<ConnectionType>, WithDatabaseTransactionFactory<ConnectionType> {
|
|
1216
1434
|
driverType: ConnectionType['driverType'];
|
|
1217
1435
|
close: () => Promise<void>;
|
|
1218
1436
|
}
|
|
1219
1437
|
type ConnectionPoolFactory<ConnectionPoolType extends ConnectionPool = ConnectionPool, ConnectionPoolOptions = unknown> = (options: ConnectionPoolOptions) => ConnectionPoolType;
|
|
1220
|
-
|
|
1221
|
-
driverType: ConnectionType[
|
|
1438
|
+
type AmbientConnectionPoolOptions<ConnectionType extends AnyConnection> = {
|
|
1439
|
+
driverType: ConnectionType['driverType'];
|
|
1222
1440
|
connection: ConnectionType;
|
|
1223
|
-
}
|
|
1224
|
-
|
|
1441
|
+
};
|
|
1442
|
+
declare const createAmbientConnectionPool: <ConnectionType extends AnyConnection>(options: AmbientConnectionPoolOptions<ConnectionType>) => ConnectionPool<ConnectionType>;
|
|
1443
|
+
type SingletonConnectionPoolOptions<ConnectionType extends AnyConnection> = {
|
|
1225
1444
|
driverType: ConnectionType['driverType'];
|
|
1226
|
-
getConnection: () => ConnectionType
|
|
1445
|
+
getConnection: () => ConnectionType | Promise<ConnectionType>;
|
|
1446
|
+
closeConnection?: (connection: ConnectionType) => void | Promise<void>;
|
|
1227
1447
|
connectionOptions?: never;
|
|
1228
1448
|
};
|
|
1229
|
-
declare const createSingletonConnectionPool: <ConnectionType extends AnyConnection>(options:
|
|
1230
|
-
type
|
|
1449
|
+
declare const createSingletonConnectionPool: <ConnectionType extends AnyConnection>(options: SingletonConnectionPoolOptions<ConnectionType>) => ConnectionPool<ConnectionType>;
|
|
1450
|
+
type CreateBoundedConnectionPoolOptions<ConnectionType extends AnyConnection> = {
|
|
1451
|
+
driverType: ConnectionType['driverType'];
|
|
1452
|
+
getConnection: () => ConnectionType | Promise<ConnectionType>;
|
|
1453
|
+
maxConnections: number;
|
|
1454
|
+
};
|
|
1455
|
+
declare const createBoundedConnectionPool: <ConnectionType extends AnyConnection>(options: CreateBoundedConnectionPoolOptions<ConnectionType>) => ConnectionPool<ConnectionType>;
|
|
1456
|
+
type SingletonClientConnectionPoolOptions<ConnectionType extends AnyConnection> = {
|
|
1231
1457
|
driverType: ConnectionType['driverType'];
|
|
1232
1458
|
dbClient: InferDbClientFromConnection<ConnectionType>;
|
|
1233
1459
|
connectionFactory: (options: {
|
|
1234
1460
|
dbClient: InferDbClientFromConnection<ConnectionType>;
|
|
1235
1461
|
}) => ConnectionType;
|
|
1236
1462
|
};
|
|
1237
|
-
declare const
|
|
1463
|
+
declare const createSingletonClientConnectionPool: <ConnectionType extends AnyConnection>(options: SingletonClientConnectionPoolOptions<ConnectionType>) => ConnectionPool<ConnectionType>;
|
|
1238
1464
|
type CreateAlwaysNewConnectionPoolOptions<ConnectionType extends AnyConnection, ConnectionOptions extends Record<string, unknown> | undefined = undefined> = ConnectionOptions extends undefined ? {
|
|
1239
1465
|
driverType: ConnectionType['driverType'];
|
|
1240
1466
|
getConnection: () => ConnectionType;
|
|
@@ -1268,4 +1494,4 @@ type DatabaseConnectionString<DatabaseTypeName extends DatabaseType = DatabaseTy
|
|
|
1268
1494
|
};
|
|
1269
1495
|
declare const parseConnectionString: (connectionString: DatabaseConnectionString | string) => DatabaseDriverTypeParts;
|
|
1270
1496
|
|
|
1271
|
-
export { type
|
|
1497
|
+
export { type AnyDatabaseSchemaSchemaComponent as $, type AnyConnection as A, type AnyTypeValidationError as B, type Connection as C, type DefaultSQLColumnToken as D, type TypeValidationSuccess as E, type AnyDumboDatabaseDriver as F, type ExtractDumboDatabaseDriverOptions as G, type ExtractDumboTypeFromDriver as H, IndexURN as I, JSONSerializer as J, ANSISQLIdentifierQuote as K, ANSISQLParamPlaceholder as L, type MigratorOptions as M, type AcquireDatabaseLockMode as N, type AcquireDatabaseLockOptions as O, AdminShutdownError as P, type QueryResultRow as Q, type AllColumnReferences as R, SQLColumnTypeTokens as S, TableURN as T, type AllColumnReferencesInSchema as U, type AllColumnTypes as V, type AllColumnTypesInSchema as W, type AmbientConnectionPoolOptions as X, type AnyColumnSchemaComponent as Y, type AnyColumnTypeToken as Z, type AnyDatabaseSchemaComponent as _, SQLProcessor as a, type ExtractSQLTokenType as a$, type AnyDatabaseTransaction as a0, type AnyRelationshipDefinition as a1, type AnySQLProcessor as a2, type AnySchemaComponent as a3, type AnySchemaComponentOfType as a4, type AnyTableRelationshipDefinition as a5, type AnyTableRelationshipDefinitionWithColumns as a6, type AnyTableSchemaComponent as a7, AutoIncrementSQLColumnToken as a8, BatchCommandNoChangesError as a9, type CreateSingletonConnectionOptions as aA, type CreateTransientConnectionOptions as aB, DataError as aC, type DatabaseCapabilities as aD, type DatabaseConnectionString as aE, type DatabaseDriverName as aF, type DatabaseDriverTypeParts as aG, type DatabaseLock as aH, type DatabaseLockOptions as aI, type DatabaseSchemaComponent as aJ, type DatabaseSchemaSchemaComponent as aK, type DatabaseSchemaTables as aL, DatabaseSchemaURNType as aM, type DatabaseSchemas as aN, type DatabaseSchemasWithSingle as aO, type DatabaseType as aP, DatabaseURNType as aQ, type DbSQLExecutorOptions as aR, DeadlockError as aS, DefaultMapSQLParamValueOptions as aT, DumboDatabaseDriverRegistry as aU, DumboDatabaseMetadataRegistry as aV, type DumboSchemaComponentType as aW, ExclusionViolationError as aX, type ExtractAdditionalData as aY, type ExtractColumnNames as aZ, type ExtractColumnTypeName as a_, type BatchSQLCommandOptions as aa, BigIntegerToken as ab, BigSerialToken as ac, CheckViolationError as ad, type CollectReferencesErrors as ae, type CollectRelationshipErrors as af, type ColumnName as ag, type ColumnPath as ah, type ColumnPathToReference as ai, type ColumnReference as aj, type ColumnReferenceError as ak, type ColumnReferenceExistanceError as al, type ColumnReferenceTypeMismatchError as am, type ColumnSchemaComponent as an, type ColumnSchemaComponentOptions as ao, ColumnTypeToken as ap, ColumnURNType as aq, ConcurrencyError as ar, ConnectionError as as, type ConnectionFactory as at, type ConnectionPoolFactory as au, type CreateAlwaysNewConnectionPoolOptions as av, type CreateAmbientConnectionOptions as aw, type CreateBoundedConnectionPoolOptions as ax, type CreateConnectionOptions as ay, type CreateConnectionPoolOptions as az, type SQLProcessorContext as b, ParametrizedSQLBuilder as b$, type ExtractSchemaNames as b0, type ExtractTableNames as b1, ForeignKeyViolationError as b2, type FormatContext as b3, type FormatDatabaseValidationErrors as b4, type FormatRelationshipBlock as b5, type FormatSQLOptions as b6, type FormatSchemaLevel as b7, type FormatSingleError as b8, type FormatTableLevel as b9, JSONReplacers as bA, JSONReviver as bB, type JSONReviverContext as bC, JSONRevivers as bD, type JSONSerializeOptions as bE, type JSONSerializerOptions as bF, type JSONValueType as bG, type JSONValueTypeName as bH, type JavaScriptValueType as bI, type JavaScriptValueTypeName as bJ, type JavaScriptValueTypeToNameMap as bK, type Join as bL, LockNotAvailableError as bM, type LookupColumnType as bN, MIGRATIONS_LOCK_ID as bO, type MapSQLParamValue as bP, type MapSQLParamValueOptions as bQ, type MigrationRecord as bR, type MigrationStyle as bS, NoDatabaseLock as bT, type NoError as bU, type NormalizeColumnPath as bV, type NormalizeReference as bW, NotNullViolationError as bX, type NotNullableSQLColumnTokenProps as bY, type NullableSQLColumnTokenProps as bZ, type ParametrizedSQL as b_, type FormatValidationErrors as ba, type IndentErrors as bb, type IndexSchemaComponent as bc, IndexURNType as bd, type InferColumnType as be, type InferDatabaseSchemas as bf, type InferDbClientFromConnection as bg, type InferDriverDatabaseType as bh, type InferDriverTypeFromConnection as bi, type InferSchemaTables as bj, type InferTableRow as bk, type InferTableSchemaComponentColumns as bl, type InferTableSchemaComponentTypes as bm, type InferTransactionFromConnection as bn, type InferTransactionOptionsFromConnection as bo, type InferTransactionOptionsFromTransaction as bp, type InitTransaction as bq, InsufficientResourcesError as br, IntegerToken as bs, IntegrityConstraintViolationError as bt, InvalidOperationError as bu, JSONBToken as bv, JSONCodec as bw, type JSONCodecOptions as bx, type JSONDeserializeOptions as by, JSONReplacer as bz, type DumboConnectionOptions as c, type ValidateTable as c$, type ParseReferencePath as c0, QueryCanceledError as c1, RawSQL as c2, type RelationshipColumnsMismatchError as c3, type RelationshipDefinition as c4, type RelationshipReferencesLengthMismatchError as c5, type RelationshipType as c6, type RelationshipValidationError as c7, type ReleaseDatabaseLockOptions as c8, type RunSQLMigrationsResult as c9, type SingletonConnectionPoolOptions as cA, SystemError as cB, type TableColumnName as cC, type TableColumnNames as cD, type TableColumnType as cE, type TableColumns as cF, type TableRelationships as cG, type TableRowType as cH, type TableSchemaComponent as cI, TableURNType as cJ, TimestampToken as cK, TimestamptzToken as cL, type TransactionResult as cM, TransientDatabaseError as cN, UniqueConstraintError as cO, type ValidateColumnReference as cP, type ValidateColumnTypeMatch as cQ, type ValidateColumnsMatch as cR, type ValidateDatabaseSchema as cS, type ValidateDatabaseSchemas as cT, type ValidateDatabaseSchemasWithMessages as cU, type ValidateReference as cV, type ValidateReferences as cW, type ValidateRelationship as cX, type ValidateRelationshipColumns as cY, type ValidateRelationshipLength as cZ, type ValidateSchemaTables as c_, SQL as ca, type SQLArrayMode as cb, SQLColumnToken as cc, SQLColumnTypeTokensFactory as cd, type SQLCommandOptions as ce, type SQLDefaultTokens as cf, type SQLDefaultTokensTypes as cg, type SQLExecutor as ch, type SQLFormatterOptions as ci, SQLPlain as cj, type SQLProcessorOptions as ck, type SQLProcessorsReadonlyRegistry as cl, SQLProcessorsRegistry as cm, type SQLQueryOptions as cn, type SQLQueryResultColumnMapping as co, SQLToken as cp, SQLValueMapper as cq, type SchemaColumnName as cr, type SchemaComponentOptions as cs, type SchemaComponentType as ct, type SchemaTablesWithSingle as cu, SerialToken as cv, type SerializationCodec as cw, SerializationError as cx, type Serializer as cy, type SingletonClientConnectionPoolOptions as cz, type DumboDatabaseDriver as d, runSQLMigrations as d$, type ValidateTableRelationships as d0, VarcharToken as d1, type WithConnectionFactory as d2, type WithConnectionOptions as d3, type WithDatabaseTransactionFactory as d4, type WithSQLExecutor as d5, type Writable as d6, canHandleDriverWithConnectionString as d7, columnSchemaComponent as d8, combineMigrations as d9, findSchemaComponentsOfType as dA, formatSQL as dB, fromDatabaseDriverType as dC, getDatabaseDriverName as dD, getDatabaseMetadata as dE, getDatabaseType as dF, getDefaultDatabase as dG, getDefaultDatabaseAsync as dH, getDefaultMigratorOptionsFromRegistry as dI, getFormatter as dJ, indexSchemaComponent as dK, isSQL as dL, isSchemaComponentOfType as dM, jsonSerializer as dN, mapANSISQLParamPlaceholder as dO, mapColumnToBigint as dP, mapColumnToDate as dQ, mapColumnToJSON as dR, mapSQLIdentifier as dS, mapSQLParamValue as dT, mapSQLQueryResult as dU, mapSchemaComponentsOfType as dV, parseConnectionString as dW, registerDefaultMigratorOptions as dX, registerFormatter as dY, relationship as dZ, resolveDatabaseMetadata as d_, composeJSONReplacers as da, composeJSONRevivers as db, createAlwaysNewConnectionPool as dc, createAmbientConnection as dd, createAmbientConnectionPool as de, createBoundedConnectionPool as df, createConnection as dg, createConnectionPool as dh, createSingletonClientConnectionPool as di, createSingletonConnection as dj, createSingletonConnectionPool as dk, createTransientConnection as dl, databaseSchemaComponent as dm, databaseSchemaSchemaComponent as dn, defaultDatabaseLockOptions as dp, defaultProcessorsRegistry as dq, describeSQL as dr, dumboDatabaseDriverRegistry as ds, dumboDatabaseMetadataRegistry as dt, dumboSchema as du, executeInAmbientConnection as dv, executeInNewConnection as dw, executeInNewDbClient as dx, executeInTransaction as dy, filterSchemaComponentsOfType as dz, type ConnectionOptions as e, schemaComponent as e0, sqlExecutor as e1, sqlExecutorInAmbientConnection as e2, sqlExecutorInNewConnection as e3, sqlMigration as e4, tableSchemaComponent as e5, toDatabaseDriverType as e6, transactionFactoryWithAmbientConnection as e7, transactionFactoryWithAsyncAmbientConnection as e8, transactionFactoryWithDbClient as e9, transactionFactoryWithNewConnection as ea, SQLFormatter as f, type DatabaseMetadata as g, type DatabaseTransactionOptions as h, type DatabaseTransaction as i, type ConnectionPool as j, type JSONSerializationOptions as k, type DbSQLExecutor as l, DumboError as m, SQLArray as n, SQLIn as o, SQLIdentifier as p, SQLLiteral as q, type AnySQLToken as r, DatabaseURN as s, DatabaseSchemaURN as t, ColumnURN as u, type QueryResult as v, type SchemaComponent as w, type DatabaseDriverType as x, type Dumbo as y, type SQLMigration as z };
|