/** * <p>Clears the values set for the PreparedStatement object's IN parameters and * releases the resources used by those values. In general, parameter values * remain in force for repeated use of statement. * @throws SQLException if there is an error while clearing params */ public void clearParameters() throws SQLException { checkStatement(); //clear the parameters list on servers prepared statement object if(parameterMap != null){ parameterMap.clear(); } }
/** * <p>Clears the values set for the PreparedStatement object's IN parameters and * releases the resources used by those values. In general, parameter values * remain in force for repeated use of statement. * @throws SQLException if there is an error while clearing params */ public void clearParameters() throws SQLException { checkStatement(); //clear the parameters list on servers prepared statement object if(parameterMap != null){ parameterMap.clear(); } }
/** * <p>Adds a set of parameters to this PreparedStatement object's list of commands * to be sent to the database for execution as a batch. * @throws SQLException if there is an error */ public void addBatch() throws SQLException { checkStatement(); if(batchParameterList == null){ batchParameterList = new ArrayList<List<Object>>(); } batchParameterList.add(getParameterValues()); }
/** * <p>Adds a set of parameters to this PreparedStatement object's list of commands * to be sent to the database for execution as a batch. * @throws SQLException if there is an error */ public void addBatch() throws SQLException { checkStatement(); if(batchParameterList == null){ batchParameterList = new ArrayList<List<Object>>(); } batchParameterList.add(getParameterValues()); }
public ResultSetMetaData getMetaData() throws SQLException { // check if the statement is open checkStatement(); if(metadata == null) { if (updateCounts != null) { return null; } else if(resultSet != null) { metadata = resultSet.getMetaData(); } else { Matcher matcher = StatementImpl.SHOW_STATEMENT.matcher(prepareSql); if (matcher.matches()) { this.executeShow(matcher); metadata = this.resultSet.getMetaData(); this.resultSet = null; return metadata; } if (getMetadataResults().getColumnMetadata() == null || getMetadataResults().getColumnMetadata().length == 0) { return null; } MetadataProvider provider = new MetadataProvider(getMetadataResults().getColumnMetadata()); metadata = new ResultSetMetaDataImpl(provider, this.getExecutionProperty(ExecutionProperties.JDBC4COLUMNNAMEANDLABELSEMANTICS)); } } return metadata; }
public ResultSetMetaData getMetaData() throws SQLException { // check if the statement is open checkStatement(); if(metadata == null) { if (updateCounts != null) { return null; } else if(resultSet != null) { metadata = resultSet.getMetaData(); } else { Matcher matcher = StatementImpl.SHOW_STATEMENT.matcher(prepareSql); if (matcher.matches()) { this.executeShow(matcher); metadata = this.resultSet.getMetaData(); this.resultSet = null; return metadata; } if (getMetadataResults().getColumnMetadata() == null || getMetadataResults().getColumnMetadata().length == 0) { return null; } MetadataProvider provider = new MetadataProvider(getMetadataResults().getColumnMetadata()); metadata = new ResultSetMetaDataImpl(provider, this.getExecutionProperty(ExecutionProperties.JDBC4COLUMNNAMEANDLABELSEMANTICS)); } } return metadata; }