General SQL Parser and SQL Pretty Printer Formatter options
Index
Switch parentheses, which structure interlaced logical expressions into a new line.
Example format options:
Formatted SQL:
SELECT f
FROM t
WHERE
test1 IN ( 'Group1', 'Group2', 'Group3', 'Group4' )
AND ( test2 IS NULL
OR test2 NOT IN ( 'Group3', 'Group5' )
OR ( ( test2 IN ( 'Group3', 'Group4' )
AND test3 <> 10 )
AND NOT ( test2 IN ( 'Group6', 'Group7' )
AND test3 = 20 ) ) )
AND test4 NOT IN ( 7654321, 1234567 )
Example format options:
Formatted SQL:
SELECT f
FROM t
WHERE
test1 IN ( 'Group1', 'Group2', 'Group3', 'Group4' )
AND
(
test2 IS NULL
OR test2 NOT IN ( 'Group3', 'Group5' )
OR
(
(
test2 IN ( 'Group3', 'Group4' )
AND test3 <> 10
)
AND NOT
(
test2 IN ( 'Group6', 'Group7' )
AND test3 = 20
)
)
)
AND test4 NOT IN ( 7654321, 1234567 )