Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update prisma monorepo to v5.14.0 #9145

Merged
merged 2 commits into from
May 15, 2024
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 14, 2024

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@prisma/client (source) 5.13.0 -> 5.14.0 age adoption passing confidence
@prisma/internals (source) 5.13.0 -> 5.14.0 age adoption passing confidence
@prisma/migrate (source) 5.13.0 -> 5.14.0 age adoption passing confidence
prisma (source) 5.13.0 -> 5.14.0 age adoption passing confidence

Release Notes

prisma/prisma (@​prisma/client)

v5.14.0

Compare Source

Today, we are excited to share the 5.14.0 stable release 🎉

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

Highlights
Share your feedback about Prisma ORM

We want to know how you like working with Prisma ORM in your projects! Please take our 2min survey and let us know what you like or where we can improve 🙏

createManyAndReturn()

We’re happy to announce the availability of a new, top-level Prisma Client query: createManyAndReturn(). It works similarly to createMany() but uses a RETURNING clause in the SQL query to retrieve the records that were just created.

Here’s an example of creating multiple posts and then immediately returning those posts.

const postBodies = req.json()['posts']

const posts = prisma.post.createManyAndReturn({
	data: postBodies
});

return posts

Additionally,createManyAndReturn() supports the same options as findMany(), such as the ability to return only specific fields.

const postBodies = req.json()['posts']

const postTitles = prisma.post.createManyAndReturn({
	data: postBodies,
	select: {
	  title: true,
	},
});

return postTitles

Note: Because createManyAndReturn() uses the RETURNING clause, it is only supported by PostgreSQL, CockroachDB, and SQLite databases. At this time, relationLoadStrategy: join is not supported in createManyAndReturn() queries.

MongoDB performance improvements

Previously, Prisma ORM suffered from performance issues when using the in operator or when including related models in queries against a MongoDB database. These queries were translated by the Prisma query engine in such a way that indexes were skipped and collection scans were used, leading to slower queries especially on large datasets.

With 5.14.0, Prisma ORM now rewrites queries to use a combination of $or and $eq operators, leading to dramatic performance increases for queries that include in operators or relation loading.

Fixes and improvements
Prisma Client
Prisma Migrate
Language tools (e.g. VS Code)
Company news
Prisma Changelog

Curious about all things Prisma? Be sure to check out the Prisma Changelog for updates across Prisma's products, including ORM, Accelerate, and Pulse!

Credits

Huge thanks to @​pranayat, @​yubrot, @​skyzh, @​anuraaga, @​gutyerrez, @​avallete, @​ceddy4395, @​Kayoshi-dev for helping!


Configuration

📅 Schedule: Branch creation - "before 7am on Tuesday,before 7am on Wednesday" in timezone Australia/Sydney, Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 653b175:

Sandbox Source
@keystone-6/sandbox Configuration

@borisno2
Copy link
Member

borisno2 commented May 15, 2024

@dcousens - Prisma internal's function formatSchema now only accepts the type { schemas: [[filename: string, content: string]]} and returns [filename: string, content: string] https://github.com/prisma/prisma/blob/ffd104059130a24f43489e21f6f093161014b4a0/packages/internals/src/engine-commands/formatSchema.ts#L11 - I have updated the getCommittedArtifacts function to handle this new type. Feel free to change if there is a different way you would like to handle this 🙏 .

@borisno2 borisno2 requested a review from dcousens May 15, 2024 07:48
Copy link
Contributor Author

renovate bot commented May 15, 2024

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@dcousens dcousens merged commit 8f59beb into main May 15, 2024
43 checks passed
@dcousens dcousens deleted the renovate/prisma-monorepo branch May 15, 2024 23:48
@dcousens
Copy link
Member

Thanks @borisno2! LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants