Woman wearing Vision Pro
PPrisma
•Created by Woman wearing Vision Pro on 5/25/2024 in #help-and-questions
Prisma with Accelerate TypeScript error
When I'm using Prisma with Accelerate, the Prisma types are not generated for the Accelerate extension. Trying to use
cacheStrategy
results in TS showing the following error:
I'm using SvelteKit and have the following setup:
src/app.d.ts
:
src/lib/server/prisma.ts
:
How can I fix this?8 replies
PPrisma
•Created by Woman wearing Vision Pro on 4/4/2024 in #help-and-questions
Optimizing a query
I currently have the following code to update the pricing of the items in the database:
This is a cron job that runs every day and I have 700 items. So every day, 700 queries are being executed.
This is not great, especially since I'm using Accelerate as this costs 21000 queries a month (700 * 30).
I don't know how to optimize this, since updateMany doesn't work with multiple different id's.
Any help would be great!
5 replies