PackageTrack

npm · #3659 most downloaded on npm

@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

10653 releases since 2020
20202026

One column per quarter.

Releases

  1. 5.11.0-dev.723 Feb 2024pre-release

    Nothing published for this version

  2. 5.11.0-dev.622 Feb 2024pre-release

    Nothing published for this version

  3. 5.11.0-dev.521 Feb 2024pre-release

    Nothing published for this version

  4. 5.11.0-dev.421 Feb 2024pre-release

    Nothing published for this version

  5. 5.11.0-dev.320 Feb 2024pre-release

    Nothing published for this version

  6. 5.11.0-dev.220 Feb 2024pre-release

    Nothing published for this version

  7. 5.11.0-dev.120 Feb 2024pre-release

    Nothing published for this version

  8. 5.10.221 Feb 2024
    Release notes

    Today, we are issuing the 5.10.2 patch release.

    Fix in Prisma CLI

    Open source →
  9. 5.10.2-dev.221 Feb 2024pre-release

    Nothing published for this version

  10. 5.10.2-dev.121 Feb 2024pre-release

    Nothing published for this version

  11. 5.10.120 Feb 2024
    Release notes

    Today, we are issuing the 5.10.1 patch release.

    Fix in Prisma Client / Prisma CLI

    Open source →
  12. 5.10.1-dev.320 Feb 2024pre-release

    Nothing published for this version

  13. 5.10.1-dev.220 Feb 2024pre-release

    Nothing published for this version

  14. 5.10.1-dev.120 Feb 2024pre-release

    Nothing published for this version

  15. 5.10.020 Feb 2024
    Release notes

    Today, we are excited to share the 5.10.0 stable release 🎉

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.

    Highlights

    Optimized relation queries in MySQL (Preview)

    This release brings the optimizations for relation queries from the previous releases to MySQL as well! This means that by enabling the relationJoins Preview feature with the mysql database provider, you now also get access to the relationLoadStrategy option in relation queries that let you choose whether you want to merged relations on the application- or database-level.

    If you enable the relationJoins Preview feature, you can choose between the join and query options:

    • join (default): Sends a single query to the database and joins the data on the database-level.
    • query: Sends multiple queries to the database and joins the data on the application-level.

    To get started, enable the Preview feature in your Prisma schema:

    // schema.prisma
    generator client {
      provider        = "prisma-client-js"
      previewFeatures = ["relationJoins"]
    }
    

    Be sure to re-generate Prisma Client afterwards:

    npx prisma generate
    

    And finally, specify the relation loading strategy for your relation query via the relationLoadStrategy option as follows:

    await prisma.user.findMany({
      relationLoadStrategy: 'join', // or 'query' 
      include: {
        posts: true,
      },
    })
    

    Note that in the example above, the relationLoadStrategy could be omitted altogether because join is used as the default value.

    A few notes about relationLoadStrategy support on MySQL:

    • relationLoadStrategy is supported for MySQL v8.0.14 and higher. MariaDB is not supported.
    • Prisma ORM uses correlated sub-queries for MySQL (as opposed to LATERAL JOINs which are used on PostgreSQL).

    Configure transaction options in the PrismaClient constructor

    This feature enables you to configure the following transaction options on a global level via the PrismaClient constructor:

    • isolationLevel: Sets the transaction isolation level. By default, this is set to the value currently configured in your database.
    • timeout: The maximum amount of time the interactive transaction can run before being canceled and rolled back. The default value is 5 seconds.
    • maxWait: The maximum amount of time Prisma Client will wait to acquire a transaction from the database. The default value is 2 seconds.

    Here is an example of how you can set this value globally for all transactions:

    const prisma = new PrismaClient({
      transactionOptions: {
        isolationLevel: 'ReadCommitted',
        timeout: 1_000, // 1 sec
        maxWait: 2_000  // 2 sec
      }
    })
    

    Thanks a lot to our fantastic community member @tockn, who took the initiative to implement this feature in Prisma ORM 🎉

    Note that you can still override the global values by setting them on a particular transaction.

    New P2037 code for “Too many database connections opened” errors

    We introduced a new error code for “Too many database connections opened” errors: P2037. You can find all error codes in our documentation.

    Access the Prisma Data Platform via Prisma CLI

    Now available in Early Access, you can manage your workspace and configure Prisma Accelerate and Prisma Pulse directly from the terminal.

    Visit our docs to learn more about the integration and try it out for yourself!

    Fixes and improvements

    Prisma Client

    Open source →
  16. 5.10.0-integration-refactor-client-remove-dataproxy-wasm.212 Feb 2024pre-release

    Nothing published for this version

  17. 5.10.0-integration-refactor-client-remove-dataproxy-wasm.112 Feb 2024pre-release

    Nothing published for this version

  18. 5.10.0-integration-fix-nodenext.230 Jan 2024pre-release

    Nothing published for this version

  19. 5.10.0-integration-fix-nodenext.130 Jan 2024pre-release

    Nothing published for this version

  20. 5.10.0-integration-fix-client-wasm-runtime-es2022.16 Feb 2024pre-release

    Nothing published for this version

  21. 5.10.0-integration-fix-client-exports-map.1531 Jan 2024pre-release

    Nothing published for this version

  22. 5.10.0-integration-fix-client-exports-map.1431 Jan 2024pre-release

    Nothing published for this version

  23. 5.10.0-integration-fix-client-exports-map.1331 Jan 2024pre-release

    Nothing published for this version

  24. 5.10.0-integration-fix-client-exports-map.1231 Jan 2024pre-release

    Nothing published for this version

  25. 5.10.0-integration-fix-client-exports-map.1131 Jan 2024pre-release

    Nothing published for this version

  26. 5.10.0-integration-fix-client-exports-map.1031 Jan 2024pre-release

    Nothing published for this version

  27. 5.10.0-integration-fix-client-exports-map.931 Jan 2024pre-release

    Nothing published for this version

  28. 5.10.0-integration-fix-client-exports-map.831 Jan 2024pre-release

    Nothing published for this version

  29. 5.10.0-integration-fix-client-exports-map.731 Jan 2024pre-release

    Nothing published for this version

  30. 5.10.0-integration-fix-client-exports-map.631 Jan 2024pre-release

    Nothing published for this version

  31. 5.10.0-integration-fix-client-exports-map.531 Jan 2024pre-release

    Nothing published for this version

  32. 5.10.0-integration-fix-client-exports-map.430 Jan 2024pre-release

    Nothing published for this version

  33. 5.10.0-integration-fix-client-exports-map.330 Jan 2024pre-release

    Nothing published for this version

  34. 5.10.0-integration-fix-client-exports-map.230 Jan 2024pre-release

    Nothing published for this version

  35. 5.10.0-integration-fix-client-exports-map.130 Jan 2024pre-release

    Nothing published for this version

  36. 5.10.0-integration-feat-wasm-engine-split.168 Feb 2024pre-release

    Nothing published for this version

  37. 5.10.0-integration-feat-wasm-engine-split.157 Feb 2024pre-release

    Nothing published for this version

  38. 5.10.0-integration-feat-wasm-engine-split.147 Feb 2024pre-release

    Nothing published for this version

  39. 5.10.0-integration-feat-wasm-engine-split.137 Feb 2024pre-release

    Nothing published for this version

  40. 5.10.0-integration-feat-wasm-engine-split.127 Feb 2024pre-release

    Nothing published for this version

  41. 5.10.0-integration-feat-wasm-engine-split.117 Feb 2024pre-release

    Nothing published for this version

  42. 5.10.0-integration-feat-wasm-engine-split.107 Feb 2024pre-release

    Nothing published for this version

  43. 5.10.0-integration-feat-wasm-engine-split.97 Feb 2024pre-release

    Nothing published for this version

  44. 5.10.0-integration-feat-wasm-engine-split.87 Feb 2024pre-release

    Nothing published for this version

  45. 5.10.0-integration-feat-wasm-engine-split.77 Feb 2024pre-release

    Nothing published for this version

  46. 5.10.0-integration-feat-wasm-engine-split.66 Feb 2024pre-release

    Nothing published for this version

  47. 5.10.0-integration-feat-wasm-engine-split.56 Feb 2024pre-release

    Nothing published for this version

  48. 5.10.0-integration-feat-wasm-engine-split.46 Feb 2024pre-release

    Nothing published for this version

  49. 5.10.0-integration-feat-wasm-engine-split.36 Feb 2024pre-release

    Nothing published for this version

  50. 5.10.0-integration-feat-wasm-engine-split.26 Feb 2024pre-release

    Nothing published for this version

  51. 5.10.0-integration-feat-wasm-engine-split.15 Feb 2024pre-release

    Nothing published for this version

  52. 5.10.0-integration-engines-5-7-0-23-integration-geometry-e0f834dc25d3a4b4c821df9810dfd890335c0b86.11 Feb 2024pre-release

    Nothing published for this version

  53. 5.10.0-integration-engines-5-10-0-33-joins-distinct-22d9d534a1dfc6606e6ca560bd10c2ad045eea7d.116 Feb 2024pre-release

    Nothing published for this version

  54. 5.10.0-integration-engines-5-10-0-31-joins-distinct-1a693f2b982374446ba145038ac6bb6028481687.216 Feb 2024pre-release

    Nothing published for this version

  55. 5.10.0-integration-engines-5-10-0-31-joins-distinct-1a693f2b982374446ba145038ac6bb6028481687.116 Feb 2024pre-release

    Nothing published for this version

  56. 5.10.0-integration-engines-5-10-0-2-integration-minimal-qe-wasm-1b4ed50da42d97c4ac234536343ff31faa0b6b70.231 Jan 2024pre-release

    Nothing published for this version

  57. 5.10.0-integration-engines-5-10-0-2-integration-minimal-qe-wasm-1b4ed50da42d97c4ac234536343ff31faa0b6b70.131 Jan 2024pre-release

    Nothing published for this version

  58. 5.10.0-integration-engines-5-10-0-13-feat-qe-specific-psl-performance-b9f77ddd4b02a49b324c20b050de9087e29da4ed.320 Feb 2024pre-release

    Nothing published for this version

  59. 5.10.0-integration-engines-5-10-0-13-feat-qe-specific-psl-performance-b9f77ddd4b02a49b324c20b050de9087e29da4ed.213 Feb 2024pre-release

    Nothing published for this version

  60. 5.10.0-integration-engines-5-10-0-13-feat-qe-specific-psl-performance-b9f77ddd4b02a49b324c20b050de9087e29da4ed.19 Feb 2024pre-release

    Nothing published for this version