Skip to content

Query builder for clickhouse

Harsimar Sandhu requested to merge 420340-clickhouse-query-builder into master

What does this MR do and why?

Query builder for clickhouse

This commit adds clickhouse query builder we can use this class to build sql queries which we can fire on clickhouse client

Changelog: added

Screenshots or screen recordings

How to set up and validate locally

  1. Run rails c
  2. Try generating different queries for example:
ClickHouse::QueryBuilder.new("audit_events").select(:id, :author_id).where(author_id: 1, target_type: "User").order(:created_at, 'desc').limit(10).offset(5).to_sql

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #420340 (closed)

Edited by Harsimar Sandhu

Merge request reports

Loading