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

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

Closed
rcauble opened this issue Nov 18, 2022 · 1 comment

Comments

@rcauble
Copy link

rcauble commented Nov 18, 2022

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
Copy link
Author

rcauble commented Nov 18, 2022

I figured it out

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

@rcauble rcauble closed this as completed Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant