PackageTrack

npm ยท #3659

@prisma/client

7.10.0prisma/prisma โ†—

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.

Release timeline

10652 releases since 2020
2020202120222023202420252026

Releases

  1. 6.8.0-dev.3512 May 2025pre-release

    Nothing published for this version

  2. 6.8.0-dev.3412 May 2025pre-release

    Nothing published for this version

  3. 6.8.0-dev.3312 May 2025pre-release

    Nothing published for this version

  4. 6.8.0-dev.3212 May 2025pre-release

    Nothing published for this version

  5. 6.8.0-dev.3112 May 2025pre-release

    Nothing published for this version

  6. 6.8.0-dev.3010 May 2025pre-release

    Nothing published for this version

  7. 6.8.0-dev.299 May 2025pre-release

    Nothing published for this version

  8. 6.8.0-dev.289 May 2025pre-release

    Nothing published for this version

  9. 6.8.0-dev.279 May 2025pre-release

    Nothing published for this version

  10. 6.8.0-dev.268 May 2025pre-release

    Nothing published for this version

  11. 6.8.0-dev.258 May 2025pre-release

    Nothing published for this version

  12. 6.8.0-dev.247 May 2025pre-release

    Nothing published for this version

  13. 6.8.0-dev.237 May 2025pre-release

    Nothing published for this version

  14. 6.8.0-dev.227 May 2025pre-release

    Nothing published for this version

  15. 6.8.0-dev.217 May 2025pre-release

    Nothing published for this version

  16. 6.8.0-dev.207 May 2025pre-release

    Nothing published for this version

  17. 6.8.0-dev.196 May 2025pre-release

    Nothing published for this version

  18. 6.8.0-dev.186 May 2025pre-release

    Nothing published for this version

  19. 6.8.0-dev.176 May 2025pre-release

    Nothing published for this version

  20. 6.8.0-dev.165 May 2025pre-release

    Nothing published for this version

  21. 6.8.0-dev.155 May 2025pre-release

    Nothing published for this version

  22. 6.8.0-dev.145 May 2025pre-release

    Nothing published for this version

  23. 6.8.0-dev.135 May 2025pre-release

    Nothing published for this version

  24. 6.8.0-dev.125 May 2025pre-release

    Nothing published for this version

  25. 6.8.0-dev.112 May 2025pre-release

    Nothing published for this version

  26. 6.8.0-dev.102 May 2025pre-release

    Nothing published for this version

  27. 6.8.0-dev.92 May 2025pre-release

    Nothing published for this version

  28. 6.8.0-dev.82 May 2025pre-release

    Nothing published for this version

  29. 6.8.0-dev.72 May 2025pre-release

    Nothing published for this version

  30. 6.8.0-dev.61 May 2025pre-release

    Nothing published for this version

  31. 6.8.0-dev.530 Apr 2025pre-release

    Nothing published for this version

  32. 6.8.0-dev.430 Apr 2025pre-release

    Nothing published for this version

  33. 6.8.0-dev.330 Apr 2025pre-release

    Nothing published for this version

  34. 6.8.0-dev.230 Apr 2025pre-release

    Nothing published for this version

  35. 6.8.0-dev.129 Apr 2025pre-release

    Nothing published for this version

  36. 6.7.029 Apr 2025
    Release notes

    Today, we are excited to share the 6.7.0 stable release ๐ŸŽ‰

    ๐ŸŒŸ Help us spread the word about Prisma by starring the repo โ˜๏ธ or posting on X about the release.

    Highlights

    Prisma ORM without Rust engines (Early Access)

    If you're a regular visitor of our company blog, you may already know that we're currently working on moving the core of Prisma from Rust to TypeScript. We have written extensively about why we're moving away from Rust and already shared the first measurements of performance boosts we saw from the re-write.

    This re-write is not just a move from one programming language to another. It fundamentally improves the architecture of Prisma ORM and replaces the Query Engine (which is written in Rust and deployed as a standalone binary) with a much leaner and more efficient approach that we call Query Compiler.

    In this release, we're excited to give you Early Access to the new Query Compiler for PostgreSQL and SQLite database ๐Ÿฅณ Support for more database will follow very soon!

    To use the new "Rust-free" version of Prisma ORM, add the queryCompiler (new) and driverAdapters feature flags to your client generator:

    generator client {
      provider        = "prisma-client-js"
      previewFeatures = ["queryCompiler", "driverAdapters"]
      output          = "../generated/prisma"
    }
    

    Now run prisma generate to re-generate Prisma Client. If you didn't use a driver adapter before, you'll need to install one. For example, the one for PostgreSQL:

    npm install @prisma/adapter-pg
    

    Once installed, you can instantiate PrismaClient as follows:

    import { PrismaPg } from '@prisma/adapter-pg'
    import { PrismaClient } from './generated/prisma'
    
    const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
    const prisma = new PrismaClient({ adapter })
    

    This version of PrismaClient doesn't have a Query Engine binary and you can use it in the exact same way as before.

    ๐Ÿ“š Learn more in the docs.

    Support for better-sqlite3 JavaScript driver (Preview)

    Driver adapters are Prisma ORM's way of letting you use JS-native drivers (like pg) to interact with your database. In this release, we're introducing a new driver adapter for using the better-sqlite3 package, so you can now interact with SQLite database in a JS-native way.

    To use it, first enable the driverAdapters Preview feature flag in on your client generator, then install these libraries:

    npm install @prisma/adapter-better-sqlite3
    

    Now you can instantiate Prisma Client as follows:

    import { PrismaBetterSQLite3 } from '@prisma/adapter-better-sqlite3';
    import { PrismaClient } from './generated/prisma';
    
    const adapter = new PrismaBetterSQLite3({
      url: "file:./prisma/dev.db"
    });
    const prisma = new PrismaClient({ adapter });
    

    ๐Ÿ“š Learn more in the docs.

    Multi-file Prisma schemas are now production-ready

    The prismaSchemaFolder Preview feature is moving into General Availability ๐ŸŽ‰ With that change, Prisma ORM now by default supports splitting your Prisma schema file and e.g. lets you organize your schema as follows:

    prisma/schema.prisma โ†’ defines data source and generator

    datasource db {
      provider = "postgresql"
      url      = env("DATABASE_URL")
    }
    
    generator client {
      provider = "prisma-client-js"
    }
    

    prisma/models/posts.prisma โ†’ defines Post model

    model Post {
      id        Int     @id @default(autoincrement())
      title     String
      content   String?
      published Boolean @default(false)
      author    User?   @relation(fields: [authorId], references: [id])
      authorId  Int?
    }
    

    prisma/models/users.prisma โ†’ defines User model

    model User {
      id    Int     @id @default(autoincrement())
      email String  @unique
      name  String?
      posts Post[]
    }
    

    โš ๏ธ Note that there have been breaking changes to the prismaSchemaFolder Preview feature in the last 6.6.0 release. If you've been using this feature to split your Prisma schema, make sure to read the release notes and update your project accordingly.

    ๐Ÿ“š Learn more in the docs.

    Splitting generated output with new prisma-client generator (Preview)

    With the prisma-client-js generator, the generated Prisma Client library is put into a single index.d.ts file. This sometimes led to issues with large schemas where the size of the generated output could slow down code editors and breaking auto-complete.

    As of this release, our new prisma-client generator (that was released in 6.6.0) now splits the generated Prisma Client library into multiple files and thus avoids the problems of a single, large output file.

    Also: As a bonus, we now ensure that generated files do not raise any ESLint and TypeScript errors!

    Before

    generated/
    โ””โ”€โ”€ prisma
        โ”œโ”€โ”€ client.ts
        โ”œโ”€โ”€ index.ts # -> this is split into multiple files in 6.7.0
        โ””โ”€โ”€ libquery_engine-darwin.dylib.node
    

    After

    generated/
    โ””โ”€โ”€ prisma
        โ”œโ”€โ”€ client.ts
        โ”œโ”€โ”€ commonInputTypes.ts
        โ”œโ”€โ”€ enums.ts
        โ”œโ”€โ”€ index.ts
        โ”œโ”€โ”€ internal
        โ”‚   โ”œโ”€โ”€ class.ts
        โ”‚   โ””โ”€โ”€ prismaNamespace.ts
        โ”œโ”€โ”€ libquery_engine-darwin.dylib.node
        โ”œโ”€โ”€ models
        โ”‚   โ”œโ”€โ”€ Post.ts
        โ”‚   โ””โ”€โ”€ User.ts
        โ””โ”€โ”€ models.ts
    

    ๐Ÿ“š Learn more in the docs.

    Company news

    Our team has been busy shipping more than just the ORM! Check out these articles to learn what else we've been up to recently:

    Open source โ†’
  37. 6.7.0-integration-push-sunrovnkrkpv.19 Apr 2025pre-release

    Nothing published for this version

  38. 6.7.0-integration-push-qwtnrmswnvqm.123 Apr 2025pre-release

    Nothing published for this version

  39. 6.7.0-dev.5429 Apr 2025pre-release

    Nothing published for this version

  40. 6.7.0-dev.5328 Apr 2025pre-release

    Nothing published for this version

  41. 6.7.0-dev.5228 Apr 2025pre-release

    Nothing published for this version

  42. 6.7.0-dev.5128 Apr 2025pre-release

    Nothing published for this version

  43. 6.7.0-dev.5028 Apr 2025pre-release

    Nothing published for this version

  44. 6.7.0-dev.4926 Apr 2025pre-release

    Nothing published for this version

  45. 6.7.0-dev.4825 Apr 2025pre-release

    Nothing published for this version

  46. 6.7.0-dev.4725 Apr 2025pre-release

    Nothing published for this version

  47. 6.7.0-dev.4625 Apr 2025pre-release

    Nothing published for this version

  48. 6.7.0-dev.4525 Apr 2025pre-release

    Nothing published for this version

  49. 6.7.0-dev.4425 Apr 2025pre-release

    Nothing published for this version

  50. 6.7.0-dev.4325 Apr 2025pre-release

    Nothing published for this version

  51. 6.7.0-dev.4225 Apr 2025pre-release

    Nothing published for this version

  52. 6.7.0-dev.4125 Apr 2025pre-release

    Nothing published for this version

  53. 6.7.0-dev.4024 Apr 2025pre-release

    Nothing published for this version

  54. 6.7.0-dev.3924 Apr 2025pre-release

    Nothing published for this version

  55. 6.7.0-dev.3824 Apr 2025pre-release

    Nothing published for this version

  56. 6.7.0-dev.3724 Apr 2025pre-release

    Nothing published for this version

  57. 6.7.0-dev.3624 Apr 2025pre-release

    Nothing published for this version

  58. 6.7.0-dev.3524 Apr 2025pre-release

    Nothing published for this version

  59. 6.7.0-dev.3424 Apr 2025pre-release

    Nothing published for this version

  60. 6.7.0-dev.3324 Apr 2025pre-release

    Nothing published for this version