Examples of ExecPreparedStatement


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

             boolean forGrant,
             Activation activation) throws StandardException
  {
    DataDictionary dd = lcc.getDataDictionary();
    TransactionController tc = lcc.getTransactionExecute();
    ExecPreparedStatement ps = activation.getPreparedStatement();
   
    RoutinePermsDescriptor perms = dd.getRoutinePermissions( routineUUID, authorizationId);
    if( perms == null || ! perms.getHasExecutePermission())
      perms = dd.getRoutinePermissions(routineUUID, Authorizer.PUBLIC_AUTHORIZATION_ID);
View Full Code Here

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,
                    authorizationId, forGrant, ps)) {
      TableDescriptor td = getTableDescriptor( dd);
      throw StandardException.newException( forGrant ? SQLState.AUTH_NO_TABLE_PERMISSION_FOR_GRANT
View Full Code Here

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

  {
    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

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

  {
    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

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

        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

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

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

      ExecPreparedStatement   cursorStmt = currentOfNode.getCursorStatement();

      /*
      ** If there is no update column list, we need to build
      ** out the result column list to have all columns.
      */
            if (!cursorStmt.hasUpdateColumns())
      {
        /*
        ** Get the resultColumnList representing ALL of the columns in the
        ** base table.  This is the "before" portion of the result row.
        */
 
View Full Code Here

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

    this.isInSortedOrder = isInSortedOrder;
        source = s;
        originalSource = s;
    this.maxRowSize = maxRowSize;

        ExecPreparedStatement ps = a.getPreparedStatement();

    sortTemplateRow = ((ExecRowBuilder) ps.getSavedObject(ra))
                                .build(a.getExecutionFactory());

        order = ((FormatableArrayHolder) ps.getSavedObject(orderingItem))
                .getArray(ColumnOrdering[].class);

    /* NOTE: We need to save order to another variable
     * in the constructor and reset it on every open.
     * This is important because order can get reset in the
View Full Code Here

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

        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

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

    String          uuidStr = null
    String          suuidStr = null// schema 
    String          compUuidStr = null// compilation schema 
    String          text = null;
    String          usingText = null;
    ExecPreparedStatement  preparedStatement = null;
    String          typeStr = null;
    boolean          valid = true;
    Timestamp        time = null;
    boolean          initiallyCompilable = true;
View Full Code Here

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

    String            suuidStr;  // schema
    String            typeStr;
    char            type;
    boolean            valid;
    Timestamp          time = null;
    ExecPreparedStatement    preparedStatement = null;
    boolean            initiallyCompilable;
    DataDescriptorGenerator    ddg = dd.getDataDescriptorGenerator();

    if (SanityManager.DEBUG)
    {
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.