From 3adc9ebfdf382482d88e319bcf7d8a2c4ce84d74 Mon Sep 17 00:00:00 2001 From: old-tom <892955278@msn.cn> Date: Fri, 23 Jun 2023 18:12:24 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=9C=AA=E5=AE=9E?= =?UTF-8?q?=E7=8E=B0sqlSession=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- session/engine/dbengine.py | 2 +- session/session.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/session/engine/dbengine.py b/session/engine/dbengine.py index 3431ba4..ad27f00 100644 --- a/session/engine/dbengine.py +++ b/session/engine/dbengine.py @@ -54,7 +54,7 @@ class DatabaseEngine(object): 'postgresql': 'postgresql+psycopg2://{0}:{1}@{2}:{3}/{4}', 'oracle': 'oracle+cx_oracle://{0}:{1}@{2}:{3}/?service_name={4}' } - + # 连接池容器名称,具体看ObjContainer对象 attr = 'engines' def __init__(self, db_name, conf_path=DEFAULT_CONF_PATH): diff --git a/session/session.py b/session/session.py index 9cf2c3e..ef15731 100644 --- a/session/session.py +++ b/session/session.py @@ -91,6 +91,12 @@ class Sqlsession(object): def insert(self, sql): return self.executor.execute_update(sql) + def insert_batch(self, sql): + """ + todo implement + """ + pass + def update(self, sql): return self.executor.execute_update(sql)