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
I'm trying to write a DELETE query which I want to join the results with another table. The way that I am familiar with is to use the USING keyword but that seems to be scoped to the WHERE clause only. When I try returning the columns from the USING table, sqlc generate complains that it cant find the column in the RETURNING block.
* fix(compiler): Pull in array information from analyzer
Fixes#1532
* test(analyzer): Add testcase for #1574
* test: Added test for #1634
* test: Add test case for #1646
* test: Add test for #1714
* Fixes#1912
* test: Add case for #1916
* test: Add two test cases
#1917#1545
* test: Add case for #1979
* test: Add case for #1990
Version
1.14.0
What happened?
I'm trying to write a DELETE query which I want to join the results with another table. The way that I am familiar with is to use the
USING
keyword but that seems to be scoped to theWHERE
clause only. When I try returning the columns from theUSING
table,sqlc generate
complains that it cant find the column in theRETURNING
block.I have an example with CI testing/output here.
Add sqlc DELETE/USING issue demonstration contains the commit for the "working path".
failure case introduces the problematic query. The CI error can be found here.
I can get around this specific issue by using CTEs but it'd be nice to get this way working also!
Relevant log output
Database schema
SQL queries
Query that works:
Failing query:
Configuration
Playground URL
https://play.sqlc.dev/p/1ca4c468637ee1d35988be307ea517680fce1fb63af2b816a5a9af4361bf4f68
What operating system are you using?
macOS
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
The text was updated successfully, but these errors were encountered: