Interface ViolatedConstraintNameExtractor
- All Known Implementing Classes:
TemplatedViolatedConstraintNameExtractor
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Extracts a violated database-constraint name from a vendor
SQLException.
Return null when the exception does not expose a constraint name. An
absent name must not be represented by an empty string or a sentinel.
Implementations may inspect nested vendor exceptions when the driver
reports constraint details there.
- Since:
- 8.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionExtract the violated constraint name from the given exception.
-
Method Details
-
extractConstraintName
Extract the violated constraint name from the given exception.- Parameters:
sqle- the exception caused by the constraint violation- Returns:
- the extracted name, or
nullwhen no name can be recovered
-