Open Nikola-Milovic opened 1 year ago
I've just encountered the same error, but it got fixed when I removed table aliases
Propagating the table aliases to the sqlc.embed
calls also seems to work. Try:
-- name: FindAllUserProjects :many
SELECT sqlc.embed(p), sqlc.embed(u), sqlc.embed(utm)
FROM user_team_membership as utm
JOIN projects as p on utm.user_id = p.user_id
JOIN users as u on utm.user_id = u.id
WHERE utm.user_id = $1;
Version
1.24.0
What happened?
Trying to use embed, but I am getting some weird error about
edited query syntax
being invalid, but no pointers as to what's happening. I saw some issues related to NULL and LEFT JOINs but not sure what is happening in my queries.Relevant log output
SQL queries
Configuration
Playground URL
https://play.sqlc.dev/p/2271bc8399f2303d47ee013bf2a3f932f595682859671163af34c450b356105b
What operating system are you using?
Linux
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go