suggestions for AND/OR indent

7 Posts
3 Users
2 Reactions
1,169 Views
Posts: 11
 Zero
Topic starter
(@zero)
Member
Joined: 3 years ago
[#109]

Hi, I have  a suggestion for adding a "indent AND/OR in AND/OR condition" option, please and the features if you agree with it, thanks

Example:

-- origin code:

select * from tables
where 1=1 and (2=2 or (3=3 and 4=4 and 5=5))

;

-- now formatted:

SELECT
       *
  FROM TABLES
 WHERE 1 = 1
       AND(2 = 2
       OR(3  = 3
       AND 4 = 4
       AND 5 = 5 ) )

;

-- hope: add a "indent AND/OR in AND/OR condition" option

SELECT
       *
  FROM TABLES
 WHERE 1 = 1
       AND(2 = 2
           OR(3  = 3
              AND 4 = 4
              AND 5 = 5 ) )

6 Replies
Posts: 17
(@benjamin-moeller)
Member
Joined: 4 years ago

Hallo Zero
this is possible:

image

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

Hello, thanks for your reply.

Follow the setting in my vscode with plugin v2.0.60, It seems don't work

image

Reply
Guido
Posts: 295
Admin
(@admin)
Member
Joined: 5 years ago

Hello @zero, thanks for your reply.

Are you working with the free or pro Version of VSCode Plugin?

This is what I get in VSCode

grafik

Regards

Guido


Reply
1 Reply
 Zero
(@zero)
Joined: 3 years ago

Member
Posts: 11

Hi @admin , In my VSCode(1.88.0) with Plugin(v2.0.60) and  pro Version, I get this:

image

Reply
Guido
Posts: 295
Admin
(@admin)
Member
Joined: 5 years ago

Could you please send me the results of this command via mail to info@sqlinform.com

grafik

Reply
1 Reply
 Zero
(@zero)
Joined: 3 years ago

Member
Posts: 11

@admin I have send you the file, please check your mailbox, thanks


Reply
Share: