Skip to main content

数据库填充

Prisma Client 提供的功能通常无法通过特定数据库实现或需要扩展。这些功能称为 Polyfill。对于所有数据库,这包括:

¥Prisma Client provides features that are typically either not achievable with particular databases or require extensions. These features are referred to as polyfills. For all databases, this includes:

  • 使用 cuiduuid 值初始化 ID

    ¥Initializing ID values with cuid and uuid values

  • 使用 @updatedAt 存储记录最后更新的时间

    ¥Using @updatedAt to store the time when a record was last updated

对于关系数据库,这包括:

¥For relational databases, this includes:

对于 MongoDB,这包括:

¥For MongoDB, this includes:

  • 一般关系 - MongoDB 中不强制执行文档之间的外键关系

    ¥Relations in general - foreign key relations between documents are not enforced in MongoDB