Add curve api and test

This commit is contained in:
WQY\qiong
2022-10-22 13:17:42 +08:00
parent bb1d772eaa
commit 9e8a84c4c0
6 changed files with 131 additions and 2 deletions

View File

@@ -30,7 +30,7 @@ def set_pattern(name: str, cs: ChangeSet) -> ChangeSet:
for factor in cs.operations[0]['factors']:
f_factor = float(factor)
redo_sql += f"\ninsert into patterns (id, factor) values ({f_id}, {f_factor});"
new['factors'].append(f_factor)
new['factors'].append(factor)
undo_sql = f"delete from patterns where id = {f_id};"
undo_sql += f"\ndelete from _pattern where id = {f_id};"