Support cascade deletion
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from .operation import *
|
||||
from .database import *
|
||||
|
||||
|
||||
def get_control_schema(name: str) -> dict[str, dict[str, Any]]:
|
||||
@@ -13,7 +13,7 @@ def get_control(name: str) -> dict[str, Any]:
|
||||
return { 'controls': ds }
|
||||
|
||||
|
||||
def set_control_cache(name: str, cs: ChangeSet) -> DbChangeSet:
|
||||
def set_control_cmd(name: str, cs: ChangeSet) -> DbChangeSet:
|
||||
old = get_control(name)
|
||||
|
||||
redo_sql = 'delete from controls;'
|
||||
@@ -31,7 +31,7 @@ def set_control_cache(name: str, cs: ChangeSet) -> DbChangeSet:
|
||||
|
||||
|
||||
def set_control(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
return execute_command(name, set_control_cache(name, cs))
|
||||
return execute_command(name, set_control_cmd(name, cs))
|
||||
|
||||
|
||||
def inp_in_control(section: list[str]) -> ChangeSet:
|
||||
|
||||
Reference in New Issue
Block a user