Add batch change set for set demand

This commit is contained in:
WQY\qiong
2022-10-30 14:43:22 +08:00
parent 7860faadd7
commit 23ce9d73d0
2 changed files with 10 additions and 11 deletions

View File

@@ -49,6 +49,13 @@ class SqlChangeSet:
self.redo_cs = redo_cs
self.undo_cs = undo_cs
class BatchSqlChangeSet:
def __init__(self, redo_sql: str, undo_sql: str, redo_cs: list[dict[str, str]], undo_cs: list[dict[str, str]]) -> None:
self.redo_sql = redo_sql
self.undo_sql = undo_sql
self.redo_cs = redo_cs
self.undo_cs = undo_cs
def read(name: str, sql: str) -> Row:
with conn[name].cursor(row_factory=dict_row) as cur: