File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -197,6 +197,8 @@ pub enum ErrorKind {
197197 NotNullViolation ,
198198 /// Check constraint violation.
199199 CheckViolation ,
200+ /// Exclusion constraint violation.
201+ ExclusionViolation ,
200202 /// An unmapped error.
201203 Other ,
202204}
Original file line number Diff line number Diff line change @@ -214,6 +214,7 @@ impl DatabaseError for PgDatabaseError {
214214 error_codes:: FOREIGN_KEY_VIOLATION => ErrorKind :: ForeignKeyViolation ,
215215 error_codes:: NOT_NULL_VIOLATION => ErrorKind :: NotNullViolation ,
216216 error_codes:: CHECK_VIOLATION => ErrorKind :: CheckViolation ,
217+ error_codes:: EXCLUSION_VIOLATION => ErrorKind :: ExclusionViolation ,
217218 _ => ErrorKind :: Other ,
218219 }
219220 }
@@ -239,4 +240,6 @@ pub(crate) mod error_codes {
239240 pub const NOT_NULL_VIOLATION : & str = "23502" ;
240241 /// Caused when a check constraint is violated.
241242 pub const CHECK_VIOLATION : & str = "23514" ;
243+ /// Caused when a exclude constraint is violated.
244+ pub const EXCLUSION_VIOLATION : & str = "23P01" ;
242245}
You can’t perform that action at this time.
0 commit comments