fix where

This commit is contained in:
José Henrique Ivanchechen 2023-11-24 22:25:48 -03:00
parent 6a3e11cc79
commit 3c8316ebc4
1 changed files with 3 additions and 2 deletions

5
sql.py
View File

@ -31,8 +31,9 @@ class SQL:
if "ONDE" in query_parts: if "ONDE" in query_parts:
index = query_parts.index("ONDE") index = query_parts.index("ONDE")
where_filter_column = query_parts[index + 1] where_filter_column = query_parts[index + 1]
where_filter_value = query_parts[index + 2] where_filter_operator = query_parts[index + 2]
where_filter = [where_filter_column, where_filter_value] where_filter_value = query_parts[index + 3]
where_filter = [where_filter_column, where_filter_operator, where_filter_value]
# parse TABLE # parse TABLE
table = self.tables[query_parts[3]] table = self.tables[query_parts[3]]