Support cascade deletion

This commit is contained in:
WQY\qiong
2023-02-04 13:45:14 +08:00
parent 633a616d39
commit 804e1c7796
38 changed files with 1272 additions and 707 deletions

View File

@@ -1,4 +1,4 @@
from .operation import *
from .database import *
OPTION_UNITS_CFS = 'CFS'
OPTION_UNITS_GPM = 'GPM'
@@ -67,7 +67,7 @@ def get_option(name: str) -> dict[str, Any]:
return d
def set_option_cache(name: str, cs: ChangeSet) -> DbChangeSet:
def set_option_cmd(name: str, cs: ChangeSet) -> DbChangeSet:
raw_old = get_option(name)
old = {}
@@ -102,7 +102,7 @@ def set_option_cache(name: str, cs: ChangeSet) -> DbChangeSet:
def set_option(name: str, cs: ChangeSet) -> ChangeSet:
return execute_command(name, set_option_cache(name, cs))
return execute_command(name, set_option_cmd(name, cs))
def inp_in_option(section: list[str]) -> ChangeSet: