Skip to content
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

Again, you can call CCJSqlParserUtil.sanitizeSingleSql( sqlStr) to clean your statements properly. #6187

Open
nieqiurong opened this issue May 21, 2024 · 2 comments

Comments

@nieqiurong
Copy link
Contributor

          Again, you can call `CCJSqlParserUtil.sanitizeSingleSql( sqlStr)` to clean your statements properly.

Details see here: JSQLParser/JSqlParser#1988 (comment)

Originally posted by @manticore-projects in #5345 (comment)

@lujiamingzZ
Copy link

lujiamingzZ commented May 27, 2024

为何不是官方在BoundSql的统一生成处使用CCJSqlParserUtil.sanitizeSingleSql来处理呢?直接从源头处理掉是不是会更好;像DataPermissionInterceptor中beforeQuery、beforePrepare的方法中会调用parserSingle和parserMulti方法,这里面会走校验,那在调用之前先CCJSqlParserUtil.sanitizeSingleSql处理一下或者在更早的地方处理应该更好一些吧?
@nieqiurong

@nieqiurong
Copy link
Contributor Author

统计3.5.3.2后面版本框架提供的方法出现情况.

@nieqiurong nieqiurong pinned this issue Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants