vertical-blank / sql-formatter

SQL formatter written with only Java Standard Library, without dependencies.
MIT License
223 stars 46 forks source link

:= format problem #23

Closed kaplan441 closed 3 years ago

kaplan441 commented 3 years ago

My script starts as DECLARE v_number NUMBER := 0;

then SqlFormatter.format(sql). But return like this DECLARE v_number NUMBER: = 0; This script throw exception in Oracle. It seperates := operator.

vertical-blank commented 3 years ago

Ver 2.0.0, you can extend Formatter to add operator like this. https://github.com/vertical-blank/sql-formatter/blob/c1e10a0377d741619bf56fcf10effb0b1c535123/src/test/kotlin/com/github/vertical_blank/sqlformatter/ModifiedFormatterTest.kt#L27-L42