You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry if this is digging up something that got settled in #71, but I wish the syntax was :param instead of @param. That way you could use psql to debug your queries against a running database:
psql --variable "param=1" -f queries.sql database
Unsure if using that syntax would help with the parsing problem here.
Activity
kyleconroy commentedon Jul 21, 2020
I'm not sure why, but the
@form works when there's a space between the=and@. Take a look here: https://play.sqlc.dev/p/a2beb1f05746a8cac18a0d161645866c83f95896311b1e1b8ad5943199d7c5ddLong term, I think I'm going to regret adding the
@form of named parameters because of issues like this.maxhawkins commentedon Jul 26, 2020
Sorry if this is digging up something that got settled in #71, but I wish the syntax was
:paraminstead of@param. That way you could use psql to debug your queries against a running database:psql --variable "param=1" -f queries.sql databaseUnsure if using that syntax would help with the parsing problem here.
kyleconroy commentedon Aug 28, 2021
@maxhawkins The
:paramsyntax doesn't work with the MySQL parser.tv42 commentedon May 29, 2024
If
@foois not even supposed to work right, https://docs.sqlc.dev/en/latest/howto/named_parameters.html needs to be updated to not recommend it as a shortcut.