jdorn / sql-formatter

A lightweight php class for formatting sql statements. Handles automatic indentation and syntax highlighting.
http://jdorn.github.com/sql-formatter/
MIT License
3.89k stars 187 forks source link

Add SQL2003 window function syntax #82

Open chanmix51 opened 8 years ago

chanmix51 commented 8 years ago

Window functions keywords like WINDOW, OVER, PARTITION were not recognized and the SQL formatting was bad when these functions were used.

stof commented 8 years ago

The fact that you reformat the arrays of keywords/functions make it quite hard to see what is new in them

chanmix51 commented 8 years ago

@stof true, I have made a diff of before and after:

I have tested it in my own project's web debug toolbar and it works well.