Collapse CASE statements
a.higgins
Posts: 90 Bronze 2
The "Collapse CASE statements shorter than N characters" option appears to conflict with the Lists --> List items --> "Place first item on new line" option, when the first expression in a SELECT statement is a CASE expression.
When I have "Place first item on new line" set to Always and "Collapse CASE statements" unchecked, my code looks like the following:
When I check "Collapse CASE statements", it turns into this:
Notice that the query with the CASE expression first goes back and forth between respecting the First Line option and ignoring it.
Closing nitpick: technically it's a CASE expression, not a CASE statement...
When I have "Place first item on new line" set to Always and "Collapse CASE statements" unchecked, my code looks like the following:
SELECT CASE WHEN 1 = 1 THEN 1 END AS x ,1 AS y SELECT 0 AS w ,CASE WHEN 1 = 1 THEN 1 END AS x ,1 AS y
When I check "Collapse CASE statements", it turns into this:
SELECT CASE WHEN 1 = 1 THEN 1 END AS x ,1 AS y SELECT 0 AS w ,CASE WHEN 1 = 1 THEN 1 END AS x ,1 AS y
Notice that the query with the CASE expression first goes back and forth between respecting the First Line option and ignoring it.
Closing nitpick: technically it's a CASE expression, not a CASE statement...
Comments
So just to confirm and/or clarify what you actually expect would be the following:
Is that correct?
Kind regards,
Alex
Have you visited our Help Center?
Righto that makes sense. I've escalated this to the developers and will let you know what they say!
Kind regards,
Alex
Have you visited our Help Center?
Thanks for sending this in, I'm looking at it now!
And you're quite right - they are definitely expressions. I'll change the text.
Best regards,
David
I've got a fix for it, so this will be in the next beta release.
Best regards,
David