Ir al contenido
verdict:

Prisma 7.4.0

notable

note: la síntesis y las notas de la versión están en inglés

note: sin síntesis para esta release más antigua

Sintetizamos las releases recientes. Las notas de la versión originales de esta versión están aquí abajo.

release-notesgithub.com/prisma/orm · 103 líneas
  1. Today, we are excited to share the `7.4.0` stable release 🎉
  2. **🌟 Star this repo for notifications about new releases, bug fixes & features — or [follow us on X](https://pris.ly/x)!**
  3. # Highlights
  4. ## ORM
  5. ### Caching in Prisma Client
  6. Today’s release is a big one, as we introduce a new caching layer into Prisma ORM. But why the need for a caching layer?
  7. In Prisma 7, the query compiler runs as a WebAssembly module directly on the JavaScript main thread. While this simplified the architecture by eliminating the separate engine process, it introduced a trade-off: every query now synchronously blocks the event loop during compilation.
  8. For individual queries, compilation takes between 0.1ms and 1ms, which is barely noticeable in isolation. But under high concurrency this overhead adds up and creates event loop contention that affects overall application throughput.
  9. For instance, say we have a query that is run over and over, but is a similar shape:
  10. ```tsx
  11. // These two queries have the same shape:
  12. const alice = await prisma.user.findUnique({ where: { email: 'alice@prisma.io' } })
  13. const bob = await prisma.user.findUnique({ where: { email: 'bob@prisma.io' } })
  14. ```
  15. Prior to v7.4.0, this would be reevaluated ever time the query is run. Now, Prisma Client will extract the user-provided values and replaces them with typed placeholders, producing a normalized query shape:
  16. ```
  17. prisma.user.findUnique({ where: { email: %1 } }) // cache key
  18. ↑
  19. %1 = 'alice@prisma.io' (or 'bob@prisma.io')
  20. ```
  21. This normalized shape is used as a cache key. On the first call, the query is compiled as usual and the resulting plan is stored in an LRU cache. On every subsequent call with the same query shape, regardless of the actual values, the cached plan is reused instantly without invoking the compiler.
  22. We have more details on the impact of this change and some deep dives into Prisma architecture in an upcoming blog post!
  23. ### Partial Indexes (Filtered Indexes) Support
  24. We're excited to announce **Partial Indexes** support in Prisma! This powerful community-contributed feature allows you to create indexes that only include rows matching specific conditions, significantly reducing index size and improving query performance.
  25. Partial indexes are available behind the `partialIndexes` preview feature for PostgreSQL, SQLite, SQL Server, and CockroachDB, with full migration and introspection support.
  26. **Basic usage**
  27. Enable the preview feature in your schema:
  28. ```groovy
  29. generator client {
  30. provider = "prisma-client-js"
  31. previewFeatures = ["partialIndexes"]
  32. }
  33. ```
  34. **Raw SQL syntax**
  35. For maximum flexibility, use the `raw()` function with database-specific predicates:
  36. ```groovy
  37. model User {
  38. id Int @id
  39. email String
  40. status String
  41. @@unique([email], where: raw("status = 'active'"))
  42. @@index([email], where: raw("deletedAt IS NULL"))
  43. }
  44. ```
  45. **Type-safe object syntax**
  46. For better type safety, use the object literal syntax for simple conditions:
  47. ```groovy
  48. model Post {
  49. id Int @id
  50. title String
  51. published Boolean
  52. @@index([title], where: { published: true })
  53. @@unique([title], where: { published: { not: false } })
  54. }
  55. ```
  56. ### Bug Fixes
  57. Most of these fixes are **community contributions** - thank you to our amazing contributors!
  58. - [**prisma/prisma-engines#5767**](https://github.com/prisma/prisma-engines/pull/5767): Fixed an issue with PostgreSQL migration scripts that prevented usage of `CREATE INDEX CONCURRENTLY` in migrations
  59. - [**prisma/prisma-engines#5752**](https://github.com/prisma/prisma-engines/pull/5752): Fixed BigInt precision loss in JSON aggregation for MySQL and CockroachDB by casting BigInt values to text (from community member [polaz](https://github.com/polaz))
  60. - [**prisma/prisma-engines#5750**](https://github.com/prisma/prisma-engines/pull/5750): Fixed connection failures with non-ASCII database names by properly URL-decoding database names in connection strings
  61. - [**#29155**](https://github.com/prisma/prisma/pull/29155): Fixed silent transaction commit errors in PlanetScale adapter by ensuring COMMIT failures are properly propagated
  62. - [**#29141**](https://github.com/prisma/prisma/pull/29141): Resolved race condition errors (EREQINPROG) in SQL Server adapter by serializing commit/rollback operations using mutex synchronization
  63. - [**#29158**](https://github.com/prisma/prisma/pull/29158): Fixed MSSQL connection string parsing to properly handle curly brace escaping for passwords containing special characters
  64. ## Open roles at Prisma
  65. Interested in joining Prisma? We’re growing and have several exciting opportunities across the company for developers who are passionate about building with Prisma. Explore our open positions on our [Careers page](https://www.prisma.io/careers#current) and find the role that’s right for you.
  66. ## Enterprise support
  67. Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.
  68. With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: https://prisma.io/enterprise.

ver en githubimported 2026-09-28 vía npm