ClickHouse / ClickHouse/clickhouse-rs
Interpret `?` as a parameter only if `.bind` was called at least once
- Dominant language
- Rust
- Stars
- 559
- Forks
- 172
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 3
Description
Related to https://github.com/ClickHouse/clickhouse-rs/pull/154
Considering this query:
```rs
client
.query("SELECT 1 FROM test WHERE a IN 'a?b'")
.fetch_one::()
.execute()
.await?;
```
Currently, an unescaped `?` is still considered a missing parameter; after the fix, the query should be written as:
```rs
client
.query("SELECT 1 FROM test WHERE a IN 'a??b'")
.fetch_one::()
.execute()
.await?;
```
This might be problematic if a query is pre-generated elsewhere (file, etc) and contains question marks, but we did not want to do any client-side binding.
Contributor guide
Research direction
Start by reading the issue examples and the linked pull request 154; the payload does not name an implementation file or test. Trace how query strings and bind calls handle `?`, then verify that unbound queries permit literal question marks while bound queries still require escaping.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100