def order_by(self, column, direction="asc"):
        """
        Add a "order by" clause to the query

        :param column: The order by column
        :type column: str

        :param direction: The direction of the order
        :type direction: str

        :return: The current QueryBuilder instance
        :rtype: QueryBuilder
        """
        if self.unions:
            prop = "union_orders"
        else:
            prop = "orders"

        if direction.lower() == "asc":
            direction = "asc"
        else:
            direction = "desc"

        getattr(self, prop).append({"column": column, "direction": direction})

        return self
Add a "order by" clause to the query

        :param column: The order by column
        :type column: str

        :param direction: The direction of the order
        :type direction: str

        :return: The current QueryBuilder instance
        :rtype: QueryBuilder