Skip to content
Advertisement

Tag: prisma

RegExp not working in prisma aggregateRaw for MongoDB

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’t like the RegExp or /regex/ notation. This same query works from mongosh command line though.

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 like this: I am trying to run

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 Magnificent’, profileViews: 0, role: ‘admin’ } } Unknown arg email in where.email for type prismaUserWhereUniqueInput. Did you mean id? Available args: type prismaUserWhereUniqueInput { id? My

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, queryString] = await this.prisma.$transaction([ this.prisma.$executeRawCALL transfer_transactions(${login_id},@transaction);, this.prisma.$queryRawSELECT @transaction FROM DUAL;, ]); } error displayed while executing API Invalid prisma.executeRaw() invocation: Raw query failed. Code: 42703. Message: column “transaction_idout” does

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_projectnode_modulesprismaquery_engine-windows.dll.node’ I tried to remove node_modules and re-install all modules but it not worked.

Advertisement