@Override protected ExecuteResult prepareAndExecuteInternal(AvaticaStatement statement, String sql, long maxRowCount) throws SQLException, NoSuchStatementException { try { return super.prepareAndExecuteInternal(statement, sql, maxRowCount); } catch (RuntimeException e) { Throwables.throwIfInstanceOf(e.getCause(), SQLException.class); throw e; } } /**
@Override protected ExecuteResult prepareAndExecuteInternal(AvaticaStatement statement, String sql, long maxRowCount) throws SQLException, NoSuchStatementException { try { return super.prepareAndExecuteInternal(statement, sql, maxRowCount); } catch(RuntimeException e) { Throwables.propagateIfInstanceOf(e.getCause(), SQLException.class); throw e; } }
@Override protected ExecuteResult prepareAndExecuteInternal(AvaticaStatement statement, String sql, long maxRowCount) throws SQLException, NoSuchStatementException { try { return super.prepareAndExecuteInternal(statement, sql, maxRowCount); } catch (RuntimeException e) { Throwables.throwIfInstanceOf(e.getCause(), SQLException.class); throw e; } } /**
protected void executeInternal(String sql) throws SQLException { // reset previous state before moving forward. this.updateCount = -1; try { // In JDBC, maxRowCount = 0 means no limit; in prepare it means LIMIT 0 final long maxRowCount1 = maxRowCount <= 0 ? -1 : maxRowCount; for (int i = 0; i < connection.maxRetriesPerExecute; i++) { try { Meta.ExecuteResult x = connection.prepareAndExecuteInternal(this, sql, maxRowCount1); return; } catch (NoSuchStatementException e) { resetStatement(); } } } catch (RuntimeException e) { throw connection.helper.createException("Error while executing SQL \"" + sql + "\": " + e.getMessage(), e); } throw new RuntimeException("Failed to successfully execute query after " + connection.maxRetriesPerExecute + " attempts."); }
protected void executeInternal(String sql) throws SQLException { // reset previous state before moving forward. this.updateCount = -1; try { // In JDBC, maxRowCount = 0 means no limit; in prepare it means LIMIT 0 final long maxRowCount1 = maxRowCount <= 0 ? -1 : maxRowCount; for (int i = 0; i < connection.maxRetriesPerExecute; i++) { try { @SuppressWarnings("unused") Meta.ExecuteResult x = connection.prepareAndExecuteInternal(this, sql, maxRowCount1); return; } catch (NoSuchStatementException e) { resetStatement(); } } } catch (RuntimeException e) { throw AvaticaConnection.HELPER.createException("Error while executing SQL \"" + sql + "\": " + e.getMessage(), e); } throw new RuntimeException("Failed to successfully execute query after " + connection.maxRetriesPerExecute + " attempts."); }
protected void executeInternal(String sql) throws SQLException { // reset previous state before moving forward. this.updateCount = -1; try { // In JDBC, maxRowCount = 0 means no limit; in prepare it means LIMIT 0 final long maxRowCount1 = maxRowCount <= 0 ? -1 : maxRowCount; for (int i = 0; i < connection.maxRetriesPerExecute; i++) { try { @SuppressWarnings("unused") Meta.ExecuteResult x = connection.prepareAndExecuteInternal(this, sql, maxRowCount1); return; } catch (NoSuchStatementException e) { resetStatement(); } } } catch (RuntimeException e) { throw AvaticaConnection.HELPER.createException("Error while executing SQL \"" + sql + "\": " + e.getMessage(), e); } throw new RuntimeException("Failed to successfully execute query after " + connection.maxRetriesPerExecute + " attempts."); }