Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Spike] : Investigate Prisma Client Extensions (PCE) #4296

Open
YazeedLoonat opened this issue Sep 3, 2024 · 0 comments
Open

[Spike] : Investigate Prisma Client Extensions (PCE) #4296

YazeedLoonat opened this issue Sep 3, 2024 · 0 comments
Labels
spike Ticket for discovery and research

Comments

@YazeedLoonat
Copy link
Collaborator

We want to investigate Prisma Client Extensions (PCE): https://www.prisma.io/docs/orm/prisma-client/client-extensions

what we would like to do is build a custom query (or set of queries) to "update" supporting records as in-place as possible

if we take Listing -> Listing Events as our example:
we want to build a custom extension such that:

  • if its a new listing event it gets created in the db
  • if its a listing event that is being removed from the db it gets deleted from the db
  • if its a listing event that is getting updated then update it in place
  • if its a listing event that has no changes, do nothing to it

the way it currently works is we delete all listing events and then re-create them. PCE might be able to reduce that churn and hopefully make the process easier, or at least more legible

@YazeedLoonat YazeedLoonat added the spike Ticket for discovery and research label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spike Ticket for discovery and research
Projects
None yet
Development

No branches or pull requests

1 participant