Socket
Socket
Sign inDemoInstall

@prisma/client

Package Overview
Dependencies
0
Maintainers
6
Versions
8270
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @prisma/client

Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.


Version published
Weekly downloads
1.7M
increased by4.55%
Maintainers
6
Install size
8.54 MB
Created
Weekly downloads
 

Package description

What is @prisma/client?

The @prisma/client package is an auto-generated and type-safe query builder that's tailored to your data model. It's part of the Prisma ORM and is designed to make database access easy and intuitive in Node.js and TypeScript applications.

What are @prisma/client's main functionalities?

Fetching data

This feature allows you to fetch data from the database. The code sample demonstrates how to retrieve all records from the 'user' table.

const users = await prisma.user.findMany();

Creating data

This feature is used to create new records in the database. The code sample shows how to create a new user with a name and email.

const user = await prisma.user.create({ data: { name: 'Alice', email: 'alice@example.com' } });

Updating data

This feature allows you to update existing records in the database. The code sample demonstrates updating the name of a user with a specific ID.

const updateUser = await prisma.user.update({ where: { id: 1 }, data: { name: 'Bob' } });

Deleting data

This feature enables you to delete records from the database. The code sample shows how to delete a user with a particular ID.

const deleteUser = await prisma.user.delete({ where: { id: 1 } });

Other packages similar to @prisma/client

Readme

Source

Prisma Client · npm version PRs Welcome GitHub license Slack Discord

Prisma Client JS is an auto-generated query builder that enables type-safe database access and reduces boilerplate. You can use it as an alternative to traditional ORMs such as Sequelize, TypeORM or SQL query builders like knex.js.

It is part of the Prisma ecosystem. Prisma provides database tools for data access, declarative data modeling, schema migrations and visual data management. Learn more in the main prisma repository or read the documentation.

Getting started

Follow one of these guides to get started with Prisma Client JS:

Alternatively you can explore the ready-to-run examples (REST, GraphQL, gRPC, plain JavaScript and TypeScript demos, ...) or watch the demo videos (1-2 min per video).

Contributing

Refer to our contribution guidelines and Code of Conduct for contributors.

Tests Status

  • Prisma Tests Status:
    CI
  • Ecosystem Tests Status:
    Actions Status

Keywords

FAQs

Last updated on 23 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc