bracket

4 Posts
2 Users
0 Reactions
290 Views
 Zero
(@zero)
Member
Joined: 12 months ago
Posts: 11
Topic starter  

I have a problem with the bracket linebreak config in vscore plugin, Is anyone know that how to solve it? Thanks

As the settings of bracket  (none actived) and  white spaces (Oneinside Around Brackets):  

image
image

The original query in mysql:

SELECT  COUNT( A ) , SUM( IF( A = 1,1,0 ) ) AS 'a' -- a  FROM ...

I suprose that It should be formated like:  ( no linebreak after "SUM(" ,and no white space after "IF")

SELECT
       COUNT( A )
     , SUM( IF( A = 1,1,0 ) ) AS 'a' -- a
  FROM
       ...

But it's formated as below:  ( add a linebreak after "SUM(" ,and add a white space after "IF")

SELECT
       COUNT( A )
     , SUM(
       IF ( A = 1,1,0 ) ) AS 'a' -- a
  FROM
       ...

   
Quote
Topic Tags
Guido
(@admin)
Member Admin
Joined: 3 years ago
Posts: 216
 

Hi zero,

I see the issue. Currently the parser is always putting a linebreak for the IF.  I will check if this rule is still valid and change this with next release (will probably be publishe around XMas)

Regards

Guido


   
ReplyQuote
Guido
(@admin)
Member Admin
Joined: 3 years ago
Posts: 216
 

I changed this behavior. It will be published with next Release

Thx

Guido


   
ReplyQuote
 Zero
(@zero)
Member
Joined: 12 months ago
Posts: 11
Topic starter  

Hi Guido,

Thank you for your reply. I'm looking forward to the next release 😀 


   
ReplyQuote
Share: