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
Reacted by Muhammed Ali CAN, Aryan Jain, Loïk Gaonac'h, Jille Timmermans, Damiano Petrungaro, michaelgrijalva-resim, Chris Duncan, Ed N, Josh Needham and steve
If anyone else runs into this issue and lands on this page, I found it usually works if you explicitly annotate the appropriate type on the sqlc argument:
-- name: CTERef :one
WITH t1_ids AS (
SELECT id FROM t1
)
SELECT*FROM t1_ids WHEREt1_ids.id=sqlc.arg('id')::integer;
-- ^^^^^^^^^
This makes sqlc happy for now, until the above fix is merged.
The SQL in the link is silly, as I have reduced the case as much as possible.
The actual query is trying to retrieve a single record with some conditions and insert a modified version of the same record using input provided by the user.
Activity
michaelgrijalva-resim commentedon Nov 19, 2024
If anyone else runs into this issue and lands on this page, I found it usually works if you explicitly annotate the appropriate type on the sqlc argument:
This makes sqlc happy for now, until the above fix is merged.
mem commentedon Dec 20, 2024
I have a similar issue, but the workaround suggested in this case does not work.
https://play.sqlc.dev/p/3df2d3f54eff7ef74e32ffca38be69ddd9a3dc7058cbe7ae9274007e05909236
The SQL in the link is silly, as I have reduced the case as much as possible.
The actual query is trying to retrieve a single record with some conditions and insert a modified version of the same record using input provided by the user.
ednmechrock commentedon Mar 24, 2025
Still getting this issue on 24/3/2025 using sqlc v1.28.0
Annotation as above (#3585 (comment)) also still working as a temp fix.
feat(database): generate Go code for workspace sessions queries
feat(database): generate Go code for workspace sessions queries