An execution engine operator. Query results are encapsulated using iterators that are self-contained software objects that accept a stream of rows from null or n-ary data sets. The role of an iterator is to process many iterations of a data set across many nodes in serial or parallel. Iterators do not know what the source of the data stream is, if the source is external, such as another iterator, or do know the source if source is internal, such as when the source is produced by the iterator itself. For each iteration of a data set, the iterator applies a predefined behavior to the data set being processed, manipulating the data according to the specification of that iterator. For example, scanning rows from a table on disk can be the behavior of one type of iterator. A key feature of iterators is that regardless of what type the iterator is and what behavior is associated with it, all iterators follow the same mode and have the same external interface. They all open data streams, iteratively read the streams, then process and close the streams.
a datatype that encapsulates a list
a different class which acts as a pointer to an object in your collection
a kind of pointer but indeed more than a pointer
a language mechanism that facilitates successive enumeration of all the elements of a collection in some definite order
a method, operator, or accessor that returns the members of a set of objects, one member at a time, from start to finish
a method (or methods) used to access or visit each part of an object
a method which accepts a block or a Proc object
an abstraction of a pointer to an element of an array
an entity that gives access to the contents of a container object without violating encapsulation constraints
an event handler for the events open/next/close/tuple-received
a new concept that generalizes the sequence S so that you can use objects other than regular sequence types like lists and tuples
an object associated with a collection that makes it possible to traverse the collection (that is, to visit each of the items in the collection in turn)
an object interface to a list
an object that acts like a pointer
an object that allows me both random and positional access into a collection
an object that allows us to manipulate each of the objects in the collection in some order
an object that can be used to traverse a collection
an object that enables you to traverse through a collection and to remove elements from the collection selectively, if desired
an object that genarates a collection
an object that has a current position, but that can be moved so it gets a new position
an object that knows how to visit a sequence of values
an object that lets you step through all the items in a collection of objects
an object that lets you step through a sequence of values
an object that moves through a container of other objects and selects them one at a time, without providing direct access to the implementation of that container
an object that represents a list of members and a pointer to one of the members on the list
an object that represents a position
an object which, when invoked, returns the next object from a collection of objects
an object whose job is to move through a sequence of objects and select each object in that sequence without the client programmer knowing or caring about the underlying structure of that sequence
an object whose purpose is to traverse the elements stored in a data structure
an ordered collection of objects and an interface that allows one to traverse the objects
a pointer-like object (that is, an object that supports pointer operations) that is able to "point" to a specific element in the container
An object whose methods return other objects in succession from a containing object and determine if there are additional objects in the containing object to return.
An object whose primary purpose is to locate another object (an iterator "remembers" where something is).
An object that refers to an item in a container and used commonly used in for_loops and generic code. Iterators for sequential containers have two special values: begin and end. The begin value refers to the front item. The end value is a not the back but referee to a nonexistent item after the back of the container. See NULL.
A data type used to mark a position in a collection of data (e.g. a linked list) and to move from item to item within the collection.
An object representing a stream of data. Repeated calls to the iterator's next() method return successive items in the stream. When no more data is available a StopIteration exception is raised instead. At this point, the iterator object is exhausted and any further calls to its next() method just raise StopIteration again. Iterators are required to have an __iter__() method that returns the iterator object itself so every iterator is also iterable and may be used in most places where other iterables are accepted. One notable exception is code that attempts multiple iteration passes. A container object (such as a list) produces a fresh new iterator each time you pass it to the iter() function or use it in a for loop. Attempting this with an iterator will just return the same exhausted iterator object used in the previous iteration pass, making it appear like an empty container.
In computer science, an iterator is an object which allows a programmer to traverse through all the elements of a collection, regardless of its specific implementation. An iterator is sometimes called a cursor, especially within the context of a database.