You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We recently updated the API for Ecto Connections to accept arguments for sorting the connection by adding ordered_by and ordered_by_direction arguments. This works if you want to sort by the Connection's underlying table, but not if you want to sort by a joined table.
Thinking on this it became clear that we can simply look to see if the passed in Ecto query has an order_by clause from which we can then derive the sort field and direction. We don't need separate ordered_by and ordered_by_direction arguments. Just introspect the query.
The text was updated successfully, but these errors were encountered:
We recently updated the API for Ecto Connections to accept arguments for sorting the connection by adding
ordered_by
andordered_by_direction
arguments. This works if you want to sort by the Connection's underlying table, but not if you want to sort by a joined table.Thinking on this it became clear that we can simply look to see if the passed in Ecto query has an order_by clause from which we can then derive the sort field and direction. We don't need separate
ordered_by
andordered_by_direction
arguments. Just introspect the query.The text was updated successfully, but these errors were encountered: