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

添加 pgsql 上线功能 #334

Merged
merged 4 commits into from
Aug 11, 2019
Merged

添加 pgsql 上线功能 #334

merged 4 commits into from
Aug 11, 2019

Conversation

yzypals
Copy link
Collaborator

@yzypals yzypals commented Jul 17, 2019

优化pgsql创建连接逻辑
暂时解决pgsql无法查看表结构问题
暂时解决query 参数传递问题

关联issue : #204

sql/query.py Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 18, 2019

Codecov Report

Merging #334 into master will decrease coverage by 0.2%.
The diff coverage is 74.8%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #334      +/-   ##
==========================================
- Coverage   85.29%   85.09%   -0.21%     
==========================================
  Files          67       67              
  Lines        8822     8955     +133     
==========================================
+ Hits         7525     7620      +95     
- Misses       1297     1335      +38
Impacted Files Coverage Δ
sql/instance.py 43.17% <0%> (-0.58%) ⬇️
sql/engines/pgsql.py 78.98% <61.19%> (-13.73%) ⬇️
sql/query.py 67.76% <75%> (-0.03%) ⬇️
sql/engines/tests.py 99.59% <96.22%> (-0.2%) ⬇️
sql/engines/redis.py 85.05% <0%> (-2.79%) ⬇️
sql/engines/__init__.py 72.72% <0%> (-1.09%) ⬇️
sql/engines/mysql.py 90.64% <0%> (-0.41%) ⬇️
sql/sql_workflow.py 74.16% <0%> (ø) ⬆️

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 7929526...648cca9. Read the comment docs.

@stale
Copy link

stale bot commented Jul 21, 2019

你已经很久没有回复这个issue了,如果没有进一步的信息的话, 会作为不活跃issue关闭, 感谢你对本项目的贡献。
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix This will not be worked on label Jul 21, 2019
@LeoQuote LeoQuote added the enhancement New feature or request label Jul 21, 2019
@stale stale bot removed the wontfix This will not be worked on label Jul 21, 2019
def get_connection(self, db_name):
#只有获取数据库名字可以不带dbname参数
if not db_name and traceback.extract_stack()[-3][2] != "get_all_databases":
raise ValueError('db_name未填写,请检查参数')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以考虑在query 函数中检查参数, 这里还要看堆栈感觉挺蛋疼

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

query 或者 execute

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里怎么写 已经考虑到 只有 not db_name 才会 去 查看 traceback.extract_stack()[-3][2]

Copy link
Collaborator

@LeoQuote LeoQuote Aug 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

新做一个 _query 方法, 这个方法不检查 db_name, schema_name 等, 就只是查询, query 方法调用_query 方法, 但是在调用前检查 db_name, schema_name

get_all_database 的时候直接使用 _query 方法, 不检查参数

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

可以的

@LeoQuote
Copy link
Collaborator

@yzypals 聚聚, 没问题的话按上面的评论改一下吧, 合了好release 一波啊

@yzypals
Copy link
Collaborator Author

yzypals commented Jul 25, 2019

嗯 好 的 主要最近忙着搞elk 要不然 早去改了~!~

@yzypals yzypals closed this Aug 2, 2019
@LeoQuote
Copy link
Collaborator

LeoQuote commented Aug 2, 2019

又关了, 不提了?

@bucardo111
Copy link

这是关了还是忙完别的再继续做哇?大佬们,不要放弃这个啊

@yzypals
Copy link
Collaborator Author

yzypals commented Aug 6, 2019

挂这么久 我都不好意思了 , 我 今天 去修改下
提了

yingzy added 2 commits August 6, 2019 15:03
    优化pgsql创建连接逻辑
    暂时解决pgsql无法查看表结构问题
    暂时解决query 参数传递问题
@LeoQuote
Copy link
Collaborator

LeoQuote commented Aug 8, 2019

单元测试没过, 有空看一下.

@LeoQuote
Copy link
Collaborator

@hhyo 问题不大,可以合了

@hhyo hhyo merged commit fe1023a into hhyo:master Aug 11, 2019
@yzypals yzypals deleted the forpr branch September 9, 2019 09:42
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.

4 participants