'Create a result set that will construct objects of type
`model_class`.
`model_class` is a subclass of `LibModel` that will be
constructed. `rows` is a query result: a list of mappings. The
new objects will be associated with the database `db`.
If `query` is provided, it is used as a predicate to filter the
results for a "slow query" that cannot be evaluated by the
database directly. If `sort` is provided, it is used to sort the
full list of results before returning. This means it is a "slow
sort" and all objects must be built before returning the first
one.'

def __init__(self, model_class, rows, db, query=None, sort=None):

    self.model_class = model_class
    self.rows = rows
    self.db = db
    self.query = query
    self.sort = sort
    self._rows = rows
    self._row_count = len(rows)
    self._objects = []
