Add README, fix column deduplication in parser, remove .env from git

This commit is contained in:
2026-06-03 09:30:37 +02:00
parent b79d66d36b
commit 6536ad60c5
8 changed files with 452 additions and 8 deletions
+6 -2
View File
@@ -63,9 +63,13 @@ def _extract_table(statement: exp.Select) -> str:
def _extract_columns(statement: exp.Select) -> list[str]:
columns = []
seen: set[str] = set()
columns: list[str] = []
for col in statement.find_all(exp.Column):
columns.append(col.name)
name = col.name
if name not in seen:
seen.add(name)
columns.append(name)
if not columns:
raise UnsupportedQueryError("Could not extract column names from query.")
return columns