Prisma

Latest version: v0.15.0

Safety actively analyzes 714772 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 41 of 44

0.5.0

Not secure
Tons of bugfixes & [Upsert](https://github.com/prisma/prisma-client-go/blob/v0.5.0/docs/reference/10-upsert.md)!

🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20Prisma%20Go%20Client%20release%20v0.4.2%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma-client-go/releases/tag/vv0.5.0) about the release.**

Major changes

UpsertOne

go
post, err := client.Post.UpsertOne(
// query
Post.ID.Equals("upsert"),
).Create(
// set these fields if document doesn't exist already
Post.Title.Set("title"),
Post.Views.Set(0),
Post.ID.Set("upsert"),
).Update(
// update these fields if document already exists
Post.Title.Set("new-title"),
Post.Views.Increment(1),
).Exec(ctx)
if err != nil {
panic(err)
}


Changes

* fix(unique): use new uniqueFields model data (391) steebchen
* ci(lint): increase timeout to 5m (394) steebchen
* feat(raw): handle time values (393) steebchen
* feat(transaction): support raw queries in transaction (398) steebchen
* fix(fetch): allow fetching with update/delete (400) steebchen
* docs: fix broken/missing links & example code (403) imkh
* feat(generate): write debug file on env var (404) steebchen
* feat(indexes): support composite id indexes, restructure templates (405) steebchen
* fix(engine): remove debug logs (412) steebchen
* fix(query): allow empty links to use with IfPresent (413) steebchen
* fix: add dummy.go files to template dirs (416) bshihr
* feat(upsert): add upsert (415) steebchen
* docs(upsert): add docs for UpsertOne (417) steebchen
* feat(prisma): upgrade to 2.17.0 (421) steebchen
* feat(prisma): upgrade to 2.18.0 (422) steebchen

Contributors

