(query, request_params)
return query.order_by(order_by, "id")
Always order by date and ID to ensure consistent result order
    across requests.

    This is required for the cursor pagination.
Always order by date and ID to ensure consistent result order
    across requests.
Always order by date and ID to ensure consistent result order across requests .
def sort_query(query, request_params):
    """Always order by date and ID to ensure consistent result order
    across requests.

    This is required for the cursor pagination.
    """
    order_by = get_order_by_field(request_params)
    return query.order_by(order_by, "id")
def sort_query ( query , request_params ) : order_by = get_order_by_field ( request_params ) return query . order_by ( order_by , "id" )