diff --git a/pydbapi/api/trino.py b/pydbapi/api/trino.py index 31b1457..c90fcd1 100644 --- a/pydbapi/api/trino.py +++ b/pydbapi/api/trino.py @@ -2,7 +2,7 @@ # @Author: longfengpili # @Date: 2023-06-02 15:27:41 # @Last Modified by: longfengpili -# @Last Modified time: 2024-03-01 10:05:18 +# @Last Modified time: 2024-03-01 11:34:01 # @github: https://github.com/longfengpili diff --git a/pydbapi/db/base.py b/pydbapi/db/base.py index 8a9b219..313187d 100644 --- a/pydbapi/db/base.py +++ b/pydbapi/db/base.py @@ -2,7 +2,7 @@ # @Author: longfengpili # @Date: 2023-06-02 15:27:41 # @Last Modified by: longfengpili -# @Last Modified time: 2024-03-01 10:16:08 +# @Last Modified time: 2024-03-01 11:37:15 # @github: https://github.com/longfengpili @@ -137,8 +137,9 @@ def execute(self, sql, count=None, ehandling='raise', verbose=0): except Exception as e: dblogger.error(e) if ehandling == 'raise': - conn.rollback() - raise e + if self.dbtype not in ('trino',): + conn.rollback() + raise finally: if self.dbtype not in ('trino',): cur.close() diff --git a/setup.py b/setup.py index 2841059..7541b51 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-03-01 10:17:37 +# @Last Modified time: 2024-03-01 11:43:49 # @github: https://github.com/longfengpili import setuptools -VERSION = '0.0.119' +VERSION = '0.0.120' PROJECT_NAME = 'pydbapi' with open('README.md', 'r', encoding='utf-8') as f: