Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of SETTINGS ClickHouse clause #1

Merged

Commits on May 14, 2024

  1. Add support of SETTINGS ClickHouse clause

     ### Summary
    
    Clickhouse SQL has an optional [`SETTINGS` clause](settings-clause) with
    `SELECT`s which can be used to configure [all kinds of options](settings).
    
    This PR adds a `settings` method to `ClickHouseQueryBuilder` to add these
    options to a `SELECT` query.
    
    All current (Clickhouse 24.4) settings keys are snake-case. Therefore I opted
    to use the settings keys directly as kwargs to the `settings` method, allowing
    passing multiple settings pairs in one call in a Pythonic/ideomatic way.
    
    [settings-clause]: https://clickhouse.com/docs/en/sql-reference/statements/select#settings-in-select-query
    [settings]: https://clickhouse.com/docs/en/operations/settings/settings
    
     ### Test Plan
    
    Added a unit test to exercise the new function.
    martijnthe committed May 14, 2024
    Configuration menu
    Copy the full SHA
    8ac4c2e View commit details
    Browse the repository at this point in the history