Comments (1)
这样处理是想要在内存中处理trim函数么?
com.alibaba.druid.sql.visitor.SQLASTOutputVisitor#visit(com.alibaba.druid.sql.ast.expr.SQLMethodInvokeExpr)
public boolean visit(SQLMethodInvokeExpr x) {
SQLExpr owner = x.getOwner();
if (owner != null) {
printMethodOwner(owner);
}
if (parameterized) {
List<SQLExpr> arguments = x.getArguments();
if (x.methodNameHashCode64() == FnvHash.Constants.TRIM
&& arguments.size() == 1
&& arguments.get(0) instanceof SQLCharExpr && x.getTrimOption() == null && x.getFrom() == null) {
print('?');
if (parameters != null) {
SQLCharExpr charExpr = (SQLCharExpr) arguments.get(0);
parameters.add(charExpr.getText().trim());
}
replaceCount++;
return false;
}
}
String function = x.getMethodName();
if (function != null) {
printFunctionName(function);
}
printMethodParameters(x);
return false;
}
from druid.
Related Issues (20)
- [BUG] druid 1.2.8 19c jdk8 listagg打印可执行sql 提示缺失右括号
- [BUG] merge sql error, dbType postgresql 不支持 ORDER BY case_count DESC NULLS LAST 语句
- [BUG] 解析MySQL8.x的json类型字段时,_utf8mb4被统一成_utf8了
- [BUG] 基于PG内核的LightDB 23.3在validationQuery时被识别为Oracle
- [BUG] sql injection violation, dbType oracle, , druid-version 1.2.5, syntax error: syntax error, expect ), actual IDENTIFIER pos 2133, line 19, column 132, token IDENTIFIER COLUMNS HOT 1
- [BUG] Oracle的merge into语法错误时解析不正确,把错误的SQL语句删除了,而没有报错 HOT 3
- 添加一下flink jdbc
- [BUG] 请问 1.2.23的 jar 里面是否少了段代码? code中有,jar里没有
- [BUG] SQLUtils.refactor表名改写错误
- [BUG]
- [BUG]
- [BUG] java.lang.NullPointerException: null
- [BUG] Mysql的字符串中带\n等字符,进行解析美化之后就字符串语义变化了
- [BUG] com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure
- [BUG]
- [BUG] com.mysql.cj.jdbc.exceptions.CommunicationsException: Communications link failure HOT 1
- [BUG] postgresql 的 CURRENT_DATE 解析错误
- [BUG] 连接池(已配置连接检活机制)中连接不能根据数据库server端wait_timeout时间及时清理server端已关闭的长时间未使用的超时连接,导致客户端使用超时连接执行SQL失败报错
- [BUG] Resolving Oracle Subpartition Definition Errors 解析Oracle子分区定义失败 HOT 2
- [BUG] PostgreSQL数据库解析hibernate6.4.4分页sql报错 token FIRST
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from druid.