Skip to content

Commit

Permalink
修复SQLUtil.toSQLString在VisitorFeature.OutputNameQuote特性下解析特殊变量命名:table…
Browse files Browse the repository at this point in the history
….column错误问题 #5386
  • Loading branch information
AdolphLv authored and wenshao committed Aug 7, 2023
1 parent 4847886 commit e9354e1
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public void scanVariable() {
for (; ; ) {
ch = charAt(++pos);

if (!isIdentifierChar(ch)) {
if (!isIdentifierCharForVariable(ch)) {
break;
}

Expand Down Expand Up @@ -786,4 +786,17 @@ public static boolean isIdentifierChar(char c) {
}
return c != ' ' && c != ',';
}

/**
* employee.code=:employee.code 解析异常
* 修复:变量名支持含符号.
* @param c
* @return
*/
public static boolean isIdentifierCharForVariable(char c) {
if (c == '.'){
return true;
}
return isIdentifierChar(c);
}
}

0 comments on commit e9354e1

Please sign in to comment.