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

增加数据字典导出功能 #511

Merged
merged 6 commits into from
Nov 16, 2019
Merged

Conversation

hhyo
Copy link
Owner

@hhyo hhyo commented Nov 10, 2019

样式参考:https://github.com/shangheguang/data_dictionary

  • 导出格式为html
  • 增加导出权限控制
  • 拥有导出权限的普通用户单次仅可以获取指定数据库的字典信息,并直接下载
  • 管理员可以导出整个实例的字典信息,但是需要到下载目录获取

导出结果大致如下,暂时没有索引跳转目录:
image

@codecov
Copy link

codecov bot commented Nov 10, 2019

Codecov Report

Merging #511 into master will increase coverage by 0.11%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #511      +/-   ##
==========================================
+ Coverage    81.5%   81.62%   +0.11%     
==========================================
  Files          74       74              
  Lines        9667     9712      +45     
==========================================
+ Hits         7879     7927      +48     
+ Misses       1788     1785       -3
Impacted Files Coverage Δ
sql/models.py 97.63% <ø> (ø) ⬆️
sql/urls.py 100% <ø> (ø) ⬆️
sql/utils/tests.py 98.91% <ø> (-0.01%) ⬇️
sql/engines/mysql.py 89.67% <100%> (+0.04%) ⬆️
sql/data_dictionary.py 100% <100%> (ø) ⬆️
sql/tests.py 100% <100%> (ø) ⬆️
sql/utils/sql_utils.py 94.11% <100%> (+1.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8826e9d...51177f4. Read the comment docs.

@LeoQuote
Copy link
Collaborator

6,可以不可以考虑一下把数据字典移到engine部分,这样后续就可以继续把其他数据库的功能也加上了,兴许...其他也会有这样的需求?

@hhyo
Copy link
Owner Author

hhyo commented Nov 11, 2019

扩充引擎是一直想的,还有会话管理这些,就是需要前端页面能复用,不同数据库的元数据信息差异能不能兼容

导出这个改动按需求在引擎的query入参中加入了关键字参数,直接追加在最后,如果所有引擎统一调整的话,你觉得在后面追加合适还是仅保留一个关键字参数合适

@LeoQuote
Copy link
Collaborator

我其实觉得扩充一个方法比较好- -

@stale stale bot added the wontfix This will not be worked on label Nov 14, 2019
Repository owner deleted a comment from stale bot Nov 14, 2019
@stale stale bot removed the wontfix This will not be worked on label Nov 14, 2019
@hhyo hhyo self-assigned this Nov 14, 2019
@hhyo hhyo added the enhancement New feature or request label Nov 14, 2019
@hhyo hhyo merged commit e156475 into master Nov 16, 2019
@hhyo hhyo deleted the feature/mysql_data_dictionary_export branch November 16, 2019 05:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants