Examples of ParameterValueSet


Examples of org.apache.derby.iapi.sql.ParameterValueSet

  /**
    Check to see if a statement requires to be executed via a callable statement.
  */
  void checkRequiresCallableStatement(Activation activation) throws SQLException {

    ParameterValueSet pvs = activation.getParameterValueSet();

    if (pvs == null)
      return;

    if (pvs.checkNoDeclaredOutputParameters()) {
      try {
        activation.close();
      } catch (StandardException se) {
      }
      throw newSQLException(SQLState.REQUIRES_CALLABLE_STATEMENT, SQLText);
View Full Code Here

Examples of org.apache.derby.iapi.sql.ParameterValueSet

  /**
    Check to see if a statement requires to be executed via a callable statement.
  */
  void checkRequiresCallableStatement(Activation activation) throws SQLException {

    ParameterValueSet pvs = activation.getParameterValueSet();

    if (pvs == null)
      return;

    if (pvs.checkNoDeclaredOutputParameters()) {
      try {
        activation.close();
      } catch (StandardException se) {
      }
      throw newSQLException(SQLState.REQUIRES_CALLABLE_STATEMENT, SQLText);
View Full Code Here

Examples of org.apache.derby.iapi.sql.ParameterValueSet

        JDBC30Translation.NO_GENERATED_KEYS,
        null,
        null);

    // mark our parameters as for a callable statement
    ParameterValueSet pvs = getParms();

    // do we have a return parameter?
    hasReturnOutputParameter = pvs.hasReturnOutputParameter();
  }
View Full Code Here

Examples of org.apache.derby.iapi.sql.ParameterValueSet

      //Fetch the getParms into a local variable now because the
      //activation associated with a CallableStatement at this
      //point(after the executStatement) is the current activation.
      //We can now safely stuff the return value of the
      //CallableStatement into the following ParameterValueSet object.
      ParameterValueSet pvs = getParms();

      /*
      ** If we have a return parameter, then we
      ** consume it from the returned ResultSet
      ** reset the ResultSet set to null.
      */
      if (hasReturnOutputParameter)
      {
        if (SanityManager.DEBUG)
        {
          SanityManager.ASSERT(results!=null, "null results even though we are supposed to have a return parameter");
        }
        boolean gotRow = results.next();
        if (SanityManager.DEBUG)
        {
          SanityManager.ASSERT(gotRow, "the return resultSet didn't have any rows");
        }

        try
        {
          DataValueDescriptor returnValue = pvs.getReturnValueForSet();
          returnValue.setValueFromResultSet(results, 1, true);
        } catch (StandardException e)
        {
          throw EmbedResultSet.noStateChangeException(e);
        }
View Full Code Here

Examples of org.apache.derby.iapi.sql.ParameterValueSet

      throw Util.notImplemented();
    }
  public void addBatch() throws SQLException {

    checkStatus();
    ParameterValueSet pvs = getParms();

    int numberOfParameters = pvs.getParameterCount();

    for (int j=1; j<=numberOfParameters; j++) {

      switch (pvs.getParameterMode(j)) {
      case JDBC30Translation.PARAMETER_MODE_IN:
      case JDBC30Translation.PARAMETER_MODE_UNKNOWN:
        break;
      case JDBC30Translation.PARAMETER_MODE_OUT:
      case JDBC30Translation.PARAMETER_MODE_IN_OUT:
View Full Code Here

Examples of org.apache.derby.iapi.sql.ParameterValueSet

            throw StandardException.newException
                (SQLState.INVALID_TRANSACTION_STATE_ACTIVE_CONNECTION);
        }

        if (type == StatementType.SET_ROLE_DYNAMIC) {
            ParameterValueSet pvs = activation.getParameterValueSet();
            DataValueDescriptor dvs = pvs.getParameter(0);
            // SQL 2003, section 18.3, GR2: trim whitespace first, and
            // interpret as identifier, then we convert it to case normal form
            // here.
            String roleId = dvs.getString();
View Full Code Here

Examples of org.apache.derby.iapi.sql.ParameterValueSet

        Statement.NO_GENERATED_KEYS,
        null,
        null);

    // mark our parameters as for a callable statement
    ParameterValueSet pvs = getParms();

    // do we have a return parameter?
    hasReturnOutputParameter = pvs.hasReturnOutputParameter();
  }
View Full Code Here

Examples of org.apache.derby.iapi.sql.ParameterValueSet

      //Fetch the getParms into a local variable now because the
      //activation associated with a CallableStatement at this
      //point(after the executStatement) is the current activation.
      //We can now safely stuff the return value of the
      //CallableStatement into the following ParameterValueSet object.
      ParameterValueSet pvs = getParms();

      /*
      ** If we have a return parameter, then we
      ** consume it from the returned ResultSet
      ** reset the ResultSet set to null.
      */
      if (hasReturnOutputParameter)
      {
        if (SanityManager.DEBUG)
        {
          SanityManager.ASSERT(results!=null, "null results even though we are supposed to have a return parameter");
        }
        boolean gotRow = results.next();
        if (SanityManager.DEBUG)
        {
          SanityManager.ASSERT(gotRow, "the return resultSet didn't have any rows");
        }

        try
        {
          DataValueDescriptor returnValue = pvs.getReturnValueForSet();
          returnValue.setValueFromResultSet(results, 1, true);
        } catch (StandardException e)
        {
          throw EmbedResultSet.noStateChangeException(e);
        }
View Full Code Here

Examples of org.apache.derby.iapi.sql.ParameterValueSet

      throw Util.notImplemented();
    }
  public void addBatch() throws SQLException {

    checkStatus();
    ParameterValueSet pvs = getParms();

    int numberOfParameters = pvs.getParameterCount();

    for (int j=1; j<=numberOfParameters; j++) {

      switch (pvs.getParameterMode(j)) {
      case JDBC30Translation.PARAMETER_MODE_IN:
      case JDBC30Translation.PARAMETER_MODE_UNKNOWN:
        break;
      case JDBC30Translation.PARAMETER_MODE_OUT:
      case JDBC30Translation.PARAMETER_MODE_IN_OUT:
View Full Code Here

Examples of org.apache.derby.iapi.sql.ParameterValueSet

    dd = lcc.getDataDictionary();
    String thisSchemaName = schemaName;
    if (type == StatementType.SET_SCHEMA_DYNAMIC)
    {
      ParameterValueSet pvs = activation.getParameterValueSet();
      DataValueDescriptor dvs = pvs.getParameter(0);
      thisSchemaName = dvs.getString();
      //null parameter is not allowed
      if (thisSchemaName == null || thisSchemaName.length() > Limits.MAX_IDENTIFIER_LENGTH)
        throw StandardException.newException(SQLState.LANG_DB2_REPLACEMENT_ERROR, "CURRENT SCHEMA");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.