Refine option to support batch command
This commit is contained in:
@@ -140,6 +140,11 @@ def set_option_cmd(name: str, cs: ChangeSet) -> DbChangeSet:
|
||||
return DbChangeSet(redo_sql, undo_sql, [redo_cs], [undo_cs])
|
||||
|
||||
|
||||
def set_option_only(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
v2_cmd = set_option_cmd(name, cs)
|
||||
return execute_command(name, v2_cmd)
|
||||
|
||||
|
||||
OPTION_V3_FLOW_UNITS_CFS = OPTION_UNITS_CFS
|
||||
OPTION_V3_FLOW_UNITS_GPM = OPTION_UNITS_GPM
|
||||
OPTION_V3_FLOW_UNITS_MGD = OPTION_UNITS_MGD
|
||||
@@ -260,6 +265,11 @@ def set_option_v3_cmd(name: str, cs: ChangeSet) -> DbChangeSet:
|
||||
return DbChangeSet(redo_sql, undo_sql, [redo_cs], [undo_cs])
|
||||
|
||||
|
||||
def set_option_v3_only(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
v3_cmd = set_option_v3_cmd(name, cs)
|
||||
return execute_command(name, v3_cmd)
|
||||
|
||||
|
||||
_key_map_23 = {
|
||||
'UNITS' : 'FLOW_UNITS',
|
||||
'PRESSURE' : 'PRESSURE_UNITS',
|
||||
|
||||
Reference in New Issue
Block a user