code: public static void runIgnoringConstraintViolation(Runnable task)
      {
          try {
              task.run();
          }
          catch (RuntimeException e) {
              if (!sqlCodeStartsWith(e, "23")) {
                  throw e;
              }
          }
      }
docs: Run a SQL query as ignoring any constraint violations.
  This allows idempotent inserts (equivalent to INSERT IGNORE).