'Fetch the objects of type `model_cls` matching the given
query. The query may be given as a string, string sequence, a
Query object, or None (to fetch everything). `sort` is an
`Sort` object.'

def _fetch(self, model_cls, query=None, sort=None):

    query = (query or TrueQuery())
    sort = (sort or NullSort())
    (where, subvals) = query.clause()
    order_by = sort.order_clause()
    sql = 'SELECT    *    FROM    {0}    WHERE    {1}    {2}'.format(model_cls._table, (where or '1'), ('ORDER    BY    {0}'.format(order_by) if order_by else ''))
    with self.transaction() as tx:
        rows = tx.query(sql, subvals)
    return Results(model_cls, rows, self, (None if where else query), (sort if sort.is_slow() else None))
