Add pattern api and test

This commit is contained in:
WQY\qiong
2022-10-22 12:55:16 +08:00
parent c1b99bc7eb
commit bb1d772eaa
7 changed files with 123 additions and 13 deletions

View File

@@ -29,6 +29,7 @@ def set_demand(name: str, cs: ChangeSet) -> ChangeSet:
f_junction = f"'{junction}'"
# TODO: transaction ?
redo_sql = f"delete from demands where junction = {f_junction};"
for r in cs.operations[0]['demands']:
demand = float(r['demand'])