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

Replace query parameters with their values #49

Closed
victor-sushko opened this issue Mar 22, 2022 · 2 comments
Closed

Replace query parameters with their values #49

victor-sushko opened this issue Mar 22, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@victor-sushko
Copy link
Contributor

Currently parameters' values are passed along with the query as a table with the only one row. In the query each parameter is replaced with the SELECT subquery (see implementation details). However, there are some placed in the query where such subqueries are not allowed (#42, #46, #48).

Another way to pass parameters is implemented in the ClickHouse command-line client. This client substitutes parameters with their values. Similar behavior could be implemented in the ClickHouseClient as well.

In order to keep a backward compatibility the current behavior should remain the default behavior of ClickHouseClient. Which means that that the new behavior must be explicitly requested by the client code.

The strategy for passing parameters to the query can be defined at three levels:

  1. Parameter. Affects only this parameter;
  2. Command. Affects all command's parameters;
  3. Connection. Affects all parameters in all commands executed with this connection.
@MaceWindu
Copy link
Contributor

Close? Already released in 2.2.10

@victor-sushko
Copy link
Contributor Author

Implemented in the version 2.2.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants