code: public int executeUpdate(String query) throws Exception {
          int returnVal = 0;
          Statement queryStatement = null;
  
          try (Connection sqlConnection = getConnection()) {
              queryStatement = sqlConnection.createStatement();
              returnVal = queryStatement.executeUpdate(query);
          } catch (Exception e) {
          } finally {
              try {
                  if (queryStatement != null) {
                      queryStatement.close();
                  }
              } catch (Exception e) {
              }
          }
  
          return returnVal;
      }
docs: Wrapped version of standard jdbc executeUpdate Pays attention to DB
  locked exception and waits up to 1s
  
  @param query SQL query to execute
  @throws Exception - will throw an exception if we can never get a lock