Title: MySQL: LEFT OUTER JOINed columns not considered NULLable · Issue #1247 · sqlc-dev/sqlc · GitHub
Open Graph Title: MySQL: LEFT OUTER JOINed columns not considered NULLable · Issue #1247 · sqlc-dev/sqlc
X Title: MySQL: LEFT OUTER JOINed columns not considered NULLable · Issue #1247 · sqlc-dev/sqlc
Description: Version 1.10.0 What happened? When I join another table using LEFT OUTER JOIN, the referenced colums are not treated as potential NULL. For example, int32 is used instead of sql.NullInt32 Relevant log output No response Database schema C...
Open Graph Description: Version 1.10.0 What happened? When I join another table using LEFT OUTER JOIN, the referenced colums are not treated as potential NULL. For example, int32 is used instead of sql.NullInt32 Relevant ...
X Description: Version 1.10.0 What happened? When I join another table using LEFT OUTER JOIN, the referenced colums are not treated as potential NULL. For example, int32 is used instead of sql.NullInt32 Relevant ...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/1247
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"MySQL: LEFT OUTER JOINed columns not considered NULLable","articleBody":"### Version\n\n1.10.0\n\n### What happened?\n\nWhen I join another table using `LEFT OUTER JOIN`, the referenced colums are not treated as potential `NULL`.\r\n\r\nFor example, `int32` is used instead of `sql.NullInt32`\r\n\n\n### Relevant log output\n\n_No response_\n\n### Database schema\n\n```sql\nCREATE TABLE authors\r\n(\r\n id INT(10) NOT NULL,\r\n name VARCHAR(255) NOT NULL,\r\n parent_id INT(10),\r\n PRIMARY KEY (id)\r\n);\r\n\r\nCREATE TABLE parents\r\n(\r\n id INT(10) NOT NULL,\r\n name VARCHAR(255) NOT NULL,\r\n PRIMARY KEY (id)\r\n);\n```\n\n\n### SQL queries\n\n```sql\n-- name: AllAuthors :many\r\nSELECT authors.id,\r\n authors.name,\r\n parents.id as alias_id,\r\n parents.name as alias_name\r\nFROM authors LEFT OUTER JOIN parents ON (authors.parent_id = parents.id);\n```\n\n\n### Configuration\n\n```yaml\n{\r\n \"version\": \"1\",\r\n \"packages\": [\r\n {\r\n \"path\": \"db\",\r\n \"engine\": \"mysql\",\r\n \"schema\": \"query.sql\",\r\n \"queries\": \"query.sql\"\r\n }\r\n ]\r\n}\n```\n\n\n### Playground URL\n\nhttps://play.sqlc.dev/p/ce7fec524f816ea7f485c8d9b83c60a0e36c7de065db7d23150d7271ce59bd90\n\n### What operating system are you using?\n\nmacOS\n\n### What database engines are you using?\n\nMySQL\n\n### What type of code are you generating?\n\nGo","author":{"url":"https://github.com/Funzinator","@type":"Person","name":"Funzinator"},"datePublished":"2021-10-22T12:09:34Z","url":"https://github.com/sqlc-dev/sqlc/issues/1247"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:8add0cbf-cf09-6a01-d690-41e02eb6749a |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C36C:38C5CF:27415A9:31CEB3E:6B017AAB |
| html-safe-nonce | b15bdb59af473d1da0f7e9359d726151a320b4bac809bdaeec4e9ea1fe46ad13 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMzZDOjM4QzVDRjoyNzQxNUE5OjMxQ0VCM0U6NkIwMTdBQUIiLCJ2aXNpdG9yX2lkIjoiMTg0NjY2NjE2NzYwNzk4Mjc2MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | dcfb291c42e305496a87d083348469a0c0dcbbed1ef494bb776e801937d28385 |
| hovercard-subject-tag | issue:1033512693 |
| 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/1247/issue_layout |
| twitter:image | https://opengraph.githubassets.com/e8eab80f01b43620fe03c0fe5f98d89be0488c8915bd37731e9beb98bba74edc/sqlc-dev/sqlc/issues/1247 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/e8eab80f01b43620fe03c0fe5f98d89be0488c8915bd37731e9beb98bba74edc/sqlc-dev/sqlc/issues/1247 |
| og:image:alt | Version 1.10.0 What happened? When I join another table using LEFT OUTER JOIN, the referenced colums are not treated as potential NULL. For example, int32 is used instead of sql.NullInt32 Relevant ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Funzinator |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| 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 | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width