Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-1210

To provide machine-readeble SQLIntegrityConstraintViolationException. Required schema name, table name, constraint name.

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Hello!
      When constraint violation exception occurs I need machine-readeble attributes of SQLIntegrityConstraintViolationException.
      Here example how it works in PG:

      if (
                  ex instanceof PSQLException pex &&
                  ex.getSQLState().startsWith("23")
      ) {
                  return new ConstraintViolationException(
                      null,
                      pex.getServerErrorMessage().getSchema(),     // <----
                      pex.getServerErrorMessage().getTable(),       // <----
                      pex.getServerErrorMessage().getConstraint()  // <----
                  );
      }
      

      Attachments

        Activity

          People

            diego dupin Diego Dupin
            dgorodetskiy Gorodetskiy Dmitry
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.