Examples of CursorActivation


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

                 */

                boolean foundOneColumnAlready = false;
                StringBuffer insertSQL = new StringBuffer("INSERT INTO ");
                StringBuffer valuesSQL = new StringBuffer("VALUES (");
                CursorActivation activation = lcc.lookupCursorActivation(getCursorName());

                ExecCursorTableReference targetTable =
                        activation.getPreparedStatement().getTargetTable();
                // got the underlying (schema.)table name
                insertSQL.append(getFullBaseTableName(targetTable));
                ResultDescription rd = theResults.getResultDescription();

                insertSQL.append(" (");
View Full Code Here

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

                return; //nothing to do since no updates were made to this row

            //now construct the update where current of sql
            boolean foundOneColumnAlready = false;
            StringBuffer updateWhereCurrentOfSQL = new StringBuffer("UPDATE ");
            CursorActivation activation = lcc.lookupCursorActivation(getCursorName());


            ExecCursorTableReference targetTable = activation.getPreparedStatement().getTargetTable();
            updateWhereCurrentOfSQL.append(getFullBaseTableName(targetTable));//got the underlying (schema.)table name
            updateWhereCurrentOfSQL.append(" SET ");
            ResultDescription rd = theResults.getResultDescription();

            for (int i=1; i<=rd.getColumnCount(); i++) { //in this for loop we are constructing columnname=?,... part of the update sql
View Full Code Here

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

            StatementContext statementContext = null;
           
            //now construct the delete where current of sql
            try {
                StringBuffer deleteWhereCurrentOfSQL = new StringBuffer("DELETE FROM ");
                CursorActivation activation = lcc.lookupCursorActivation(getCursorName());
                deleteWhereCurrentOfSQL.append(getFullBaseTableName(activation.getPreparedStatement().getTargetTable()));//get the underlying (schema.)table name
                //using quotes around the cursor name to preserve case sensitivity
                deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF " +
                        IdUtil.normalToDelimited(getCursorName()));

                StatementContext currSC = lcc.getStatementContext();
View Full Code Here

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

    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.CursorActivation

    if (cursor == null) {

      LanguageConnectionContext lcc = getLanguageConnectionContext();

      CursorActivation cursorActivation = lcc.lookupCursorActivation(cursorName);

      if (cursorActivation != null)
      {
       
        cursor = cursorActivation.getCursorResultSet();
        target = cursorActivation.getTargetResultSet();
        /* beetle 3865: updateable cursor using index. 2 way communication between
         * update activation and cursor activation. Cursor passes index scan to
         * update and update passes heap conglom controller to cursor.
         */
        activation.setForUpdateIndexScan(cursorActivation.getForUpdateIndexScan());
        if (cursorActivation.getHeapConglomerateController() != null)
          cursorActivation.getHeapConglomerateController().close();
        cursorActivation.setHeapConglomerateController(activation.getHeapConglomerateController());       
      }
    }

    if (cursor == null || cursor.isClosed()) {
      throw StandardException.newException(SQLState.LANG_CURSOR_NOT_FOUND, cursorName)
View Full Code Here

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

    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.CursorActivation

                 */

                boolean foundOneColumnAlready = false;
                StringBuffer insertSQL = new StringBuffer("INSERT INTO ");
                StringBuffer valuesSQL = new StringBuffer("VALUES (");
                CursorActivation activation = getEmbedConnection().
                        getLanguageConnection().lookupCursorActivation(getCursorName());

                ExecCursorTableReference targetTable =
                        activation.getPreparedStatement().getTargetTable();
                // got the underlying (schema.)table name
                insertSQL.append(getFullBaseTableName(targetTable));
                ResultDescription rd = theResults.getResultDescription();

                insertSQL.append(" (");
View Full Code Here

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

                return; //nothing to do since no updates were made to this row

            //now construct the update where current of sql
            boolean foundOneColumnAlready = false;
            StringBuffer updateWhereCurrentOfSQL = new StringBuffer("UPDATE ");
            CursorActivation activation = getEmbedConnection().getLanguageConnection().lookupCursorActivation(getCursorName());


            ExecCursorTableReference targetTable = activation.getPreparedStatement().getTargetTable();
            updateWhereCurrentOfSQL.append(getFullBaseTableName(targetTable));//got the underlying (schema.)table name
            updateWhereCurrentOfSQL.append(" SET ");
            ResultDescription rd = theResults.getResultDescription();

            for (int i=1; i<=rd.getColumnCount(); i++) { //in this for loop we are constructing columnname=?,... part of the update sql
View Full Code Here

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

            StatementContext statementContext = null;
           
            //now construct the delete where current of sql
            try {
                StringBuffer deleteWhereCurrentOfSQL = new StringBuffer("DELETE FROM ");
                CursorActivation activation = getEmbedConnection().getLanguageConnection().lookupCursorActivation(getCursorName());
                deleteWhereCurrentOfSQL.append(getFullBaseTableName(activation.getPreparedStatement().getTargetTable()));//get the underlying (schema.)table name
                //using quotes around the cursor name to preserve case sensitivity
                deleteWhereCurrentOfSQL.append(" WHERE CURRENT OF " +
                        quoteSqlIdentifier(getCursorName()));

                lcc = getEmbedConnection().getLanguageConnection();
View Full Code Here

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

    if (cursor == null) {

      LanguageConnectionContext lcc = getLanguageConnectionContext();

      CursorActivation cursorActivation = lcc.lookupCursorActivation(cursorName);

      if (cursorActivation != null)
      {
       
        cursor = cursorActivation.getCursorResultSet();
        target = cursorActivation.getTargetResultSet();
        /* beetle 3865: updateable cursor using index. 2 way communication between
         * update activation and cursor activation. Cursor passes index scan to
         * update and update passes heap conglom controller to cursor.
         */
        activation.setForUpdateIndexScan(cursorActivation.getForUpdateIndexScan());
        if (cursorActivation.getHeapConglomerateController() != null)
          cursorActivation.getHeapConglomerateController().close();
        cursorActivation.setHeapConglomerateController(activation.getHeapConglomerateController());       
      }
    }

    if (cursor == null || cursor.isClosed()) {
      throw StandardException.newException(SQLState.LANG_CURSOR_CLOSED, cursorName)
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.