Use sql batch to optimize

This commit is contained in:
WQY\qiong
2023-03-16 08:30:04 +08:00
parent 1d2ac09c92
commit 04a58bb864
29 changed files with 145 additions and 105 deletions

View File

@@ -38,13 +38,12 @@ def inp_in_backdrop(section: list[str]) -> ChangeSet:
return ChangeSet()
def inp_in_backdrop_new(name: str, section: list[str]) -> None:
def inp_in_backdrop_new(section: list[str]) -> str:
if section == []:
return
return ''
content = '\n'.join(section)
sql = f"update backdrop set content = '{content}';"
write(name, sql)
return f"update backdrop set content = '{content}';"
def inp_out_backdrop(name: str) -> list[str]: