Skip to content

SPR-16663 - Update NamedParameterUtils.parseSqlStatement #1758

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

Merged
merged 1 commit into from
Mar 29, 2018
Merged

SPR-16663 - Update NamedParameterUtils.parseSqlStatement #1758

merged 1 commit into from
Mar 29, 2018

Conversation

nkjackzhang
Copy link
Contributor

@nkjackzhang nkjackzhang commented Mar 29, 2018

In my opinion, we should parse :{x} style parameter as x is parameter using NamedParameterUtils.parseSqlStatement,
so the condition j - i > 2 is the correct condition, not j - i > 3, because if i is the index of
: in :{x}, and j is the index of } in :{x}, j - i == 3 is true.
Also add a test case for SPR-16663.

…er correctly

In my opinion, we should parse ":{x}" style parameter as "x" is parameter using "NamedParameterUtils.parseSqlStatement",
so the condition "j - i > 2" is the correct condition, not "j - i > 3", because if "i" is the index of
":" in ":{x}", and "j" is the index of "}" in ":{x}",  "j - i == 3" is true.
Also add a test case for SPR-16663.
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

Successfully merging this pull request may close these issues.

2 participants