Closed brunolnetto closed 1 month ago
Hi,
This seems like something that should be in an external library.
Looking at the implementation it seems ok for the function part, but you should pass a class to the init, not an instance.
I'm also not sure how pydantic figures in this
Describe the use case
Hi guys. I have a use case which is oftentimes used along SQLAlchemy: the repository pattern. On this pattern, we separate concerns, storage and domain in such a way to allow acess along interface with the repository.
Databases / Backends / Drivers targeted
sqlalchemy 2.0.29
and Postgres 13Example Use
Additional context
The above implementation is not fully correct. However, due my partial knowledge on the library, it is still hard for me to fix on agile pace. I found this library redbird, which does not work with Pydantic V2, which is sad.