gorilla-co / odata-query

An OData v4 query parser and transpiler for Python
MIT License
71 stars 16 forks source link

Support relationship traversal and `any/all` in SQLAlchemy Core #32

Open OliverHofkens opened 1 year ago

OliverHofkens commented 1 year ago

Basic support for SQLAlchemy Core was added in v0.7.0, but this does not include relationship traversal (e.g. author/blogposts) or collection lambda blogposts/any(b: b/title eq 'test') functionality.

To implement this we need a way to find the related table and its target column. In the ORM visitor, this is easy because mapped models usually include a relationship attribute with all necessary details. Core Table objects seem to lack such a linking property.

All integration tests for this are already present, but currently marked xfail.