Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjustment to support Databases and SQLAlchemy 2.0 #1155

Open
mes5k opened this issue May 8, 2024 · 0 comments
Open

Adjustment to support Databases and SQLAlchemy 2.0 #1155

mes5k opened this issue May 8, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mes5k
Copy link

mes5k commented May 8, 2024

I tried using fastapi-pagination on a FastAPI + Databases project where I ran databases version 0.9.0 with SQLAlchemy > 2.0.

This line fails: https://github.com/uriyyo/fastapi-pagination/blob/main/fastapi_pagination/ext/databases.py#L30

select([func.count()]) needs to become select(func.count()) (i.e. remove brackets) for SQLAlchemy 2.0.

I'm not sure how you want to handle compatibility with different versions of SQLAlchemy, otherwise I would have created a PR.

@uriyyo uriyyo self-assigned this May 10, 2024
@uriyyo uriyyo added the bug Something isn't working label May 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants