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

新增mssql 执行 #212

Merged
merged 3 commits into from
May 28, 2019
Merged

新增mssql 执行 #212

merged 3 commits into from
May 28, 2019

Conversation

LeoQuote
Copy link
Collaborator

@LeoQuote LeoQuote commented May 17, 2019

  • 实现engine 中的 execute 和 execute_workflow

@codecov
Copy link

codecov bot commented May 17, 2019

Codecov Report

Merging #212 into master will increase coverage by 0.13%.
The diff coverage is 94.44%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #212      +/-   ##
==========================================
+ Coverage   82.03%   82.16%   +0.13%     
==========================================
  Files          64       64              
  Lines        7895     7964      +69     
==========================================
+ Hits         6477     6544      +67     
- Misses       1418     1420       +2
Impacted Files Coverage Δ
sql/engines/models.py 90.69% <100%> (+0.22%) ⬆️
sql/engines/tests.py 99.76% <100%> (ø) ⬆️
sql/engines/mssql.py 79.45% <88.88%> (+4.45%) ⬆️

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 8875f44...7a2ac9d. Read the comment docs.

@LeoQuote LeoQuote requested a review from hhyo May 17, 2019 08:10
@LeoQuote LeoQuote self-assigned this May 17, 2019
split_sql = [f"""use [{db_name}]"""] + sqlparse.split(sql)
for statement in split_sql:
check_result.rows.append(ReviewResult(
id=1,
Copy link
Owner

Choose a reason for hiding this comment

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

是不是也可以自增

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

怎么做自增?在model里吗?

errormessage='None',
sql=statement,
affected_rows=cursor.rowcount,
execute_time=0,
Copy link
Owner

Choose a reason for hiding this comment

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

执行时间可以参考redis和oracle使用计时器获取

execute_time=0,
))
rowid += 1
if execute_result.error:
Copy link
Owner

Choose a reason for hiding this comment

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

发现oracle的执行失败可以参考这个来,哈哈

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

如果是一样可以提取到EngineBase中

* 实现engine 中的 execute 和 execute_workflow
@LeoQuote LeoQuote marked this pull request as ready for review May 28, 2019 08:28
@LeoQuote LeoQuote requested a review from hhyo May 28, 2019 08:29
@LeoQuote LeoQuote merged commit e09dd4e into master May 28, 2019
@LeoQuote
Copy link
Collaborator Author

关联issue #227

@LeoQuote LeoQuote deleted the feature/mssql-execution branch May 28, 2019 09:40
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.

None yet

2 participants