Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sql Formatter doesn't handle JDBI/JDBC parameters well. #952

Closed
dylanbaroody opened this issue Sep 30, 2021 · 2 comments
Closed

Sql Formatter doesn't handle JDBI/JDBC parameters well. #952

dylanbaroody opened this issue Sep 30, 2021 · 2 comments

Comments

@dylanbaroody
Copy link
Contributor

When using JDBI, adding parameters to queries uses one of the following formats:

where user_id = :user_id

or

user_id in ( <user_ids> )

The included formatter doesn't handle either of these well:

WHERE user_id =:user_id

or

user_id IN ( 
    < user_ids >
)

In particular, the IN style statement breaks because a space is added between < and the word. Could a parameter to configure spaces between (, < and words be added?

@nedtwigg
Copy link
Member

nedtwigg commented Oct 2, 2021

Fixed in plugin-gradle 5.16.0 and plugin-maven 2.16.0, thanks to #955.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants