Advanced queries SQL auto identation
815
Views
4
Comments
On our RadarOn our Radar
Aggregates & Queries
It would be nice to have in the advance query editor a mechanism that allowed SQL auto indentation, such as exists in some applications of SQL management.
This feature would allow a better understanding and performance (in terms of readability) for the developer, especially in more complex queries.
Simliar to https://www.outsystems.com/ideas/996/.

Maybe the votes/ideas can be combined.
The mindset is similar but not exactly the same. I'm talking about an automatic mechanism to make the indentation.
For example, if we have something like:

select A.*, B.* from A inner B on(A.Id = B.fk_Id) where A.i > 10 and B.Id in(select F.ext_Id from F) order by A.i

We should
automatically get:

 SELECT     A.*,
                    B.*

 FROM        A INNER JOIN B
                        ON( A.Id = B.fk_Id )

 WHERE     A.i > 10
                    AND
                    B.Id IN  (
                                         SELECT   F.ext_Id
                                          FROM      F
                                  )

ORDER BY A.i



Think it would be a hard one since everybody has his 'own' vision of how it should be 'sorted'.

See also idea Integrate SQL beautifier in SQL Advanced editor that can fix the issues of preferences on styling, most beautifiers are configurable in terms of uppercase/lowercase, indentation, line breaks etc.