bracket

4 Posts
2 Users
0 Reactions
876 Views
Posts: 11
 Zero
Topic starter
(@zero)
Member
Joined: 3 years ago
[#93]

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
       ...

Topic Tags
3 Replies
Guido
Posts: 295
Admin
(@admin)
Member
Joined: 5 years ago

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


Reply
1 Reply
Guido
Admin
(@admin)
Joined: 5 years ago

Member
Posts: 295

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

Thx

Guido


Reply
Posts: 11
 Zero
Topic starter
(@zero)
Member
Joined: 3 years ago

Hi Guido,

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


Reply
Share: