Skip to content
created by Aha00aAha00a at 2021-04-29
last modified by Aha00aAha00a at 2026-10-03
revision: 12

Prisma

Software Source Code Software Application

Next-generation ORM

for Node.js and TypeScript

1. Command

npm install prisma --save-dev
prisma init
prisma db pull
prisma generate

2. Raw Query

await prisma.$executeRaw`SELECT 1`;

3. Mono-repo

모노리포 + 워크스페이스별 Database를 구성할 경우 project의 @prisma/client를 참조하면 문제가 생기기에 workspace별로 client를 따로 생성해 주어야한다. 그리고 생성된 파일은 ignore.

  • schema.prisma
    generator client {
      provider = "prisma-client-js"
      output   = "../gen/client"
    }
  • code
    const { PrismaClient } = require('../gen/client');

--2025-10-20

4. See Also

4.2. Adjacent Pages

Control
≤ 32
all
1.0x
1.0x
80
-120
ON
Metrics
Nodes(visible/total)0/0
Links(visible/total)0/0
Avg degree0.00
Depth coverage0
Queue(fetch/graph)0 / 0
Zoom(scale)1.00x
Ctrl/⌘ + Scroll: Zoom
Root 1-hop 2-hop+