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

fix: 支持使用create or replace创建函数、存储过程、视图以及包等语句 #2066

Merged
merged 9 commits into from
Mar 11, 2023

Conversation

songtao12
Copy link
Contributor

原来代码只支持使用create创建函数、存储过程、视图以及包,使用create or replace创建时获取不到对象名导致报错,实际运维中上线SQL大多使用create or replace方式,修改后同时支持使用create 和 create or replace两个方式。

原来代码只支持使用create创建函数、存储过程、视图以及包,使用create or replace创建时获取不到对象名导致报错,实际运维中上线SQL大多使用create or replace方式,修改后同时支持使用create 和 create or replace两个方式。
@codecov
Copy link

codecov bot commented Feb 28, 2023

Codecov Report

Patch coverage: 50.00% and project coverage change: +0.01 🎉

Comparison is base (b18de11) 75.00% compared to head (a42d005) 75.02%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2066      +/-   ##
==========================================
+ Coverage   75.00%   75.02%   +0.01%     
==========================================
  Files         102      102              
  Lines       14820    14811       -9     
==========================================
- Hits        11116    11112       -4     
+ Misses       3704     3699       -5     
Impacted Files Coverage Δ
sql/engines/oracle.py 48.63% <50.00%> (+0.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link
Collaborator

@nick2wang nick2wang left a comment

Choose a reason for hiding this comment

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

还需要处理一下原有的对象存在性检查代码,返回审核信息也可以提示一下对象将被覆盖

fix-支持Oracle创建存储过程、函数、包等,使用create or replace方式
@songtao12
Copy link
Contributor Author

还需要处理一下原有的对象存在性检查代码,返回审核信息也可以提示一下对象将被覆盖

重新修改了提交代码,原对象存在,告警提示:
{对象名} 对象已经存在,请确认是否替换!

sql/engines/oracle.py Outdated Show resolved Hide resolved
优化使用正则提取SQL语句中 object name 部分的代码逻辑
sql/engines/oracle.py Outdated Show resolved Hide resolved
优化获取object name部分代码
@LeoQuote
Copy link
Collaborator

LeoQuote commented Mar 9, 2023

感谢! 代码风格基本没什么问题了, 请看一下 CI 相关的报错, 修一下 lint 和 test 错误就可以了

优化代码
修复lint报错(代码规范)
处理lint报错(代码规范)
调整代码规范
@songtao12
Copy link
Contributor Author

感谢! 代码风格基本没什么问题了, 请看一下 CI 相关的报错, 修一下 lint 和 test 错误就可以了

lint 和 test 部分错误已修复,codecov/patch 的报错需要处理吗?

@LeoQuote
Copy link
Collaborator

不强求, codecov 是对覆盖率的要求, 如果你要做的话我就再等等你, 不做的话我就现在 merge

@songtao12
Copy link
Contributor Author

不强求, codecov 是对覆盖率的要求, 如果你要做的话我就再等等你, 不做的话我就现在 merge

直接merge吧,谢谢!

@LeoQuote LeoQuote merged commit 96094b4 into hhyo:master Mar 11, 2023
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