intersystems / isc-codetidy

MIT License
2 stars 5 forks source link

Indentation of unions in SQL class queries #37

Open isc-pbarton opened 1 year ago

isc-pbarton commented 1 year ago

The automatic indentation of SQL class queries with UNION statements is a little funky:

Query Test() As %SQLQuery [ SqlProc ]
{
    select 1
    union
    select 2
    union
    select 3
}

After compilation, turns into:

Query Test() As %SQLQuery [ SqlProc ]
{
    select 1
        union
        select 2
            union
            select 3
}