From fcd2deb2ef3ffb70cc947d5121cf1ef30072340f Mon Sep 17 00:00:00 2001 From: longfengpili <398745129@qq.com> Date: Thu, 6 Jun 2024 19:12:16 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=96=B0=E5=A2=9E]=E6=AD=A3=E5=88=99=E6=96=87?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pydbapi/sql/compile.py | 4 ++-- setup.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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: