Skip to main content
Glama
prisma

Prisma MCP Server

Official
by prisma
tests.ts1.08 kB
import { randomBytes } from 'crypto' import testMatrix from './_matrix' // @ts-ignore import type { PrismaClient } from './generated/prisma/client' declare let prisma: PrismaClient testMatrix.setupTestSuite( () => { test('bytes upsert should work correctly', async () => { const byteId = new Uint8Array(randomBytes(16)) const upsertByteRow = () => prisma.testByteId.upsert({ create: { bytes: byteId, }, where: { bytes: byteId, }, update: {}, }) await upsertByteRow() // This second call was failing in v7 with "No record was found for an upsert" await upsertByteRow() // Should not throw // Verify the record exists and has correct data const result = await prisma.testByteId.findUnique({ where: { bytes: byteId }, }) expect(result).toBeTruthy() expect(result?.bytes).toEqual(byteId) }) }, { optOut: { from: ['sqlserver'], reason: 'SQL Server does not support bytes IDs', }, }, )

Latest Blog Posts

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