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
Can SQL statement splicing support placeholder rules other than question marks? #3530
Comments
Is your feature request related to a problem? Please describe.
Describe alternatives you've considered Additional |
Issues-translate-bot
changed the title
sql语句拼接能否支持除问号外的占位规则?
Can SQL statement splicing support placeholder rules other than question marks?
Apr 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your feature request related to a problem? Please describe.
1.有些时候sql语句中本来就包含问号字符,但是使用db.query后会将不想转义的问号替换掉导致sql执行出错;
2.另外sql填充过程中,可能存在多个地方重复填充一个值的情况,使用问号占位会让入参有很多重复值,入参会很长,容易错行;
3.期望自定义sql中能够允许注入sql,希望能通过占位的方式添加sql要查询的表,目前只能通过字符拼接的方式来处理,自定义语句处理会很割裂。如果担心sql注入,那字符串直接拼接也是避免不了的。
Describe the solution you'd like
希望有类似java那种 通过 ${} #{} 占位的方式来完整语句的拼接,可以选择是否需要给填充参数添加引号。
Describe alternatives you've considered
或者能添加相应接口,允许自定义相关注入规则
Additional
The text was updated successfully, but these errors were encountered: