May I add an extra overload for the select
function, for 5 arguments, or is there a reason for this limit?
#1280
Replies: 3 comments 1 reply
-
Seems like it would even be as trivial as just increasing the following and then regenerating the source file: sqlmodel/scripts/generate_select.py Line 16 in 7d00768 Might as well go up to like 10 or 20 since it's just autogenerated at no additional effort. |
Beta Was this translation helpful? Give feedback.
-
This is really confusing behaviour. I was double-checking all of my tables to see if I was missing some definition until I figured out that the total number of tables in the |
Beta Was this translation helpful? Give feedback.
-
The docstring does not document this limitation: from sqlmodel import select
help(select)
It looks like |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
First Check
Commit to Help
Example Code
Description
I am trying to write a select statement that selects 5 different SQLModel children. However I get a type error as the overloads for
select
are limited to 4.Other people have had this issue too, eg here. The fix seems to be to fallback to SQLAlchemy, but then we lost the beautiful typing of SQLModel.
I am happy to fix this problem by adding extra overloads. Or is there some reason this is capped to 4? Thank you very much and I'll do my best to push the help forward!
Operating System
macOS
Operating System Details
No response
SQLModel Version
0.0.22
Python Version
3.11.9
Additional Context
No response
Beta Was this translation helpful? Give feedback.
All reactions