Skip to content

Introduction

Welcome to the Prisma Dart Client, this documentation will help you get started quickly. If you encounter any problems during use, please submit them in GitHub Discussions.

What is Prisma?

Prisma unlocks a new level of developer experience when working with databases thanks to its intuitive data model, automated migrations, type-safety & auto-completion.

Learn more about Prisma

What is Prisma Client Dart?

Prisma Client Dart is a Dart ORM that is published on pub.dev with the package name orm. It uses Prisma Engine as the data access layer and tries to keep the API as consistent as possible with Prisma JS/TS Client.

Why Prisma Client Dart package name is orm?

Because the package name prisma has been occupied, and the package has not been widely used and the author is no longer updating it. When we released Prisma Dart Client, we contacted the author of the prisma package, but did not get a reply.

TIP

Prisma Client Dart is an open source project maintained by Seven Du. It allows you to use Prisma ORM in Dart. It is not directly related to Prisma Data Inc., but it Is a member of the Prisma ecosystem. Thanks to the great open source community, thanks to the great Prisma ORM project.

Installation

Install Prisma Client Dart is very simple, Prisma is a Node.js project, so it is not a one-step process. If you encounter any problems during the installation process, you can submit a discussion in GitHub Discussions.

Prerequisites

Install Bun.js/Node.js

Install Prisma CLI

Please open your project directory, usually the directory where pubspec.yaml is located, if it is a Mono Repo project, then please open your project root directory.

If you don't have a project yet, use dart create to create one.

Please run the following command to install Prisma CLI:

bash
bun add prisma
bash
npm install prisma
bash
pnpm add prisma

Prisma Official installation documentation can be found here 👉 Prisma CLI install

Install orm (Prisma Client Dart)

Please run the following command to install orm:

bash
# Dart project 👇
dart pub add orm

# Flutter project 👇
flutter pub add orm

Or add the following to your pubspec.yaml file:

yaml
dependencies:
  orm: latest

Released under the BSD-3-Clause License