/** * INTERNAL: * Prepare the JDBC statement, this may be parameterize or a call statement. * If caching statements this must check for the pre-prepared statement and re-bind to it. */ public Statement prepareStatement(DatabaseAccessor accessor, AbstractRecord translationRow, AbstractSession session) throws SQLException { Statement statement = accessor.prepareStatement(this, session); if (getMaxRows() > 0) { statement.setMaxRows(getMaxRows()); } if (!hasParameters()) { return statement; } for (int index = 0; index < getParameters().size(); index++) { session.getPlatform().setParameterValueInDatabaseCall(this.getParameters(), (PreparedStatement)statement, index, session); } return statement; }
if (call.getMaxRows() > 0) { statement.setMaxRows(0);