We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1.10.0
I juste noticed a small bug on functions that take a single argument which is also returned, for example:
-- name: UpdateTable :one UPDATE my_table SET field1 = CURRENT_TIMESTAMP WHERE id = $1 RETURNING id;
(The purpose of this being to return an error if the update does not affect a row, but there might be some other use cases)
This produces the following function:
func (q *Queries) UpdateTable(ctx context.Context, id int64) (int64, error) { row := q.queryRow(ctx, q.updateTableStmt, updateTable, id) var id int64 err := row.Scan(&id) return id, err }
which fails to compile because id is declared twice.
This is a minor bug though, since we can use named parameters instead.
No response
PostgreSQL
Go
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Version
1.10.0
What happened?
I juste noticed a small bug on functions that take a single argument which is also returned, for example:
(The purpose of this being to return an error if the update does not affect a row, but there might be some other use cases)
This produces the following function:
which fails to compile because id is declared twice.
This is a minor bug though, since we can use named parameters instead.
Relevant log output
No response
Database schema
No response
SQL queries
No response
Configuration
No response
Playground URL
No response
What operating system are you using?
No response
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: