Search in sources :

Example 6 with ParameterValueSet

use of org.apache.derby.iapi.sql.ParameterValueSet in project derby by apache.

the class EmbedPreparedStatement method clearParameters.

/**
 * <P>In general, parameter values remain in force for repeated use of a
 * Statement. Setting a parameter value automatically clears its
 * previous value.  However, in some cases it is useful to immediately
 * release the resources used by the current parameter values; this can
 * be done by calling clearParameters.
 * @exception SQLException thrown on failure.
 */
public void clearParameters() throws SQLException {
    checkStatus();
    ParameterValueSet pvs = getParms();
    if (pvs != null)
        pvs.clearParameters();
}
Also used : ParameterValueSet(org.apache.derby.iapi.sql.ParameterValueSet)

Example 7 with ParameterValueSet

use of org.apache.derby.iapi.sql.ParameterValueSet in project derby by apache.

the class EmbedPreparedStatement method executeBatchElement.

boolean executeBatchElement(Object batchElement) throws SQLException, StandardException {
    ParameterValueSet temp = (ParameterValueSet) batchElement;
    int numberOfParameters = temp.getParameterCount();
    for (int j = 0; j < numberOfParameters; j++) {
        temp.getParameter(j).setInto(this, j + 1);
    }
    return super.executeStatement(activation, false, true);
}
Also used : ParameterValueSet(org.apache.derby.iapi.sql.ParameterValueSet)

Aggregations

ParameterValueSet (org.apache.derby.iapi.sql.ParameterValueSet)7 DataValueDescriptor (org.apache.derby.iapi.types.DataValueDescriptor)4 LanguageConnectionContext (org.apache.derby.iapi.sql.conn.LanguageConnectionContext)2 DataDictionary (org.apache.derby.iapi.sql.dictionary.DataDictionary)2 StandardException (org.apache.derby.shared.common.error.StandardException)2 RoleGrantDescriptor (org.apache.derby.iapi.sql.dictionary.RoleGrantDescriptor)1 SchemaDescriptor (org.apache.derby.iapi.sql.dictionary.SchemaDescriptor)1 TransactionController (org.apache.derby.iapi.store.access.TransactionController)1 VariableSizeDataValue (org.apache.derby.iapi.types.VariableSizeDataValue)1