File tree 3 files changed +21
-5
lines changed
3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change 1
1
Changelog
2
2
=========
3
3
4
+ 3.0.1
5
+
6
+ Fixes
7
+ ~~~~~
8
+
9
+ - Fixed an issue causing `sqlalchemy_hana.elements.view ` to fail with sqlalchemy 2.0.38
10
+
4
11
3.0.0
5
12
-----
6
13
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
5
5
[project ]
6
6
name = " sqlalchemy-hana"
7
- version = " 3.0.0 "
7
+ version = " 3.0.1 "
8
8
description = " SQLAlchemy dialect for SAP HANA"
9
9
keywords = [" sqlalchemy" , " sap" , " hana" ]
10
10
requires-python = " ~=3.9"
@@ -41,7 +41,7 @@ dev = [
41
41
" pre-commit==4.1.0" ,
42
42
" flake8==7.1.1" ,
43
43
" pylint==3.3.4" ,
44
- " mypy==1.14.1 " ,
44
+ " mypy==1.15.0 " ,
45
45
" types-hdbcli==2.23.0.20241221" ,
46
46
" typing-extensions==4.12.2" ,
47
47
]
Original file line number Diff line number Diff line change @@ -35,9 +35,18 @@ def __init__(self, name: str):
35
35
def view (name : str , selectable : AnySelect ) -> TableClause :
36
36
"""Helper function to create a view clause element."""
37
37
clause = table_clause (name )
38
- clause ._columns ._populate_separate_keys (
39
- col ._make_proxy (clause ) for col in selectable .selected_columns
40
- )
38
+
39
+ iter_ = []
40
+ for col in selectable .selected_columns :
41
+ try :
42
+ iter_ .append (col ._make_proxy (clause )) # type:ignore
43
+ except TypeError :
44
+ iter_ .append (
45
+ col ._make_proxy (
46
+ clause , clause .primary_key , clause .foreign_keys # type:ignore
47
+ )
48
+ )
49
+ clause ._columns ._populate_separate_keys (iter_ )
41
50
return clause
42
51
43
52
You can’t perform that action at this time.
0 commit comments