[prev] 48 [next]

Iterators

Access methods typically involve iterators, e.g.


Scan s = start_scan(Relation r, ...)

  • commence a scan of relation r
  • Scan may include condition to implement WHERE-clause
  • Scan holds data on progress through file (e.g. current page)


Tuple next_tuple(Scan s)

  • return Tuple immediately following last accessed one
  • returns NULL if no more Tuples left in the relation