Skip to content

Conversation

@mostertb
Copy link
Contributor

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

@codecov
Copy link

codecov bot commented Oct 13, 2018

Codecov Report

Merging #203 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master     #203      +/-   ##
============================================
+ Coverage     99.75%   99.75%   +<.01%     
- Complexity     1751     1771      +20     
============================================
  Files            57       57              
  Lines          4126     4164      +38     
============================================
+ Hits           4116     4154      +38     
  Misses           10       10

@devenbansod devenbansod requested review from devenbansod and nijel and removed request for devenbansod October 29, 2018 08:29
Copy link
Member

@devenbansod devenbansod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

Copy link
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM :)

@ibennetch ibennetch merged commit c8febda into phpmyadmin:master Dec 24, 2018
@ibennetch
Copy link
Member

Merged, thanks for your contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants