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 Parameterized Queries #38

Closed
abraithwaite opened this issue Feb 28, 2024 · 2 comments · Fixed by #49
Closed

Support for Parameterized Queries #38

abraithwaite opened this issue Feb 28, 2024 · 2 comments · Fixed by #49
Assignees

Comments

@abraithwaite
Copy link
Contributor

We should figure out how to support parameterized queries for databases.

They have various distinct ways of being implemented that we should be able to support

We may be able to use the passthrough mechanisms plus some side-channel loading of parameters somehow, as an idea.

@zombiezen zombiezen self-assigned this Jun 3, 2024
@zombiezen
Copy link
Collaborator

@abraithwaite I think this makes the most sense to restrict to named parameters (as opposed to positional parameters), since I don't see a KQL syntax for positional parameters. Named parameters would behave like let parameters.

@zombiezen
Copy link
Collaborator

Ohh, Clickhouse's substitution is interesting: https://clickhouse.com/docs/en/sql-reference/syntax#defining-and-using-query-parameters

I suppose it makes the most sense to have that specified during compilation, not inside the expression itself.

zombiezen added a commit to zombiezen/pql that referenced this issue Jun 3, 2024
This also introduces the notion of `CompileOptions`.
I was able to create a mechanism that avoids a dialect enum
while delivering a fairly straightforward API.

Fixes runreveal#38
zombiezen added a commit that referenced this issue Jun 11, 2024
Add named parameter compile option.
This also introduces the notion of CompileOptions.
I was able to create a mechanism that avoids a dialect enum while delivering a fairly straightforward API.

Fixes #38
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

Successfully merging a pull request may close this issue.

2 participants