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

Allow alphanumeric characters in SQLLite style parameters. #32

Merged

Conversation

BlurrechDev
Copy link
Contributor

@BlurrechDev BlurrechDev commented Dec 4, 2023

  • I've made "$" a valid identifier in get_ident_named_placeholder_token().
  • Added some tests mixing indexed and named parameters.
  • Adjusting the parameter precedence based on the initial QueryParams provided. (Named vs Indexed).
  • The first commit 766c923 was sufficient to get to where I wanted to get, the rest just addresses mixed parameter types which might not actually be a real issue anyway...

Attempts to fix #18

I don't have a Rust background so there may be better ways of doing this.

Happy to adjust as necessary or throw out the lot as it may be.

Thanks.

@shssoichiro
Copy link
Owner

shssoichiro commented Dec 5, 2023

The code looks good. Would you be able to run cargo fmt and push up the changes?

@BlurrechDev
Copy link
Contributor Author

@shssoichiro Sorted. I had to rejig the token ordering so this would play nicely with the very recent $$ change.

@shssoichiro shssoichiro merged commit ecb6ffc into shssoichiro:master Dec 5, 2023
4 checks passed
@max-sixty
Copy link

Thanks for these @BlurrechDev

@shssoichiro if you'd be up for doing a release, I'd love to integrate this into PRQL

@shssoichiro
Copy link
Owner

Published, thanks!

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 this pull request may close these issues.

Space added in $foo
5 participants