René's URL Explorer Experiment


Title: Add support for Aliases on CASE expressions by mostertb · Pull Request #203 · phpmyadmin/sql-parser · GitHub

Open Graph Title: Add support for Aliases on CASE expressions by mostertb · Pull Request #203 · phpmyadmin/sql-parser

X Title: Add support for Aliases on CASE expressions by mostertb · Pull Request #203 · phpmyadmin/sql-parser

Description: Hi This PR allows CASE expressions to be aliased to fix issues #192 and #162 It specifically adds support for CASE ... END [AS] alias for both CASE formats with the AS keyword being optional. Im a little out of my depth so any help or guidance tests or functionality that I have missed would be great. I know that queries like CASE ... END expression [AS] alias such as SELECT CASE WHEN 2 IS NULL THEN 0 ELSE 2 END + 1 as 'foo' are not covered. Let me know if there is sufficient use-case for this scenario and I'll attempt it in a new PR

Open Graph Description: Hi This PR allows CASE expressions to be aliased to fix issues #192 and #162 It specifically adds support for CASE ... END [AS] alias for both CASE formats with the AS keyword being optional. Im a ...

X Description: Hi This PR allows CASE expressions to be aliased to fix issues #192 and #162 It specifically adds support for CASE ... END [AS] alias for both CASE formats with the AS keyword being optional. Im a ...

