Skip to content

Commit

Permalink
[修复]SqlFileParse
Browse files Browse the repository at this point in the history
  • Loading branch information
longfengpili committed Jul 15, 2024
1 parent 5be945a commit 8aeb087
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pydbapi/sql/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# @Author: longfengpili
# @Date: 2023-06-02 15:27:41
# @Last Modified by: longfengpili
# @Last Modified time: 2024-06-06 17:07:57
# @Last Modified time: 2024-07-15 11:26:48
# @github: https://github.com/longfengpili


Expand All @@ -15,7 +15,7 @@
sqllogger = logging.getLogger(__name__)


REG_BEHIND = r'(?=[,();:\s])'
REG_BEHIND = r'(?=[,();:\s.])'


class SqlParse(object):
Expand Down Expand Up @@ -189,7 +189,7 @@ def replace_params(self, **kwargs):
Exception -- [需要设置参数]
'''
filename = os.path.basename(self.filepath)
kwargs = {k: f"'{v}'" if isinstance(v, str) else v for k, v in kwargs.items()} # str加引号处理
kwargs = {k: f"'{v}'" if isinstance(v, str) else v for k, v in kwargs.items() if v} # str加引号处理
arguments = self.arguments

arguments_same = set(arguments) & set(kwargs)
Expand Down

0 comments on commit 8aeb087

Please sign in to comment.