Skip to content

Commit

Permalink
Allow ByExpr and QueryExpr to remain explicit
Browse files Browse the repository at this point in the history
needed to support the work done here
elixir-ecto/ecto#4417
  • Loading branch information
pmonson711 committed Aug 27, 2024
1 parent a57c1f4 commit b778b18
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/fob/ordering.ex
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ defmodule Fob.Ordering do

@spec config(%Query{}) :: [t()]
def config(%Query{order_bys: orderings} = query) do
Enum.flat_map(orderings, fn %{expr: exprs} ->
Enum.flat_map(orderings, fn %expr_struct{expr: exprs}
when expr_struct in [
Query.QueryExpr,
Query.ByExpr
] ->
config_from_ordering_expressions(exprs, query)
end)
end
Expand Down

0 comments on commit b778b18

Please sign in to comment.