1
0
Fork 0

Merging upstream version 0.3.1.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-03-20 08:26:51 +01:00
parent ef493ccbe5
commit 483c153286
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
14 changed files with 98 additions and 3155 deletions

View file

@ -148,12 +148,19 @@ class HarlequinOdbcConnection(HarlequinConnection):
cur = self.aux_conn.cursor()
catalog: dict[str, dict[str, list[tuple[str, str]]]] = {}
for db_name, schema_name, rel_name, rel_type, *_ in cur.tables(catalog="%"):
if db_name is None:
continue
if db_name not in catalog:
catalog[db_name] = {schema_name: [(rel_name, rel_type)]}
elif schema_name not in catalog[db_name]:
catalog[db_name][schema_name] = [(rel_name, rel_type)]
else:
catalog[db_name][schema_name].append((rel_name, rel_type))
catalog[db_name] = dict()
if schema_name is None:
continue
if schema_name not in catalog[db_name]:
catalog[db_name][schema_name] = list()
if rel_name is not None:
catalog[db_name][schema_name].append((rel_name, rel_type or ""))
return catalog
def _list_columns_in_relation(