Prisma helps app developers build faster and make fewer errors with an open source ORM for PostgreSQL, MySQL and SQLite.
12// Creating a new record
id | firstName | active | |
---|---|---|---|
1 | Patrick | patrick@prisma.io | true |
2 | Eden | eden@prisma.io | true |
3 | Dylan | dylan@prisma.io | false |
4 | Anki | anki@prisma.io | true |
5 | Juraci | juraci@prisma.io | false |
Central to Prisma is the schema - a declarative way to define your app's data models and their relations that's human-readable. And you don't have to painstakingly create it from scratch if you already have a database - prisma introspect
takes care of that.
1datasource db {2 provider = "sqlite"3 url = env("DATABASE_URL")4}56generator client {7 provider = "prisma-client-js"8}910model Post {11 id Int @id @default(autoincrement())12 title String13 content String?14 published Boolean @default(false)15 author User? @relation(fields: [authorId], references: [id])16 authorId Int?17}
Check out an example schema1await prisma.user2 .findUnique({3 where: { email: 'ada@prisma.io' }4 })5 .posts({6 where: {7 title: {89 }10 }11 })
Prisma Client is a query builder that composes the way you think and gets auto-generated from the Prisma schema with types tailored to your app. We designed the API to be intuitive for both SQL veterans and people brand new to databases.
Auto-completion, linting, formatting and more help Prisma developers in VSCode stay confident without distractions.
Download the Prisma VSCode ExtensionPrisma Client puts extra emphasis on extensive type safety for more productive development in TypeScript.
Type definitions in Prisma ClientBased on the Prisma Schema, Prisma Migrate automatically generates SQL database migrations, that are fully customizable. For quick data model prototyping in development,prisma db push
lets you make changes to the database without generating migration files.
The easiest way to explore and manipulate Data in your Prisma projects. Understand your data by browsing across tables and their relations and edit them with safety. Available for macOS, Windows and Linux.
Prisma is a server-side library that helps your app read and write data to the database in an intuitive and safe way.
Easy to integrate into your framework of choice, Prisma simplifies database access, saves repetitive CRUD boilerplate and increases type safety. It's the perfect database toolkit for building robust and scalable web APIs.
Easiest way to work with a database for this popular React framework
Query databases from your GraphQL servers easily with Prisma
Integrate Prisma with this popular server-side application framework
Easy way to query databases in this minimalist web framework.
Integrate Prisma with one of the most popular GraphQL platforms.
Query databases with easy from this backend framework.
Prisma’s YouTube channel is the headquarters for new weekly videos, livestreams, and meetups with Prisma folks and audience members.
Engage with a vibrant community of developers and companies adopting Prisma
Browse the Prisma source code, send feedback or join the discussion on GitHub.
Stay up to date with the latest features and changes to Prisma
Prisma © 2018-2021.
Made with ❤️ in Berlin and worldwide