开发机迁移
This commit is contained in:
@@ -30,6 +30,16 @@ class DatabaseOperations:
|
||||
@property
|
||||
def _connect_timeout(self):
|
||||
return self._connection._connect_timeout
|
||||
|
||||
def ensure_open(self) -> bool:
|
||||
"""透传 DatabaseConnection.ensure_open(),重连后同步 self.conn 引用。"""
|
||||
result = self._connection.ensure_open()
|
||||
self.conn = self._connection.conn
|
||||
return result
|
||||
|
||||
def rollback(self):
|
||||
"""透传 DatabaseConnection.rollback()。"""
|
||||
self._connection.rollback()
|
||||
|
||||
def batch_execute(self, sql: str, rows: list, page_size: int = 1000):
|
||||
"""批量执行SQL"""
|
||||
|
||||
Reference in New Issue
Block a user