From 977e706a054fc3191906f9a59330dec545522983 Mon Sep 17 00:00:00 2001 From: "WQY\\qiong" Date: Thu, 16 Mar 2023 08:30:32 +0800 Subject: [PATCH] Add any sql to batch --- api/inp_in_new.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/inp_in_new.py b/api/inp_in_new.py index 949e904..860dadd 100644 --- a/api/inp_in_new.py +++ b/api/inp_in_new.py @@ -216,7 +216,7 @@ def parse_file(project: str, inp: str) -> None: if s == PATTERNS: tokens = line.split() if current_pattern != tokens[0]: - write(project, f"insert into _pattern (id) values ('{tokens[0]}');") + sql_batch.add(f"insert into _pattern (id) values ('{tokens[0]}');") current_pattern = tokens[0] elif s == CURVES: tokens = line.split() @@ -224,7 +224,7 @@ def parse_file(project: str, inp: str) -> None: type = CURVE_TYPE_PUMP if curve_type_desc_line != None: type = curve_type_desc_line.split(':')[0].strip() - write(project, f"insert into _curve (id, type) values ('{tokens[0]}', '{type}');") + sql_batch.add(f"insert into _curve (id, type) values ('{tokens[0]}', '{type}');") current_curve = tokens[0] curve_type_desc_line = None