sqlc icon indicating copy to clipboard operation
sqlc copied to clipboard

OFFSET computed value causing issue

Open talksik opened this issue 1 year ago • 1 comments

Version

1.26.0

What happened?

...
LIMIT @page_size OFFSET @page_size * @page_number;

The multiplication throws the codegen off. Error: queries/commz.sql:33:3: edited query syntax is invalid: syntax error at or near "er"

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?

Postgres

What type of code are you generating?

No response

talksik avatar Jun 14 '24 23:06 talksik

Can this be reproduced in the playground: https://play.sqlc.dev/ ?

orisano avatar Jun 30 '24 05:06 orisano