'A selection of rows from the given table, filtered by any() and all() constraints.'

def __init__(self, table, fields=ALL, filters=[], relations=[], sort=None, order=ASCENDING, group=None, function=FIRST, range=None):

    if isinstance(filters, Filter):
        filters = [filters]
    if isinstance(relations, Relation):
        relations = [relations]
    Query.id += 1
    filters = FilterChain(*filters, **dict(operator=getattr(filters, 'operator', AND)))
    self._id = Query.id
    self._table = table
    self.fields = fields
    self.aliases = {}
    self.filters = filters
    self.relations = relations
    self.sort = sort
    self.order = order
    self.group = group
    self.function = function
    self.range = range
