nikolasburk
middlewares
(for intercepting Prisma Client queries | 📚 docs)
- distinct
(to remove duplicates from findMany
| 📚 docs)
- aggregationsApi
(to calculate aggregate values of number type columns | 📚 docs)
If you've used these features in prior releases, you can remove the respective feature flag from the generator
block in your Prisma schema after upgrading to 2.5.0
.
🔎 New preview feature: Case insensitive filters for PostgreSQL
In 2.5.0
, we introduce case insensitive filters to Prisma Client. It allows you to query for fields of type String
in a case insensitive way.
The new mode
option you can pass to findMany
queries influences the corresponding filter (e.g. equals
, contains
or startsWith
) but doesn't change the return type of the findMany
query. mode
can have two possible values:
• `default`: Uses the default filter configured on the database level. If the collation is configured as case insensitive in the database, the default mode will be case insensitive as well. In that case, there's no need to use the insensitive mode.
• `insensitive`: Uses the case insensitive filter (if possible).
Here is an example of using mode
with `equals`:
const result = await prisma.user.findMany({
where: {
email: {
equals: '<mailto:lowercase@UPPERCASE.com|lowercase@UPPERCASE.com>',
mode: 'insensitive',
},
},
})
📚 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 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.
✍️ Share your experience with Prisma on Reddit
There currently is an interesting discussion on Reddit about Which ORM should I use? (TypeScript). If you already have some experience with Prisma, we'd love if you could take a few minutes and write up your honest thoughts and experience about using Prisma in a project so far. This helps other developers better understand how Prisma fits in and what benefit they might get from it as well as where its current limitations might be! 🙌