Prisma Next API reference
Reference index for the Prisma Next ORM client, SQL query builder, pipeline builder, raw queries, and runtime APIs.
Prisma Next has three query surfaces. The ORM client gives you model-level methods like where(), create(), and include(), and works against both PostgreSQL and MongoDB. The SQL query builder gives you table-level, SQL-shaped methods like select(), innerJoin(), and groupBy(), and today targets PostgreSQL only. The pipeline builder gives you a typed way to build MongoDB aggregation pipelines through db.query.
Use the ORM client for everyday application queries across models and relations. Reach for the SQL query builder when you need a join, aggregate, or SQL feature the ORM client doesn't expose on PostgreSQL, and the pipeline builder for MongoDB aggregation pipelines. When even those can't express a query, drop to a raw query; for client lifecycle, transactions, and prepared statements, see Transactions and runtime.
How database differences are documented
The method reference pages document each method with the classic Remarks / Options / Return type / Examples structure (the raw queries page is deliberately more narrative). When a method's behavior differs between PostgreSQL and MongoDB, exists on only one database, or is type-checked but not enforced at runtime, the method's own Remarks call that out inline.
For a conceptual walkthrough of reading, writing, and querying data (rather than an exhaustive method-by-method reference), see the Fundamentals section:
ORM client reference
Every ORM client method, with PostgreSQL and MongoDB behavior documented side by side.
SQL query builder reference
Every SQL query builder method for building typed, table-level queries against PostgreSQL.
Pipeline builder reference
Every MongoDB pipeline-builder stage, accumulator, expression helper, and write terminal.
Raw queries reference
Raw escape hatches: PostgreSQL raw SQL fragments and MongoDB raw commands.
Transactions and runtime reference
Client lifecycle, transactions, prepared statements, and execution options.