Prisma 客户端和 Prisma 架构
当我们发布新的 Prisma 客户端或 Prisma 架构功能时,它通常以预览版启动,以便你可以对其进行测试并提交反馈。在我们根据你的反馈改进该功能并对内部测试结果感到满意后,我们会将该功能推广为普遍可用。
¥When we release a new Prisma Client or Prisma schema feature, it often starts in Preview so that you can test it and submit your feedback. After we improve the feature with your feedback and are satisfied with the internal test results, we promote the feature to general availability.
欲了解更多信息,请参阅 ORM 版本和成熟度级别。
¥For more information, see ORM releases and maturity levels.
当前有效的预览功能
¥Currently active Preview features
以下 预览 功能标志可用于 Prisma 客户端和 Prisma 架构:
¥The following Preview feature flags are available for Prisma Client and Prisma schema:
特性 | 发布预览版 | 反馈问题 |
---|---|---|
metrics | 3.15.0 | 提交反馈 |
multiSchema | 4.3.0 | 提交反馈 |
postgresqlExtensions | 4.5.0 | 提交反馈 |
views | 4.9.0 | 提交反馈 |
driverAdapters | 5.4.0 | 提交反馈 |
relationJoins | 5.7.0 | 提交反馈 |
nativeDistinct | 5.7.0 | 提交反馈 |
typedSql | 5.19.0 | 提交反馈 |
strictUndefinedChecks | 5.20.0 | 提交反馈 |
fullTextSearchPostgres | 6.0.0 | 提交反馈 |
prisma-client | 6.6.0 | 提交反馈 |
queryCompiler | 6.7.0 | 提交反馈 |
shardKeys | 6.10.0 | 提交反馈 |
要启用预览功能,请在 schema.prisma
文件中添加 将功能标志添加到 generator
块。在 GitHub 上分享你对所有预览版功能的反馈。
¥To enable a Preview feature, add the feature flag to the generator
block in your schema.prisma
file. Share your feedback on all Preview features on GitHub.
启用 Prisma 客户端预览功能
¥Enabling a Prisma Client Preview feature
要启用 Prisma 客户端预览功能:
¥To enable a Prisma Client Preview feature:
-
将预览功能标志添加到
generator
块:¥Add the Preview feature flag to the
generator
block:generator client {
provider = "prisma-client-js"
previewFeatures = ["relationJoins"]
} -
重新生成 Prisma 客户端:
¥Re-generate Prisma Client:
npx prisma generate
-
如果你使用的是 Visual Studio Code,并且生成 Prisma 客户端后
.ts
文件中的预览功能不可用,请运行 TypeScript:重新启动 TS 服务器命令。¥If you are using Visual Studio Code and the Preview feature is not available in your
.ts
file after generating Prisma Client, run the TypeScript: Restart TS server command.
预览功能升级为普遍可用
¥Preview features promoted to general availability
在下面的列表中,你可以找到预览版和现已公开发布的 Prisma 客户端和 Prisma 架构功能的历史记录。这些功能按升级为通用版本的最新版本排序。
¥In the list below, you can find a history of Prisma Client and Prisma schema features that were in Preview and are now in general availability. The features are sorted by the most recent version in which they were promoted to general availability.