47ng / 47ng/prisma-field-encryption
Feature Request: Support upserts
- Lingua principale
- TypeScript
- Stelle
- 306
- Fork
- 40
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
First of all, thank you for such a solid package!
I am unsure if it's a realistic request, but I couldn't find any discussion, issue, or PR alluding to [upserts](https://www.prisma.io/docs/orm/reference/prisma-client-reference#upsert) so I want to start the conversation.
Given that there is currently support for the `findUnique` Prisma API, and the `create` and `update` methods generate an encrypted field's hash counterpart, would it be possible to extend support to `upsert`? Perhaps beyond that question, would nested `upsert` operations also be possible?
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
The issue mentions extending the existing middleware to support the Prisma `upsert` operation and possibly nested upserts. Start by examining the current implementation of `findUnique`, `create`, and `update` handlers in the codebase to understand how field encryption is applied. Look for the middleware or hook files that intercept Prisma operations. Determine how to modify the logic to handle the conditional create/update flow of an upsert, ensuring encrypted fields are properly hashed. Check if there are existing tests for other operations to use as a reference for writing tests for upsert.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- typescript
- Ambito
- backend-api-design, databases
- Tipo di issue
- Funzionalità
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100