Skip to content
New issue

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

fix: specifies parameter ":one" without containing a RETURNING clause #2173

Merged
merged 1 commit into from
Apr 7, 2023

Conversation

ihatov08
Copy link
Contributor

I got an error when I followed the documentation.

db/query/user.sql:49:1: query "UpdateUser" specifies parameter ":one" without containing a RETURNING clause

db/query/user.sql

-- name: UpdateUser :one
UPDATE users
SET
  name = coalesce(sqlc.narg('name'), name),
  email = coalesce(sqlc.narg('email'), email),
  role = coalesce(sqlc.narg('role'), role),
  bio = coalesce(sqlc.narg('bio'), bio),
  hashed_password = coalesce(sqlc.narg('hashed_password'), hashed_password)
WHERE id = sqlc.arg('id');

I added RETURNING to avoid errors.

sqlc version
1.17.2

@kyleconroy kyleconroy merged commit 7e6c137 into sqlc-dev:main Apr 7, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants