diff --git a/sqlalchemy_iris/base.py b/sqlalchemy_iris/base.py index c3e9ddb..c17125e 100644 --- a/sqlalchemy_iris/base.py +++ b/sqlalchemy_iris/base.py @@ -11,6 +11,7 @@ from sqlalchemy.sql import func from sqlalchemy.sql.functions import ReturnTypeFromArgs from sqlalchemy.sql.elements import Null +from sqlalchemy.sql.elements import quoted_name from sqlalchemy.sql import expression from sqlalchemy.sql import schema from sqlalchemy import sql, text @@ -1676,3 +1677,8 @@ def get_view_definition(self, connection, view_name, schema=None, **kw): if view_def: return view_def raise exc.NoSuchTableError(f"{schema}.{view_name}") + + def normalize_name(self, name): + if self.identifier_preparer._requires_quotes(name): + return quoted_name(name, quote=True) + return name