提交 30d3bc37 编写于 作者: S serge-rider

#3640 Save context variables without quote/unquote (this makes string from numbers unexpectedly)

上级 d20ffa60
......@@ -618,9 +618,9 @@ public class SQLQueryJob extends DataSourceJob
if (scriptContext.hasVariable(paramName)) {
Object varValue = scriptContext.getVariable(paramName);
String strValue;
if (varValue instanceof String) {
/*if (varValue instanceof String) {
strValue = SQLUtils.quoteString(getExecutionContext().getDataSource(), (String) varValue);
} else {
} else */{
strValue = varValue == null ? null : varValue.toString();
}
param.setValue(strValue);
......@@ -643,7 +643,7 @@ public class SQLQueryJob extends DataSourceJob
for (SQLQueryParameter param : parameters) {
if (param.isNamed() && scriptContext.hasVariable(param.getTitle())) {
String strValue = param.getValue();
scriptContext.setVariable(param.getTitle(), SQLUtils.unQuoteString(getExecutionContext().getDataSource(), strValue));
scriptContext.setVariable(param.getTitle(), strValue);
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册