From d8257bd690133c989d1e8ef6a5b1365de9a51f9b Mon Sep 17 00:00:00 2001 From: mayank0109 Date: Fri, 13 Jun 2025 11:35:00 +0530 Subject: [PATCH 1/2] aggregate value should be true for any_value operatore --- lib/query_helper/sql_parser.rb | 2 +- lib/query_helper/version.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/query_helper/sql_parser.rb b/lib/query_helper/sql_parser.rb index 1104c87..47e4cda 100644 --- a/lib/query_helper/sql_parser.rb +++ b/lib/query_helper/sql_parser.rb @@ -188,7 +188,7 @@ def find_aliases ColumnMap.new( alias_name: sql_alias, sql_expression: sql_expression.squish, - aggregate: /\b(array_agg|avg|bit_and|bit_or|bool_and|bool_or|boolor_agg|booland_agg|count|every|json_agg|jsonb_agg|json_object_agg|jsonb_object_agg|max|min|string_agg|sum|xmlagg)\((.*)\)/.match?(sql_expression) + aggregate: /\b(array_agg|avg|bit_and|bit_or|bool_and|bool_or|boolor_agg|booland_agg|count|every|json_agg|jsonb_agg|json_object_agg|jsonb_object_agg|max|min|string_agg|sum|xmlagg|any_value|ANY_VALUE)\((.*)\)/.match?(sql_expression) ) if sql_alias end column_maps.compact diff --git a/lib/query_helper/version.rb b/lib/query_helper/version.rb index c3119b9..88a3fde 100644 --- a/lib/query_helper/version.rb +++ b/lib/query_helper/version.rb @@ -1,3 +1,3 @@ class QueryHelper - VERSION = "0.4.3" + VERSION = "0.4.4" end From a069184c1d7f81f8033591c3682f0815a8bb9578 Mon Sep 17 00:00:00 2001 From: mayank0109 Date: Fri, 13 Jun 2025 11:41:51 +0530 Subject: [PATCH 2/2] Update gemfile.lock --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index d261ef0..f972f31 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - query_helper (0.4.2) + query_helper (0.4.4) activerecord (> 5) activesupport (> 5) sqlite3