-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement CASE WHEN format #101
Conversation
a3c1749
to
43c8828
Compare
We don't maintain 1.3 anymore. Please target 1.4.x. |
tests/format.txt
Outdated
END | ||
ELSE | ||
40 | ||
END; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add tests with…
- … a
FROM
clause? - … a column without a
CASE
statement after the one with theCASE
statement? - … a column alias with
AS
for one of the columns built with aCASE
statement?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* … a `FROM` clause?
do you mean select case ... end from ...?
* … a column without a `CASE` statement after the one with the `CASE` statement?
what exactly do you mean?
* … a column alias with `AS` for one of the columns built with a `CASE` statement?
do you mean select case ... end AS xxx?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@derrabus I will do it, but let me please know what you want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You understood me correctly already. 🙂
… a column without a
CASE
statement after the one with theCASE
statement?
something like this:
SELECT some_column, CASE … END, some_other_column FROM some_table;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done and retargeted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a rebase as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rebased
728aae1
to
43c8828
Compare
3f3bdc9
to
8e102fa
Compare
6e642b2
to
ae2bf3e
Compare
ae2bf3e
to
4e8bb59
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be squash-merged
🤔 why are you targeting 1.4.x? This is not a bugfix, is it? |
There is no 1.5.x, if you will create it, feel free to retarget :) |
Thanks @mvorisek ! |
closes #36
Supporting CASE WHEN SQL is important to format queries like https://github.com/atk4/data/blob/a9c6063420/tests/Persistence/Sql/QueryTest.php#L867 to be readable.
Please merge into 1.3.x as we need PHP 7.4 support.