Skip to main content
Glama

Prisma MCP Server

Official
by prisma
Apache 2.0
4
44,213
  • Linux
  • Apple
tests.ts2.08 kB
import testMatrix from './_matrix' // @ts-ignore import type { PrismaClient } from './generated/prisma/client' declare let prisma: PrismaClient /** * Tests for: * - https://github.com/prisma/prisma/issues/22947 */ testMatrix.setupTestSuite( () => { test('concurrent upserts should succeed', async () => { const user = await prisma.user.create({ data: { name: 'Jeffrey Danley', email: 'jeff@mail.com', username: 'Fireship', avatar: 'https://yt3.googleusercontent.com/...', password: 'password123', bio: 'High-intensity ...', }, }) const videos = [ { name: 'browser past', url: '/static/videos/browser-paste.mp4', tags: ['Programming', 'Web Development', 'JavaScript'], }, { name: 'file types', url: '/static/videos/file-types.mp4', tags: ['Programming', 'Operating Systems'], }, { name: 'pages in 4d', url: '/static/videos/pages-in-3d.mp4', tags: ['Programming', 'Web Development', 'CSS'], }, { name: 'story of web', url: '/static/videos/story-of-web.mp4', tags: ['Programming', 'Web Development'], }, ] for (const video of videos) { const tags = await Promise.all( video.tags.map((name) => prisma.tag.upsert({ where: { name }, update: {}, create: { name }, }), ), ) const created = await prisma.video.create({ data: { title: video.name, description: video.name, url: video.url, userId: user.id, }, }) await Promise.all(tags.map((tag) => prisma.videoTag.create({ data: { videoId: created.id, tagId: tag.id } }))) } }) }, { optOut: { from: ['sqlserver', 'mongodb', 'postgresql', 'cockroachdb', 'mysql'], reason: 'Test is made for SQLite only', }, }, )

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