1 | import { CommonErrorProperties, ErrorOptions } from '../base-error';
|
2 | import ValidationError, { ValidationErrorItem } from '../validation-error';
|
3 | interface UniqueConstraintErrorParent extends Error, Pick<CommonErrorProperties, 'sql'> {
|
4 | }
|
5 | export interface UniqueConstraintErrorOptions extends ErrorOptions {
|
6 | parent?: UniqueConstraintErrorParent;
|
7 | original?: UniqueConstraintErrorParent;
|
8 | errors?: ValidationErrorItem[];
|
9 | fields?: Record<string, unknown>;
|
10 | message?: string;
|
11 | }
|
12 |
|
13 |
|
14 |
|
15 | declare class UniqueConstraintError extends ValidationError implements CommonErrorProperties {
|
16 | readonly parent: UniqueConstraintErrorParent;
|
17 | readonly original: UniqueConstraintErrorParent;
|
18 | readonly fields: Record<string, unknown>;
|
19 | readonly sql: string;
|
20 | constructor(options: UniqueConstraintErrorOptions);
|
21 | }
|
22 | export default UniqueConstraintError;
|