ClickHouse Querybuilder `.to_redacted_sql` enhancement
##Problem Statement
We want to log SQL queries being fired on Clickhouse but would also want to hide sensitive information from being logged.
Implementation Plan
- Build
to_redacted_sql
method inClickHouse::QueryBuilder
class which generates redacted SQL
example:
where(column: 12) # .to_redacted_sql would generate: WHERE column = $1
One idea here is to keep track of binds and then only build SQL when to_sql
is called and for to_sql_redacted
we can pass redact: true
Edited by Harsimar Sandhu