prisma/prisma
### [`v4.2.1`](https://togithub.com/prisma/prisma/releases/tag/4.2.1)
[Compare Source](https://togithub.com/prisma/prisma/compare/4.2.0...4.2.1)
Today, we are issuing the `4.2.1` patch release.
##### Fix in Prisma Client
- [Fixed a cold start performance regression in case of multiple queries starting in parallel right after client creation](https://togithub.com/prisma/prisma/issues/14695)
### [`v4.2.0`](https://togithub.com/prisma/prisma/releases/tag/4.2.0)
[Compare Source](https://togithub.com/prisma/prisma/compare/4.1.1...4.2.0)
🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v4.2.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.2.0) about the release.** 🌟
#### Major improvements
##### Prisma Client tracing support (Preview)
We're excited to announce [Preview](https://www.prisma.io/docs/about/prisma/releases#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](https://www.jaegertracing.io/), [Honeycomb](https://www.honeycomb.io/trace/), or [DataDog](https://www.datadoghq.com/).
![](https://user-images.githubusercontent.com/33921841/183606710-5945999c-4e0b-420c-9de5-4c6bf9984f0c.png)
Read more about tracing in our [announcement post](https://www.prisma.io/blog/tracing-launch-announcement-pmk4rlpc0ll) and learn more in [our documentation](https://prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing) on how to start working with tracing.
Try it out and [let us know what you think](https://togithub.com/prisma/prisma/issues/14640).
##### 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:
```ts
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](https://www.prisma.io/docs/concepts/components/prisma-client/transactions#transaction-isolation-level). Try it out, and let us know what you think in this [GitHub issue](https://togithub.com/prisma/prisma/issues/8664).
##### 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](https://togithub.com/prisma/prisma/issues/13579)
To learn more, check out [our documentation](https://www.prisma.io/docs/concepts/components/prisma-client/metrics).
##### 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](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma).
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](https://togithub.com/prisma/language-tools/issues/1219).
##### Experimental Cloudflare Module Worker Support
We fixed a bug in this release that prevented the [Prisma Edge Client](https://www.prisma.io/docs/data-platform/data-proxy#edge-runtimes) from working with [Cloudflare Module Workers](https://developers.cloudflare.com/workers/learning/migrating-to-module-workers/).
We now provide experimental support with a [workaround for environment variables](https://togithub.com/prisma/prisma/issues/13771#issuecomment-1204295665).
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](https://togithub.com/prisma/prisma/issues/new?assignees=\&labels=kind%2Fbug\&template=bug_report.yml).
#### Upgrade to Prisma 4
In case you missed it, we held a [livestream](https://www.youtube.com/watch?v=FSjkBrfaoEY) a few weeks ago and walked through issues you may run into while upgrading to [Prisma 4](https://togithub.com/prisma/prisma/releases/tag/4.0.0) 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:
- [Prisma GIS](https://prisma103696.typeform.com/to/p8xo5o95) User Research Survey
- [Prisma Full-Text Search](https://prisma103696.typeform.com/fts-survey) User Research Survey
Many thanks! 🙌🏽
#### Fixes and improvements
##### Prisma Client
- [Allow `dataproxy` to have datasource overrides](https://togithub.com/prisma/prisma/issues/11595)
- [Warning during build: equals-negative-zero](https://togithub.com/prisma/prisma/issues/14188)
- [getGraphQLType throws error if object has no prototype](https://togithub.com/prisma/prisma/issues/14274)
- [Prisma Client: Log Data Proxy usage explicitly](https://togithub.com/prisma/prisma/issues/14319)
- [Cannot read property 'name' of undefined attempting to create row](https://togithub.com/prisma/prisma/issues/14342)
- [Edge client crashes when enabling debug logs in constructor](https://togithub.com/prisma/prisma/issues/14536)
- [TypeError: Cannot read properties of undefined (reading '\_hasPreviewFlag')](https://togithub.com/prisma/prisma/issues/14548)
- [Large package.json log output in prisma:client:dataproxyEngine](https://togithub.com/prisma/prisma/issues/14660)
##### Prisma
- [Error: \[libs/datamodel/connectors/dml/src/model.rs:338:29\] Crash probably due to cyrillic table names](https://togithub.com/prisma/prisma/issues/12615)
- [Prisma doesn't validate composite attributes correctly](https://togithub.com/prisma/prisma/issues/14252)
- [Not letting me add Int as a type?](https://togithub.com/prisma/prisma/issues/14389)
- [Introspection crash, `libs\datamodel\connectors\dml\src\model.rs:494:29` (missing PK?)](https://togithub.com/prisma/prisma/issues/14403)
- [SQL Server introspection panic](https://togithub.com/prisma/prisma/issues/14438)
- [Hi Prisma Team! Prisma Migrate just crashed. ](https://togithub.com/prisma/prisma/issues/14462)
- [Primary key in model using a missing column](https://togithub.com/prisma/prisma/issues/14511)
- [Migrate just crashed sqlserver](https://togithub.com/prisma/prisma/issues/14611)
- [Prisma is trying to find column that doesn't exists `prisma db pull` on `SQL Server`](https://togithub.com/prisma/prisma/issues/14636)
- [Issue that occurred during `prisma db pull`](https://togithub.com/prisma/prisma/issues/14647)
##### Language tools (e.g. VS Code)
- [Highlight raw SQL syntax](https://togithub.com/prisma/language-tools/issues/74)
- [Do not offer all the attributes for composite fields in a model or a type](https://togithub.com/prisma/language-tools/issues/1198)
##### Prisma Studio
- [Horizontal scrolling does not work](https://togithub.com/prisma/studio/issues/992)
#### Credits
Huge thanks to [@shian15810](https://togithub.com/shian15810), [@zifeo](https://togithub.com/zifeo), [@lodi-g](https://togithub.com/lodi-g), [@Gnucki](https://togithub.com/Gnucki), [@apriil15](https://togithub.com/apriil15), [@givensuman](https://togithub.com/givensuman), [@peter-gy](https://togithub.com/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](https://cloud.prisma.io/) 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)](https://grnh.se/894b275b2us) and [Back-end Engineer: Prisma Data Platform](https://grnh.se/45afe7982us).
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"](https://youtu.be/5Su2c3ZLBGs) livestream.
The stream takes place [on YouTube](https://youtu.be/5Su2c3ZLBGs) on **Thursday, August 11** at **5 pm Berlin | 8 am San Francisco**.
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, click this checkbox.
This PR has been generated by Mend Renovate. View repository job log here.
This PR contains the following updates:
4.1.1
->4.2.1
Release Notes
prisma/prisma
### [`v4.2.1`](https://togithub.com/prisma/prisma/releases/tag/4.2.1) [Compare Source](https://togithub.com/prisma/prisma/compare/4.2.0...4.2.1) Today, we are issuing the `4.2.1` patch release. ##### Fix in Prisma Client - [Fixed a cold start performance regression in case of multiple queries starting in parallel right after client creation](https://togithub.com/prisma/prisma/issues/14695) ### [`v4.2.0`](https://togithub.com/prisma/prisma/releases/tag/4.2.0) [Compare Source](https://togithub.com/prisma/prisma/compare/4.1.1...4.2.0) 🌟 **Help us spread the word about Prisma by starring the repo or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20@prisma%20release%20v4.2.0%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma/releases/tag/4.2.0) about the release.** 🌟 #### Major improvements ##### Prisma Client tracing support (Preview) We're excited to announce [Preview](https://www.prisma.io/docs/about/prisma/releases#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](https://www.jaegertracing.io/), [Honeycomb](https://www.honeycomb.io/trace/), or [DataDog](https://www.datadoghq.com/). ![](https://user-images.githubusercontent.com/33921841/183606710-5945999c-4e0b-420c-9de5-4c6bf9984f0c.png) Read more about tracing in our [announcement post](https://www.prisma.io/blog/tracing-launch-announcement-pmk4rlpc0ll) and learn more in [our documentation](https://prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing) on how to start working with tracing. Try it out and [let us know what you think](https://togithub.com/prisma/prisma/issues/14640). ##### 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: ```ts 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](https://www.prisma.io/docs/concepts/components/prisma-client/transactions#transaction-isolation-level). Try it out, and let us know what you think in this [GitHub issue](https://togithub.com/prisma/prisma/issues/8664). ##### 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](https://togithub.com/prisma/prisma/issues/13579) To learn more, check out [our documentation](https://www.prisma.io/docs/concepts/components/prisma-client/metrics). ##### 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](https://marketplace.visualstudio.com/items?itemName=Prisma.prisma). 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](https://togithub.com/prisma/language-tools/issues/1219). ##### Experimental Cloudflare Module Worker Support We fixed a bug in this release that prevented the [Prisma Edge Client](https://www.prisma.io/docs/data-platform/data-proxy#edge-runtimes) from working with [Cloudflare Module Workers](https://developers.cloudflare.com/workers/learning/migrating-to-module-workers/). We now provide experimental support with a [workaround for environment variables](https://togithub.com/prisma/prisma/issues/13771#issuecomment-1204295665). 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](https://togithub.com/prisma/prisma/issues/new?assignees=\&labels=kind%2Fbug\&template=bug_report.yml). #### Upgrade to Prisma 4 In case you missed it, we held a [livestream](https://www.youtube.com/watch?v=FSjkBrfaoEY) a few weeks ago and walked through issues you may run into while upgrading to [Prisma 4](https://togithub.com/prisma/prisma/releases/tag/4.0.0) 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: - [Prisma GIS](https://prisma103696.typeform.com/to/p8xo5o95) User Research Survey - [Prisma Full-Text Search](https://prisma103696.typeform.com/fts-survey) User Research Survey Many thanks! 🙌🏽 #### Fixes and improvements ##### Prisma Client - [Allow `dataproxy` to have datasource overrides](https://togithub.com/prisma/prisma/issues/11595) - [Warning during build: equals-negative-zero](https://togithub.com/prisma/prisma/issues/14188) - [getGraphQLType throws error if object has no prototype](https://togithub.com/prisma/prisma/issues/14274) - [Prisma Client: Log Data Proxy usage explicitly](https://togithub.com/prisma/prisma/issues/14319) - [Cannot read property 'name' of undefined attempting to create row](https://togithub.com/prisma/prisma/issues/14342) - [Edge client crashes when enabling debug logs in constructor](https://togithub.com/prisma/prisma/issues/14536) - [TypeError: Cannot read properties of undefined (reading '\_hasPreviewFlag')](https://togithub.com/prisma/prisma/issues/14548) - [Large package.json log output in prisma:client:dataproxyEngine](https://togithub.com/prisma/prisma/issues/14660) ##### Prisma - [Error: \[libs/datamodel/connectors/dml/src/model.rs:338:29\] Crash probably due to cyrillic table names](https://togithub.com/prisma/prisma/issues/12615) - [Prisma doesn't validate composite attributes correctly](https://togithub.com/prisma/prisma/issues/14252) - [Not letting me add Int as a type?](https://togithub.com/prisma/prisma/issues/14389) - [Introspection crash, `libs\datamodel\connectors\dml\src\model.rs:494:29` (missing PK?)](https://togithub.com/prisma/prisma/issues/14403) - [SQL Server introspection panic](https://togithub.com/prisma/prisma/issues/14438) - [Hi Prisma Team! Prisma Migrate just crashed. ](https://togithub.com/prisma/prisma/issues/14462) - [Primary key in model using a missing column](https://togithub.com/prisma/prisma/issues/14511) - [Migrate just crashed sqlserver](https://togithub.com/prisma/prisma/issues/14611) - [Prisma is trying to find column that doesn't exists `prisma db pull` on `SQL Server`](https://togithub.com/prisma/prisma/issues/14636) - [Issue that occurred during `prisma db pull`](https://togithub.com/prisma/prisma/issues/14647) ##### Language tools (e.g. VS Code) - [Highlight raw SQL syntax](https://togithub.com/prisma/language-tools/issues/74) - [Do not offer all the attributes for composite fields in a model or a type](https://togithub.com/prisma/language-tools/issues/1198) ##### Prisma Studio - [Horizontal scrolling does not work](https://togithub.com/prisma/studio/issues/992) #### Credits Huge thanks to [@shian15810](https://togithub.com/shian15810), [@zifeo](https://togithub.com/zifeo), [@lodi-g](https://togithub.com/lodi-g), [@Gnucki](https://togithub.com/Gnucki), [@apriil15](https://togithub.com/apriil15), [@givensuman](https://togithub.com/givensuman), [@peter-gy](https://togithub.com/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](https://cloud.prisma.io/) 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)](https://grnh.se/894b275b2us) and [Back-end Engineer: Prisma Data Platform](https://grnh.se/45afe7982us). 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"](https://youtu.be/5Su2c3ZLBGs) livestream. The stream takes place [on YouTube](https://youtu.be/5Su2c3ZLBGs) on **Thursday, August 11** at **5 pm Berlin | 8 am San Francisco**.Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate. View repository job log here.