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

:= format problem #23

Closed
kaplan441 opened this issue Sep 30, 2020 · 1 comment
Closed

:= format problem #23

kaplan441 opened this issue Sep 30, 2020 · 1 comment

Comments

@kaplan441
Copy link

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

Ver 2.0.0, you can extend Formatter to add operator like this.

it("With := operator") {
val result =
SqlFormatter.standard()
.extend { it.plusOperators(":=") }
.format("SELECT * FROM TABLE WHERE A := 4")
expect(result)
.toBe(
"""
SELECT
*
FROM
TABLE
WHERE
A := 4""".trimIndent())
}
}

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

2 participants