3.4.0 #10065
Closed
janpio
announced in
Announcements
3.4.0
#10065
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Today, we are excited to share the
3.4.0stable release 🎉🌟 Help us spread the word about Prisma by starring the repo or tweeting about the release. 🌟
Major improvements & new features
Support for PostgreSQL 14
We are pleased to announce that Prisma version
3.4.0provides support for PostgreSQL 14. For a full list of our supported databases and their versions, see our documentation.MongoDB
Support for Order By Aggregate Group
In Prisma version
3.4.0, we add support on MongoDB databases for using theORDER BYclause in an aggregate function. This was previously available for relational databases.For example, if the data about your application's users includes their city of residence, you can determine which cities have the largest user groups. The following query sorts each
citygroup by the number of users in that group, and returns the results in descending order (largest group first):For more information refer to our documentation about ordering by groups.
Initial support for MongoDB in
prisma db pushThe
prisma db pushcommand is used to sync your Prisma schema and your database schema in development.Because MongoDB has a unique approach to database schema management, this initial release only syncs
@unique,@@uniqueand@@indexannotations in your schema.Let's look at a quick example using this Prisma schema:
After running
prisma db pushthe CLI will display which changes were made:Let's keep iterating on the schema. We apply the following changes:
titleauthorandtitletitleand run
prisma db pushagain, we see what changes were applied:And voilà, the index and unique definitions in our schema are reflected in the database.
There is a known limitation with empty collections: if you
db pushindexes or uniques on fields that do not have values in the collection (they are missing in all existing documents), and you usedb pullafter that, the indexes and uniques will not be pulled because the fields will not be in your schema.Since this is a Preview feature, any feedback is very much appreciated. Please get in touch by opening a GitHub issue.
Introspection of embedded documents in MongoDB
For those interested in helping us getting introspection of embedded documents right, we packaged a first iteration into the CLI. More info in the Github issue.
Prisma Client Go
Data Proxy Support
Connection limit issues got you down? By using Prisma's Data Proxy, you can pool your connections to avoid overloading your database.
With this release, Prisma Client Go can now read and write to the Data Proxy. Let's say you have the following project setup on the Prisma Data Platform.
You can generate a "Data Proxy"-enabled Go Client with the following command:
PRISMA_CLIENT_ENGINE_TYPE='dataproxy' go run github.com/prisma/prisma-client-go generateThen you can use the Go Client as you normally would:
Please note that the Data Proxy is currently in Early Access and still under active development. We do not recommend using the Data Proxy for production loads. If you run into any issues while trying to use the Go Client with the Data Proxy, please leave us a note in this issue.
JSON Filtering Support
We've had JSON filtering support in the TypeScript Client since . In 3.4.0, we're bringing support to the Go Client. Let's take a look at an example.
Given the following Prisma schema:
You can now write the following to query a specific service name inside inside the
metafield:See some more examples of what you can do in our documentation. Note that the examples are written in Typescript, but the same concepts apply to Go as well!
Fixes and improvements
Prisma Client
orderByAggregateGroup(since 2.21.0)Prisma Migrate
Language tools (e.g. VS Code)
The Prisma Serverless Data Conference is happening on November 18!
Make sure to claim your ticket for our free Prisma Serverless Data Conference about all things databases and serverless with fantastic speakers from companies like PlanetScale, MongoDB, Vercel, Netlify, Cloudflare and CockroachDB.
📺 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, November 04 at 5pm Berlin | 9am San Francisco.
This discussion was created from the release 3.4.0.
All reactions