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

insert all语法支持 #740

Merged
merged 4 commits into from
May 24, 2020
Merged

insert all语法支持 #740

merged 4 commits into from
May 24, 2020

Conversation

jan-song
Copy link
Contributor

insert all语法支持

insert all语法支持
@@ -232,14 +232,22 @@ def get_dml_table(sql='', object_name_list=None, db_name=''):
return True
else:
return False
elif re.match(r"^insert", sql):
elif re.match(r"^insert\s+into\s", sql):
Copy link
Collaborator

Choose a reason for hiding this comment

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

我理解是不是这里直接改一下正则就行, 不用这样又匹配一次吧? 里面要做的事情完全一样的

Copy link
Owner

Choose a reason for hiding this comment

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

是的,提取的group没变,正则修改下可以匹配两个场景就可以

Copy link
Contributor Author

Choose a reason for hiding this comment

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

好的,最近有空调整测试验证一下这边,顺便把备份未判断工单是否需要备份的bug修复一下

Copy link
Collaborator

Choose a reason for hiding this comment

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

建议一个pr只涉及一个问题

@@ -232,14 +232,22 @@ def get_dml_table(sql='', object_name_list=None, db_name=''):
return True
else:
return False
elif re.match(r"^insert", sql):
elif re.match(r"^insert\s+into\s", sql):
Copy link
Owner

Choose a reason for hiding this comment

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

是的,提取的group没变,正则修改下可以匹配两个场景就可以

@codecov
Copy link

codecov bot commented May 16, 2020

Codecov Report

Merging #740 into master will increase coverage by 0.00%.
The diff coverage is 80.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #740   +/-   ##
=======================================
  Coverage   79.24%   79.24%           
=======================================
  Files          78       78           
  Lines       10850    10851    +1     
=======================================
+ Hits         8598     8599    +1     
  Misses       2252     2252           
Impacted Files Coverage Δ
sql/engines/oracle.py 49.69% <80.00%> (+0.10%) ⬆️

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 32493ce...5c6a075. Read the comment docs.

jan-song added 2 commits May 21, 2020 21:47
根据workflow.is_backup判断工单是否需要备份
Copy link
Collaborator

@LeoQuote LeoQuote left a comment

Choose a reason for hiding this comment

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

很强👏

end_time = rows[0]
self.backup(workflow, cursor=cursor, begin_time=begin_time, end_time=end_time)
except Exception as e:
logger.error(f"Oracle工单备份异常,工单id:{workflow.id}, 错误信息:{traceback.format_exc()}")
Copy link
Owner

Choose a reason for hiding this comment

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

备份异常可以标识一下备份状态,可以和mysql的执行结果一致

Copy link
Owner

Choose a reason for hiding this comment

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

看了下这个是全部执行完后的操作,不好标识,先这样吧

@hhyo hhyo merged commit 7f30653 into hhyo:master May 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants