prisma-client-py
prisma-client-py copied to clipboard
Generate Async and Sync client together at the same time
Problem
In my project, i mixed sync and async operations together, so i have to use sync and async in the same project but not in the same context.
Suggested solution
Shall we just generate sync and async clients together?
Alternatives
for now i write two generator, and generate clients to different position. but the problem here
- i have to commit the code along with code, which a little bit annoying
- partial types feature does work anymore. because it share the same context between prisma cli and generated python model.
Additional context
hi i am willing to contribute this feature. would you mind giving me some instruction about how to involve it? thank you!
I appreciate it @Gnosnay! Unfortunately I think this feature isn't feasible for an external contributor that is new to this codebase as it requires a deep refactor of a large part of this library.
I have started on this refactor in https://github.com/RobertCraigie/prisma-client-py/pull/873 :)
Current TODOs:
- [ ] Figure out structure for
Model.prisma()
- [ ] Figure out structure for registering clients
- [ ] Generate separate sync / async actions classes
- [x] Define separate sync / async transaction managers
- [ ] Generate separate sync / async batch actions classes