From e74106cc7b236fac4913b192af1faab688736f33 Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Tue, 4 Mar 2025 21:32:23 +0100 Subject: Added the possibility to filter a group function without giving a group --- lib/expression/query.ml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/expression/query.ml b/lib/expression/query.ml index 89c9e0a..e648daf 100644 --- a/lib/expression/query.ml +++ b/lib/expression/query.ml @@ -148,7 +148,12 @@ module Query = TypeBuilder.Make (struct unit = fun nested formatter (expressions, order, range) -> match (expressions, order) with - | [], _ -> () + | [], [] -> () + | [], _ -> + Format.fprintf formatter " OVER (ORDER BY %a%a)" + (print_expression nested) order + (Format.pp_print_option (fun f v -> Format.fprintf f "%s" v)) + range | _, [] -> Format.fprintf formatter " OVER (PARTITION BY %a%a)" (print_expression nested) expressions -- cgit v1.2.3