From b778b18c25ce080607c4ea5dc19b16c2a59b9573 Mon Sep 17 00:00:00 2001 From: Paul Monson Date: Tue, 27 Aug 2024 11:16:37 -0500 Subject: [PATCH] Allow ByExpr and QueryExpr to remain explicit needed to support the work done here https://github.com/elixir-ecto/ecto/pull/4417 --- lib/fob/ordering.ex | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/fob/ordering.ex b/lib/fob/ordering.ex index 796cdf2..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 %{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