

def results_iter(self):
    '\n        Returns an iterator over the results from executing this query.\n        '
    resolve_columns = hasattr(self, 'resolve_columns')
    if resolve_columns:
        from django.db.models.fields import DateField
        fields = [DateField()]
    else:
        from django.db.backends.util import typecast_date
        needs_string_cast = self.connection.features.needs_datetime_string_cast
    offset = len(self.query.extra_select)
    for rows in self.execute_sql(MULTI):
        for row in rows:
            date = row[offset]
            if resolve_columns:
                date = self.resolve_columns(row, fields)[offset]
            elif needs_string_cast:
                date = typecast_date(str(date))
            if isinstance(date, datetime.datetime):
                date = date.date()
            (yield date)

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/Django-1.6.10/django/db/models/sql/compiler.py SQLDateCompiler.results_iter/original