bshihr, imkh and steebchen

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 steebprisma.io or join our [public Slack](https://slack.prisma.io) and DM me.

0.4.3

Not secure
Bug fixes

- Correctly render Enum fields within compound keys (190)

What's Changed

Subclassing pseudo-recursive models

Subclassing pseudo-recursive models will now raise a warning instead of crashing, static types will still not respect the subclass, for example:

py
from prisma.models import User

class MyUser(User):
property
def fullname(self) -> str:
return f'{self.name} {self.surname}'

static type checkers will think that `user` is an instance of `User` when it is actually `MyUser` at runtime
you can fix this by following the steps here:
https://prisma-client-py.readthedocs.io/en/stable/reference/limitations/#removing-limitations
user = MyUser.prisma().create(
data={
'name': 'Robert',
'surname': 'Craigie',
},
)


For more details, see the [documentation](https://prisma-client-py.readthedocs.io/en/stable/reference/limitations/#querying-using-model-based-access)

Default HTTP timeout increased

The default HTTP timeout used to communicate with the internal Query Engine has been increased from 5 seconds to 30 seconds, this means you should no longer encounter timeout errors when executing very large queries.

Customise the internal HTTPX Client

You can now customise the HTTPX Client used to communicate with the internal query engine, this could be useful if you need to increase the http timeout, for full reference see the [documentation](https://prisma-client-py.readthedocs.io/en/stable/reference/client/#http-options).

py
client = Client(
http={
'timeout': 100,
},
)


Prisma Upgrade

The internal Prisma binaries that Prisma Client Python makes use of have been upgraded from `v3.4.0` to `v3.7.0` for a full changelog see:

0.4.2

Not secure
What's changed

This release is a patch release, fixing a bug introduced in the dev CLI in v0.4.1 (182)

0.4.1

Not secure
A patch release for [prismav2.16.1](https://github.com/prisma/prisma/releases/tag/2.16.1).
This fixes some connectivity issues with MySQL/SQL Server.

🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20Prisma%20Go%20Client%20release%20v0.4.1%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma-client-go/releases/tag/v0.4.1) about the release.**

Changes

* feat(prisma): upgrade prisma to 2.16.1 patch release (392) steebchen

Contributors

steebchen

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 steebprisma.io or join our [public Slack](https://slack.prisma.io) and DM me.

0.4.0

Not secure
Dynamically build queries, helper methods, some BREAKING CHANGES (see below)

🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20Prisma%20Go%20Client%20release%20v0.3.1%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma-client-go/releases/tag/v0.4.0) about the release.**

Major changes

Dynamically build queries

Give your users more control over how they filter and order their data. Build up filters over time instead of all at once.

Here's an example of setting specific attributes dynamically:

go
func CreateUser(w http.ResponseWriter, r *http.Request) {
var params []db.UserSetParam
email := r.PostFormValue("email")
kind := r.PostFormValue("kind")
if kind == "customer" {
// Set the referrer for users of type customer only
params = append(params, db.User.Referer.Set(r.Header.Get("Referer"))
}
user, err := client.User.CreateOne(
db.User.Kind.Set(kind),
db.User.Email.Set(email),
params...,
).Exec(r.Context())
// ... Handle the response
}


Learn more in the [dynamic queries document](https://github.com/prisma/prisma-client-go/blob/master/docs/reference/16-dynamic-queries.md).

ExecInner helper method

Prisma uses a specific structure for its models. For some libraries, you might need a struct with pointer values instead of Prisma’s embedded structure.
For this case, you can use the .InnerX embedded structs to get the plain object. However, there was no method for results with slices before, so we introduced ExecInner:

go
users, err := client.User.FindMany().ExecInner(ctx)
doSomething(users)


Breaking changes

All methods returning structs now return a pointer to a struct

Methods in shape of (T, error) now return (*T, error):

go
user, err := client.User.FindMany().Exec(ctx)
// user was of type db.UserModel
// user is now of type *db.UserModel
log.Printf(“user: %+v”, *user)


Methods returning a primitive value such as count now returns struct

For more consistency, all methods which used to return a count-like value now return a pointer to a struct.

go
result, err := client.User.FindMany().Update(…).Exec(ctx)
// result was of type int before
// result is now a pointer to a struct
log.Printf(“user: %d”, result.Count)


This affects the following methods:

go
client.X.FindMany().Update().Exec(ctx)
client.X.FindMany().Delete().Exec(ctx)
client.ExecuteRaw(…).Exec(ctx)


Embedded model structs InternalX are renamed to InnerX

Internal might be misleading as it’s recommended to use the top-level return value wherever possible, but with some libraries you might need to use the embedded struct, so we renamed it to Inner to make it more clear what it does.

go
user, err := client.User.FindUnique()
// was called user.InternalUser before
// now is called user.InnerUser
doSomething(user.InnerUser)


Changes

* ci(test): remove verbose logs (375) steebchen
* fix(templates): rename internal->inner (376) steebchen
* feat(query): add ExecInner for find queries (373) steebchen
* fix(create): accept interface in CreateOne (378) steebchen
* fix(tests): throttle test setup schema generation (379) steebchen
* feat(client): export builder interfaces (380) steebchen
* feat(client): introduce result struct, use pointers (381) steebchen
* docs(reference): add dynamic queries docs (383) steebchen
* feat(prisma): upgrade to 2.16.0; adapt dmmf, publish & tests (384) steebchen
* ci(release-drafter): use minor version in template (385) steebchen
* fix(types): define count result in types (386) steebchen
* fix(types): rename count result to BatchResult (387) steebchen
* fix(raw): change int return value to BatchResult (388) steebchen

Contributors

steebchen

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 steebprisma.io or join our [public Slack](https://slack.prisma.io) and DM me.

0.3.0

Not secure
- Introduces basic transactions
- Introduces `FindFirst`
- `FindOne` is deprecated in favour of `FindUnique`
- There's also a new `Prisma` namespace for Prisma-related functions.

🌟 **Help us spread the word about Prisma by starring the repo ☝️ or [tweeting](https://twitter.com/intent/tweet?text=Check%20out%20the%20latest%20Prisma%20Go%20Client%20release%20v0.2.1%20%F0%9F%9A%80%0D%0A%0D%0Ahttps://github.com/prisma/prisma-client-go/releases/tag/v0.2.1) about the release.**

Major changes

Introducing transactions: run multiple statements at once, guaranteeing that everything as a whole either fails or succeeds.

go
createUserA := client.User.CreateOne(
User.Email.Set("a"),
User.ID.Set("a"),
)

createUserB := client.User.CreateOne(
User.Email.Set("b"),
User.ID.Set("b"),
)

if err := client.Prisma.Transaction(createUserA, createUserB).Exec(ctx); err != nil {
panic(err)
}


FindOne is deprecated. It's renamed to FindUnique.

To find a record which is not guaranteed to be unique, you can now use the new FindFirst method to use the first element which is found:

go
post, err := client.Post.FindFirst(
db.Post.Title.Equals("hi"),
).Exec(ctx)
if errors.Is(err, db.ErrNotFound) {
log.Printf("no record with title 'hi' found")
} else if err != nil {
log.Printf("error occurred: %s", err)
}

log.Printf("post: %+v", post)



All Prisma-related functions on the prisma client object are deprecated in favour of a new prisma namespace.

The following methods:

go
client := prisma.NewClient()

client.Connect(…)
client.Disconnect(…)
client.ExecuteRaw(…)
client.QueryRaw(…)


Should be used as follows:

go
client := prisma.NewClient()

client.Prisma.Connect(…)
client.Prisma.Disconnect(…)
client.Prisma.ExecuteRaw(…)
client.Prisma.QueryRaw(…)


Changes

* fix(binaries): add hash to engine path (338) steebchen
* feat(prisma): upgrade to 2.12.0 (339) steebchen
* ci(publish): specify node targets explicitly; cleanup (341) steebchen
* feat(query): add FindFirst method (352) steebchen
* chore(prisma): upgrade prisma to 2.14.0 (354) steebchen
* fix(query): deprecate FindOne, replace with FindUnique (353) steebchen
* fix(query): adapt non-find queries for new find calls (355) steebchen
* fix(query): disallow additional methods on FindFirst (356) steebchen
* docs(reference): add FindFirst paragraph; adapt FindUnique (358) steebchen
* refactor(generator): return -1 on raw error; minor code cleanup (359) steebchen
* feat(client): introduce prisma client namespace (360) steebchen
* refactor(project): extract packages into runtime folder (361) steebchen
* feat(client): add transactions (336) steebchen
* docs(transaction): add transaction docs (362) steebchen
* docs(quickstart): use prisma folder for schema path (335) steebchen
* docs(reference): cleanup schemas & examples (366) steebchen
* chore(binaries): upgrade prisma to 2.15.0 (368) steebchen
* fix(find): make sure FindOne deprecation comment works (367) steebchen
* docs(reference): adapt FindFirst example (369) steebchen
* docs(reference): adapt error checking in find examples (370) steebchen

Contributors

steebchen

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 steebprisma.io or join our [public Slack](https://slack.prisma.io) and DM me.

Page 41 of 44

Links

Releases

Has known vulnerabilities

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.