Skip to content

Commit

Permalink
[优化]子查询前空格
Browse files Browse the repository at this point in the history
  • Loading branch information
longfengpili committed Oct 12, 2024
1 parent 5edf71c commit d32e89b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pydbapi/sql/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# @Author: longfengpili
# @Date: 2024-10-09 16:33:05
# @Last Modified by: longfengpili
# @Last Modified time: 2024-10-12 14:13:22
# @Last Modified time: 2024-10-12 14:18:47
# @github: https://github.com/longfengpili


Expand Down Expand Up @@ -125,6 +125,8 @@ def append_subquery(subtokens: list, subqueries: list):
for token in tokens:
if isinstance(token, Comment):
continue
elif token.ttype == Newline and not subtokens:
continue
elif token.ttype in (DML, DDL, CTE):
append_subquery(subtokens, subqueries)
subtokens.append(token)
Expand Down

0 comments on commit d32e89b

Please sign in to comment.