Use sql batch to optimize
This commit is contained in:
@@ -89,7 +89,7 @@ def inp_in_emitter(section: list[str]) -> ChangeSet:
|
||||
return cs
|
||||
|
||||
|
||||
def inp_in_emitter_new(name: str, line: str) -> None:
|
||||
def inp_in_emitter_new(line: str) -> str:
|
||||
tokens = line.split()
|
||||
|
||||
num = len(tokens)
|
||||
@@ -99,7 +99,7 @@ def inp_in_emitter_new(name: str, line: str) -> None:
|
||||
junction = str(tokens[0])
|
||||
coefficient = float(tokens[1])
|
||||
|
||||
write(name, f"insert into emitters (junction, coefficient) values ('{junction}', {coefficient});")
|
||||
return f"insert into emitters (junction, coefficient) values ('{junction}', {coefficient});"
|
||||
|
||||
|
||||
def inp_out_emitter(name: str) -> list[str]:
|
||||
|
||||
Reference in New Issue
Block a user