npm prisma 4.2.0

latest releases: 5.23.0-integration-engines-5-23-0-6-integration-enum-mapped-values-cc1d5ee45ff9a116165edca8ab47690e5133baf0.2, 5.23.0-integration-engines-5-23-0-6-integration-enum-mapped-values-cc1d5ee45ff9a116165edca8ab47690e5133baf0.1, 5.23.0-dev.7...
2 years ago

🌟 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.

Screenshot 2022-08-09 at 12 30 27

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.

Don't miss a new prisma release

NewReleases is sending notifications on new releases.