Title: Ability to use nullable return type · Issue #2284 · sqlc-dev/sqlc · GitHub
Open Graph Title: Ability to use nullable return type · Issue #2284 · sqlc-dev/sqlc
X Title: Ability to use nullable return type · Issue #2284 · sqlc-dev/sqlc
Description: What do you want to change? I cannot figure out how to use expressions like these: SELECT (CASE WHEN question_id IS NOT NULL THEN (answer_id IS NOT NULL) ELSE NULL END) answered ... In these example I want to get boolean only if conditio...
Open Graph Description: What do you want to change? I cannot figure out how to use expressions like these: SELECT (CASE WHEN question_id IS NOT NULL THEN (answer_id IS NOT NULL) ELSE NULL END) answered ... In these exampl...
X Description: What do you want to change? I cannot figure out how to use expressions like these: SELECT (CASE WHEN question_id IS NOT NULL THEN (answer_id IS NOT NULL) ELSE NULL END) answered ... In these exampl...
Opengraph URL: https://github.com/sqlc-dev/sqlc/issues/2284
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Ability to use nullable return type","articleBody":"### What do you want to change?\r\n\r\nI cannot figure out how to use expressions like these:\r\n\r\n```sql\r\nSELECT\r\n (CASE WHEN question_id IS NOT NULL THEN (answer_id IS NOT NULL) ELSE NULL END) answered\r\n...\r\n```\r\n\r\nIn these example I want to get boolean only if condition is true, and null if not.\r\n\r\nIf I do not cast explicit type, I will have an error `parse table name: unexpected node type: *ast.Null`.\r\nIf I cast, I can use only non nullable type.\r\n\r\nMaybe you know the way to get this nullable row column?\r\n\r\nThank you!\r\n\r\n### What database engines need to be changed?\r\n\r\nPostgreSQL\r\n\r\n### What programming language backends need to be changed?\r\n\r\nGo","author":{"url":"https://github.com/shagohead","@type":"Person","name":"shagohead"},"datePublished":"2023-05-23T16:08:19Z","url":"https://github.com/sqlc-dev/sqlc/issues/2284"}
| 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:da594b55-67b8-577c-cd0e-b27d8241c983 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B6B2:3E4205:2134904:2C63013:6B018B62 |
| html-safe-nonce | d19a36f6dc34f3245880feaee7c1979fecfaebf5774294517f280c0ea08f2004 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNkIyOjNFNDIwNToyMTM0OTA0OjJDNjMwMTM6NkIwMThCNjIiLCJ2aXNpdG9yX2lkIjoiMTM2NTQzMDg5NjE2MDc3MDkxNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 813f1d37c7824289a55fc721749f308abf987944b51eb88db6d66a8f82938a44 |
| hovercard-subject-tag | issue:1722390465 |
| 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/2284/issue_layout |
| twitter:image | https://opengraph.githubassets.com/7d84969a8f2ec833dd4e42d99dc72e988a1e5fa7fb4e188b1feca9c6cd0e1306/sqlc-dev/sqlc/issues/2284 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/7d84969a8f2ec833dd4e42d99dc72e988a1e5fa7fb4e188b1feca9c6cd0e1306/sqlc-dev/sqlc/issues/2284 |
| og:image:alt | What do you want to change? I cannot figure out how to use expressions like these: SELECT (CASE WHEN question_id IS NOT NULL THEN (answer_id IS NOT NULL) ELSE NULL END) answered ... In these exampl... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | shagohead |
| 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