Skip to content

Incorrect query generated when query doesn't end with semicolon #1198

Closed
@Jille

Description

@Jille

Version

1.10.0

What happened?

-- name: SetA :exec
UPDATE mytable SET a=? WHERE id=?

(note the missing ;)

generates

const setToken = `-- name: SetToken :exec
UPDATE invocations SET token=? WHERE id=
`

(note the missing ?)

Relevant log output

No response

Database schema

No response

SQL queries

No response

Configuration

No response

Playground URL

https://play.sqlc.dev/p/2e2beca3d8239f8103062d8e707e48450cc95c0119343651b44a9a4e0e8d6bb2

What operating system are you using?

Linux

What database engines are you using?

MySQL

What type of code are you generating?

Go

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions