Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: positional params #473

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

Merged
psteinroe merged 6 commits into main from fix/positional-params
Aug 17, 2025
Merged

fix: positional params #473

psteinroe merged 6 commits into main from fix/positional-params
Aug 17, 2025

Conversation

Copy link
Collaborator

@psteinroe psteinroe commented Aug 12, 2025
edited
Loading

pre-processes the query string to replace named params like @name with positional params like 1ドル, because only the latter is supported by the postgres parser.

not super happy with the way it is used for the type checker but also did not want to put that function in another crate.

also removed a println! statement leftover from a previous pr of me.

also fixed a bug in the lexer that tokenized a cast as a named parameter.

fixes #405, #454

reteps reacted with heart emoji
Copy link
Collaborator

@juleswritescode juleswritescode left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just wondering about parameter reusage?

";
test_db.execute(setup_sql).await.expect("setup sql failed");

let content = r#"select * from users where id = @one and name = :two and email = :'three';"#;
Copy link
Collaborator

@juleswritescode juleswritescode Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:'three' – i want to meet the person who writes syntax like this haha

Copy link
Collaborator Author

@psteinroe psteinroe Aug 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha yeah I did for some time two years ago :D

@psteinroe psteinroe merged commit 6b0a9f8 into main Aug 17, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@juleswritescode juleswritescode Awaiting requested review from juleswritescode

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

Disable pg: Invalid statement: syntax error at or near ":" [syntax] rule

AltStyle によって変換されたページ (->オリジナル) /