Accept Merge Request #55: (api -> master)
Merge Request: Fix delete junction batch command Created By: @王琼钰 Accepted By: @王琼钰 URL: https://tjwater.coding.net/p/tjwatercloud/d/TJWaterServer/git/merge/55
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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'])
|
||||
|
||||
|
||||
@@ -96,11 +96,6 @@ def pick_snapshot(name: str, tag: str, discard: bool = False) -> ChangeSet:
|
||||
def sync_with_server(name: str, operation: int) -> ChangeSet:
|
||||
return api.sync_with_server(name, operation)
|
||||
|
||||
|
||||
############################################################
|
||||
# operation
|
||||
############################################################
|
||||
|
||||
def execute_batch_commands(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
return api.execute_batch_commands(name, cs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user