Wrapping ON/AND join clauses

The desired result is:

 

SELECT col1
, col2
FROM table t
JOIN othertable t2 ON t.id = t2.id
AND t.date < t2.date
;

 

however when autoformatting it changes to:

 

SELECT col1
, col2
FROM table t
JOIN othertable t2 ON t.id = t2.id AND t.date < t2.date

Putting an excessive number of ANDs here will eventually wrap it at the hard limit, but it will never split them into their own lines.

 

The specific alignment doesn't really matter at this point -- I just want each AND (or OR, really) in the ON clause to have a newline, and cannot find the option to do so in DataGrip 2020.3.2

Please sign in to leave a comment.