'Return an item tuple from the result of a query.
The item tuple is used to sort the items in a query without having to
look them up.'

def _make_item_tuple(self, item):

    filtered_item = self.filter(item)
    lst = [filtered_item._fullname]
    for col in self.sort_cols:
        attr = getattr(item, col)
        if isinstance(attr, datetime.datetime):
            attr = epoch_seconds(attr)
        lst.append(attr)
    return tuple(lst)