Opengraph URL: https://github.com/phpmyadmin/sql-parser/pull/203

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.4

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:757ec8d8-d8c6-9481-512c-a271455e14fe
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id965E:2B0ADD:FC566:15A6B4:6B0445FD
html-safe-noncea40abe2679d97495ed0f3337317213ecefa9d934f89c702f5baec4b33b64dc2b
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NjVFOjJCMEFERDpGQzU2NjoxNUE2QjQ6NkIwNDQ1RkQiLCJ2aXNpdG9yX2lkIjoiNzA3MzU1OTUyODg4MzcxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac3520a9c63adca22cb06794bf6e0efd88717e85d0a85752289cfad05a5b169f96
hovercard-subject-tagpull_request:222653755
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/phpmyadmin/sql-parser/pull/203/files
twitter:imagehttps://avatars.githubusercontent.com/u/2180195?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/2180195?s=400&v=4
og:image:altHi This PR allows CASE expressions to be aliased to fix issues #192 and #162 It specifically adds support for CASE ... END [AS] alias for both CASE formats with the AS keyword being optional. Im a ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned4495c3631faba668036f176d1f5946901c5172efd73a6edb984029e7d4f8e46
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/phpmyadmin/sql-parser git https://github.com/phpmyadmin/sql-parser.git
octolytics-dimension-user_id1351977
octolytics-dimension-user_loginphpmyadmin
octolytics-dimension-repository_id36256604
octolytics-dimension-repository_nwophpmyadmin/sql-parser
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id36256604
octolytics-dimension-repository_network_root_nwophpmyadmin/sql-parser
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
release9ac4337fb7c6a5846cdfdb1a04f154d3c33ebc77
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/phpmyadmin/sql-parser/pull/203/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpmyadmin%2Fsql-parser%2Fpull%2F203%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fphpmyadmin%2Fsql-parser%2Fpull%2F203%2Ffiles
Sign uphttps://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=phpmyadmin%2Fsql-parser
Reloadhttps://github.com/phpmyadmin/sql-parser/pull/203/files
Reloadhttps://github.com/phpmyadmin/sql-parser/pull/203/files
Reloadhttps://github.com/phpmyadmin/sql-parser/pull/203/files
phpmyadminhttps://github.com/phpmyadmin
sql-parserhttps://github.com/phpmyadmin/sql-parser
Codehttps://github.com/phpmyadmin/sql-parser
Issues55 (55)https://github.com/phpmyadmin/sql-parser/issues
Pull requests21 (21)https://github.com/phpmyadmin/sql-parser/pulls
Actionshttps://github.com/phpmyadmin/sql-parser/actions
Security and qualityhttps://github.com/phpmyadmin/sql-parser/security
Insightshttps://github.com/phpmyadmin/sql-parser/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fphpmyadmin%2Fsql-parser%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fphpmyadmin%2Fsql-parser%2Fissues%2Fnew%2Fchoose
ibennetchhttps://github.com/ibennetch
phpmyadmin:masterhttps://github.com/phpmyadmin/sql-parser/tree/master
mostertb:case-aliashttps://github.com/mostertb/sql-parser/tree/case-alias
Conversation 4 https://github.com/phpmyadmin/sql-parser/pull/203
Commits 7 https://github.com/phpmyadmin/sql-parser/pull/203/commits
Checks 0 https://github.com/phpmyadmin/sql-parser/pull/203/checks
Files changed https://github.com/phpmyadmin/sql-parser/pull/203/files
Please reload this pagehttps://github.com/phpmyadmin/sql-parser/pull/203/files
Add support for Aliases on CASE expressions https://github.com/phpmyadmin/sql-parser/pull/203/files#top
Show all changes 7 commits https://github.com/phpmyadmin/sql-parser/pull/203/files
1a18d1c Add Support for CASE ... END AS alias mostertb Oct 13, 2018 https://github.com/phpmyadmin/sql-parser/pull/203/commits/1a18d1c5bad164cb0d2e4584578a76273af7feaf
f2127a1 Handle CASE alias without AS mostertb Oct 13, 2018 https://github.com/phpmyadmin/sql-parser/pull/203/commits/f2127a175835f25e4936bb08698a812841a3915d
f72a44c Explicitly handle case where keyword encountered before alias value f… mostertb Oct 13, 2018 https://github.com/phpmyadmin/sql-parser/pull/203/commits/f72a44cfd6266e9448e43bf7c1dcf759ea693a72
9cc6cc7 Handle end of statement while parsing CASE alias mostertb Oct 13, 2018 https://github.com/phpmyadmin/sql-parser/pull/203/commits/9cc6cc7a51607f9df355a1713d31893aa5e4e53d
6f76011 Add tests for parsing of CASE expressions with aliases mostertb Oct 13, 2018 https://github.com/phpmyadmin/sql-parser/pull/203/commits/6f76011f86aed4f5645abef6da888c1ae0ee5bcb
61343f6 Add component build tests from CASE expressions with aliases mostertb Oct 13, 2018 https://github.com/phpmyadmin/sql-parser/pull/203/commits/61343f63d0a64a14287f2366c2907b8a05eb0a87
bf4ad3d Apply php-cs-fixer formatting changes mostertb Oct 13, 2018 https://github.com/phpmyadmin/sql-parser/pull/203/commits/bf4ad3d3b148ce0868339ee24bca9a5c46821063
Clear filters https://github.com/phpmyadmin/sql-parser/pull/203/files
Please reload this pagehttps://github.com/phpmyadmin/sql-parser/pull/203/files
Please reload this pagehttps://github.com/phpmyadmin/sql-parser/pull/203/files
CaseExpression.php https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-d9e19c46ff6b3750af4db885962d7f574868b14c8de1b4f14f6fc450e5d5acbb
CaseExpressionTest.php https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-93810796245d49f94b18a4b2ae5cb907f6be93d52ff185e0ee49e7af1f718e75
SelectStatementTest.php https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-e527aa7b9a382ae26d7cf5698ec3164e88515e4a653c41071bcfe2fbe6e2e5ee
parseSelectCaseAlias1.in https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-94d959189bd21eb25aba2ed5c806bda41611da6685440bcc141afc24a63a40b6
parseSelectCaseAlias1.out https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-fce014d7548fe0fd74e0845d2a4c2ce8f96143546c17bcad149daea4f5214fe2
parseSelectCaseAlias2.in https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-1ee63cd522bd5e69295346bbb19015111a577974d00bff2c7f985f4f52d8b1b7
parseSelectCaseAlias2.out https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-97df8325ecd997209986a4557c0861244bcca54d671ab88973c9871f62caac57
parseSelectCaseAlias3.in https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-7519895e3dee9d177c855c0c0466bd35b5aadf573ea7c27b47193c3fbd46b0b8
parseSelectCaseAlias3.out https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-5f8f1a745cd701d08331208614b8834fee297279e3d9ca5f63e115e41b5c8ab7
parseSelectCaseAlias4.in https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-aded0361cb5b11831e048fd20579f67746628addceab9965ae9cd358c26f7c48
parseSelectCaseAlias4.out https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-f0b853cf0d44f231bc32ad686f2216ac43c3d4e20ce122d26c45c049676332ae
parseSelectCaseAlias5.in https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-5d27d43072554ff28952bce5668e663a768e3b0ea883a67777fdb68f0b5740c7
parseSelectCaseAlias5.out https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-4511182a052ec4959688e8a826f7caef94ef7e2b0d0a011802b0cdbf7b53b023
parseSelectCaseAlias6.in https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-77cb5a199ba988ba12ac72c61abdb0f53334ae147520c2b8605f72f2927e1d13
parseSelectCaseAlias6.out https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-abf883ec4b7de314e1ce83f3fd6d7411466e60accf30a4a31043607bb63f785a
parseSelectCaseAliasErr1.in https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-6542ea1cedd8ab2cd6da6227fe9d0ebc9be0cd49b59b8514f800956a72e0ac2d
parseSelectCaseAliasErr1.out https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-3e7853a2aba6b1796f9c3d6df0c61718edb0e744bfcb167f34cc9757287ae18a
parseSelectCaseAliasErr2.in https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-74c9dd4ce6858a21c299ac78db82ae4c1d449ad7c0ed0609a9adc081e24ecd8d
parseSelectCaseAliasErr2.out https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-8ae9bc3056a9d17772fa1f9b4100cbd29bccbde807eda18ad80846657b77dd41
parseSelectCaseAliasErr3.in https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-401d492823db72611db9cd0b8775fbab6babc8906de32080b66407198309e422
parseSelectCaseAliasErr3.out https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-730a3288de2de6cb3da4bc3d5f06cf0882f0b7ce596103acbc13fc4dcddb129f
parseSelectCaseAliasErr4.in https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-f8ad824b0fe09f0631283106b0e8a223c6cd6d4024578e11139d369302e719db
parseSelectCaseAliasErr4.out https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-75a45c3227236d663356ab818871783b6e280c55a72e619ae7d61dd61a4bd5d1
src/Components/CaseExpression.phphttps://github.com/phpmyadmin/sql-parser/pull/203/files#diff-d9e19c46ff6b3750af4db885962d7f574868b14c8de1b4f14f6fc450e5d5acbb
View file https://github.com/mostertb/sql-parser/blob/bf4ad3d3b148ce0868339ee24bca9a5c46821063/src/Components/CaseExpression.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/203/{{ revealButtonHref }}
https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-d9e19c46ff6b3750af4db885962d7f574868b14c8de1b4f14f6fc450e5d5acbb
https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-d9e19c46ff6b3750af4db885962d7f574868b14c8de1b4f14f6fc450e5d5acbb
https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-d9e19c46ff6b3750af4db885962d7f574868b14c8de1b4f14f6fc450e5d5acbb
https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-d9e19c46ff6b3750af4db885962d7f574868b14c8de1b4f14f6fc450e5d5acbb
https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-d9e19c46ff6b3750af4db885962d7f574868b14c8de1b4f14f6fc450e5d5acbb
https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-d9e19c46ff6b3750af4db885962d7f574868b14c8de1b4f14f6fc450e5d5acbb
https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-d9e19c46ff6b3750af4db885962d7f574868b14c8de1b4f14f6fc450e5d5acbb
https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-d9e19c46ff6b3750af4db885962d7f574868b14c8de1b4f14f6fc450e5d5acbb
tests/Components/CaseExpressionTest.phphttps://github.com/phpmyadmin/sql-parser/pull/203/files#diff-93810796245d49f94b18a4b2ae5cb907f6be93d52ff185e0ee49e7af1f718e75
View file https://github.com/mostertb/sql-parser/blob/bf4ad3d3b148ce0868339ee24bca9a5c46821063/tests/Components/CaseExpressionTest.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/203/{{ revealButtonHref }}
https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-93810796245d49f94b18a4b2ae5cb907f6be93d52ff185e0ee49e7af1f718e75
tests/Parser/SelectStatementTest.phphttps://github.com/phpmyadmin/sql-parser/pull/203/files#diff-e527aa7b9a382ae26d7cf5698ec3164e88515e4a653c41071bcfe2fbe6e2e5ee
View file https://github.com/mostertb/sql-parser/blob/bf4ad3d3b148ce0868339ee24bca9a5c46821063/tests/Parser/SelectStatementTest.php
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/203/{{ revealButtonHref }}
https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-e527aa7b9a382ae26d7cf5698ec3164e88515e4a653c41071bcfe2fbe6e2e5ee
https://github.com/phpmyadmin/sql-parser/pull/203/files#diff-e527aa7b9a382ae26d7cf5698ec3164e88515e4a653c41071bcfe2fbe6e2e5ee
tests/data/parser/parseSelectCaseAlias1.inhttps://github.com/phpmyadmin/sql-parser/pull/203/files#diff-94d959189bd21eb25aba2ed5c806bda41611da6685440bcc141afc24a63a40b6
View file https://github.com/mostertb/sql-parser/blob/bf4ad3d3b148ce0868339ee24bca9a5c46821063/tests/data/parser/parseSelectCaseAlias1.in
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/203/{{ revealButtonHref }}
tests/data/parser/parseSelectCaseAlias1.outhttps://github.com/phpmyadmin/sql-parser/pull/203/files#diff-fce014d7548fe0fd74e0845d2a4c2ce8f96143546c17bcad149daea4f5214fe2
View file https://github.com/mostertb/sql-parser/blob/bf4ad3d3b148ce0868339ee24bca9a5c46821063/tests/data/parser/parseSelectCaseAlias1.out
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/203/{{ revealButtonHref }}
tests/data/parser/parseSelectCaseAlias2.inhttps://github.com/phpmyadmin/sql-parser/pull/203/files#diff-1ee63cd522bd5e69295346bbb19015111a577974d00bff2c7f985f4f52d8b1b7
View file https://github.com/mostertb/sql-parser/blob/bf4ad3d3b148ce0868339ee24bca9a5c46821063/tests/data/parser/parseSelectCaseAlias2.in
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/phpmyadmin/sql-parser/pull/203/{{ revealButtonHref }}
Please reload this pagehttps://github.com/phpmyadmin/sql-parser/pull/203/files
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

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlno-cache

Viewport: width=device-width


URLs of crawlers that visited me.