Title: Args in mysql ORDER BY not respected · Issue #3113 · sqlc-dev/sqlc · GitHub
Open Graph Title: Args in mysql ORDER BY not respected · Issue #3113 · sqlc-dev/sqlc
X Title: Args in mysql ORDER BY not respected · Issue #3113 · sqlc-dev/sqlc
Description: 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 auth...
Open Graph Description: 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: Lis...
X Description: 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: Lis...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/3113
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Args in mysql ORDER BY not respected","articleBody":"### Version\r\n\r\n1.25.0\r\n\r\n### What happened?\r\n\r\nThe postgres generator supports variables in the ORDER BY, but mysql does not.\r\n\r\n```sql\r\nSELECT * FROM authors\r\nORDER BY MOD(id, sqlc.arg(foo));\r\n```\r\n```go\r\nconst listAuthors = `-- name: ListAuthors :many\r\nSELECT id, name FROM authors\r\nORDER BY MOD(id, sqlc.arg(foo))\r\n```\r\n\r\n### Relevant log output\r\n\r\n_No response_\r\n\r\n### Database schema\r\n\r\n_No response_\r\n\r\n### SQL queries\r\n\r\n_No response_\r\n\r\n### Configuration\r\n\r\n_No response_\r\n\r\n### Playground URL\r\n\r\nhttps://play.sqlc.dev/p/a2272d7f92f2e1a2a6c122dd3e38fa8ec9625a107fc55b93a45c6db7558d85bc\r\n\r\n### What operating system are you using?\r\n\r\nmacOS\r\n\r\n### What database engines are you using?\r\n\r\nMySQL\r\n\r\n### What type of code are you generating?\r\n\r\nGo","author":{"url":"https://github.com/seanlaff","@type":"Person","name":"seanlaff"},"datePublished":"2024-01-05T20:33:25.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/3113/sqlc/issues/3113"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5774b36b-c005-8e10-ea24-a36d7a907168 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C928:33C060:3143:3AFD:6A512390 |
| html-safe-nonce | fe6846a55bfbc2dedfe761bf16d94fa53e69bc3a1c57216c2987948be0ca0ad4 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOTI4OjMzQzA2MDozMTQzOjNBRkQ6NkE1MTIzOTAiLCJ2aXNpdG9yX2lkIjoiMjY3OTUyMDYyNzYzMTY2MTk2OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c1ef6d82bdca428fc621cc7ef616ecf7f89fc2afd078b4c16fc7aa0353d6808c |
| hovercard-subject-tag | issue:2067999579 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlc-dev/sqlc/3113/issue_layout |
| twitter:image | https://opengraph.githubassets.com/15bc80a2620e8d799c3acb051e8b63a9131082193dcb2aa545e46fdb9c0b2d0a/sqlc-dev/sqlc/issues/3113 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/15bc80a2620e8d799c3acb051e8b63a9131082193dcb2aa545e46fdb9c0b2d0a/sqlc-dev/sqlc/issues/3113 |
| og:image:alt | 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: Lis... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | seanlaff |
| hostname | github.com |
| expected-hostname | github.com |
| None | 689b683944b0d7f015d0e776452c970832fa81b82dc15284469b556ecced715b |
| turbo-cache-control | no-preview |
| go-import | github.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git |
| octolytics-dimension-user_id | 136738596 |
| octolytics-dimension-user_login | sqlc-dev |
| octolytics-dimension-repository_id | 193160679 |
| octolytics-dimension-repository_nwo | sqlc-dev/sqlc |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 193160679 |
| octolytics-dimension-repository_network_root_nwo | sqlc-dev/sqlc |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 942b51ed3bd5feee3d5e2719f890a5fe286edbbb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width