-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
清理查询模块代码,便于接入各种类型的数据库 #83
Conversation
hhyo
commented
Mar 28, 2019
•
edited
Loading
edited
- mysql脱敏处理,统一异常信息
- 查询权限校验优化,统一异常信息
- 查询结果显示优化,错误信息统一在表格内展示
- 剔除mysql查询show create table 的权限校验
- 补充查询权限的测试用例
Codecov Report
@@ Coverage Diff @@
## master #83 +/- ##
==========================================
+ Coverage 64.35% 67.03% +2.67%
==========================================
Files 59 59
Lines 5729 5818 +89
==========================================
+ Hits 3687 3900 +213
+ Misses 2042 1918 -124
Continue to review full report at Codecov.
|
@@ -44,37 +43,34 @@ def query(request): | |||
return result | |||
|
|||
# 服务器端参数验证 | |||
if sql_content is None or db_name is None or instance_name is None or limit_num is None: | |||
if not (sql_content and db_name and instance_name and limit_num): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里要不改成 if None in [sql_content, db_name, instance_name, limit_num]:
因为理论上来说and再否的话, 稍微有点低效
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
可以的,我是感觉这些写着清爽点就改了,效率我还真不晓得