We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
1.25.0
A bug happened!
-- name: TestQuery :many SELECT * FROM persons WHERE sqlc.arg('foo');
correctly produces
const testQuery = `-- name: TestQuery :many SELECT personid, lastname, firstname, address, city FROM persons WHERE ? `
but
-- name: TestQuery :many SELECT * FROM persons WHERE NOT sqlc.arg('foo');
incorrectly produces
const testQuery = `-- name: TestQuery :many SELECT personid, lastname, firstname, address, city FROM persons WHERE NOT sqlc.arg('foo') `
Notice that sqlc.arg('foo') is still present in the second query. Seems like sqlc is confused by NOT. Same issue with !.
sqlc.arg('foo')
NOT
!
See live example at https://play.sqlc.dev/p/7a9cbe8fd148f62a3bf7190a87a43e58aef7b2a757c10af19b7ff206b24c0092
CREATE TABLE persons ( personID int, lastName varchar(255), firstName varchar(255), address varchar(255), city varchar(255) );
-- name: TestQuery1 :many SELECT * FROM persons WHERE NOT sqlc.arg('foo'); -- name: TestQuery2 :many SELECT * FROM persons WHERE ! sqlc.arg('foo');
{ "version": "2", "sql": [{ "schema": "schema.sql", "queries": "query.sql", "engine": "mysql", "gen": { "go": { "out": "db" } } }] }
https://play.sqlc.dev/p/7a9cbe8fd148f62a3bf7190a87a43e58aef7b2a757c10af19b7ff206b24c0092
Linux
MySQL
Go
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version
1.25.0
What happened?
A bug happened!
correctly produces
but
incorrectly produces
Notice that
sqlc.arg('foo')
is still present in the second query. Seems like sqlc is confused byNOT
. Same issue with!
.See live example at https://play.sqlc.dev/p/7a9cbe8fd148f62a3bf7190a87a43e58aef7b2a757c10af19b7ff206b24c0092
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/7a9cbe8fd148f62a3bf7190a87a43e58aef7b2a757c10af19b7ff206b24c0092
What operating system are you using?
Linux
What database engines are you using?
MySQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: