@prisma-next/sql-errors 0.3.0-pr.99.4 → 0.3.0-pr.99.6
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/index.d.mts +47 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +51 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +14 -9
- package/dist/errors.d.ts +0 -44
- package/dist/errors.d.ts.map +0 -1
- package/dist/exports/index.d.ts +0 -2
- package/dist/exports/index.d.ts.map +0 -1
- package/dist/exports/index.js +0 -46
- package/dist/exports/index.js.map +0 -1
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
//#region src/errors.d.ts
|
|
2
|
+
interface SqlDriverError<Kind extends string> {
|
|
3
|
+
readonly kind: Kind;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* SQL query error for query-related failures (syntax errors, constraint violations, permissions).
|
|
7
|
+
*/
|
|
8
|
+
declare class SqlQueryError extends Error implements SqlDriverError<'sql_query'> {
|
|
9
|
+
static readonly ERROR_NAME: "SqlQueryError";
|
|
10
|
+
readonly kind: "sql_query";
|
|
11
|
+
readonly sqlState: string | undefined;
|
|
12
|
+
readonly constraint: string | undefined;
|
|
13
|
+
readonly table: string | undefined;
|
|
14
|
+
readonly column: string | undefined;
|
|
15
|
+
readonly detail: string | undefined;
|
|
16
|
+
constructor(message: string, options?: {
|
|
17
|
+
readonly cause?: Error;
|
|
18
|
+
readonly sqlState?: string;
|
|
19
|
+
readonly constraint?: string;
|
|
20
|
+
readonly table?: string;
|
|
21
|
+
readonly column?: string;
|
|
22
|
+
readonly detail?: string;
|
|
23
|
+
});
|
|
24
|
+
/**
|
|
25
|
+
* Type predicate to check if an error is a SqlQueryError.
|
|
26
|
+
*/
|
|
27
|
+
static is(error: unknown): error is SqlQueryError;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* SQL connection error (timeouts, connection resets, etc.).
|
|
31
|
+
*/
|
|
32
|
+
declare class SqlConnectionError extends Error implements SqlDriverError<'sql_connection'> {
|
|
33
|
+
static readonly ERROR_NAME: "SqlConnectionError";
|
|
34
|
+
readonly kind: "sql_connection";
|
|
35
|
+
readonly transient: boolean | undefined;
|
|
36
|
+
constructor(message: string, options?: {
|
|
37
|
+
readonly cause?: Error;
|
|
38
|
+
readonly transient?: boolean;
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* Type predicate to check if an error is a SqlConnectionError.
|
|
42
|
+
*/
|
|
43
|
+
static is(error: unknown): error is SqlConnectionError;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { SqlConnectionError, SqlQueryError };
|
|
47
|
+
//# sourceMappingURL=index.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/errors.ts"],"sourcesContent":[],"mappings":";UAAiB;EAAA,SAAA,IAAA,EACA,IADc;AAM/B;;;;AAAoD,cAAvC,aAAA,SAAsB,KAAA,YAAiB,cAAA,CAAA,WAAA,CAAA,CAAA;EAAc,gBAAA,UAAA,EAAA,eAAA;EA6CrD,SAAA,IAAA,EAAA,WAAmB;EAQT,SAAA,QAAA,EAAA,MAAA,GAAA,SAAA;EAYe,SAAA,UAAA,EAAA,MAAA,GAAA,SAAA;EApBE,SAAA,KAAA,EAAA,MAAA,GAAA,SAAA;EAAiB,SAAA,MAAA,EAAA,MAAA,GAAA,SAAA;EAAc,SAAA,MAAA,EAAA,MAAA,GAAA,SAAA;;qBAjChD;;;;;;;;;;sCAoBe;;;;;cAazB,kBAAA,SAA2B,KAAA,YAAiB;;;;;qBAQlC;;;;;;sCAYe"}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
//#region src/errors.ts
|
|
2
|
+
/**
|
|
3
|
+
* SQL query error for query-related failures (syntax errors, constraint violations, permissions).
|
|
4
|
+
*/
|
|
5
|
+
var SqlQueryError = class SqlQueryError extends Error {
|
|
6
|
+
static ERROR_NAME = "SqlQueryError";
|
|
7
|
+
kind = "sql_query";
|
|
8
|
+
sqlState;
|
|
9
|
+
constraint;
|
|
10
|
+
table;
|
|
11
|
+
column;
|
|
12
|
+
detail;
|
|
13
|
+
constructor(message, options) {
|
|
14
|
+
super(message, { cause: options?.cause });
|
|
15
|
+
this.name = SqlQueryError.ERROR_NAME;
|
|
16
|
+
this.sqlState = options?.sqlState;
|
|
17
|
+
this.constraint = options?.constraint;
|
|
18
|
+
this.table = options?.table;
|
|
19
|
+
this.column = options?.column;
|
|
20
|
+
this.detail = options?.detail;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Type predicate to check if an error is a SqlQueryError.
|
|
24
|
+
*/
|
|
25
|
+
static is(error) {
|
|
26
|
+
return typeof error === "object" && error !== null && Object.hasOwn(error, "kind") && error.kind === "sql_query";
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* SQL connection error (timeouts, connection resets, etc.).
|
|
31
|
+
*/
|
|
32
|
+
var SqlConnectionError = class SqlConnectionError extends Error {
|
|
33
|
+
static ERROR_NAME = "SqlConnectionError";
|
|
34
|
+
kind = "sql_connection";
|
|
35
|
+
transient;
|
|
36
|
+
constructor(message, options) {
|
|
37
|
+
super(message, { cause: options?.cause });
|
|
38
|
+
this.name = SqlConnectionError.ERROR_NAME;
|
|
39
|
+
this.transient = options?.transient;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Type predicate to check if an error is a SqlConnectionError.
|
|
43
|
+
*/
|
|
44
|
+
static is(error) {
|
|
45
|
+
return typeof error === "object" && error !== null && Object.hasOwn(error, "kind") && error.kind === "sql_connection";
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
//#endregion
|
|
50
|
+
export { SqlConnectionError, SqlQueryError };
|
|
51
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/errors.ts"],"sourcesContent":["export interface SqlDriverError<Kind extends string> {\n readonly kind: Kind;\n}\n/**\n * SQL query error for query-related failures (syntax errors, constraint violations, permissions).\n */\nexport class SqlQueryError extends Error implements SqlDriverError<'sql_query'> {\n static readonly ERROR_NAME = 'SqlQueryError' as const;\n readonly kind = 'sql_query' as const;\n readonly sqlState: string | undefined;\n readonly constraint: string | undefined;\n readonly table: string | undefined;\n readonly column: string | undefined;\n readonly detail: string | undefined;\n\n constructor(\n message: string,\n options?: {\n readonly cause?: Error;\n readonly sqlState?: string;\n readonly constraint?: string;\n readonly table?: string;\n readonly column?: string;\n readonly detail?: string;\n },\n ) {\n super(message, { cause: options?.cause });\n this.name = SqlQueryError.ERROR_NAME;\n this.sqlState = options?.sqlState;\n this.constraint = options?.constraint;\n this.table = options?.table;\n this.column = options?.column;\n this.detail = options?.detail;\n }\n\n /**\n * Type predicate to check if an error is a SqlQueryError.\n */\n static is(error: unknown): error is SqlQueryError {\n return (\n typeof error === 'object' &&\n error !== null &&\n Object.hasOwn(error, 'kind') &&\n (error as { kind: unknown }).kind === 'sql_query'\n );\n }\n}\n\n/**\n * SQL connection error (timeouts, connection resets, etc.).\n */\nexport class SqlConnectionError extends Error implements SqlDriverError<'sql_connection'> {\n static readonly ERROR_NAME = 'SqlConnectionError' as const;\n readonly kind = 'sql_connection' as const;\n readonly transient: boolean | undefined;\n\n constructor(\n message: string,\n options?: {\n readonly cause?: Error;\n readonly transient?: boolean;\n },\n ) {\n super(message, { cause: options?.cause });\n this.name = SqlConnectionError.ERROR_NAME;\n this.transient = options?.transient;\n }\n\n /**\n * Type predicate to check if an error is a SqlConnectionError.\n */\n static is(error: unknown): error is SqlConnectionError {\n return (\n typeof error === 'object' &&\n error !== null &&\n Object.hasOwn(error, 'kind') &&\n (error as { kind: unknown }).kind === 'sql_connection'\n );\n }\n}\n"],"mappings":";;;;AAMA,IAAa,gBAAb,MAAa,sBAAsB,MAA6C;CAC9E,OAAgB,aAAa;CAC7B,AAAS,OAAO;CAChB,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CAET,YACE,SACA,SAQA;AACA,QAAM,SAAS,EAAE,OAAO,SAAS,OAAO,CAAC;AACzC,OAAK,OAAO,cAAc;AAC1B,OAAK,WAAW,SAAS;AACzB,OAAK,aAAa,SAAS;AAC3B,OAAK,QAAQ,SAAS;AACtB,OAAK,SAAS,SAAS;AACvB,OAAK,SAAS,SAAS;;;;;CAMzB,OAAO,GAAG,OAAwC;AAChD,SACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAO,OAAO,OAAO,OAAO,IAC3B,MAA4B,SAAS;;;;;;AAQ5C,IAAa,qBAAb,MAAa,2BAA2B,MAAkD;CACxF,OAAgB,aAAa;CAC7B,AAAS,OAAO;CAChB,AAAS;CAET,YACE,SACA,SAIA;AACA,QAAM,SAAS,EAAE,OAAO,SAAS,OAAO,CAAC;AACzC,OAAK,OAAO,mBAAmB;AAC/B,OAAK,YAAY,SAAS;;;;;CAM5B,OAAO,GAAG,OAA6C;AACrD,SACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAO,OAAO,OAAO,OAAO,IAC3B,MAA4B,SAAS"}
|
package/package.json
CHANGED
|
@@ -1,34 +1,39 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/sql-errors",
|
|
3
|
-
"version": "0.3.0-pr.99.
|
|
3
|
+
"version": "0.3.0-pr.99.6",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Normalized SQL driver error types for Prisma Next",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"
|
|
8
|
+
"tsdown": "0.18.4",
|
|
9
9
|
"typescript": "5.9.3",
|
|
10
10
|
"vitest": "4.0.16",
|
|
11
11
|
"@prisma-next/test-utils": "0.0.1",
|
|
12
|
+
"@prisma-next/tsdown": "0.0.0",
|
|
12
13
|
"@prisma-next/tsconfig": "0.0.0"
|
|
13
14
|
},
|
|
14
15
|
"files": [
|
|
15
16
|
"dist",
|
|
16
17
|
"src"
|
|
17
18
|
],
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=20"
|
|
21
|
+
},
|
|
18
22
|
"exports": {
|
|
19
|
-
".":
|
|
20
|
-
|
|
21
|
-
"import": "./dist/exports/index.js"
|
|
22
|
-
}
|
|
23
|
+
".": "./dist/index.mjs",
|
|
24
|
+
"./package.json": "./package.json"
|
|
23
25
|
},
|
|
26
|
+
"main": "./dist/index.mjs",
|
|
27
|
+
"module": "./dist/index.mjs",
|
|
28
|
+
"types": "./dist/index.d.mts",
|
|
24
29
|
"scripts": {
|
|
25
|
-
"build": "
|
|
30
|
+
"build": "tsdown",
|
|
26
31
|
"test": "vitest run",
|
|
27
32
|
"test:coverage": "vitest run --coverage",
|
|
28
|
-
"typecheck": "tsc --
|
|
33
|
+
"typecheck": "tsc --noEmit",
|
|
29
34
|
"lint": "biome check . --error-on-warnings",
|
|
30
35
|
"lint:fix": "biome check --write .",
|
|
31
36
|
"lint:fix:unsafe": "biome check --write --unsafe .",
|
|
32
|
-
"clean": "rm -rf dist coverage .tmp-output"
|
|
37
|
+
"clean": "rm -rf dist dist-tsc dist-tsc-prod coverage .tmp-output"
|
|
33
38
|
}
|
|
34
39
|
}
|
package/dist/errors.d.ts
DELETED
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
export interface SqlDriverError<Kind extends string> {
|
|
2
|
-
readonly kind: Kind;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* SQL query error for query-related failures (syntax errors, constraint violations, permissions).
|
|
6
|
-
*/
|
|
7
|
-
export declare class SqlQueryError extends Error implements SqlDriverError<'sql_query'> {
|
|
8
|
-
static readonly ERROR_NAME: "SqlQueryError";
|
|
9
|
-
readonly kind: "sql_query";
|
|
10
|
-
readonly sqlState: string | undefined;
|
|
11
|
-
readonly constraint: string | undefined;
|
|
12
|
-
readonly table: string | undefined;
|
|
13
|
-
readonly column: string | undefined;
|
|
14
|
-
readonly detail: string | undefined;
|
|
15
|
-
constructor(message: string, options?: {
|
|
16
|
-
readonly cause?: Error;
|
|
17
|
-
readonly sqlState?: string;
|
|
18
|
-
readonly constraint?: string;
|
|
19
|
-
readonly table?: string;
|
|
20
|
-
readonly column?: string;
|
|
21
|
-
readonly detail?: string;
|
|
22
|
-
});
|
|
23
|
-
/**
|
|
24
|
-
* Type predicate to check if an error is a SqlQueryError.
|
|
25
|
-
*/
|
|
26
|
-
static is(error: unknown): error is SqlQueryError;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* SQL connection error (timeouts, connection resets, etc.).
|
|
30
|
-
*/
|
|
31
|
-
export declare class SqlConnectionError extends Error implements SqlDriverError<'sql_connection'> {
|
|
32
|
-
static readonly ERROR_NAME: "SqlConnectionError";
|
|
33
|
-
readonly kind: "sql_connection";
|
|
34
|
-
readonly transient: boolean | undefined;
|
|
35
|
-
constructor(message: string, options?: {
|
|
36
|
-
readonly cause?: Error;
|
|
37
|
-
readonly transient?: boolean;
|
|
38
|
-
});
|
|
39
|
-
/**
|
|
40
|
-
* Type predicate to check if an error is a SqlConnectionError.
|
|
41
|
-
*/
|
|
42
|
-
static is(error: unknown): error is SqlConnectionError;
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=errors.d.ts.map
|
package/dist/errors.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc,CAAC,IAAI,SAAS,MAAM;IACjD,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC;CACrB;AACD;;GAEG;AACH,qBAAa,aAAc,SAAQ,KAAM,YAAW,cAAc,CAAC,WAAW,CAAC;IAC7E,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAG,eAAe,CAAU;IACtD,QAAQ,CAAC,IAAI,EAAG,WAAW,CAAU;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IACtC,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;gBAGlC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;QACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAC3B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAC7B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;QACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;QACzB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAC;KAC1B;IAWH;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa;CAQlD;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAM,YAAW,cAAc,CAAC,gBAAgB,CAAC;IACvF,MAAM,CAAC,QAAQ,CAAC,UAAU,EAAG,oBAAoB,CAAU;IAC3D,QAAQ,CAAC,IAAI,EAAG,gBAAgB,CAAU;IAC1C,QAAQ,CAAC,SAAS,EAAE,OAAO,GAAG,SAAS,CAAC;gBAGtC,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;QACR,QAAQ,CAAC,KAAK,CAAC,EAAE,KAAK,CAAC;QACvB,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;KAC9B;IAOH;;OAEG;IACH,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,kBAAkB;CAQvD"}
|
package/dist/exports/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exports/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC"}
|
package/dist/exports/index.js
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
// src/errors.ts
|
|
2
|
-
var SqlQueryError = class _SqlQueryError extends Error {
|
|
3
|
-
static ERROR_NAME = "SqlQueryError";
|
|
4
|
-
kind = "sql_query";
|
|
5
|
-
sqlState;
|
|
6
|
-
constraint;
|
|
7
|
-
table;
|
|
8
|
-
column;
|
|
9
|
-
detail;
|
|
10
|
-
constructor(message, options) {
|
|
11
|
-
super(message, { cause: options?.cause });
|
|
12
|
-
this.name = _SqlQueryError.ERROR_NAME;
|
|
13
|
-
this.sqlState = options?.sqlState;
|
|
14
|
-
this.constraint = options?.constraint;
|
|
15
|
-
this.table = options?.table;
|
|
16
|
-
this.column = options?.column;
|
|
17
|
-
this.detail = options?.detail;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Type predicate to check if an error is a SqlQueryError.
|
|
21
|
-
*/
|
|
22
|
-
static is(error) {
|
|
23
|
-
return typeof error === "object" && error !== null && Object.hasOwn(error, "kind") && error.kind === "sql_query";
|
|
24
|
-
}
|
|
25
|
-
};
|
|
26
|
-
var SqlConnectionError = class _SqlConnectionError extends Error {
|
|
27
|
-
static ERROR_NAME = "SqlConnectionError";
|
|
28
|
-
kind = "sql_connection";
|
|
29
|
-
transient;
|
|
30
|
-
constructor(message, options) {
|
|
31
|
-
super(message, { cause: options?.cause });
|
|
32
|
-
this.name = _SqlConnectionError.ERROR_NAME;
|
|
33
|
-
this.transient = options?.transient;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Type predicate to check if an error is a SqlConnectionError.
|
|
37
|
-
*/
|
|
38
|
-
static is(error) {
|
|
39
|
-
return typeof error === "object" && error !== null && Object.hasOwn(error, "kind") && error.kind === "sql_connection";
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
export {
|
|
43
|
-
SqlConnectionError,
|
|
44
|
-
SqlQueryError
|
|
45
|
-
};
|
|
46
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/errors.ts"],"sourcesContent":["export interface SqlDriverError<Kind extends string> {\n readonly kind: Kind;\n}\n/**\n * SQL query error for query-related failures (syntax errors, constraint violations, permissions).\n */\nexport class SqlQueryError extends Error implements SqlDriverError<'sql_query'> {\n static readonly ERROR_NAME = 'SqlQueryError' as const;\n readonly kind = 'sql_query' as const;\n readonly sqlState: string | undefined;\n readonly constraint: string | undefined;\n readonly table: string | undefined;\n readonly column: string | undefined;\n readonly detail: string | undefined;\n\n constructor(\n message: string,\n options?: {\n readonly cause?: Error;\n readonly sqlState?: string;\n readonly constraint?: string;\n readonly table?: string;\n readonly column?: string;\n readonly detail?: string;\n },\n ) {\n super(message, { cause: options?.cause });\n this.name = SqlQueryError.ERROR_NAME;\n this.sqlState = options?.sqlState;\n this.constraint = options?.constraint;\n this.table = options?.table;\n this.column = options?.column;\n this.detail = options?.detail;\n }\n\n /**\n * Type predicate to check if an error is a SqlQueryError.\n */\n static is(error: unknown): error is SqlQueryError {\n return (\n typeof error === 'object' &&\n error !== null &&\n Object.hasOwn(error, 'kind') &&\n (error as { kind: unknown }).kind === 'sql_query'\n );\n }\n}\n\n/**\n * SQL connection error (timeouts, connection resets, etc.).\n */\nexport class SqlConnectionError extends Error implements SqlDriverError<'sql_connection'> {\n static readonly ERROR_NAME = 'SqlConnectionError' as const;\n readonly kind = 'sql_connection' as const;\n readonly transient: boolean | undefined;\n\n constructor(\n message: string,\n options?: {\n readonly cause?: Error;\n readonly transient?: boolean;\n },\n ) {\n super(message, { cause: options?.cause });\n this.name = SqlConnectionError.ERROR_NAME;\n this.transient = options?.transient;\n }\n\n /**\n * Type predicate to check if an error is a SqlConnectionError.\n */\n static is(error: unknown): error is SqlConnectionError {\n return (\n typeof error === 'object' &&\n error !== null &&\n Object.hasOwn(error, 'kind') &&\n (error as { kind: unknown }).kind === 'sql_connection'\n );\n }\n}\n"],"mappings":";AAMO,IAAM,gBAAN,MAAM,uBAAsB,MAA6C;AAAA,EAC9E,OAAgB,aAAa;AAAA,EACpB,OAAO;AAAA,EACP;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAET,YACE,SACA,SAQA;AACA,UAAM,SAAS,EAAE,OAAO,SAAS,MAAM,CAAC;AACxC,SAAK,OAAO,eAAc;AAC1B,SAAK,WAAW,SAAS;AACzB,SAAK,aAAa,SAAS;AAC3B,SAAK,QAAQ,SAAS;AACtB,SAAK,SAAS,SAAS;AACvB,SAAK,SAAS,SAAS;AAAA,EACzB;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,GAAG,OAAwC;AAChD,WACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAO,OAAO,OAAO,MAAM,KAC1B,MAA4B,SAAS;AAAA,EAE1C;AACF;AAKO,IAAM,qBAAN,MAAM,4BAA2B,MAAkD;AAAA,EACxF,OAAgB,aAAa;AAAA,EACpB,OAAO;AAAA,EACP;AAAA,EAET,YACE,SACA,SAIA;AACA,UAAM,SAAS,EAAE,OAAO,SAAS,MAAM,CAAC;AACxC,SAAK,OAAO,oBAAmB;AAC/B,SAAK,YAAY,SAAS;AAAA,EAC5B;AAAA;AAAA;AAAA;AAAA,EAKA,OAAO,GAAG,OAA6C;AACrD,WACE,OAAO,UAAU,YACjB,UAAU,QACV,OAAO,OAAO,OAAO,MAAM,KAC1B,MAA4B,SAAS;AAAA,EAE1C;AACF;","names":[]}
|