diff --git a/pydbapi/sql/compile.py b/pydbapi/sql/compile.py index 0bc8e02..b1fe760 100644 --- a/pydbapi/sql/compile.py +++ b/pydbapi/sql/compile.py @@ -2,7 +2,7 @@ # @Author: longfengpili # @Date: 2023-06-02 15:27:41 # @Last Modified by: longfengpili -# @Last Modified time: 2024-06-06 16:34:25 +# @Last Modified time: 2024-06-06 19:11:40 # @github: https://github.com/longfengpili @@ -94,7 +94,7 @@ def deal_value(dtypes: list, value: list): elif d.startswith('varchar') or d.startswith('str'): v = v.replace("'", "''") if isinstance(v, str) else v v = f"'{v}'" - elif d in ('date', 'datetime', 'timestamp') and re.match('\d{4}-\d{2}-\d{2}( \d{2}:\d{2}:\d{2})?', v): + elif d in ('date', 'datetime', 'timestamp') and re.match(r'\d{4}-\d{2}-\d{2}( \d{2}:\d{2}:\d{2})?', v): v = f"'{v}'" else: v = f'{v}' diff --git a/setup.py b/setup.py index a6f380c..b09f6cf 100644 --- a/setup.py +++ b/setup.py @@ -2,13 +2,13 @@ # @Author: longfengpili # @Date: 2023-06-02 15:27:41 # @Last Modified by: longfengpili -# @Last Modified time: 2024-04-08 13:54:17 +# @Last Modified time: 2024-06-06 19:12:00 # @github: https://github.com/longfengpili import setuptools -VERSION = '0.0.122' +VERSION = '0.0.123' PROJECT_NAME = 'pydbapi' with open('README.md', 'r', encoding='utf-8') as f: