Have you considered handling for the JOIN "USING" keyword the same as "ON"?
There are newline before and after formatting options for the ON keyword when used in a JOIN clause but not for the increasingly common USING keyword/clause. It also appears that manipulating the USING options under the SQL/"Merge" section had no effect (as I would expect). I think they should be treated the same. e.g., in the SQL/"SELECT" section
☐ ☐ ON Would become ☐ ☐ ON/USING
Consider the generated formatted code below and the Notepad++ settings which result in my JOINs clauses are formatted differently for the same logical equivalent.
Generated Formatted Code | Settings in Notepad++ |
---|---|
SELECT * FROM t1 JOIN t2 USING (id) JOIN t3 ON ( t1.id = t2.id) |
|
Hi @kick,
thanks for your feedback.
I will check if I cann add this idea to the formatter.
Which DB are you working with?
Regards
Guido
Hi Guido,
That worked as desired, Thank you.
I am using it with Yellowbrick and PostgreSQL variants. According to Wikipedia List_of_SQL_reserved_words, The USING keyword is included in the SQL-2023 standard and works in DB2, MySQL, PG, and Teradata but NOT Oracle or MSsql