'Construct and generate Model objects for they query. The
objects are returned in the order emitted from the database; no
slow sort is applied.
For performance, this generator caches materialized objects to
avoid constructing them more than once. This way, iterating over
a `Results` object a second time should be much faster than the
first.'

def _get_objects(self):

    index = 0
    while ((index < len(self._objects)) or self._rows):
        if (index < len(self._objects)):
            (yield self._objects[index])
            index += 1
        else:
            while self._rows:
                row = self._rows.pop(0)
                obj = self._make_model(row)
                if ((not self.query) or self.query.match(obj)):
                    self._objects.append(obj)
                    index += 1
                    (yield obj)
                    break
