René's URL Explorer Experiment


Title: fix(mysql): Handle simplified CASE statements by kyleconroy · Pull Request #2852 · sqlc-dev/sqlc · GitHub

Open Graph Title: fix(mysql): Handle simplified CASE statements by kyleconroy · Pull Request #2852 · sqlc-dev/sqlc

X Title: fix(mysql): Handle simplified CASE statements by kyleconroy · Pull Request #2852 · sqlc-dev/sqlc

Description: MySQL and PostgreSQL now have the same behavior, generating a nullable string parameter. That behavior isn't right, as we'd expect the parameter to be a boolean. This can be fixed by using a type case or the new annotations in #2800. Fixes #2847

Open Graph Description: MySQL and PostgreSQL now have the same behavior, generating a nullable string parameter. That behavior isn't right, as we'd expect the parameter to be a boolean. This can be fixed by using ...

X Description: MySQL and PostgreSQL now have the same behavior, generating a nullable string parameter. That behavior isn't right, as we'd expect the parameter to be a boolean. This can be fixed b...

Opengraph URL: https://github.com/sqlc-dev/sqlc/pull/2852

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:ea50965f-67e7-4281-b9c9-a7adb55819d8
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCF70:1558E8:4FCF78:6E23FD:6A511DED
html-safe-nonce7ea39a40fcc4634c8dc0dff1cac4ef259db0c77c7935eef8febc898fa1c2b690
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRjcwOjE1NThFODo0RkNGNzg6NkUyM0ZEOjZBNTExREVEIiwidmlzaXRvcl9pZCI6IjgwNTM0MTg4NDk4MDkyNzYzOTciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacd7ea1a271bf6a50300b637057516ecd72bb44b3cbfcd84fd9eee564355a2c42d
hovercard-subject-tagpull_request:1556278909
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/sqlc-dev/sqlc/pull/2852/files
twitter:imagehttps://avatars.githubusercontent.com/u/34893?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/34893?s=400&v=4
og:image:altMySQL and PostgreSQL now have the same behavior, generating a nullable string parameter. That behavior isn't right, as we'd expect the parameter to be a boolean. This can be fixed by using ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonef0f0f3a40c5b69803a8255a8e44323880bf9c4db54d5c076f2130bedf2a1dde5
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/sqlc-dev/sqlc git https://github.com/sqlc-dev/sqlc.git
octolytics-dimension-user_id136738596
octolytics-dimension-user_loginsqlc-dev
octolytics-dimension-repository_id193160679
octolytics-dimension-repository_nwosqlc-dev/sqlc
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id193160679
octolytics-dimension-repository_network_root_nwosqlc-dev/sqlc
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release44909533816f7f99ff04e7a0fe692733af67ed84
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/sqlc-dev/sqlc/pull/2852/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlc-dev%2Fsqlc%2Fpull%2F2852%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlc-dev%2Fsqlc%2Fpull%2F2852%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=sqlc-dev%2Fsqlc
Reloadhttps://github.com/sqlc-dev/sqlc/pull/2852/files
Reloadhttps://github.com/sqlc-dev/sqlc/pull/2852/files
Reloadhttps://github.com/sqlc-dev/sqlc/pull/2852/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/2852/files
sqlc-dev https://github.com/sqlc-dev
sqlchttps://github.com/sqlc-dev/sqlc
Notifications https://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc
Fork 1.1k https://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc
Star 18k https://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc
Code https://github.com/sqlc-dev/sqlc
Issues 597 https://github.com/sqlc-dev/sqlc/issues
Pull requests 106 https://github.com/sqlc-dev/sqlc/pulls
Discussions https://github.com/sqlc-dev/sqlc/discussions
Actions https://github.com/sqlc-dev/sqlc/actions
Projects https://github.com/sqlc-dev/sqlc/projects
Security and quality 0 https://github.com/sqlc-dev/sqlc/security
Insights https://github.com/sqlc-dev/sqlc/pulse
Code https://github.com/sqlc-dev/sqlc
Issues https://github.com/sqlc-dev/sqlc/issues
Pull requests https://github.com/sqlc-dev/sqlc/pulls
Discussions https://github.com/sqlc-dev/sqlc/discussions
Actions https://github.com/sqlc-dev/sqlc/actions
Projects https://github.com/sqlc-dev/sqlc/projects
Security and quality https://github.com/sqlc-dev/sqlc/security
Insights https://github.com/sqlc-dev/sqlc/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsqlc-dev%2Fsqlc%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsqlc-dev%2Fsqlc%2Fissues%2Fnew%2Fchoose
kyleconroyhttps://github.com/kyleconroy
mainhttps://github.com/sqlc-dev/sqlc/tree/main
kyle/mysql-case-valuehttps://github.com/sqlc-dev/sqlc/tree/kyle/mysql-case-value
Conversation 1 https://github.com/sqlc-dev/sqlc/pull/2852
Commits 1 https://github.com/sqlc-dev/sqlc/pull/2852/commits
Checks 0 https://github.com/sqlc-dev/sqlc/pull/2852/checks
Files changed https://github.com/sqlc-dev/sqlc/pull/2852/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/2852/files
fix(mysql): Handle simplified CASE statements https://github.com/sqlc-dev/sqlc/pull/2852/files#top
Show all changes 1 commit https://github.com/sqlc-dev/sqlc/pull/2852/files
e9d1606 fix(mysql): Handle simplified CASE statements kyleconroy Oct 13, 2023 https://github.com/sqlc-dev/sqlc/pull/2852/commits/e9d160684d44b617a75cf04521c374e701ce1433
Clear filters https://github.com/sqlc-dev/sqlc/pull/2852/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/2852/files
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/2852/files
issue.md https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-32a43fca33c40d67a625cf86c29d46756152840202eca7c3cb048d310717701a
db.go https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-5e54c3c4e4340831b846c4f6a9433609619ec5d27028dc17154be56c79a62e34
models.go https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-15f8d6b3610288981ee9180125a2893093ab6ba45f7f6e4daa6c004e2f36e6c1
query.sql.go https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-5901d06aa33cdd557a794f5e7c7f8f1b37360fe871ef285c11e803d3b9561779
query.sql https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-ed1296216be95248a23c93f2e93de6751b8baf014f7385227fc9769d38e06ef4
schema.sql https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-e5c25b5298422e71d17bde4d7673977d0d5d3289a17360ff30983ccf9f8b2510
sqlc.yaml https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-56894432ec49880a7be9fe3fe8dd273ede9baeddadd57e7c57676c2680b5d1d9
db.go https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-1854bd2ac21c8d9c7c0b9dc2b8b2c721a219cc60e586ee37f7ba6bbec2ec9f7f
models.go https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-d7076f473b11dd57461b5d0c788df49a7c5738946837f8f4f69b1f14d3b6b948
query.sql.go https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-d7c2906e3d4a62ac7a94678f2c1d39dc960750890ce471be4b258bf21340f071
query.sql https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-8b5836da51284e9ebe998c02f9fd1f1af2907613f109edd6fa666becb8c20242
schema.sql https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-9823e2be9caabf26657b0ff6a1bef6165117881cc19357d3d03bfb3edb6d1b51
sqlc.yaml https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-bbe5c473456a6bf81e2047e0bf898c7978f841182be735f221f2cd6cac994eef
convert.go https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-a2db7e3b791a1dac2d50af7e6b5bd39ed99a4f68bd3d7a3a1dff805ffe7ba81f
internal/endtoend/testdata/case_value_param/issue.mdhttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-32a43fca33c40d67a625cf86c29d46756152840202eca7c3cb048d310717701a
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/issue.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/2852/{{ revealButtonHref }}
internal/endtoend/testdata/case_value_param/mysql/go/db.gohttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-5e54c3c4e4340831b846c4f6a9433609619ec5d27028dc17154be56c79a62e34
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/mysql/go/db.go
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/2852/files
internal/endtoend/testdata/case_value_param/mysql/go/models.gohttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-15f8d6b3610288981ee9180125a2893093ab6ba45f7f6e4daa6c004e2f36e6c1
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/mysql/go/models.go
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/2852/files
internal/endtoend/testdata/case_value_param/mysql/go/query.sql.gohttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-5901d06aa33cdd557a794f5e7c7f8f1b37360fe871ef285c11e803d3b9561779
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/mysql/go/query.sql.go
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/2852/files
internal/endtoend/testdata/case_value_param/mysql/query.sqlhttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-ed1296216be95248a23c93f2e93de6751b8baf014f7385227fc9769d38e06ef4
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/mysql/query.sql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/2852/{{ revealButtonHref }}
internal/endtoend/testdata/case_value_param/mysql/schema.sqlhttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-e5c25b5298422e71d17bde4d7673977d0d5d3289a17360ff30983ccf9f8b2510
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/mysql/schema.sql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/2852/{{ revealButtonHref }}
internal/endtoend/testdata/case_value_param/mysql/sqlc.yamlhttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-56894432ec49880a7be9fe3fe8dd273ede9baeddadd57e7c57676c2680b5d1d9
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/mysql/sqlc.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/2852/{{ revealButtonHref }}
internal/endtoend/testdata/case_value_param/postgresql/go/db.gohttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-1854bd2ac21c8d9c7c0b9dc2b8b2c721a219cc60e586ee37f7ba6bbec2ec9f7f
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/postgresql/go/db.go
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/2852/files
internal/endtoend/testdata/case_value_param/postgresql/go/models.gohttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-d7076f473b11dd57461b5d0c788df49a7c5738946837f8f4f69b1f14d3b6b948
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/postgresql/go/models.go
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/2852/files
internal/endtoend/testdata/case_value_param/postgresql/go/query.sql.gohttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-d7c2906e3d4a62ac7a94678f2c1d39dc960750890ce471be4b258bf21340f071
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/postgresql/go/query.sql.go
Open in desktop https://desktop.github.com
how customized files appear on GitHubhttps://docs.github.com/github/administering-a-repository/customizing-how-changed-files-appear-on-github
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/2852/files
internal/endtoend/testdata/case_value_param/postgresql/query.sqlhttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-8b5836da51284e9ebe998c02f9fd1f1af2907613f109edd6fa666becb8c20242
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/postgresql/query.sql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/2852/{{ revealButtonHref }}
internal/endtoend/testdata/case_value_param/postgresql/schema.sqlhttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-9823e2be9caabf26657b0ff6a1bef6165117881cc19357d3d03bfb3edb6d1b51
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/postgresql/schema.sql
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/2852/{{ revealButtonHref }}
internal/endtoend/testdata/case_value_param/postgresql/sqlc.yamlhttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-bbe5c473456a6bf81e2047e0bf898c7978f841182be735f221f2cd6cac994eef
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/endtoend/testdata/case_value_param/postgresql/sqlc.yaml
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/2852/{{ revealButtonHref }}
internal/engine/dolphin/convert.gohttps://github.com/sqlc-dev/sqlc/pull/2852/files#diff-a2db7e3b791a1dac2d50af7e6b5bd39ed99a4f68bd3d7a3a1dff805ffe7ba81f
View file https://github.com/sqlc-dev/sqlc/blob/e9d160684d44b617a75cf04521c374e701ce1433/internal/engine/dolphin/convert.go
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/sqlc-dev/sqlc/pull/2852/{{ revealButtonHref }}
https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-a2db7e3b791a1dac2d50af7e6b5bd39ed99a4f68bd3d7a3a1dff805ffe7ba81f
andrewmbentonhttps://github.com/andrewmbenton
Oct 13, 2023https://github.com/sqlc-dev/sqlc/pull/2852/files#r1358631621
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/sqlc-dev/sqlc/pull/2852/files
https://github.com/sqlc-dev/sqlc/pull/2852/files#diff-a2db7e3b791a1dac2d50af7e6b5bd39ed99a4f68bd3d7a3a1dff805ffe7ba81f
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.