clickhouse.rs icon indicating copy to clipboard operation
clickhouse.rs copied to clipboard

Automatically set `query_id`

Open abonander opened this issue 1 month ago • 0 comments

Use case

ClickHouse supports the replace_running_query feature: https://clickhouse.com/docs/operations/settings/settings#replace_running_query

query_id can be set manually via with_option(), but we should be setting this automatically.

Describe the solution you'd like

  • Query::get_query_id()
    • If query_id is not previously set, generate and store a query ID to return it? E.g. using OnceLock?
  • Query::with_query_id()
    • Like other explicit setters, easier to discover and use than with_option().

Questions:

  • [ ] Should Insert and Inserter gain this as well?

Describe the alternatives you've considered

Additional context

1.0 wishlist: feature parity

abonander avatar Oct 20 '25 14:10 abonander