sqlalchemy-stubs
sqlalchemy-stubs copied to clipboard
Columns should act as proxies to the Comparator class of underlying types
For example Column(ARRAY(Integer())).any is sqlalchemy.sql.sqltypes.ARRAY.Comparator.any. We should support this. This requires both a plugin update and filling in comparator classes in stubs.
This may be tricky because column types depend on Python types, not on SQL types, i.e. Column[str] not Column[String]. Now it looks like choosing the former and not the latter was a bad decision, but now it is hard to change because it may break lots of working annotations in user code.