@nextlyhq/adapter-drizzle 0.0.2-alpha.6 → 0.0.2-alpha.60
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/{adapter-nvlxFkF-.d.cts → adapter-BG7MnOUw.d.cts} +194 -58
- package/dist/{adapter-BxJVtttb.d.ts → adapter-DjPoLjBK.d.ts} +194 -58
- package/dist/{error-um1d_3Uo.d.cts → error-BrdknH2s.d.cts} +18 -1
- package/dist/{error-um1d_3Uo.d.ts → error-BrdknH2s.d.ts} +18 -1
- package/dist/index.cjs +461 -40
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.mjs +462 -41
- package/dist/index.mjs.map +1 -1
- package/dist/{migration-BbO5meEV.d.cts → migration-BUc56kip.d.cts} +78 -0
- package/dist/{migration-Qe70wDOC.d.ts → migration-Bj84e15B.d.ts} +78 -0
- package/dist/migrations.d.cts +5 -4
- package/dist/migrations.d.ts +5 -4
- package/dist/types/index.cjs +8 -0
- package/dist/types/index.cjs.map +1 -1
- package/dist/types/index.d.cts +3 -2
- package/dist/types/index.d.ts +3 -2
- package/dist/types/index.mjs +8 -1
- package/dist/types/index.mjs.map +1 -1
- package/dist/version-check.d.cts +1 -1
- package/dist/version-check.d.ts +1 -1
- package/package.json +10 -10
|
@@ -64,6 +64,23 @@ interface DatabaseError extends Error {
|
|
|
64
64
|
* @public
|
|
65
65
|
*/
|
|
66
66
|
declare function isDatabaseError(error: unknown): error is DatabaseError;
|
|
67
|
+
/**
|
|
68
|
+
* Whether an error is the application's verdict rather than the database's
|
|
69
|
+
* failure.
|
|
70
|
+
*
|
|
71
|
+
* Work running inside a transaction may throw to roll the write back — a
|
|
72
|
+
* refused value, a permission denial — and such an error is not something the
|
|
73
|
+
* driver produced. Classifying it as a database error replaces its code and its
|
|
74
|
+
* payload with a generic one, so a caller that asked for a refusal is handed an
|
|
75
|
+
* unexplained failure instead, and per-field validation detail is lost on the
|
|
76
|
+
* way out.
|
|
77
|
+
*
|
|
78
|
+
* @param error - Error to check
|
|
79
|
+
* @returns True if the error was raised by application code
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
declare function isApplicationError(error: unknown): boolean;
|
|
67
84
|
/**
|
|
68
85
|
* Database error constructor options.
|
|
69
86
|
*
|
|
@@ -102,4 +119,4 @@ interface DatabaseErrorOptions {
|
|
|
102
119
|
*/
|
|
103
120
|
declare function createDatabaseError(options: DatabaseErrorOptions): DatabaseError;
|
|
104
121
|
|
|
105
|
-
export { type DatabaseErrorKind as D, type DatabaseError as a, type DatabaseErrorOptions as b, createDatabaseError as c, isDatabaseError as i };
|
|
122
|
+
export { type DatabaseErrorKind as D, type DatabaseError as a, type DatabaseErrorOptions as b, createDatabaseError as c, isDatabaseError as d, isApplicationError as i };
|
|
@@ -64,6 +64,23 @@ interface DatabaseError extends Error {
|
|
|
64
64
|
* @public
|
|
65
65
|
*/
|
|
66
66
|
declare function isDatabaseError(error: unknown): error is DatabaseError;
|
|
67
|
+
/**
|
|
68
|
+
* Whether an error is the application's verdict rather than the database's
|
|
69
|
+
* failure.
|
|
70
|
+
*
|
|
71
|
+
* Work running inside a transaction may throw to roll the write back — a
|
|
72
|
+
* refused value, a permission denial — and such an error is not something the
|
|
73
|
+
* driver produced. Classifying it as a database error replaces its code and its
|
|
74
|
+
* payload with a generic one, so a caller that asked for a refusal is handed an
|
|
75
|
+
* unexplained failure instead, and per-field validation detail is lost on the
|
|
76
|
+
* way out.
|
|
77
|
+
*
|
|
78
|
+
* @param error - Error to check
|
|
79
|
+
* @returns True if the error was raised by application code
|
|
80
|
+
*
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
declare function isApplicationError(error: unknown): boolean;
|
|
67
84
|
/**
|
|
68
85
|
* Database error constructor options.
|
|
69
86
|
*
|
|
@@ -102,4 +119,4 @@ interface DatabaseErrorOptions {
|
|
|
102
119
|
*/
|
|
103
120
|
declare function createDatabaseError(options: DatabaseErrorOptions): DatabaseError;
|
|
104
121
|
|
|
105
|
-
export { type DatabaseErrorKind as D, type DatabaseError as a, type DatabaseErrorOptions as b, createDatabaseError as c, isDatabaseError as i };
|
|
122
|
+
export { type DatabaseErrorKind as D, type DatabaseError as a, type DatabaseErrorOptions as b, createDatabaseError as c, isDatabaseError as d, isApplicationError as i };
|