Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,213
  • Linux
  • Apple
tests.ts1.2 kB
import testMatrix from './_matrix' // @ts-ignore import type { Prisma as PrismaNamespace, PrismaClient } from './generated/prisma/client' declare let prisma: PrismaClient declare let Prisma: typeof PrismaNamespace // https://github.com/prisma/prisma/issues/15079 testMatrix.setupTestSuite( () => { // https://github.com/prisma/prisma/issues/15079#issuecomment-1232689729 const data = { id_periode: 90, } test('should not throw an error when upserting a @db.Decimal(2, 0)', async () => { const created = await prisma.aktivasi_bku.upsert({ where: { id: 'some-random-id', }, create: data, update: data, }) expect(created.id_periode).toEqual(new Prisma.Decimal(data.id_periode)) const upserted = await prisma.aktivasi_bku.upsert({ where: { id: created.id, }, create: data, update: data, }) expect(upserted).toMatchObject({ id: created.id, id_periode: new Prisma.Decimal(data.id_periode) }) }) }, { optOut: { from: ['cockroachdb', 'mongodb', 'mysql', 'postgresql', 'sqlite'], reason: 'Only applicable to sqlserver', }, }, )

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/prisma/prisma'

If you have feedback or need assistance with the MCP directory API, please join our Discord server