diff --git a/lib/fob/ordering.ex b/lib/fob/ordering.ex index efdf8fe..b9f6df9 100644 --- a/lib/fob/ordering.ex +++ b/lib/fob/ordering.ex @@ -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 %Query.QueryExpr{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