-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Version
1.30.0
What happened?
A bug happened!
sql:
-- name: GetUserByEmail :one
SELECT email
FROM users
WHERE email = sqlc.arg(email);
generated:
func (q *Queries) GetUserByEmail(ctx context.Context, email string) (string, error) {
row := q.db.QueryRow(ctx, getUserByEmail, email)
err := row.Scan(&email)
return email, err
}
on ErrNoRows, the function GetUserByEmail returns the input email... expected an empty string.
maybe create a separate string var like what is done with other types? after a little testing, this only happens when the names are the same xD
Relevant log output
Database schema
SQL queries
Configuration
Playground URL
No response
What operating system are you using?
Windows
What database engines are you using?
PostgreSQL
What type of code are you generating?
Go
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working