This repository was archived by the owner on Jun 14, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11declare namespace DbTypes {
22
3- class DBError extends Error {
4- name : string ;
5- nativeError : Error ;
6- }
7-
8- class CheckViolationError extends DBError {
9- table : string ;
10- constraint : string ;
11- }
12-
13- class ConstraintViolationError extends DBError { }
14-
15- class DataError extends DBError { }
16-
17- class ForeignKeyViolationError extends ConstraintViolationError {
18- table : string ;
19- constraint : string ;
20- }
21-
22- class NotNullViolationError extends ConstraintViolationError {
23- table : string ;
24- column : string ;
25- }
26-
27- class UniqueViolationError extends ConstraintViolationError {
28- table : string ;
29- columns : string [ ] ;
30- constraint : string ;
31- }
32-
33- function wrapError ( err : Error ) : DBError
34-
35- export {
36- wrapError ,
37-
38- CheckViolationError ,
39- ConstraintViolationError ,
40- DataError ,
41- ForeignKeyViolationError ,
42- NotNullViolationError ,
43- UniqueViolationError ,
44- }
3+ class DBError extends Error {
4+ name : string ;
5+ nativeError : Error ;
6+ }
7+
8+ class CheckViolationError extends DBError {
9+ table : string ;
10+ constraint : string ;
11+ }
12+
13+ class ConstraintViolationError extends DBError { }
14+
15+ class DataError extends DBError { }
16+
17+ class ForeignKeyViolationError extends ConstraintViolationError {
18+ table : string ;
19+ constraint : string ;
20+ }
21+
22+ class NotNullViolationError extends ConstraintViolationError {
23+ table : string ;
24+ column : string ;
25+ }
26+
27+ class UniqueViolationError extends ConstraintViolationError {
28+ table : string ;
29+ columns : string [ ] ;
30+ constraint : string ;
31+ }
32+
33+ function wrapError ( err : Error ) : DBError
34+
35+ export {
36+ wrapError ,
37+
38+ CheckViolationError ,
39+ ConstraintViolationError ,
40+ DataError ,
41+ ForeignKeyViolationError ,
42+ NotNullViolationError ,
43+ UniqueViolationError ,
44+ }
4545}
4646
4747export = DbTypes
You can’t perform that action at this time.
0 commit comments