Examples of CursorResultSet


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

    ** If it's a deferred insert, scan the temporary conglomerate and
    ** insert the rows into the permanent conglomerates using rowChanger.
    */
    if (constants.deferred)
    {
      CursorResultSet tempRS = rowHolder.getResultSet();
      try
      {
        tempRS.open();
        while ((row = tempRS.getNextRow()) != null)
        {
          insertIntoVTI(rs, row);
        }
      } finally
      {
        sourceResultSet.clearCurrentRow();
        tempRS.close();
      }
    }

    if (rowHolder != null)
    {
View Full Code Here

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

    ** If it's a deferred update, scan the temporary conglomerate and
    ** insert the rows into the VTI using rowChanger.
    */
    if (constants.deferred)
    {
      CursorResultSet tempRS = rowHolder.getResultSet();
      try
      {
        tempRS.open();
        while ((row = tempRS.getNextRow()) != null)
        {
                    int rowNumber = row.getColumn( rowLocationColumn).getInt();
                    rs.absolute( rowNumber);
          updateVTI(rs, row);
        }
      }
            catch (Throwable t)
            {
                throw StandardException.unexpectedUserException(t);
            }
            finally
      {
        sourceResultSet.clearCurrentRow();
        tempRS.close();
      }
    }

    if (rowHolder != null)
    {
View Full Code Here

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

            throw StandardException.unexpectedUserException(t);
        }

    if (constants.deferred)
    {
      CursorResultSet tempRS = rowHolder.getResultSet();
      try
      {
                ExecRow  deferredRowBuffer = null;

        tempRS.open();
        while ((deferredRowBuffer = tempRS.getNextRow()) != null)
        {
                    int rowNumber = deferredRowBuffer.getColumn( 1).getInt();
                    rs.absolute( rowNumber);
          rs.deleteRow();
        }
      }
            catch (Throwable t)
            {
                throw StandardException.unexpectedUserException(t);
            }
            finally
      {
        sourceResultSet.clearCurrentRow();
        tempRS.close();
      }
    }

    if (rowHolder != null)
    {
View Full Code Here

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

    ExecIndexRow  deferredIndexRow = new IndexRow();

    /* Deferred processing only necessary for unique indexes */
    if (rowHolder != null)
    {
      CursorResultSet rs = rowHolder.getResultSet();
      try
      {
        rs.open();
        while ((deferredRow = rs.getNextRow()) != null)
        {
          if (SanityManager.DEBUG)
          {
            if (!(deferredRow instanceof ExecIndexRow))
            {
              SanityManager.THROWASSERT("deferredRow isn't an instance "+
                "of ExecIndexRow as expected. "+
                "It is an "+deferredRow.getClass().getName());
            }
          }
          insertAndCheckDups((ExecIndexRow)deferredRow);
        }
      }
      finally
      {
        rs.close();

        /*
        ** If row holder was passed in, let the
        ** client of this method clean it up.
        */
 
View Full Code Here

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

    ** If it's a deferred insert, scan the temporary conglomerate and
    ** insert the rows into the permanent conglomerates using rowChanger.
    */
    if (constants.deferred)
    {
      CursorResultSet tempRS = rowHolder.getResultSet();
      try
      {
        tempRS.open();
        while ((row = tempRS.getNextRow()) != null)
        {
          insertIntoVTI(rs, row);
        }
      } finally
      {
        sourceResultSet.clearCurrentRow();
        tempRS.close();
      }
    }

    if (rowHolder != null)
    {
View Full Code Here

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

    ** If it's a deferred update, scan the temporary conglomerate and
    ** insert the rows into the VTI using rowChanger.
    */
    if (constants.deferred)
    {
      CursorResultSet tempRS = rowHolder.getResultSet();
      try
      {
        tempRS.open();
        while ((row = tempRS.getNextRow()) != null)
        {
                    int rowNumber = row.getColumn( rowLocationColumn).getInt();
                    rs.absolute( rowNumber);
          updateVTI(rs, row);
        }
      }
            catch (Throwable t)
            {
                throw StandardException.unexpectedUserException(t);
            }
            finally
      {
        sourceResultSet.clearCurrentRow();
        tempRS.close();
      }
    }

    if (rowHolder != null)
    {
View Full Code Here

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

                           lockMode,
                           TransactionController.ISOLATION_SERIALIZABLE,
                           constants.heapSCOCI,
                           heapDCOCI);
     
    CursorResultSet rs = rowHolder.getResultSet();
    try
    {
      /*
      ** We need to do a fetch doing a partial row
      ** read.  We need to shift our 1-based bit
      ** set to a zero based bit set like the store
      ** expects.
      */
      FormatableBitSet readBitSet = RowUtil.shift(baseRowReadList, 1);

      rs.open();
      while ((deferredRLRow = rs.getNextRow()) != null)
      {
        rlColumn = deferredRLRow.getColumn(rlColumnNumber);
        baseRowLocation =
          (RowLocation) (rlColumn).getObject();
 
        /* Get the base row at the given RowLocation */
        boolean row_exists =
          deferredBaseCC.fetch(
                     baseRowLocation, deferredSparseRow.getRowArray(),
                     readBitSet);

        // In case of cascade delete , things like before triggers can delete
        // the rows before the dependent result get a chance to delete
        if(cascadeDelete && !row_exists)
          continue;

        if (SanityManager.DEBUG)
        {
          if (!row_exists)
          {
                          SanityManager.THROWASSERT("could not find row "+baseRowLocation);
          }
        }
 
        rc.deleteRow(deferredBaseRow, baseRowLocation);
        source.markRowAsDeleted();
      }
    } finally
    {
        rs.close();
    }
  }
View Full Code Here

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

      ** Second scan to make sure all the foreign key
      ** constraints are ok.  We have to do this after
      ** we have completed the deletes in case of self referencing
      ** constraints.
      */
      CursorResultSet rs = rowHolder.getResultSet();
      try
      {
        rs.open();
        while ((deferredRLRow = rs.getNextRow()) != null)
        {
          fkChecker.doPKCheck(deferredRLRow, restrictCheckOnly);
        }
      } finally
      {
        rs.close();
      }
    }
  }
View Full Code Here

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

      return null;
    }

    try
    {
      CursorResultSet brs = beforeResultSet;
      /* We should really shallow clone the result set, because it could be used
       * at multiple places independently in trigger action.  This is a bug found
       * during the fix of beetle 4373.
       */
      if (brs instanceof TemporaryRowHolderResultSet)
        brs = (CursorResultSet) ((TemporaryRowHolderResultSet) brs).clone();
      else if (brs instanceof TableScanResultSet)
        brs = (CursorResultSet) ((TableScanResultSet) brs).clone();
      brs.open();
      java.sql.ResultSet rs = cc.getResultSet(brs);
      resultSetVector.addElement(rs);
      return rs;
    } catch (StandardException se)
    {
View Full Code Here

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

    {
      /* We should really shallow clone the result set, because it could be used
       * at multiple places independently in trigger action.  This is a bug found
       * during the fix of beetle 4373.
       */
      CursorResultSet ars = afterResultSet;
      if (ars instanceof TemporaryRowHolderResultSet)
        ars = (CursorResultSet) ((TemporaryRowHolderResultSet) ars).clone();
      else if (ars instanceof TableScanResultSet)
        ars = (CursorResultSet) ((TableScanResultSet) ars).clone();
      ars.open();
      java.sql.ResultSet rs = cc.getResultSet(ars);
      resultSetVector.addElement(rs);
      return rs;
    } catch (StandardException se)
    {
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.