Skip to content

Args in mysql ORDER BY not respected #3113

Closed

Description

@seanlaff

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

Activity

  1. added
    bugSomething isn't working
    triageNew issues that hasn't been reviewed
    on Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingtriageNew issues that hasn't been reviewed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions