Package org.apache.derby.iapi.sql.execute

Examples of org.apache.derby.iapi.sql.execute.ExecPreparedStatement


             boolean forGrant,
             Activation activation)
    throws StandardException
  {
    DataDictionary dd = lcc.getDataDictionary();
    ExecPreparedStatement ps = activation.getPreparedStatement();

        if (!hasPermissionOnTable(lcc, activation, forGrant, ps)) {
      TableDescriptor td = getTableDescriptor( dd);
            throw StandardException.newException(
                (forGrant ? SQLState.AUTH_NO_TABLE_PERMISSION_FOR_GRANT
View Full Code Here


                    //the call to java procedure because that activation
                    //is still being used.
                    a.reset();
                // Only invalidate statements if we performed DDL.
                if (dataDictionaryInWriteMode()) {
                    ExecPreparedStatement ps = a.getPreparedStatement();
                    if (ps != null) {
                        ps.makeInvalid(DependencyManager.ROLLBACK, this);
                    }
                }
            } else {
                //We are dealing with commit here.
                if (resultsetReturnsRows){
View Full Code Here

      if (SanityManager.DEBUG)
      {
        SanityManager.ASSERT(currentOfNode != null, "currentOfNode is null");
      }

      ExecPreparedStatement   cursorStmt = currentOfNode.getCursorStatement();
      String[] ucl = cursorStmt.getUpdateColumns();

      /*
      ** If there is no update column list, we need to build
      ** out the result column list to have all columns.
      */
 
View Full Code Here

  {
    checkExecStatus();
    synchronized (getConnectionSynchronization())
    {
      //reason for casting is getActivationClass is not available on PreparedStatement
      ExecPreparedStatement execp = (ExecPreparedStatement)preparedStatement;

      setupContextStack(); // make sure there's context

      try {
        //bug 4579 - if the statement is invalid, regenerate the metadata info
        if (preparedStatement.isValid() == false)
        {
          //need to revalidate the statement here, otherwise getResultDescription would
          //still have info from previous valid statement
          preparedStatement.rePrepare(lcc);
          rMetaData = null;
        }
        //bug 4579 - gcDuringGetMetaData will be null if this is the first time
        //getMetaData call is made.
        //Second check - if the statement was revalidated since last getMetaData call,
        //then gcDuringGetMetaData wouldn't match with current generated class name
        if (gcDuringGetMetaData == null || gcDuringGetMetaData.equals(execp.getActivationClass().getName()) == false)
        {
          rMetaData = null;
          gcDuringGetMetaData = execp.getActivationClass().getName();
        }
        if (rMetaData == null)
        {
          ResultDescription resd = preparedStatement.getResultDescription();
          if (resd != null)
View Full Code Here

        this.lockMode = getLockMode(isolationLevel);
        this.isolationLevel =
            translateLanguageIsolationLevel(isolationLevel);

        ExecPreparedStatement ps = activation.getPreparedStatement();

        // Create a candidate row.
        resultRowBuilder =
                (ExecRowBuilder) ps.getSavedObject(resultRowTemplate);
        candidate = resultRowBuilder.build(activation.getExecutionFactory());

        this.accessedCols = colRefItem != -1 ?
            (FormatableBitSet) ps.getSavedObject(colRefItem) : null;
    }
View Full Code Here

        this.activation = activation;
        this.resultSetNumber = resultSetNumber;
        this.opType = opType;
        this.all = all;

        ExecPreparedStatement eps = activation.getPreparedStatement();
        intermediateOrderByColumns = (int[]) eps.getSavedObject(intermediateOrderByColumnsSavedObject);
        intermediateOrderByDirection = (int[]) eps.getSavedObject(intermediateOrderByDirectionSavedObject);
        intermediateOrderByNullsLow = (boolean[]) eps.getSavedObject(intermediateOrderByNullsLowSavedObject);
        recordConstructorTime();
    }
View Full Code Here

  {
    checkExecStatus();
    synchronized (getConnectionSynchronization())
    {
      //reason for casting is getActivationClass is not available on PreparedStatement
      ExecPreparedStatement execp = (ExecPreparedStatement)preparedStatement;

      setupContextStack(); // make sure there's context

      try {
        //bug 4579 - gcDuringGetMetaData will be null if this is the first time
        //getMetaData call is made.
        //Second check - if the statement was revalidated since last getMetaData call,
        //then gcDuringGetMetaData wouldn't match with current generated class name

                GeneratedClass currAc = null;
                ResultDescription resd = null;

                synchronized(execp) {
                    // DERBY-3823 Some other thread may be repreparing
                    do {
                        while (!execp.upToDate()) {
                            execp.rePrepare(lcc);
                        }

                        currAc = execp.getActivationClass();
                        resd = execp.getResultDescription();
                    } while (currAc == null);
                }

                if (gcDuringGetMetaData == null ||
                        !gcDuringGetMetaData.equals(currAc.getName())) {
View Full Code Here

        this.restriction = restriction;
        this.source = source;
        this.rownumber = 0;

        ExecPreparedStatement ps = activation.getPreparedStatement();

        this.allocatedRow = ((ExecRowBuilder) ps.getSavedObject(rowAllocator))
                .build(activation.getExecutionFactory());

        if (erdNumber != -1) {
            this.referencedColumns =
                (FormatableBitSet) ps.getSavedObject(erdNumber);
        }

        recordConstructorTime();
    }
View Full Code Here

    this.isTarget = isTarget;
    this.pushedQualifiers = pushedQualifiers;
    this.scanIsolationLevel = scanIsolationLevel;
    this.isDerbyStyleTableFunction = isDerbyStyleTableFunction;

        ExecPreparedStatement ps = activation.getPreparedStatement();

        this.allocatedRow = ((ExecRowBuilder) ps.getSavedObject(row))
                .build(activation.getExecutionFactory());

        this.returnType = returnTypeNumber == -1 ? null :
            (TypeDescriptor)
            activation.getPreparedStatement().getSavedObject(returnTypeNumber);
View Full Code Here

  {
    super(a, resultSetNumber, optimizerEstimatedRowCount, optimizerEstimatedCost);
    source = s;
    originalSource = s;

        ExecPreparedStatement ps = a.getPreparedStatement();
        ExecutionFactory ef = a.getExecutionFactory();

        rowTemplate = ef.getIndexableRow(
                ((ExecRowBuilder) ps.getSavedObject(ra)).build(ef));

    aggInfoList = (AggregatorInfoList) ps.getSavedObject(aggregateItem);
    aggregates = getSortAggregators(aggInfoList, false,
        a.getLanguageConnectionContext(), s);
  }
View Full Code Here

TOP

Related Classes of org.apache.derby.iapi.sql.execute.ExecPreparedStatement

Copyright © 2018 www.massapicom. 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.