Prisma: 4.2.0 Release

Release date:
August 9, 2022
Previous version:
4.1.1 (released July 27, 2022)
Magnitude:
4,490 Diff Delta
Contributors:
7 total committers
Data confidence:
Commits:

62 Commits in this Release

Ordered by the degree to which they evolved the repo in this version.

Authored August 3, 2022
Authored August 8, 2022
Authored July 19, 2022
Authored August 4, 2022

Top Contributors in 4.2.0

millsp
danstarns
SevInf
Jolg42
aqrln
prisma-bot
renovate-bot

Directory Browser for 4.2.0

We haven't yet finished calculating and confirming the files and directories changed in this release. Please check back soon.

Release Notes Published

🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟

Major improvements

Prisma Client tracing support (Preview)

We're excited to announce Preview support for tracing in Prisma Client! πŸŽ‰

Tracing allows you to track requests as they flow through your application. This is especially useful for debugging distributed systems where each request can span multiple services.

With tracing, you can now see how long Prisma takes and what queries are issued in each operation. You can visualize these traces as waterfall diagrams using tools such as Jaeger, Honeycomb, or DataDog.

Read more about tracing in our announcement post and learn more in our documentation on how to start working with tracing.

Try it out and let us know what you think.

Isolation levels for interactive transactions

We are improving the interactiveTransactions Preview feature with the support for defining the isolation level of an interactive transaction.

Isolation levels describe different types of trade-offs between isolation and performance that databases can make when processing transactions. Isolation levels determine what types of data leaking can occur between transactions or what data anomalies can occur.

To set the transaction isolation level, use the isolationLevel option in the second parameter of the API. For example:

await prisma.$transaction(
  async (prisma) => {
    // Your transaction...
  },
  {
    isolationLevel: Prisma.TransactionIsolationLevel.Serializable,
    maxWait: 5000,
    timeout: 10000,
  }
)

Prisma Client supports the following isolation levels if they're available in your database provider: - ReadCommitted - ReadUncommitted - RepeatableRead - Serializable - Snapshot

Learn more about in our documentation. Try it out, and let us know what you think in this GitHub issue.

Renaming of Prisma Client Metrics

In this release, we've renamed the metrics β€” counters, gauges, and histograms β€” returned from prisma.$metrics() to make it a little easier to understand at a glance.

| Previous | Updated | | ---------------------------------- | -------------------------------------------------- | | query_total_operations | prisma_client_queries_total | | query_total_queries | prisma_datasource_queries_total | | query_active_transactions | prisma_client_queries_active | | query_total_elapsed_time_ms | prisma_client_queries_duration_histogram_ms | | pool_wait_duration_ms | prisma_client_queries_wait_histogram_ms | | pool_active_connections | prisma_pool_connections_open | | pool_idle_connections | prisma_pool_connections_idle | | pool_wait_count | prisma_client_queries_wait |

Give Prisma Client metrics a shot and let us know what you think in this GitHub issue

To learn more, check out our documentation.

Syntax highlighting for raw queries in Prisma Client

This release adds syntax highlighting support for raw SQL queries when using $queryRaw and $executeRaw. This is made possible using Prisma's VS Code extension.

<img width="678" alt="Screenshot 2022-08-09 at 12 30 27" src="https://user-images.githubusercontent.com/33921841/183627500-ad866a4d-8624-4f05-839f-81daaaf3ce2d.png">

Note: Syntax highlighting currently doesn't work with when using parentheses, (), $queryRaw(), $executeRaw(), $queryRawUnsafe(), and $executeRawUnsafe().

If you are interested in having this supported, let us know in this GitHub issue.

Experimental Cloudflare Module Worker Support

We fixed a bug in this release that prevented the Prisma Edge Client from working with Cloudflare Module Workers.

We now provide experimental support with a workaround for environment variables.

Try it out and let us know how what you think! In case you run into any errors, feel free to create a bug report.

Upgrade to Prisma 4

In case you missed it, we held a livestream a few weeks ago and walked through issues you may run into while upgrading to Prisma 4 and how to fix them!

Request for feedback

Our Product teams are currently running two surveys to help close the feature gaps and improve Prisma.

If you have a use-case for geographical data (GIS) or full-text search/ indexes (FTS), we would appreciate your feedback on your needs:

Many thanks! πŸ™ŒπŸ½

Fixes and improvements

Prisma Client

Prisma

Language tools (e.g. VS Code)

Prisma Studio

Credits

Huge thanks to @shian15810, @zifeo, @lodi-g, @Gnucki, @apriil15, @givensuman, @peter-gy for helping!

Prisma Data Platform

We're working on the Prisma Data Platform β€” a collaborative environment for connecting apps to databases. It includes the: - Data Browser for navigating, editing, and querying data - Data Proxy for persistent, reliable, and scalable connection pooling for your database. - Query Console for experimenting with queries

Try it out and let us know what you think!

πŸ’Ό We're hiring!

If you're interested in joining our growing team to help empower developers to build data-intensive applications, Prisma is the place for you.

We're looking for a Developer Advocate (Frontend / Fullstack) and Back-end Engineer: Prisma Data Platform.

Feel free to read the job descriptions and apply using the links provided.

πŸ“Ί Join us for another "What's new in Prisma" livestream

Learn about the latest release and other news from the Prisma community by joining us for another "What's new in Prisma" livestream.

The stream takes place on YouTube on Thursday, August 11 at 5 pm Berlin | 8 am San Francisco.