diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /lib/click_house/redactor.rb | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'lib/click_house/redactor.rb')
-rw-r--r-- | lib/click_house/redactor.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/click_house/redactor.rb b/lib/click_house/redactor.rb index 9b8e2bc90d9..6ca7c46e747 100644 --- a/lib/click_house/redactor.rb +++ b/lib/click_house/redactor.rb @@ -14,9 +14,8 @@ module ClickHouse # redacted_query = ClickHouse::Redactor.redact(query_builder) # # The redacted_query will contain the SQL query with values replaced by placeholders. # output: "SELECT * FROM \"users\" WHERE \"users\".\"name\" = $1" - def self.redact(query_builder) + def self.redact(query_builder, bind_manager = ClickHouse::Client::BindIndexManager.new) cloned_query_builder = query_builder.clone - bind_manager = ::ClickHouse::BindIndexManager.new cloned_query_builder.conditions = cloned_query_builder.conditions.map do |condition| redact_condition(condition, bind_manager) |