Harvey Kravis
Member
It would be really cool if the Beautifier could have preferences that would align operators in WHERE clauses. It would make the code much more readable. Here's an example:
Bigger WHERE clauses easily accentuate the problem.
I realize this could be quite a challenge, but I bet you could find a way to make it happen. You'd have to deal with operators of different sizes and figuring out how to justify the operator.
If this cannot be done then a good alternative would be to allow us to preserve our WHERE clauses and we'll type in the alignment we want. When I say 'preserve' I'm referring to the tabbing and spacing related to columns and operators, not logical operators like AND/OR, and the indentation of the WHERE clause relative the rest of the statement.
Code:
SELECT rep_id
FROM sales
WHERE country_code = 'USA'
AND state <> 'MA';
would become
SELECT rep_id
FROM sales
WHERE country_code = 'USA'
AND state <> 'MA';
I realize this could be quite a challenge, but I bet you could find a way to make it happen. You'd have to deal with operators of different sizes and figuring out how to justify the operator.
If this cannot be done then a good alternative would be to allow us to preserve our WHERE clauses and we'll type in the alignment we want. When I say 'preserve' I'm referring to the tabbing and spacing related to columns and operators, not logical operators like AND/OR, and the indentation of the WHERE clause relative the rest of the statement.