Fix delete junction batch command

This commit is contained in:
WQY\qiong
2022-10-21 19:59:58 +08:00
parent 75aec8e40e
commit 6afd6c3411
3 changed files with 2 additions and 6 deletions

View File

@@ -51,7 +51,7 @@ def execute_delete_command(name: str, cs: ChangeSet) -> ChangeSet:
type = cs.operations[0]['type']
if type == JUNCTION:
return add_junction(name, cs)
return delete_junction(name, cs)
elif type == RESERVOIR:
return delete_reservoir(name, cs)
elif type == TANK:

View File

@@ -55,6 +55,7 @@ def write(name: str, sql: str) -> None:
with conn[name].cursor() as cur:
cur.execute(sql)
def get_current_operation(name: str) -> int:
return int(read(name, 'select id from current_operation')['id'])