Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@prisma/client

Package Overview
Dependencies
Maintainers
3
Versions
9043
Alerts
File Explorer

Advanced tools

Socket logo

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.

  • 6.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.4M
increased by12.04%
Maintainers
3
Weekly downloads
 
Created

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

Keywords

FAQs

Package last updated on 02 Dec 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc