Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Galileo SQL Editor: is there a code formatter (tidy) function?

I do like the SQL editor now bundled with Eclipse but I can't seem to find a way for it to format my code like eclipse will with my java.

Did I miss something, or does anybody have any alternatives?

Thanks

like image 532
Jason Tholstrup Avatar asked Feb 12 '10 19:02

Jason Tholstrup


1 Answers

This had bothered me in the past, but I shelved it until I saw your question. The DBViewer plug-in seems to do a fairly decent job of this, but I only tested it with basic SQL. For example, it will transform

select * from urbase order by foo;

into

SELECT
        *
    FROM
        urbase
    ORDER BY
        foo

This does the best job out of any that I tested, although there might be better plug-ins out there.

like image 60
Justin Garrick Avatar answered Nov 15 '22 03:11

Justin Garrick