-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
For example: create()
right now takes Prisma.Args<Delegate, "create">, tx?: TransactionType
as parameters, but it should be just Prisma.Args<Delegate, "create">
.
We should create a facade to hide this current create()
, probably by prefixing it with an _
, and have a higher-level API that takes care of transaction creation and makes the tx
param required instead of optional.
This will simplify the API, make it more similar to Prisma, and reduce transaction bugs when passing around the tx
parameter. However, it will increase the complexity of the client's situation. Maybe something to work on in the future.
Tech debt cleanup:
- Better
_getStoresNeeded()
handling - An abstract class for all model classes instead of a base class
- Better
_applyRelations()
for all clauses - Facade API
- Cleanup repetitive code
- Use
for (const elem of arr)
instead ofarr.forEach((elem) => {})
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo