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()));
               
                // Context used for preparing, don't set any timeout (use 0)
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 = 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 " +
                        quoteSqlIdentifier(getCursorName()));
               
                // Context used for preparing, don't set any timeout (use 0)
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 = lcc.lookupCursorActivation(getCursorName());

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

                insertSQL.append(" (");
                // in this for loop we are constructing list of column-names
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 ");
     
            for (int i=1; i<=resultDescription.getColumnCount(); i++) { //in this for loop we are constructing columnname=?,... part of the update sql
                if (columnGotUpdated[i-1]) { //if the column got updated, do following
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.