vertical-blank / sql-formatter

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

Formatter inserts space in between "//" (this is vertica's integer division operator) #62

Closed rcauble closed 1 year ago

rcauble commented 1 year ago

Hi, I'm trying to use sqlFormatter with vertica which uses "//" for integer division. It doesn't look like there's an exact dialect of of the box for vertica. Wondering if there's a way to disable adding the extra space?

rcauble commented 1 year ago

I figured it out

var base = SqlFormatter.of(com.github.vertical_blank.sqlformatter.languages.Dialect.MySql); base.extend(cfg -> cfg.plusOperators("//")).format(...);