Up to 1000x faster database queries with Accelerate -> Sign up for Early Access
prisma_logo
Product

Prisma ORM

Client
Write Queries the way you think
Migrate
Generate customisable SQL migrations

Prisma Data Platform

Accelerateearly access
Query up to 1000x faster
Data Browser
Explore and manipulate data in your projects
Data Proxy
Manage and scale your connection pool
Docs
Developer
Get Started
Tutorials
Playground
Prisma Examples
Prisma in your Stack
Support
Ecosystem
Community
Data Guide
Prisma
Playground
Use Cases
Customer Stories
Learn about applications built with Prisma
Enterprise
Up-level your applications with our Data Platform
Company
About
Blog
Careers
Events
Causes

Latest from the blog

Get Started
Get StartedConceptsGuidesReferencePrisma Data PlatformAbout
Docs
    • Concepts
      • Overview
        • What is Prisma?
        • Why Prisma?
        • Should you use Prisma?
        • Prisma in your stack
      • Components
        • Prisma schema
        • Prisma Client
          • Working with PrismaClient
            • Generating the client
            • Instantiating the client
            • Using custom model and field names
            • Connecting and disconnecting
            • Connection pool
            • Configuring logging
            • Configuring error formatting
          • CRUD
          • Select fields
          • Relation queries
          • Filtering and sorting
          • Working with fields
          • Advanced type safety
          • Middleware
          • Pagination
          • Aggregation, grouping, and summarizing
          • Composite types
          • Transactions and batch queries
          • Full-text searchPreview
          • Custom validation
          • Computed fields
          • Excluding fields
          • Custom models
          • Case sensitivity
          • Null and undefined
          • Raw database access
          • Debugging
          • Module bundlers
          • Database polyfills
          • Handling exceptions and errors
          • MetricsPreview
          • OpenTelemetry tracingPreview
          • Prisma Client extensionsPreview
        • Prisma Migrate
        • Introspection
        • Prisma CLI
        • Prisma Studio
        • Prisma engines
        • Preview features
      • Database connectors
        • PostgreSQL
        • MySQL
        • SQLite
        • MongoDB
        • CockroachDB
        • Microsoft SQL Server
      • More
        • Telemetry
        • Comparing Prisma
Concepts / Components / Prisma Client

Working with PrismaClient

This section describes how to generate, configure, and instantiate PrismaClient , as well as when and how to actively manage connections.

In this section

  • Generating the client
  • Instantiating the client
  • Using custom model and field names
  • Connecting and disconnecting
  • Connection pool
  • Configuring logging
  • Configuring error formatting

Was this helpful?

Edit this page on GitHub
ON THIS PAGE
  • In this section

Product

ClientMigrateData BrowserData ProxyPricing

Developers

DocsGet StartedPrisma ExamplesData GuidePrisma in your StackSupportCommunityData Platform Status

Use Cases

Customer StoriesEnterprise

Company

AboutBlogCareers EventsCausesTerms & Privacy

Newsletter

prisma_logo
© 2023 Prisma Data, Inc.