Skip to content

fix(mysql): allow sql.arg to be replaced when preceeded with NOT or ! - #4499

Open
theoriginalstove wants to merge 1 commit into
sqlc-dev:mainfrom
theoriginalstove:3933-fix-not-sqlarg-replacement
Open

fix(mysql): allow sql.arg to be replaced when preceeded with NOT or !#4499
theoriginalstove wants to merge 1 commit into
sqlc-dev:mainfrom
theoriginalstove:3933-fix-not-sqlarg-replacement

Conversation

@theoriginalstove

Copy link
Copy Markdown

The MySQL engine converted every unary operator to an opaque TODO node, so a negated argument like WHERE NOT sqlc.arg('foo') was never traversed by the rewrite pass and sqlc.arg() leaked into the generated SQL. This converts logical negation to a BoolExpr, which then walk and rewrite passes already handle.

Fixes #3933

@theoriginalstove theoriginalstove changed the title fix(mysql): allow sql.arg to be replace when preceeded with NOT or ! Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant