def order_by(self, ordering):

        # GAE doesn't have any kind of natural ordering?
        if not isinstance(ordering, bool):
            for field, ascending in ordering:
                column = '__key__' if field.primary_key else field.column
                direction = Query.ASCENDING if ascending else Query.DESCENDING
                self.ordering.append((column, direction))