Prisma

P

Prisma

Join the community to ask questions about Prisma and get answers from other members.

Join

0% cache hits

I just setup accelerate and have verified it's working, but I keep getting 0% cache hit rate. How do I debug this? I think I am making the exact same query repeatedly

data optimization

Hello everyone, I'm really stuck and need help. I have a PostgreSQL database running with Docker on my VPS server. I was given a CSV file with over 60,000 rows, and my Next.js application is hosted on the same VPS. On my local machine, it works fine with no delay or timeout. However, after deploying, I noticed it was extremely slow. Most times, the requests time out because I'm trying to fetch all the data to create a dashboard. I think the problem might be related to how I'm making the database calls. I would be really grateful if someone could hop on a call or review my code to see what I can change to improve performance. here is the github link https://github.com/alidauda/Analysis-...

createManyAndReturn order preservation?

do we know if the order of the created entities in the returned list is the same as the input list? couldn't find anything in the docs!...

New Prisma 5.19 TypeSQL: other statements beyond select

Greetings The TypeSQL support an insert statement like this? (Assuming PostGIS was installed). INSERT INTO locations (name, geom)...

Prisma Types

Pls somebody help with these types ```js type PostFindUniqueResult = Prisma.Result< typeof db.post,...

As a fullStack developer, I am looking for new project

I am a fullStack developer and 9 years of experience about web/mobile development. main skills are React, Next, Angular, Vue, Sveltekit, Django, PHP, Laravel. Currently I am focusing miniApp and Web3 projects. If you need my help, call me anytime...

Unknown authentication plugin

Hello Team, Do i need to switch ORM or is there a plugin for this issue? Error: "Unknown authentication plugin" Instead of clear password I provide AWS token to the connection URL....

Deploying to Vercel

From what I can see by searching, it seems I'm not the first one.... But I've now been stuck for days trying to deploy to Vercel, a NextJS app using Prisma. ✅ All works fine locally ✅ I've added a postinstall script to generate the client, I see no build errors, prisma client is generated fine in the build logs ✅ prisma.myModel.findMany(....) returns data...

Clarification on Prisma and DB Congruence

Dear Prisma Support Staff, I hope this message finds you well! I am a Software Engineering student currently using Prisma and have some clarifications to make. I have read in the documentation that the Prisma Schema is the single source of truth and it can either be pushed or migrated to the backend to construct the backend, or if the backend has already constructed Prisma may introspect the backend to construct the schema. Thus, it is my understanding that the Prisma schema follows a similar configuration to the database records. ...

Prisma Pulse with nextjs

Did anyone ever try this? i did try but im not sure where should i run the prisma pulse in my apps. API? Direct in page.tsx?

Validator questions

I'm trying to operate partial type of my User model as I omit the passwordHash field at instantiation. When I follow the docs I end up with the select included in the type, this is from my sveltekit app: ``` import { Prisma, type User } from 'prisma/prisma-client' const partialUser = Prisma.validator<Prisma.UserDefaultArgs>()({ select:{ email: true, givenName: true }...
Solution:
Can you try this code? ```js import { Prisma } from '@prisma/client' const partialUser = Prisma.validator<Prisma.UserDefaultArgs>()({...

cacheStrategy in local dev

https://www.prisma.io/docs/accelerate/local-development#using-prisma-accelerate-client-extension-in-development-and-production specifies how to use prisma accelerate client extension in local development, but it's incomplete. Most of my prisma queries have the cacheStrategy property specified. This works fine in production with the accelerate client, but fails with the non-accelerate client. Is the best practice here to just go through and comment out 50+ instances of cacheStrategy before developing your app locally and then uncomment it later when pushing?...

Connection Pool Timeout Issue Despite Custom Limit

I'm intermittently encountering a "Timed out fetching a new connection from the connection pool" error, even though I’ve set a custom connection limit of 70: Invalid prisma.entity.findFirstOrThrow() invocation: Timed out fetching a new connection from the connection pool. More info: http://pris.ly/d/connection-pool (Current connection pool timeout: 10, connection limit: 70) ...

Prisma support for PostGIS/GIS

Are there any plans for adding PostGIS/GiS support in the pipeline for Prisma? I've seen some people manage some workarounds but it seems too unstable to use in production.

Prisma Client: Injectable Setup Outside NestJS (with/without DI)?

In NestJS, the Prisma Client can be made injectable by extending PrismaClient and implementing lifecycle hooks like onModuleInit to manage connections. Here's how it's typically done in NestJS: ```typescript import { Injectable, OnModuleInit, INestApplication } from '@nestjs/common'; import { PrismaClient } from '@prisma/client';...

is there a `substring` method in prisma?

is there a substring method in prisma?

How can I disconnect a relation by using it's fields?

I need to disconnect a relation, but I cannot access the actual relation field due to the way it is setup. Let's say there is a relation called author, and I only have access to authorId, can I disconnect it by setting authorId to null/undefined?...

Prisma so slow in localhost with remote Postgresql (NextJS)

My website in local with remote postgresql is so slow but all good on deployed website using NextJS

Is support for Postgres composite types planned?

I'm just wondering if there's a specific reason for it not being currently supported since it's been a thing for a while

Prisma and CUIDv2

why prisma doesnt support cuidv2? in sense that it doesnt let you generate cuidv2 by default