soql-parser-js icon indicating copy to clipboard operation
soql-parser-js copied to clipboard

Format WHERE clause improvement

Open paustint opened this issue 2 years ago • 0 comments

  • [ ] Feature
  • [x] Bug

Description

WHERE clause formatting has some cases where formatting does not work properly.

SELECT ID FROM Account WHERE OwnerId = '0013t00001nJsHJAA0' AND ( AccountNumber = 'Open' OR AccountNumber = 'Called Off Rent' ) AND ( (NOT Name LIKE 'H%') OR (NOT Name LIKE 'L%') OR (NOT Name LIKE 'W%') OR (NOT Name LIKE 'R%') )
SELECT ID
FROM Account
WHERE OwnerId = '0013t00001nJsHJAA0'
	AND (
		AccountNumber = 'Open'
		OR AccountNumber = 'Called Off Rent'
	)
	AND (
(NOT Name LIKE 'H%')
	OR (NOT Name LIKE 'L%')
	OR (NOT Name LIKE 'W%')
	OR (NOT Name LIKE 'R%')
	)

paustint avatar Feb 25 '23 13:02 paustint