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

修复问题:Oracle建表解析错误-解析成PLSQL #2458

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sql/utils/sql_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def get_full_sqlitem_list(full_sql, db_name):
# 逐行处理SQL文本
for line in pre_sql_list:
# 匹配到declare和begin开始的行,同时该行SQL不是处于PLSQL程序块内部的,前面添加delimiter $$标识符(独立一行)
pattern = r"^(declare|begin)"
pattern = r"^(declare|begin)\s|\n"
groups = re.match(pattern, line.lstrip(), re.IGNORECASE)
if groups and is_inside_plsqlblock == 0:
line = "delimiter $$" + "\n" + line
Expand Down
Loading