SuperAPI AI 工具集

prisma-client-api

编程与开发

查看项目

更新于 10-16 06:14

技能介绍

用途:为使用 Prisma ORM 7.x 的 Prisma Client 编写或调试数据库查询提供 API 参考,覆盖模型查询、过滤、关系、CRUD 操作、事务与客户端配置。

主要能力:按优先级整理了客户端构造、模型查询、查询形态、过滤、关系、事务、原生 SQL、客户端方法八类规则。模型查询方法包括 findUnique、findUniqueOrThrow、findFirst、findFirstOrThrow、findMany、create、createMany、createManyAndReturn、update、updateMany、updateManyAndReturn、upsert、delete、deleteMany、count、aggregate、groupBy。查询选项含 where、select、include、omit、orderBy、take、skip、cursor、distinct。客户端方法含 $connect、$disconnect、$transaction、$queryRaw、$executeRaw、$on、$extends。过滤运算符含 equals、not、in、notIn、lt/lte、gt/gte、contains、startsWith、endsWith、mode;关系过滤含 some、every、none、is、isNot。

使用方式:按参考文件查阅细节,constructor.md 对应构造函数、model-queries.md 对应 CRUD、query-options.md 对应 select/include/omit/where/orderBy、filters.md 对应过滤条件、relations.md 对应关系与嵌套操作、transactions.md 对应事务、raw-queries.md 对应 $queryRaw 与 $executeRaw、client-methods.md 对应 $connect 等生命周期与扩展方法。

限制与版本要求:需将 @prisma/client、Prisma CLI 与所选驱动适配器锁定在同一稳定 7.x 版本;当前已验证兼容目标为 7.10.0,应避免无界 latest 安装,因为其会选中 Prisma 8 候选版本。资料以英文规则说明为主,未提供中文文档、价格或平台信息。