I'd ilke a SQL formatter (specifically for formatting Flyway db migration scripts). Hibernate has BasicFormatterImpl and DDLFormatterImpl. They don't do a ton, but they're better than nothing.
The General SQL Parser is really neat, but there's no free version we can distribute. Maaaaybe they'd be interested in publishing a "format-only" version along with our lib? Might be a marketing opportunity for them. I'll email them and invite them to this thread.
Regardless, there are different ways that folks might wanna format sql, but there isn't a language-specific plugin to hang onto like there has been scala, kotlin, gradle, etc.
Here's my proposal:
spotless {
sql {
target 'somedir' // have to specify target manually
hibernateBasicFormatter('optionalHibernateVersion')
hibernateDdlFormatter('optionalHibernateVersion')
...
If General SQL Parser is interested, we could maybe have something like this:
spotless {
sql {
target 'somedir' // have to specify target manually
generalSqlParser('optionalVersion').dialect(POSTGRES).someOtherOption(SOMEOPT)
...
I'd ilke a SQL formatter (specifically for formatting Flyway db migration scripts). Hibernate has BasicFormatterImpl and DDLFormatterImpl. They don't do a ton, but they're better than nothing.
The General SQL Parser is really neat, but there's no free version we can distribute. Maaaaybe they'd be interested in publishing a "format-only" version along with our lib? Might be a marketing opportunity for them. I'll email them and invite them to this thread.
Regardless, there are different ways that folks might wanna format sql, but there isn't a language-specific plugin to hang onto like there has been scala, kotlin, gradle, etc.
Here's my proposal:
If General SQL Parser is interested, we could maybe have something like this: