Skip to content

v0.12.0

Compare
Choose a tag to compare
@github-actions github-actions released this 20 Oct 09:17
· 594 commits to main since this release
6d3749e

v0.12.0

Scalar list operations, docs improvements, minor fixes

🌟 Help us spread the word about Prisma by starring the repo ☝️ or tweeting about the release.

Major changes

You can now filter and atomically update scalar lists with Prisma Client Go.

Given the following Prisma schema:

model User {
  id   Int      @id @default(autoincrement())
  name String
  pets String[]
}

You can filter pets with the following code:

user, err := client.User.FindFirst(
	db.User.Pets.HasSome([]string{"Fido", "Scooby"}),
).Exec(ctx)

And when you add a new furry addition to your family, you can update your list with Push:

user, err := client.User.FindUnique(
	db.User.Name.Equals(1),
).Update(
	db.User.Items.Push([]string{"Charlemagne"}),
).Exec(ctx)

Learn more about how to use this new feature in our documentation. To dive deeper into the concept of scalar lists, you can read the guide on Working with scalar lists.

Changes

Contributors

@s-takehana and @steebchen

Special shoutout to @s-takehana for all the useful PRs :)

Interested in providing feedback for the Go client?

We would like to ask you a few questions and get your feedback about the Go client. We'll send merch along your away as a thank you.
If you're interested, email me at [email protected] or join our public Slack and DM me.