Alex Ruheni
3.15.0
prisma rainbow
๐ฎ Improvements to Prisma Client for Data Proxy
The Prisma Data Proxy provides connection management and pooling for database connections for efficiently scaling database connections in serverless environments. The Prisma Client for Data Proxy includes support for connecting to the Prisma Data Proxy using HTTP.
One of the changes in this release is improving the Prisma Client for the Data Proxy generation step. You can now generate Prisma Client for the Data Proxy it using the --data-proxy
flag:
npx prisma generate --data-proxy
We also updated how you can run Prisma Client using the Data Proxy in Cloudflare Workers and Edge environments. You can now use @prisma/client/edge
instead of @prisma/client
in your application.
import { PrismaClient } from '@prisma/client/edge'
To learn more, check out our documentation.
๐ Prisma Client Metrics is now in Preview
Metrics is a new Preview feature that allows you to monitor how Prisma Client interacts with your database. Metrics expose a set of counters, gauges, and histograms that can be labeled and piped into an external monitoring system like Prometheus or StatsD.
You can use metrics in your project to help diagnose how your applicationโs number of idle and active connections changes with counters, gauges, and histograms. To get started using metrics in your project, enable the Preview feature flag in your Prisma schema:
generator client {
provider = "prisma-client-js"
previewFeatures = ["metrics"]
}
You can then get started using metrics in your project:
import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()
const metrics = await prisma.$metrics.json()
console.log(metrics)
To learn more, check out the metrics documentation. Give it a try and let us know what you think.
๐ง migrate reset
now returns with a non-0 exit code if the seed script returns with a non-0 exit code
This will help user scripts know more about the success of the command but might break existing scripts.
๐ Learn more in the release notes
For more info and links to documentation, you can read the release notes.
๐ Help us spread the word about Prisma. ๐
To help spread the word about Prisma, weโd very much appreciate it if you would star the repo, And if youโre excited about the features in this weekโs release, then help us and share your excitement on Twitter.
๐ฐ Join us on Thursday for the โWhatโs new in Prismaโ livestream
This week, @Tasin Ishmam and I will discuss the latest release and other news from the Prisma ecosystem in a this Thursday at 5 pm Berlin | 8 am San Francisco.