Skip to content

Commit

Permalink
Prefer sqlalchemy-hana types in get_columns
Browse files Browse the repository at this point in the history
  • Loading branch information
kasium committed Oct 23, 2023
1 parent 5792172 commit 047ce89
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sqlalchemy_hana/dialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,10 +528,10 @@ def get_columns(self, connection, table_name, schema=None, **kwargs):
"comment": row[6],
}

if hasattr(types, row[1]):
column["type"] = getattr(types, row[1])
elif hasattr(hana_types, row[1]):
column["type"] = getattr(hana_types, row[1])
if hasattr(hana_types, row[1]):
column['type'] = getattr(hana_types, row[1])
elif hasattr(types, row[1]):
column['type'] = getattr(types, row[1])
else:
util.warn(
"Did not recognize type '%s' of column '%s'"
Expand Down

0 comments on commit 047ce89

Please sign in to comment.