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 186 forks source link

Oracle outerjoin (+) syntax disappears after formatting #64

Open xerohour opened 10 years ago

xerohour commented 10 years ago

Code example:

AND e.spouse_id_number = tgs.id_number(+) AND tgs.id_number = sps.id_number(+)

turns into

AND e.spouse_id_number = tgs.id_number() AND tgs.id_number = sps.id_number()

After being run through SqlFormatter

When I run SqlFormatter::format($sql) on sql code that contains these oracle outerjoins with plus signs (+) they get removed from the final output after SqlFormatter formats the SQL code. How would I go about preventing this? Thanks

jdorn commented 10 years ago

I'm not able to reproduce this. What version of PHP are you using?