Support cascade deletion
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
from .operation import *
|
||||
from .database import *
|
||||
|
||||
|
||||
def get_backdrop_schema(name: str) -> dict[str, dict[str, Any]]:
|
||||
@@ -10,7 +10,7 @@ def get_backdrop(name: str) -> dict[str, Any]:
|
||||
return { 'content': e['content'] }
|
||||
|
||||
|
||||
def set_backdrop_cache(name: str, cs: ChangeSet) -> DbChangeSet:
|
||||
def set_backdrop_cmd(name: str, cs: ChangeSet) -> DbChangeSet:
|
||||
old = get_backdrop(name)
|
||||
|
||||
redo_sql = f"update backdrop set content = '{cs.operations[0]['content']}' where content = '{old['content']}';"
|
||||
@@ -23,7 +23,7 @@ def set_backdrop_cache(name: str, cs: ChangeSet) -> DbChangeSet:
|
||||
|
||||
|
||||
def set_backdrop(name: str, cs: ChangeSet) -> ChangeSet:
|
||||
return execute_command(name, set_backdrop_cache(name, cs))
|
||||
return execute_command(name, set_backdrop_cmd(name, cs))
|
||||
|
||||
|
||||
class InpBackdrop:
|
||||
|
||||
Reference in New Issue
Block a user