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

Args in mysql ORDER BY not respected #3113

Closed
seanlaff opened this issue Jan 5, 2024 · 0 comments · Fixed by #3115
Closed

Args in mysql ORDER BY not respected #3113

seanlaff opened this issue Jan 5, 2024 · 0 comments · Fixed by #3115
Labels
bug Something isn't working triage New issues that hasn't been reviewed

Comments

@seanlaff
Copy link
Contributor

seanlaff commented Jan 5, 2024

Version

1.25.0

What happened?

The postgres generator supports variables in the ORDER BY, but mysql does not.

SELECT * FROM authors
ORDER BY MOD(id, sqlc.arg(foo));
const listAuthors = `-- name: ListAuthors :many
SELECT id, name FROM authors
ORDER BY MOD(id, sqlc.arg(foo))

Relevant log output

No response

Database schema

No response

SQL queries

No response

Configuration

No response

Playground URL

https://play.sqlc.dev/p/a2272d7f92f2e1a2a6c122dd3e38fa8ec9625a107fc55b93a45c6db7558d85bc

What operating system are you using?

macOS

What database engines are you using?

MySQL

What type of code are you generating?

Go

@seanlaff seanlaff added bug Something isn't working triage New issues that hasn't been reviewed labels Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working triage New issues that hasn't been reviewed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant