nikolasburk
prisma introspect
(e.g. any usage of @map
and @@map
or the renaming of relation fields).
Keeping these manual changes in the Prisma schema file has been available as a preview feature via the --experimental-reintrospection
option already. After getting tested as a preview feature for a few releases, we are excited to promote this functionality to be the default behavior of prisma introspect
into this stable release.
🔢 Atomic number operations (preview)
With today's release, we introduce atomic number operations for update
queries in Prisma Client. It allows you to update the values of certain number fields atomically (i.e. as a single Prisma Client query).
The new operations work with Int
and Float
type fields:
• `increment: x`: Adds x
to the current value
• `decrement: x`: Subtracts x
from the current value
• `multiply: x`: Multiplies the current value by x
• `divide: x`: Divides the current value by x
• `set: x`: Sets the value to x
Here's an example of using the increment
operation:
const result = await prisma.user.update({
where: {
email: '<mailto:alice@prisma.io|alice@prisma.io>',
},
data: {
age: {
increment: 1, // age = age + 1 - Happy Birthday!
}
},
})
📚 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.
🤔 How would you describe Prisma?
We'd love to hear from you how you describe Prisma to your developer friends and coworkers. If you have 2 minutes, please answer this question via this online form.