Closed jossefaz closed 9 months ago
I think we can perform an outer join using the join()
method by setting is_outer=True.
Example: .join(is_outer=True)
.
Ref: https://docs.sqlalchemy.org/en/20/core/selectable.html#sqlalchemy.sql.expression.Select.join
Can you please add more context to the question?
I'm using async SQLAlchemy with the asyncmy driver for MySQL in a FastAPI application. My code works fine when using .join(), but when I switch to .outerjoin(), I encounter a MissingGreenlet error. I'm trying to perform a query involving two tables (Table1 and Table2), counting entries from Table2 related to Table1.
Switching from
join
toouterjoin
causes this error :UPDATE:
I tried to switch from asyncmy to aiomysql : got the same error So i is probably not an error from asyncmy, howeverm any help would be blessed !