UNPKG

656 BTypeScriptView Raw
1import DatabaseError, { DatabaseErrorSubclassOptions } from '../database-error';
2interface ExclusionConstraintErrorOptions {
3 constraint?: string;
4 fields?: Record<string, string | number>;
5 table?: string;
6}
7/**
8 * Thrown when an exclusion constraint is violated in the database
9 */
10declare class ExclusionConstraintError extends DatabaseError implements ExclusionConstraintErrorOptions {
11 constraint: string | undefined;
12 fields: Record<string, string | number> | undefined;
13 table: string | undefined;
14 constructor(options: DatabaseErrorSubclassOptions & ExclusionConstraintErrorOptions);
15}
16export default ExclusionConstraintError;