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
{{ message }}
Repository navigation
Can't use name parameters for less than/greater than conditions #1439
@danthegoodman1 I think that what you are hitting here is a problem with the use of the token offset-- which is also reserved in SQL (i.e. LIMIT and OFFSET). I plugged your code into the sqlc playground and reproduced the problem, but when I changed offset to theoffset it worked. Dunno if that helps.
Possibly it would be good to update the title of the issue to "cannot use offset as an input param name" or similar. You might need to experiment to see how widespread this problem is, I don't know. I tried limit and it produced a similar issue.
Activity
danielbprice commentedon Mar 31, 2022
@danthegoodman1 I think that what you are hitting here is a problem with the use of the token
offset-- which is also reserved in SQL (i.e.LIMITandOFFSET). I plugged your code into the sqlc playground and reproduced the problem, but when I changedoffsettotheoffsetit worked. Dunno if that helps.https://play.sqlc.dev/p/6073003aaa3db6eae4250aee0de4c82ed28c7864064671fd50761341a9a900d0
Possibly it would be good to update the title of the issue to "cannot use
offsetas an input param name" or similar. You might need to experiment to see how widespread this problem is, I don't know. I triedlimitand it produced a similar issue.danthegoodman1 commentedon Apr 2, 2022
Ahh that could make sense, will have to try
bokunodev commentedon Jul 13, 2022
using the verbose sqlc.arg or narg work though.
kyleconroy commentedon Aug 28, 2022
Closing this one as there are two workarounds. I'm not sure we'll be able to get around using a reserved word with short-hand syntax.