Title: Invalid go generated code when there's only one field and it's named "q" · Issue #3627 · sqlc-dev/sqlc · GitHub
Open Graph Title: Invalid go generated code when there's only one field and it's named "q" · Issue #3627 · sqlc-dev/sqlc
X Title: Invalid go generated code when there's only one field and it's named "q" · Issue #3627 · sqlc-dev/sqlc
Description: Version 1.27.0 What happened? The generated function func (q *Queries) GetAuthorWithQ(ctx context.Context, q sql.NullString) ([]Author, error) has both a q struct and q parameter, which is invalid go syntax. Relevant log output No respon...
Open Graph Description: Version 1.27.0 What happened? The generated function func (q *Queries) GetAuthorWithQ(ctx context.Context, q sql.NullString) ([]Author, error) has both a q struct and q parameter, which is invalid ...
X Description: Version 1.27.0 What happened? The generated function func (q *Queries) GetAuthorWithQ(ctx context.Context, q sql.NullString) ([]Author, error) has both a q struct and q parameter, which is invalid ...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/3627
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Invalid go generated code when there's only one field and it's named \"q\"","articleBody":"### Version\n\n1.27.0\n\n### What happened?\n\nThe generated function `func (q *Queries) GetAuthorWithQ(ctx context.Context, q sql.NullString) ([]Author, error)` has both a `q` struct and `q` parameter, which is invalid go syntax.\n\n### Relevant log output\n\n_No response_\n\n### Database schema\n\n```sql\nCREATE TABLE authors (\r\n id BIGSERIAL PRIMARY KEY,\r\n name text NOT NULL,\r\n bio text,\r\n q text\r\n);\n```\n\n\n### SQL queries\n\n```sql\n-- name: GetAuthorWithQ :many\r\nSELECT * FROM authors\r\nWHERE q = $1\r\nORDER BY name;\n```\n\n\n### Configuration\n\n_No response_\n\n### Playground URL\n\nhttps://play.sqlc.dev/p/ba6e22e495b02c910c219f86bc6b9b145bbf2af16fff7913059fdb26889b4ec3\n\n### What operating system are you using?\n\nmacOS\n\n### What database engines are you using?\n\nPostgreSQL\n\n### What type of code are you generating?\n\nGo","author":{"url":"https://github.com/lsmoura","@type":"Person","name":"lsmoura"},"datePublished":"2024-10-02T18:57:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/3627/sqlc/issues/3627"}
| 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:5b2778fc-5bd3-214c-b0a2-8fde438b7f70 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B908:3E37F3:1A407A5:22B8EC1:6A51D033 |
| html-safe-nonce | 912113b0969a20749976ab4e4a672022b0240231a488490f02bb2cd48b51c1ce |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTA4OjNFMzdGMzoxQTQwN0E1OjIyQjhFQzE6NkE1MUQwMzMiLCJ2aXNpdG9yX2lkIjoiMTgwOTUwMzA0ODIzOTc5NjI3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fed77a65f4e66a94a2f7682dc3578edb84888ef350f348aea1a8e28a8d6e70a8 |
| hovercard-subject-tag | issue:2562432345 |
| 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/3627/issue_layout |
| twitter:image | https://opengraph.githubassets.com/483d1e4d69ac2dd2076ab5193a40034f1b69e31930ef157995e8a274af70b3fa/sqlc-dev/sqlc/issues/3627 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/483d1e4d69ac2dd2076ab5193a40034f1b69e31930ef157995e8a274af70b3fa/sqlc-dev/sqlc/issues/3627 |
| og:image:alt | Version 1.27.0 What happened? The generated function func (q *Queries) GetAuthorWithQ(ctx context.Context, q sql.NullString) ([]Author, error) has both a q struct and q parameter, which is invalid ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lsmoura |
| hostname | github.com |
| expected-hostname | github.com |
| None | b9a586c06a05a7a86fc7e3f4dbd03e42f6869085879aa184aa6369456dbd50fb |
| 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 | 7aed05249554b889eb33d002851a973eebcc7e91 |
| ui-target | canary-1 |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width