origranot / reduced.to

Free Modern URL Reducer. Make sure to share love by giving it a star.🌟 Have a great day!
https://reduced.to
MIT License
661 stars 279 forks source link

[Snyk] Upgrade @prisma/client from 5.12.1 to 5.16.0 #813

Closed origranot closed 1 month ago

origranot commented 1 month ago

This PR was automatically created by Snyk using the credentials of a real user.


![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)

Snyk has created this PR to upgrade @prisma/client from 5.12.1 to 5.16.0.

:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
- The recommended version is **328 versions** ahead of your current version. - The recommended version was released on **22 days ago**.
Release notes
Package name: @prisma/client
  • 5.16.0 - 2024-06-25

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

    Highlights

    Omit model fields globally

    With Prisma ORM 5.16.0 we’re more than happy to announce that we’re expanding the omitApi Preview feature to also include the ability to omit fields globally.

    When the Preview feature is enabled, you’re able to define fields to omit when instantiating Prisma Client.

    const prisma = new PrismaClient({
    omit: {
    user: {
    // make sure that password is never queried.
    password: true,
    },
    },
    });

    You’re also able to omit fields from multiple models and multiple fields from the same model

    const prisma = new PrismaClient({
    omit: {
    user: {
    // make sure that password and internalId are never queried.
    password: true,
    internalId: true,
    },
    post: {
    secretkey: true,
    },
    },
    });

    With both local and global omit, you now have the flexibility to completely remove sensitive fields while also tailoring individual queries. If you need the ability to generally omit a field except in a specific query, you can also overwrite a global omit locally

    <div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const prisma = new PrismaClient({ omit: { user: { // password is omitted globally. password: true, }, }, });

    const userWithPassword = await prisma.user.findUnique({ omit: { password: false }, // omit now false, so password is returned where: { id: 1 }, });">

    const prisma = new PrismaClient({
    omit: {
    user: {
    // password is omitted globally.
    password: true,
    },
    },
    });

    const userWithPassword = await prisma.user.findUnique({ omit: { password: false }, // omit now false, so password is returned where: { id: 1 }, });

Changes to prismaSchemaFolder

In 5.15.0 we released the prismaSchemaFolder Preview feature, allowing you to create multiple Prisma Schema files in a prisma/schema directory. We’ve gotten a lot of great feedback and are really excited with how the community has been using the feature.

To continue improving our multi-file schema support, we have a few breaking changes to the prismaSchemaFolder feature:

Changes to fullTextSearch

In order to improve our full-text search implementation we have made a breaking change to the fullTextSearch Preview feature.

Previously, when the feature was enabled we updated the <Model>OrderByWithRelationInput TypeScript type with the <Model>OrderByWithRelationAndSearchRelevanceInput type. However, we have noted that there are no cases where relational ordering is needed but search relevance is not. Thus, we have decided to remove the <Model>OrderByWithRelationAndSearchRelevanceInput naming and only use the <Model>OrderByWithRelationInput naming.

Fixes and improvements

Prisma

Language tools (e.g. VS Code)

Prisma Engines

Credits

Huge thanks to @ key-moon, @ pranayat, @ yubrot, @ skyzh, @ brian-dlee, @ mydea, @ nickcarnival, @ eruditmorina, @ nzakas, @ gutyerrez, @ avallete, @ ceddy4395, @ Kayoshi-dev, @ yehonatanz for helping!

  </li>
  <li>
    <b>5.16.0-integration-vitest-workaround.2</b> - 2024-06-25
  </li>
  <li>
    <b>5.16.0-integration-vitest-workaround.1</b> - 2024-06-17
  </li>
  <li>
    <b>5.16.0-integration-sqlite-fix.1</b> - 2024-06-11
  </li>
  <li>
    <b>5.16.0-integration-optimize-login-v2.5</b> - 2024-06-19
  </li>
  <li>
    <b>5.16.0-integration-optimize-login-v2.4</b> - 2024-06-18
  </li>
  <li>
    <b>5.16.0-integration-optimize-login-v2.3</b> - 2024-06-18
  </li>
  <li>
    <b>5.16.0-integration-optimize-login-v2.2</b> - 2024-06-18
  </li>
  <li>
    <b>5.16.0-integration-optimize-login-v2.1</b> - 2024-06-18
  </li>
  <li>
    <b>5.16.0-integration-joel-repro-gh-11789.2</b> - 2024-06-18
  </li>
  <li>
    <b>5.16.0-integration-joel-repro-gh-11789.1</b> - 2024-06-18
  </li>
  <li>
    <b>5.16.0-integration-janpio-studio-prisma-config.3</b> - 2024-06-14
  </li>
  <li>
    <b>5.16.0-integration-janpio-studio-prisma-config.2</b> - 2024-06-14
  </li>
  <li>
    <b>5.16.0-integration-janpio-studio-prisma-config.1</b> - 2024-06-14
  </li>
  <li>
    <b>5.16.0-integration-fix-empty-schema.1</b> - 2024-06-10
  </li>
  <li>
    <b>5.16.0-integration-engines-5-16-0-15-fix-fts-relation-input-name-9388ddb70ab6bc6cba66ec9b351906f857af5d3f.1</b> - 2024-06-17
  </li>
  <li>
    <b>5.16.0-integration-engines-5-16-0-1-fix-sqlite-concurrent-writes-74a48e9f33b0a8b403045af35430ce444541be88.1</b> - 2024-06-05
  </li>
  <li>
    <b>5.16.0-integration-crypto-client-vercel.2</b> - 2024-06-05
  </li>
  <li>
    <b>5.16.0-integration-crypto-client-vercel.1</b> - 2024-06-05
  </li>
  <li>
    <b>5.16.0-dev.64</b> - 2024-06-25
  </li>
  <li>
    <b>5.16.0-dev.63</b> - 2024-06-25
  </li>
  <li>
    <b>5.16.0-dev.62</b> - 2024-06-24
  </li>
  <li>
    <b>5.16.0-dev.61</b> - 2024-06-24
  </li>
  <li>
    <b>5.16.0-dev.60</b> - 2024-06-24
  </li>
  <li>
    <b>5.16.0-dev.59</b> - 2024-06-21
  </li>
  <li>
    <b>5.16.0-dev.58</b> - 2024-06-21
  </li>
  <li>
    <b>5.16.0-dev.57</b> - 2024-06-20
  </li>
  <li>
    <b>5.16.0-dev.56</b> - 2024-06-20
  </li>
  <li>
    <b>5.16.0-dev.55</b> - 2024-06-20
  </li>
  <li>
    <b>5.16.0-dev.54</b> - 2024-06-20
  </li>
  <li>
    <b>5.16.0-dev.53</b> - 2024-06-19
  </li>
  <li>
    <b>5.16.0-dev.51</b> - 2024-06-19
  </li>
  <li>
    <b>5.16.0-dev.50</b> - 2024-06-19
  </li>
  <li>
    <b>5.16.0-dev.49</b> - 2024-06-18
  </li>
  <li>
    <b>5.16.0-dev.48</b> - 2024-06-18
  </li>
  <li>
    <b>5.16.0-dev.47</b> - 2024-06-18
  </li>
  <li>
    <b>5.16.0-dev.46</b> - 2024-06-18
  </li>
  <li>
    <b>5.16.0-dev.45</b> - 2024-06-17
  </li>
  <li>
    <b>5.16.0-dev.44</b> - 2024-06-17
  </li>
  <li>
    <b>5.16.0-dev.43</b> - 2024-06-17
  </li>
  <li>
    <b>5.16.0-dev.42</b> - 2024-06-17
  </li>
  <li>
    <b>5.16.0-dev.41</b> - 2024-06-17
  </li>
  <li>
    <b>5.16.0-dev.40</b> - 2024-06-14
  </li>
  <li>
    <b>5.16.0-dev.39</b> - 2024-06-14
  </li>
  <li>
    <b>5.16.0-dev.38</b> - 2024-06-14
  </li>
  <li>
    <b>5.16.0-dev.37</b> - 2024-06-14
  </li>
  <li>
    <b>5.16.0-dev.36</b> - 2024-06-13
  </li>
  <li>
    <b>5.16.0-dev.35</b> - 2024-06-12
  </li>
  <li>
    <b>5.16.0-dev.34</b> - 2024-06-12
  </li>
  <li>
    <b>5.16.0-dev.33</b> - 2024-06-12
  </li>
  <li>
    <b>5.16.0-dev.32</b> - 2024-06-12
  </li>
  <li>
    <b>5.16.0-dev.31</b> - 2024-06-12
  </li>
  <li>
    <b>5.16.0-dev.30</b> - 2024-06-12
  </li>
  <li>
    <b>5.16.0-dev.29</b> - 2024-06-12
  </li>
  <li>
    <b>5.16.0-dev.28</b> - 2024-06-12
  </li>
  <li>
    <b>5.16.0-dev.27</b> - 2024-06-11
  </li>
  <li>
    <b>5.16.0-dev.26</b> - 2024-06-11
  </li>
  <li>
    <b>5.16.0-dev.25</b> - 2024-06-10
  </li>
  <li>
    <b>5.16.0-dev.24</b> - 2024-06-10
  </li>
  <li>
    <b>5.16.0-dev.23</b> - 2024-06-10
  </li>
  <li>
    <b>5.16.0-dev.22</b> - 2024-06-10
  </li>
  <li>
    <b>5.16.0-dev.21</b> - 2024-06-10
  </li>
  <li>
    <b>5.16.0-dev.20</b> - 2024-06-10
  </li>
  <li>
    <b>5.16.0-dev.19</b> - 2024-06-10
  </li>
  <li>
    <b>5.16.0-dev.18</b> - 2024-06-10
  </li>
  <li>
    <b>5.16.0-dev.17</b> - 2024-06-10
  </li>
  <li>
    <b>5.16.0-dev.16</b> - 2024-06-07
  </li>
  <li>
    <b>5.16.0-dev.15</b> - 2024-06-07
  </li>
  <li>
    <b>5.16.0-dev.14</b> - 2024-06-07
  </li>
  <li>
    <b>5.16.0-dev.13</b> - 2024-06-06
  </li>
  <li>
    <b>5.16.0-dev.12</b> - 2024-06-06
  </li>
  <li>
    <b>5.16.0-dev.11</b> - 2024-06-06
  </li>
  <li>
    <b>5.16.0-dev.9</b> - 2024-06-05
  </li>
  <li>
    <b>5.16.0-dev.8</b> - 2024-06-05
  </li>
  <li>
    <b>5.16.0-dev.7</b> - 2024-06-05
  </li>
  <li>
    <b>5.16.0-dev.6</b> - 2024-06-05
  </li>
  <li>
    <b>5.16.0-dev.5</b> - 2024-06-05
  </li>
  <li>
    <b>5.16.0-dev.4</b> - 2024-06-04
  </li>
  <li>
    <b>5.16.0-dev.3</b> - 2024-06-04
  </li>
  <li>
    <b>5.16.0-dev.2</b> - 2024-06-04
  </li>
  <li>
    <b>5.16.0-dev.1</b> - 2024-06-04
  </li>
  <li>
    <b>5.15.1</b> - <a href="https://github.com/prisma/prisma/releases/tag/5.15.1">2024-06-18</a></br><p>Today, we are issuing the <code>5.15.1</code> patch release.</p>

Fixes in Prisma Client

  </li>
  <li>
    <b>5.15.1-dev.1</b> - 2024-06-17
  </li>
  <li>
    <b>5.15.0</b> - <a href="https://github.com/prisma/prisma/releases/tag/5.15.0">2024-06-04</a></br><p>Today, we are excited to share the <code>5.15.0</code> stable release 🎉</p>

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

Highlights

Multi-File Prisma Schema support

Prisma ORM 5.15.0 features support for multi-file Prisma Schema in Preview.

This closes a long standing issue and does so in a clean and easy to migrate way.

To get started:

  1. Enable the prismaSchemaFolder Preview feature by including it in the previewFeatures field of your generator.
    datasource db {
      provider = "postgresql"
      url      = env("DATABASE_URL")
    }
    
    generator client {
      provider        = "prisma-client-js"
      previewFeatures = ["prismaSchemaFolder"]
    }
    
  2. Create a schema subdirectory under your prisma directory.
  3. Move your schema.prisma into this directory.

You are now set up with a multi-file Prisma Schema! Add as many or as few .prisma files to the new prisma/schema directory.

When running commands where a Prisma Schema file is expected to be provided, you can now define a Prisma Schema directory. This includes Prisma CLI commands that use the --schema option as well as defining schema via package.json

Our tooling has also been updated to handle multiple Prisma Schema files. This includes our Visual Studio Code extension and tools like database introspection, which will deposit new models in a introspected.prisma file. Existing models will be updated in the file they are found.

To learn more, please refer to our official documentation and announcement blog post. If you try out prismaSchemaFolder, please let us know!

Interesting Bug Fixes

Fix for PostgreSQL prepared statement caching for raw queries

This release fixes a nasty bug with the caching of prepared statements in raw Prisma Client queries that affected PostgreSQL when you ran the same SQL statement with differently typed paramters. This should not fail any more.

Fix for SQL Server introspection of (deprecated) CREATE DEFAULT

Our Introspection logic crashed on encountering certain multi-line CREATE DEFAULT, a deprecated way to define defaults in SQL Server. As many SQL Server users are working with established databases, this happened frequently enough that we now explicitly ignore these defaults instead of crashing.

Fix for Cloudflare D1’s lower parameter limit

Cloudflare’s D1 has a lower parameter limit than local SQLite, which caused bigger queries to fail. We adapted that limit to the D1 default for @ prisma/adapter-d1, which will avoid such failures.

Fix for Cloudflare D1’s different PRAGMA support

Our generated migration SQL for SQLite did not always work for Cloudflare D1, because of differences in the supported pragmas. We adapted the SQL to work in both local SQLite and Cloudflare D1.

Fixes and improvements

Prisma Migrate

Prisma Client

Language tools (e.g. VS Code)

Credits

Huge thanks to @ pranayat, @ yubrot, and @ skyzh for helping!

  </li>
  <li>
    <b>5.15.0-integration-static-wasm-worker-loader.2</b> - 2024-05-23
  </li>
  <li>
    <b>5.15.0-integration-static-wasm-worker-loader.1</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-integration-pr-24186.1</b> - 2024-05-15
  </li>
  <li>
    <b>5.15.0-integration-fix-sqlite-d1-max-bind-values.8</b> - 2024-06-03
  </li>
  <li>
    <b>5.15.0-integration-fix-sqlite-d1-max-bind-values.7</b> - 2024-05-31
  </li>
  <li>
    <b>5.15.0-integration-fix-sqlite-d1-max-bind-values.5</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-integration-fix-sqlite-d1-max-bind-values.4</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-integration-fix-sqlite-d1-max-bind-values.3</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-integration-fix-sqlite-d1-max-bind-values.2</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-integration-fix-sqlite-d1-max-bind-values.1</b> - 2024-05-20
  </li>
  <li>
    <b>5.15.0-integration-feat-cli-pdp-optimize-tracking.1</b> - 2024-05-14
  </li>
  <li>
    <b>5.15.0-integration-engines-5-15-0-9-wasm-update-nightly-f2a9d342d78503d7a478faefd4bb8a7e79d927f5.1</b> - 2024-05-27
  </li>
  <li>
    <b>5.15.0-integration-engines-5-15-0-4-integration-fix-sqlite-d1-migrations-93d288241fddb3768c310aeceb6b0120145c6f6d.2</b> - 2024-05-16
  </li>
  <li>
    <b>5.15.0-integration-engines-5-15-0-4-integration-fix-sqlite-d1-migrations-93d288241fddb3768c310aeceb6b0120145c6f6d.1</b> - 2024-05-16
  </li>
  <li>
    <b>5.15.0-integration-engines-5-15-0-21-feat-multi-file-introspection-cli-2-146af78f10dc7146469ce4d409ecaca820e74472.1</b> - 2024-05-30
  </li>
  <li>
    <b>5.15.0-integration-engines-5-15-0-18-feat-multi-file-introspection-cli-2-2161c3dd5f60d5d52f89724118f4b1328f7d161d.1</b> - 2024-05-30
  </li>
  <li>
    <b>5.15.0-integration-engines-5-15-0-17-feat-multi-file-introspection-cli-1-27cfda7ab7d009c56e2bfb58badc16a348cbeefa.1</b> - 2024-05-29
  </li>
  <li>
    <b>5.15.0-integration-engines-5-15-0-15-get-config-fault-tolerant-49eaa97e1de2cace3bd0d8016b165ad0012b7f1a.1</b> - 2024-05-29
  </li>
  <li>
    <b>5.15.0-integration-engines-5-15-0-14-feat-restore-json-noparse-9e8157b12aa689561bf138f5e305ef24cf4bd2e3.1</b> - 2024-05-29
  </li>
  <li>
    <b>5.15.0-integration-engines-5-15-0-11-integration-fix-sqlite-d1-migrations-9cebc28b8d3cb5e1ebd8ad8d096e1cef4725d5ad.2</b> - 2024-05-28
  </li>
  <li>
    <b>5.15.0-integration-engines-5-15-0-11-integration-fix-sqlite-d1-migrations-9cebc28b8d3cb5e1ebd8ad8d096e1cef4725d5ad.1</b> - 2024-05-28
  </li>
  <li>
    <b>5.15.0-integration-client-dynamic-wasm-imports.2</b> - 2024-05-29
  </li>
  <li>
    <b>5.15.0-integration-client-dynamic-wasm-imports.1</b> - 2024-05-28
  </li>
  <li>
    <b>5.15.0-dev.73</b> - 2024-06-04
  </li>
  <li>
    <b>5.15.0-dev.72</b> - 2024-06-03
  </li>
  <li>
    <b>5.15.0-dev.71</b> - 2024-06-03
  </li>
  <li>
    <b>5.15.0-dev.70</b> - 2024-06-03
  </li>
  <li>
    <b>5.15.0-dev.69</b> - 2024-06-03
  </li>
  <li>
    <b>5.15.0-dev.68</b> - 2024-06-03
  </li>
  <li>
    <b>5.15.0-dev.67</b> - 2024-06-03
  </li>
  <li>
    <b>5.15.0-dev.66</b> - 2024-06-03
  </li>
  <li>
    <b>5.15.0-dev.64</b> - 2024-06-03
  </li>
  <li>
    <b>5.15.0-dev.63</b> - 2024-05-31
  </li>
  <li>
    <b>5.15.0-dev.62</b> - 2024-05-31
  </li>
  <li>
    <b>5.15.0-dev.61</b> - 2024-05-31
  </li>
  <li>
    <b>5.15.0-dev.60</b> - 2024-05-31
  </li>
  <li>
    <b>5.15.0-dev.59</b> - 2024-05-31
  </li>
  <li>
    <b>5.15.0-dev.58</b> - 2024-05-31
  </li>
  <li>
    <b>5.15.0-dev.57</b> - 2024-05-31
  </li>
  <li>
    <b>5.15.0-dev.56</b> - 2024-05-30
  </li>
  <li>
    <b>5.15.0-dev.55</b> - 2024-05-30
  </li>
  <li>
    <b>5.15.0-dev.54</b> - 2024-05-30
  </li>
  <li>
    <b>5.15.0-dev.53</b> - 2024-05-30
  </li>
  <li>
    <b>5.15.0-dev.52</b> - 2024-05-30
  </li>
  <li>
    <b>5.15.0-dev.51</b> - 2024-05-30
  </li>
  <li>
    <b>5.15.0-dev.50</b> - 2024-05-30
  </li>
  <li>
    <b>5.15.0-dev.49</b> - 2024-05-29
  </li>
  <li>
    <b>5.15.0-dev.48</b> - 2024-05-29
  </li>
  <li>
    <b>5.15.0-dev.47</b> - 2024-05-29
  </li>
  <li>
    <b>5.15.0-dev.46</b> - 2024-05-29
  </li>
  <li>
    <b>5.15.0-dev.45</b> - 2024-05-29
  </li>
  <li>
    <b>5.15.0-dev.44</b> - 2024-05-29
  </li>
  <li>
    <b>5.15.0-dev.43</b> - 2024-05-29
  </li>
  <li>
    <b>5.15.0-dev.42</b> - 2024-05-29
  </li>
  <li>
    <b>5.15.0-dev.41</b> - 2024-05-28
  </li>
  <li>
    <b>5.15.0-dev.40</b> - 2024-05-28
  </li>
  <li>
    <b>5.15.0-dev.39</b> - 2024-05-28
  </li>
  <li>
    <b>5.15.0-dev.38</b> - 2024-05-28
  </li>
  <li>
    <b>5.15.0-dev.37</b> - 2024-05-28
  </li>
  <li>
    <b>5.15.0-dev.36</b> - 2024-05-28
  </li>
  <li>
    <b>5.15.0-dev.35</b> - 2024-05-28
  </li>
  <li>
    <b>5.15.0-dev.34</b> - 2024-05-28
  </li>
  <li>
    <b>5.15.0-dev.33</b> - 2024-05-27
  </li>
  <li>
    <b>5.15.0-dev.32</b> - 2024-05-27
  </li>
  <li>
    <b>5.15.0-dev.31</b> - 2024-05-27
  </li>
  <li>
    <b>5.15.0-dev.30</b> - 2024-05-23
  </li>
  <li>
    <b>5.15.0-dev.29</b> - 2024-05-23
  </li>
  <li>
    <b>5.15.0-dev.28</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-dev.27</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-dev.26</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-dev.25</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-dev.24</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-dev.23</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-dev.22</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-dev.21</b> - 2024-05-22
  </li>
  <li>
    <b>5.15.0-dev.20</b> - 2024-05-21
  </li>
  <li>
    <b>5.15.0-dev.19</b> - 2024-05-21
  </li>
  <li>
    <b>5.15.0-dev.18</b> - 2024-05-21
  </li>
  <li>
    <b>5.15.0-dev.17</b> - 2024-05-17
  </li>
  <li>
    <b>5.15.0-dev.16</b> - 2024-05-17
  </li>
  <li>
    <b>5.15.0-dev.15</b> - 2024-05-16
  </li>
  <li>
    <b>5.15.0-dev.14</b> - 2024-05-16
  </li>
  <li>
    <b>5.15.0-dev.13</b> - 2024-05-16
  </li>
  <li>
    <b>5.15.0-dev.12</b> - 2024-05-15
  </li>
  <li>
    <b>5.15.0-dev.11</b> - 2024-05-15
  </li>
  <li>
    <b>5.15.0-dev.10</b> - 2024-05-15
  </li>
  <li>
    <b>5.15.0-dev.9</b> - 2024-05-15
  </li>
  <li>
    <b>5.15.0-dev.8</b> - 2024-05-15
  </li>
  <li>
    <b>5.15.0-dev.7</b> - 2024-05-15
  </li>
  <li>
    <b>5.15.0-dev.6</b> - 2024-05-15
  </li>
  <li>
    <b>5.15.0-dev.5</b> - 2024-05-15
  </li>
  <li>
    <b>5.15.0-dev.4</b> - 2024-05-15
  </li>
  <li>
    <b>5.15.0-dev.3</b> - 2024-05-15
  </li>
  <li>
    <b>5.15.0-dev.2</b> - 2024-05-14
  </li>
  <li>
    <b>5.14.0</b> - <a href="https://github.com/prisma/prisma/releases/tag/5.14.0">2024-05-14</a></br><p>Today, we are excited to share the <code>5.14.0</code> stable release 🎉</p>

🌟 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.

<div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const postBodies = req.json()['posts']

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

return 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.

<div class="highlight highlight-source-tsx notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="const postBodies = req.json()['posts']

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

return postTitles">

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

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

return postTitles

Full documentation for this feature can be found in the Prisma Client API Reference.

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!

New product announcement: Prisma Optimize

With this release, we are excited to introduce a new Prisma product. We’re calling it “Optimize” because that’s what it does! Let your favorite ORM also help you debug the performance of your application.

Check out our announcement blog post for more details, including a demo video.

Credits

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

  </li>
  <li>
    <b>5.14.0-integration-static-wasm-worker-loader.5</b> - 2024-05-13
  </li>
  <li>
    <b>5.14.0-integration-static-wasm-worker-loader.4</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-integration-static-wasm-worker-loader.3</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-integration-static-wasm-worker-loader.2</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-integration-static-wasm-worker-loader.1</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-integration-schema-files-resolver.10</b> - 2024-05-14
  </li>
  <li>
    <b>5.14.0-integration-schema-files-resolver.9</b> - 2024-05-14
  </li>
  <li>
    <b>5.14.0-integration-schema-files-resolver.8</b> - 2024-05-10
  </li>
  <li>
    <b>5.14.0-integration-schema-files-resolver.7</b> - 2024-05-10
  </li>
  <li>
    <b>5.14.0-integration-schema-files-resolver.6</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-integration-schema-files-resolver.5</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-integration-schema-files-resolver.4</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-integration-schema-files-resolver.3</b> - 2024-05-07
  </li>
  <li>
    <b>5.14.0-integration-schema-files-resolver.2</b> - 2024-05-07
  </li>
  <li>
    <b>5.14.0-integration-schema-files-resolver.1</b> - 2024-05-06
  </li>
  <li>
    <b>5.14.0-integration-engines-5-14-0-26-text-comp-multi-20f7cb6cf71d1ee66be7363748ca983d326e9db1.1</b> - 2024-05-14
  </li>
  <li>
    <b>5.14.0-integration-engines-5-14-0-22-integration-rust-1-78-wasm-fc926224322c04c61c76032c9985a1d4fdfee13f.2</b> - 2024-05-10
  </li>
  <li>
    <b>5.14.0-integration-engines-5-14-0-22-integration-rust-1-78-wasm-fc926224322c04c61c76032c9985a1d4fdfee13f.1</b> - 2024-05-10
  </li>
  <li>
    <b>5.14.0-integration-engines-5-14-0-19-fix-ds-url-rn-03c57ba9ba8eea9dfcf11c5382fdb6822d5aa3d2.1</b> - 2024-05-10
  </li>
  <li>
    <b>5.14.0-integration-engines-5-14-0-10-feat-create-many-and-return-31c187d29db487fb54d6bb593a851d2f9e5687a6.2</b> - 2024-05-02
  </li>
  <li>
    <b>5.14.0-integration-engines-5-14-0-10-feat-create-many-and-return-31c187d29db487fb54d6bb593a851d2f9e5687a6.1</b> - 2024-05-02
  </li>
  <li>
    <b>5.14.0-integration-engines-5-14-0-1-integration-vitess-constraint-fix-ca251465b6b966a5b9f61c3a8077ef99275ca330.2</b> - 2024-04-23
  </li>
  <li>
    <b>5.14.0-integration-engines-5-14-0-1-integration-vitess-constraint-fix-ca251465b6b966a5b9f61c3a8077ef99275ca330.1</b> - 2024-04-23
  </li>
  <li>
    <b>5.14.0-dev.77</b> - 2024-05-14
  </li>
  <li>
    <b>5.14.0-dev.76</b> - 2024-05-13
  </li>
  <li>
    <b>5.14.0-dev.75</b> - 2024-05-13
  </li>
  <li>
    <b>5.14.0-dev.74</b> - 2024-05-13
  </li>
  <li>
    <b>5.14.0-dev.72</b> - 2024-05-13
  </li>
  <li>
    <b>5.14.0-dev.71</b> - 2024-05-13
  </li>
  <li>
    <b>5.14.0-dev.70</b> - 2024-05-13
  </li>
  <li>
    <b>5.14.0-dev.69</b> - 2024-05-13
  </li>
  <li>
    <b>5.14.0-dev.68</b> - 2024-05-13
  </li>
  <li>
    <b>5.14.0-dev.67</b> - 2024-05-10
  </li>
  <li>
    <b>5.14.0-dev.66</b> - 2024-05-10
  </li>
  <li>
    <b>5.14.0-dev.65</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-dev.64</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-dev.63</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-dev.62</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-dev.61</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-dev.60</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-dev.59</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-dev.58</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-dev.57</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-dev.56</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-dev.55</b> - 2024-05-08
  </li>
  <li>
    <b>5.14.0-dev.54</b> - 2024-05-07
  </li>
  <li>
    <b>5.14.0-dev.53</b> - 2024-05-07
  </li>
  <li>
    <b>5.14.0-dev.52</b> - 2024-05-07
  </li>
  <li>
    <b>5.14.0-dev.51</b> - 2024-05-06
  </li>
  <li>
    <b>5.14.0-dev.50</b> - 2024-05-06
  </li>
  <li>
    <b>5.14.0-dev.49</b> - 2024-05-06
  </li>
  <li>
    <b>5.14.0-dev.48</b> - 2024-05-03
  </li>
  <li>
    <b>5.14.0-dev.47</b> - 2024-05-03
  </li>
  <li>
    <b>5.14.0-dev.46</b> - 2024-05-02
  </li>
  <li>
    <b>5.14.0-dev.44</b> - 2024-05-02
  </li>
  <li>
    <b>5.14.0-dev.43</b> - 2024-05-02
  </li>
  <li>
    <b>5.14.0-dev.42</b> - 2024-05-02
  </li>
  <li>
    <b>5.14.0-dev.41</b> - 2024-05-02
  </li>
  <li>
    <b>5.14.0-dev.40</b> - 2024-05-02
  </li>
  <li>
    <b>5.14.0-dev.39</b> - 2024-05-02
  </li>
  <li>
    <b>5.14.0-dev.38</b> - 2024-05-02
  </li>
  <li>
    <b>5.14.0-dev.36</b> - 2024-05-02
  </li>
  <li>
    <b>5.14.0-dev.35</b> - 2024-05-01
  </li>
  <li>
    <b>5.14.0-dev.34</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-dev.33</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-dev.32</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-dev.31</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-dev.30</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-dev.28</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-dev.27</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-dev.26</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-dev.25</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-dev.24</b> - 2024-04-30
  </li>
  <li>
    <b>5.14.0-dev.23</b> - 2024-04-29
  </li>
  <li>
    <b>5.14.0-dev.22</b> - 2024-04-26
  </li>
  <li>
    <b>5.14.0-dev.21</b> - 2024-04-26
  </li>
  <li>
    <b>5.14.0-dev.20</b> - 2024-04-26
  </li>
  <li>
    <b>5.14.0-dev.19</b> - 2024-04-26
  </li>
  <li>
    <b>5.14.0-dev.18</b> - 2024-04-26
  </li>
  <li>
    <b>5.14.0-dev.16</b> - 2024-04-25
  </li>
  <li>
    <b>5.14.0-dev.14</b> - 2024-04-25
  </li>
  <li>
    <b>5.14.0-dev.13</b> - 2024-04-25
  </li>
  <li>
    <b>5.14.0-dev.12</b> - 2024-04-24
  </li>
  <li>
    <b>5.14.0-dev.11</b> - 2024-04-24
  </li>
  <li>
    <b>5.14.0-dev.9</b> - 2024-04-24
  </li>
  <li>
    <b>5.14.0-dev.6</b> - 2...
vercel[bot] commented 1 month ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
reduced-to ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2024 9:19pm