Use sql batch to optimize
This commit is contained in:
@@ -40,13 +40,12 @@ def inp_in_title(section: list[str]) -> ChangeSet:
|
||||
return ChangeSet(g_update_prefix | {'type': 'title', 'value' : obj.value})
|
||||
|
||||
|
||||
def inp_in_title_new(name: str, section: list[str]) -> None:
|
||||
def inp_in_title_new(section: list[str]) -> str:
|
||||
if section == []:
|
||||
return
|
||||
return ''
|
||||
|
||||
title = '\n'.join(section)
|
||||
sql = f"update title set value = '{title}';"
|
||||
write(name, sql)
|
||||
return f"update title set value = '{title}';"
|
||||
|
||||
|
||||
def inp_out_title(name: str) -> list[str]:
|
||||
|
||||
Reference in New Issue
Block a user