Conversation
|
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/flortz/fastapi-crudrouter/EAS4myHY5LcKjZqzoaV1XjS28kmP |
|
Wow, I was just working on this myself after abandoning ormar in favor of using async sqlalchemy but yours looks great and I hope it is merged quickly. |
|
Hi @il-s thanks for this! Sorry for the delay, I've been quite busy. I am totally on board with adding support for this, however I have a couple questions:
Thanks again for this 🚀 |
|
@awtkns |
|
for the test, I used db_func like so: ` |
|
@awtkns, need review! |
…alse: not; None: autodetect)
|
HI @il-s, looking good! I am hoping to get this in and released tomorrow! I just need to add it to the test framework and write some documentation for it 🚀 |
|
@awtkns |
|
Hi @awtkns , any status on this? |
| try: | ||
| (model,) = ( | ||
| await db.execute( | ||
| select(self.db_model).where(self.db_model.id == item_id) |
There was a problem hiding this comment.
Just fyi... my team noticed this doesn't work with PK's not named "id". I think this code might work better:
| select(self.db_model).where(self.db_model.id == item_id) | |
| select(self.db_model).where(getattr(self.db_model, self._pk) == item_id) |
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Hi, I liked the idea of your project and needed to make a fastapi router that will work with SQLAlchemy in asynchronous mode.
Also this answers issue number #87