Examples of ExecPreparedStatement


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

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

      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

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

      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

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

          //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

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

     * @throws StandardException
     */
  protected void checkPositionedStatement(String cursorName, String psName)
    throws StandardException {

    ExecPreparedStatement ps = getPreparedStatement();
    if (ps == null)
      return;
     
    LanguageConnectionContext lcc = getLanguageConnectionContext();

    CursorActivation cursorActivation = lcc.lookupCursorActivation(cursorName);

    if (cursorActivation != null)
    {
      // check we are compiled against the correct cursor
      if (!psName.equals(cursorActivation.getPreparedStatement().getObjectName())) {

        // our prepared statement is now invalid since there
        // exists another cursor with the same name but a different
        // statement.
        ps.makeInvalid(DependencyManager.CHANGED_CURSOR, lcc);
      }
    }
  }
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

      a.reset();

      // Only invalidate statements if we performed DDL.
      if (andClose && dataDictionaryInWriteMode()) {
        ExecPreparedStatement ps = a.getPreparedStatement();
        if (ps != null) {
          ps.makeInvalid(DependencyManager.ROLLBACK, this);
        }
      }
    }
  }
View Full Code Here

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

      a.reset();

      // Only invalidate statements if we performed DDL.
      if (andClose && dataDictionaryInWriteMode()) {
        ExecPreparedStatement ps = a.getPreparedStatement();
        if (ps != null) {
          ps.makeInvalid(DependencyManager.ROLLBACK, this);
        }
      }
    }
  }
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.