cunybpl / aiodal

async data access layer and related tools for sqlalchemy core
0 stars 0 forks source link

Remove/Replace `oqm` #32

Closed bsnacks000 closed 3 months ago

bsnacks000 commented 3 months ago

@tinnaing347 @kgasiorowski

We decided to drop the oqm package going forward. I think it makes sense to remove the package for 0.7 in favor of something closer to the generic crud implementations in hivedb and basatdb.

In hivedb we are using the dbentity interfaces to create controller classes which I think is the way forward since it is flexible to be able to define and return statements. The current version has only Controllers for Detail and List views but we can try to extend this pattern to implement full crud.

Also the underlying impl of our _default_paginator is used so that is something we can re-wrap.

bsnacks000 commented 3 months ago

removes oqm and related tests. This is obviously breaking backwards compatibility but is the only way to cleanly make progress.

In the current PR we can install web as an extra dependency like pip install aiodal[web] or using the extras flag in pyproject. This will bring in fastapi and jose.

I've decided to move all of what I consider "boilerplate" for our fastapi applications into the web package. Including our implementation of fastapi_auth0. This sort of makes aiodal an all in one web toolkit for building with asyncpg, sqlalchemy and Auth0.

The CRUD implementation is opinionated but flexible.