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

Support for parameterised queries #16

Open
roborourke opened this issue Oct 3, 2022 · 1 comment
Open

Support for parameterised queries #16

roborourke opened this issue Oct 3, 2022 · 1 comment

Comments

@roborourke
Copy link

Hi, thanks for publishing this library, it looks really promising and straightforward to use.

I currently have an implementation using the HTTP interface which lets me do parameterised queries like so:

# query not URL encoded for ease of reading
http://localhost:8123/?query=select * from t where event_type = {type:String};&param_type=click

Would it be possible to introduce this feature? I know there are encoding functions but it would be good to make ClickHouse do the work, I'm just not sure how.

Possible interface:

$client->query( 'select * from t where event_type = {type:String}', [
    'type' => 'click',
] )
@lizhichao
Copy link
Owner

Good idea. I have time to see how to add this feature

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

No branches or pull requests

2 participants