Class SortScan

    • Field Detail

      • sort

        protected MergeSort sort
        The sort that this class is scanning.
      • current

        protected DataValueDescriptor[] current
        The row at the current position of the scan, from which fetch will return values.
      • hold

        protected boolean hold
        The row at the current position of the scan, from which fetch will return values.
    • Method Detail

      • fetchNext

        public final boolean fetchNext​(DataValueDescriptor[] row)
                                throws StandardException
        Fetch the row at the next position of the Scan. If there is a valid next position in the scan then the value in the template storable row is replaced with the value of the row at the current scan position. The columns of the template row must be of the same type as the actual columns in the underlying conglomerate. The resulting contents of templateRow after a fetchNext() which returns false is undefined. The result of calling fetchNext(row) is exactly logically equivalent to making a next() call followed by a fetch(row) call. This interface allows implementations to optimize the 2 calls if possible. RESOLVE (mikem - 2/24/98) - come back to this and see if coding this differently saves in sort scans, as did the heap recoding.
        Parameters:
        row - The template row into which the value of the next position in the scan is to be stored.
        Returns:
        True if there is a next position in the scan, false if there isn't.
        Throws:
        StandardException - Standard exception policy.
        See Also:
        ScanController.fetch(org.apache.derby.iapi.types.DataValueDescriptor[]), RowUtil
      • close

        public void close()
        Close the scan. @see ScanController#close