Examples of ExecPreparedStatement


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

  {
    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

    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

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

    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

  {
    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

     * @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

             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

         String privilegeType )
        throws StandardException
  {
    DataDictionary dd = lcc.getDataDictionary();
    TransactionController tc = lcc.getTransactionExecute();
    ExecPreparedStatement ps = activation.getPreparedStatement();
   
    PermissionsDescriptor perm = getPermissionDescriptor( authorizationId, dd );
    if( !isCorrectPermission( perm ) ) { perm = getPermissionDescriptor(Authorizer.PUBLIC_AUTHORIZATION_ID, dd ); }

        // if the user has the correct permission, we're done
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.