|
taco-db
0.1.0
|
The output operator that can used to scan through the output of this ExternalSort instance in ascending order defined by comp.
More...
Public Member Functions | |
| OutputIterator (const File *tmpfile, PageNumber final_num_pages) | |
| Construct an iterator from the tmp file containing the final sorted items. More... | |
| ~OutputIterator () override | |
| Deconstructor to clean all the states. More... | |
| bool | Next () override |
| Move the iterator to next output record. More... | |
| const char * | GetCurrentItem (FieldOffset &p_reclen) override |
| Return the item pointed by this iterator. More... | |
| bool | SupportsRewind () const override |
| Indicate if this iterator supports rewind. More... | |
| uint64_t | SavePosition () const override |
| Save the position of current iterator so that later on can be rewind to this position. More... | |
| void | Rewind (uint64_t pos) override |
| Rewind to a particular position saved before. More... | |
| void | EndScan () override |
| Ends the scan. More... | |
Public Member Functions inherited from taco::ItemIterator | |
| virtual | ~ItemIterator () |
| Destructor. More... | |
The output operator that can used to scan through the output of this ExternalSort instance in ascending order defined by comp.
| taco::ExternalSort::OutputIterator::OutputIterator | ( | const File * | tmpfile, |
| PageNumber | final_num_pages | ||
| ) |
Construct an iterator from the tmp file containing the final sorted items.
You also want to remember which is the page to stop for this tmp file.
|
override |
Deconstructor to clean all the states.
|
overridevirtual |
Ends the scan.
Implements taco::ItemIterator.
|
overridevirtual |
Return the item pointed by this iterator.
It returns the buffer location through return value and update p_reclen to be the length of this item.
Implements taco::ItemIterator.
|
overridevirtual |
Move the iterator to next output record.
Returns true if there is such a record. The current record of this iterator stores the page and sid information in its state. Even this tmp file is not managed by the buffer manager. You should manage something more like a single-page buffer manager inside the state of this iterator.
Implements taco::ItemIterator.
|
overridevirtual |
Rewind to a particular position saved before.
Specifically, if pos equals to 0, it rewinds to the state as if the iterator just been constructed.
pos must be a number returned by SavePosition() by the same iterator before. Otherwise, the behavior of this function is undefined.
Implements taco::ItemIterator.
|
inlineoverridevirtual |
Save the position of current iterator so that later on can be rewind to this position.
Implements taco::ItemIterator.
|
inlineoverridevirtual |
Indicate if this iterator supports rewind.
As the output iterator of sorting, it should be true;
Implements taco::ItemIterator.