Skip to content

Unhelpful error when specifying :one but not including a RETURNING clause #121

Closed
@inconshreveable

Description

@inconshreveable
-- name: DeleteFoo :one
DELETE FROM foo
WHERE id = $1 and type = $2;

Observed:

sqlc generate
# package query
error generating code: template: table:33:77: executing "table" at <.Ret.Type>: error calling Type: no type for GoQueryValue:

Expected:
"Query 'DeleteFoo' specifies parameter ":one" without containing a RETURNING clause"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions