Class JdbcExceptionUtils

java.lang.Object
io.micronaut.data.jdbc.exceptions.JdbcExceptionUtils

@Internal public final class JdbcExceptionUtils extends Object
JDBC exception classification utilities.
Since:
5.2.0
  • Method Details

    • isUniqueConstraintViolation

      public static boolean isUniqueConstraintViolation(SQLException sqlException)
      Parameters:
      sqlException - The SQL exception
      Returns:
      Whether the exception or one of its chained exceptions represents a duplicate-key violation
    • isIntegrityConstraintViolation

      public static boolean isIntegrityConstraintViolation(SQLException sqlException)
      Parameters:
      sqlException - The SQL exception
      Returns:
      Whether the exception or one of its chained exceptions represents an integrity constraint violation