sqlalchemy-stubs icon indicating copy to clipboard operation
sqlalchemy-stubs copied to clipboard

Columns should act as proxies to the Comparator class of underlying types

Open ilevkivskyi opened this issue 6 years ago • 0 comments

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.

ilevkivskyi avatar Jun 21 '19 20:06 ilevkivskyi