Skip to content

Commit b778b18

Browse files
committed
Allow ByExpr and QueryExpr to remain explicit
needed to support the work done here elixir-ecto/ecto#4417
1 parent a57c1f4 commit b778b18

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/fob/ordering.ex

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,11 @@ defmodule Fob.Ordering do
2424

2525
@spec config(%Query{}) :: [t()]
2626
def config(%Query{order_bys: orderings} = query) do
27-
Enum.flat_map(orderings, fn %{expr: exprs} ->
27+
Enum.flat_map(orderings, fn %expr_struct{expr: exprs}
28+
when expr_struct in [
29+
Query.QueryExpr,
30+
Query.ByExpr
31+
] ->
2832
config_from_ordering_expressions(exprs, query)
2933
end)
3034
end

0 commit comments

Comments
 (0)