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

[ 功能建议 ] 完善查询sql的limit改写功能 #143

Closed
hhyo opened this issue Apr 22, 2019 · 0 comments
Closed

[ 功能建议 ] 完善查询sql的limit改写功能 #143

hhyo opened this issue Apr 22, 2019 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@hhyo
Copy link
Owner

hhyo commented Apr 22, 2019

目前遇到的问题/使用障碍

MySQL查询语句有 limit N offset Nlimit N 两种语法,目前平台的改写匹配很简陋,仅针对没有limit的语句增加 limit N ,对于带limit的语句,不做改写,仅通过fetchmany方法过滤,对数据安全和查询效率都有影响

希望如何解决/实现它

limit N offset Nlimit N 都按照用户limit限制改写为limit N

代码

https://github.com/hhyo/Archery/blob/master/sql/engines/mysql.py#L128

@hhyo hhyo added enhancement New feature or request help wanted Extra attention is needed labels Apr 22, 2019
@hhyo hhyo changed the title [ 功能建议 ]完善查询sql的limit改写功能 [ 功能建议 ] 完善查询sql的limit改写功能 Apr 22, 2019
@hhyo hhyo closed this as completed in e858f36 Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant