-
Notifications
You must be signed in to change notification settings - Fork 987
Open
@philon123
Description
Version
1.30.0
What happened?
This query should fail, since column is_deleted doesn't exist (should bedeleted). But it compiles just fine and only errors when being called! Additional problem: The generated query.sql.go doesn't even select the users name, leading to broken SQL and empty user object:
const getUsers = `-- name: GetUsers :many select from user where is_deleted = false ` type GetUsersRow struct { }
Relevant log output
no logs, which is the problem :)
Database schema
create table "user" ("name" text not null, deleted bool not null);
SQL queries
-- name: GetUsers :many select * from user where is_deleted = false;
Configuration
version: 2 sql: - schema: schema.sql queries: query.sql engine: postgresql gen: go: package: sqlc out: ./
Playground URL
No response
What operating system are you using?
Linux
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go