Skip to content

using sqlalchemy class models to generate queries #433

Answered by aminalaee
nbraun-wolf asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, I think with SQLAlchemy 1.4 this should work:

from sqlalchemy import select

query = select(User).where(User.name == 'spongebob')
await database.execute(query)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@nbraun-wolf
Comment options

Answer selected by nbraun-wolf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants