From dfeb7f61b48a82e4380a194ddd43c745a9a5d817 Mon Sep 17 00:00:00 2001 From: Sanjiban Sengupta Date: Sat, 24 Jun 2023 23:27:06 +0530 Subject: [PATCH] fix: Execute and Parse test for DuckDB --- api/backend/duckdb.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/backend/duckdb.py b/api/backend/duckdb.py index 294cf7ce..916ca106 100644 --- a/api/backend/duckdb.py +++ b/api/backend/duckdb.py @@ -52,7 +52,7 @@ def check(self): def execute(self, data): try: if self.check()["db_health"] != "up and running": - self.connection = self.connect() + self.connect() for i in data: self.connection.execute(query=i) return {"message": "DuckDB Operation successful"} @@ -66,7 +66,7 @@ def execute(self, data): def parse(self, data): try: if self.check()["db_health"] != "up and running": - self.connection = self.connect() + self.connect() result = self.connection.get_substrait_json(data["query"]).fetchone()[0] return result except Exception as e: