Hey <!everyone> :v: :prisma-cool: We just release...
# prisma-whats-new
n
Hey <!everyone> ✌️ prisma cool We just released Prisma 2.8.0prisma rainbow Here is what's new in this version. 1️⃣ 
findFirst
 to query a single item with the same filters from 
findMany
While the 
findMany
 API gives you a powerful API to query your database with various filters, it's not ideal if you just want to query a single item. On the other hand, the 
findOne
 API returns single items, but it only allows for filtering by unique fields. In version 
2.8.0
, we're introducing 
findFirst
 - giving you the full power of 
findMany
 filters while only returning the first item that matches the filter criteria. So instead of this:
Copy code
const usersCalledAlice = await prisma.user.findMany({
  name: "Alice"	
})
const firstUserCalledAlice = usersCalledAlice[0]
You can now do this:
Copy code
const firstUserCalledAlice = await prisma.user.findFirst({
  name: "Alice"	
})
🔎 Case insensitive filters for PostgreSQL promoted to stable In 
2.5.0
 we introduced case insensitive filters for PostgreSQL, in today's release we're promoting this feature to stable. This means you don't need to include the 
insensitiveFilters
 feature flag in the 
previewFeatures
 field of the Prisma Client generator any more. The new 
mode
 option you can pass to 
findMany
 influences the corresponding filter (e.g. 
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).
Copy code
const result = await prisma.user.findMany({
  where: {
    email: {
      equals: '<mailto:lowercase@UPPERCASE.com|lowercase@UPPERCASE.com>',
      mode: 'insensitive',
    },
  },
})
You can learn more about this feature in the docs.  Are you using Prisma at work? We'd love to know if you're using Prisma at work. Answer with a quick yes or no in our poll, it won't take longer than a few seconds! 📚 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.
america parrot 4
❤️ 75
🌞 2
prisma rainbow 70
👏 25
spain parrot 13
💪 12
🌟 8
india parrot 11
prisma cool 6
🇧🇪 2
🇺🇦 4
fast parrot 52
🇬🇭 4
🇧🇷 4
🇮🇳 6
🇳🇴 2
🇨🇦 2
prismo gif 1
🇰🇪 2
southafrica parrot 1
💯 36
💚 15
😍 15
france parrot 11
🇵🇱 4
🚀 11
cat on keyboard 4
🇪🇸 2
🇸🇰 2
😋 1
🇰🇷 6
🇮🇩 2
🇧🇻 1
👋 9
🇩🇪 5
🇹🇭 1
newzealand parrot 1
🇳🇬 5
japan parrot 2
🇻🇪 3
🇯🇲 1
😎 19
hackernews 11
🐻 9
🇰🇿 3
🇵🇰 3
🇦🇷 1
🇻🇳 2
🇨🇴 1