'Return an iterable of dicts containing the data for the table.
This default implementation calls _query_and_params and _format_row.
You can either implement those or, if you need more flexibility,
override this.
Limit to `max` rows.'

def rows(self, max=None):

    cursor = _cursor()
    cursor.execute(*self._query_and_params(max))
    return self.sort_and_truncate([self._format_row(r) for r in cursor.fetchall()], max)
