prisma-client-api

Provides Prisma Client API reference for queries, filters, relations, and transactions.

Updated Aug 30, 2026
One-click install
npx skills add https://github.com/Rashidrxq/SalesOrder-ERP-REMEX --skill prisma-client-api-rashidrxq
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: prisma-client-api
Source: https://github.com/Rashidrxq/SalesOrder-ERP-REMEX/tree/main/sales_order/.windsurf/skills/prisma-client-api
Command: npx skills add https://github.com/Rashidrxq/SalesOrder-ERP-REMEX --skill prisma-client-api-rashidrxq

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing correct Prisma Client queries requires knowing dozens of methods, filter operators, relation patterns, and transaction options. This Skill gives you an on-demand reference so you write accurate database queries without leaving your workflow to search documentation. ## Core Features & Use Cases - Model Query Reference: Covers all CRUD methods including findUnique, findMany, create, update, upsert, delete, count, aggregate, and groupBy with return types. - Filtering and Relations: Documents scalar operators, logical operators (AND/OR/NOT), relation filters (some/every/none), and nested writes like connect, connectOrCreate, and disconnect. - Transactions and Raw SQL: Explains sequential and interactive $transaction patterns, isolation levels, and safe $queryRaw/$executeRaw usage with SQL injection prevention. - Use Case: When building a paginated user list with filtered relations, consult the query-options and relations references to compose the correct select, include, where, orderBy, and cursor arguments in one pass. ## Quick Start Ask the AI to write a Prisma query that finds all published posts with their authors, ordered by creation date with cursor pagination.

Frequently Asked Questions about prisma-client-api

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I filter records with Prisma Client where clauses?▼

Use the where option with operators like equals, contains, gt, lt, in, and notIn for scalar fields, and AND, OR, NOT for logical combinations. Relation filters use some, every, none for to-many relations and is/isNot for one-to-one relations.

How to use Prisma transactions for multiple operations?▼

Use prisma.$transaction with an array for sequential independent operations, or pass an async function for interactive transactions with dependent logic. Interactive transactions accept maxWait, timeout, and isolationLevel options such as Serializable.

What is the difference between select and include in Prisma?▼

select returns only the specified scalar fields, while include adds full related records to the result. You cannot combine select and omit on the same query, but select and include can be nested inside relation clauses.

Does Prisma Client support raw SQL queries safely?▼

Yes, $queryRaw and $executeRaw use tagged templates that parameterize interpolated values, preventing SQL injection. Avoid $queryRawUnsafe with string concatenation; use Prisma.sql, Prisma.join, and Prisma.raw for dynamic identifiers.

How do I paginate results with Prisma findMany?▼

Use take and skip for offset pagination, or cursor with take for cursor-based pagination. Pass the last record's unique field as the cursor and set skip to 1 to exclude the cursor record itself.

Why does Prisma raw query return BigInt for COUNT?▼

PostgreSQL returns BigInt for COUNT aggregations through raw queries. Convert the result with Number() before using it in arithmetic or JSON serialization to avoid type errors.