Hey <!everyone> :v: :sunny: We just released Pris...
# prisma-whats-new
n
Hey <!everyone> ✌️ ☀️ We just released Prisma* 2.5.0 *prisma rainbow Next to a lot of bug fixes and small improvements, a lot has happened with Prisma Client preview features in this version! 🎊 Several preview features promoted into stable Thanks to your feedback and contributions, three out of five prior preview features have been promoted to stable in this release 🎉 The following features can now be used in production: -
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`:
Copy code
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! 🙌
🇦🇫 1
🇬🇭 1
🇰🇪 2
💯 43
🤩 3
prisma green 35
❤️ 28
fast parrot 40
😘 7
🇮🇳 1
😍 11
🇰🇬 1
🇳🇴 1
🇨🇱 2
👍 1
🎉 17
🇳🇬 9
india parrot 4
🇵🇭 2
🇻🇪 2
🇲🇽 1
🇵🇪 2
🇵🇱 1
🇻🇳 1
prisma rainbow 47
🍾 18
🇨🇳 2
🇰🇷 9
🇧🇷 2
🦜 3
australia parrot 1
🇦🇺 1
taiwan parrot 1