Skip to content

parser: Return error if missing RETURNING #131

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

Merged
merged 2 commits into from
Nov 18, 2019
Merged

parser: Return error if missing RETURNING #131

merged 2 commits into from
Nov 18, 2019

Conversation

kyleconroy
Copy link
Collaborator

If a query specifies a return value (:one or :many), require that
statements have a RETURNING clause.

Fixes #121

$ sqlc generate
# package ondeck
query/city.sql:26:1: query "DeleteCity" specifies parameter ":one" without containing a RETURNING clause

If a query specifies a return value (:one or :many), require that
statements have a RETURNING clause.

Fixes #121
@kyleconroy kyleconroy merged commit 6da56ff into master Nov 18, 2019
@kyleconroy kyleconroy deleted the returning-one branch November 18, 2019 20:26
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.

Unhelpful error when specifying :one but not including a RETURNING clause
1 participant