Skip to content

Commit

Permalink
fix: 修复 拼接虚拟参数在 SQL片段最后时,会造成程序死循环的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
troyzhxu committed Oct 14, 2021
1 parent c29f069 commit 6f9b162
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private VirtualSolution resolveVirtualParams(String sqlSnippet) {
if ((quotationCount1 + quotationCount2) % 2 != 0) {
throw new SearcherException("这里有一个语法错误(引号不匹配):" + sqlSnippet);
}
int nextIndex = Math.max(index1, index2);
int nextIndex = index1 + paramName.length();
// 判断虚拟参数是否不在引号内部,并且不是以 :name: 的形式
if (quotationCount1 % 2 == 0 && !endWithPrefix) {
virtualParam.setParameterized(true);
Expand Down

0 comments on commit 6f9b162

Please sign in to comment.