aboutsummaryrefslogtreecommitdiff
path: root/lib/expression/query.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/expression/query.ml')
-rw-r--r--lib/expression/query.ml7
1 files changed, 6 insertions, 1 deletions
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