|< < 6 > >|

Iterators

SelectScan

typedef int (*RowPredicate)(Row*); class SelectScan: public Iterator { ... };
SelectScan::SelectScan(Iterator* input, RowPredicate predicate) { this->input = input; this->predicate = predicate; } void SelectScan::open() { input->open(); }
Row* SelectScan::next() { Row* next; while (next = input->next() && !predicate(next)); return next; } void SelectScan::close() { input->close(); }

|< < 6 > >|