I’m new to mongo and prisma in javascript. This is a mongo query using prisma’s aggregateRaw method. The cond should do a case-insensitive string comparison. For example if $$property.property_name is “The Brough”, a regex /the br/i should be true. Prisma throws an error it doesn’…
Tag: prisma
Resolve promise inside javascript map function
I have gone through several questions and posts regarding how to accomplish this but none have worked. I have tried an array (no pun intended) of possible solutions involving Promise.*, thenable, await and none have worked. I have an array of payments that I extract from a Prisma db call, the object looks lik…
MongoDB & Prisma: unilateral M-to-N relation
Is there a way to make an unilateral m-to-n relation or must both collections have each other’s ids? I’m trying to do something like this: But prisma is making me add another field to Country to store the users ids… Like this: I don’t need that data and it’s not logically needed.…
Problem with prisma .upsert, Unkown argument
I have problem with prisma upsert(), I get info: PrismaClientValidationError: Invalid prisma.prismaUser.upsert() invocation: { where: { email: ‘viola@prisma.io’ ~~~~~ }, update: { name: ‘Viola the Magnificent’ }, create: { email: ‘viola@prisma.io’, name: ‘Viola the Ma…
ERROR [ExceptionsHandler] Invalid `prisma.executeRaw()` invocation: ERROR [ExceptionsHandler] Invalid `prisma.executeRaw()` invocation:
my Stored procedure CREATE OR REPLACE PROCEDURE public.transfer_transactions( initiated_by integer, OUT transaction integer) LANGUAGE ‘plpgsql’ AS $BODY$ $BODY$; Calling the sp from nestjs prisma client async create(createTransactionDto: CreateTransactionDto) { const [callGetSequenceBlock, querySt…
get id value from req.body.id for new value of object
I have a field with id value in it. It auto created while created a new data. Concatenated with string. I have doing a try, but it gets undefined value. code: result: Answer Do you sure you sent the id property to the server? or was it just created by the ORM?
error An unexpected error occurred: “EPERM: operation not permitted, unlink ‘path_to_project\node_modules\prisma\query_engine-windows.dll.node’
I installed Prisma and I run npx primsa db push it pushed all tables to database successfully, after that I run npx prisma generate it tried to install @prisma/client and it fails with this error message: error An unexpected error occurred: “EPERM: operation not permitted, unlink ‘path_to_projectn…
Array inside an map function seems to receive data, outside the map it was empty
I’m making a simple GET and POST with NodeJS and Express just for learning a little about PrismaJS with MySQL database. I want to pass the value of the array grouped to the creating function, when I use console.log(grouped) inside the map function I have the values I want, outside it keeps empty [], als…