Open jhomiak opened 2 years ago
Hi, jsh121988! Thanks for your issue and sorry for late reply. Sql with comments is a big problem when I developed this plugin and it still can not satisfy all users' habits of comments.
In my opinion, in this "case when" case, it is more reasonable to put comments after each "then XXX" or put comments after "END AS xxx". So I designed to start a new line when meeting "THEN"/"ELSE"/"END". It can work like this:
------ Before SELECT CASE WHEN 1 = 1 THEN 'True' -- Handles some logic ELSE 'False' -- Handles some logic2 END AS TABLE FROM TABLE
------ After select case when 1 = 1 then 'True' -- Handles some logic else 'False' -- Handles some logic end as TABLE from TABLE
But I will still try to fix this comments situation.
Comments directly after CASE cause the rest of the code to be commented out. In addition, it would be nice if the CASE WHEN THEN ELSE END statements we're able to be on their own line and indented, instead of all on the same line. It can cause huge blocks of unreadable code.
Version: 0.2.8 (2021/11/01)