Skip to content

Commit 15ac98b

Browse files
committed
fixed bug when table not in lowercase
1 parent 0f28f7e commit 15ac98b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

sqlalchemy_iris/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from sqlalchemy.sql import func
1212
from sqlalchemy.sql.functions import ReturnTypeFromArgs
1313
from sqlalchemy.sql.elements import Null
14+
from sqlalchemy.sql.elements import quoted_name
1415
from sqlalchemy.sql import expression
1516
from sqlalchemy.sql import schema
1617
from sqlalchemy import sql, text
@@ -1676,3 +1677,8 @@ def get_view_definition(self, connection, view_name, schema=None, **kw):
16761677
if view_def:
16771678
return view_def
16781679
raise exc.NoSuchTableError(f"{schema}.{view_name}")
1680+
1681+
def normalize_name(self, name):
1682+
if self.identifier_preparer._requires_quotes(name):
1683+
return quoted_name(name, quote=True)
1684+
return name

0 commit comments

Comments
 (0)