Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion apps/docs/content/docs/orm/next/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
"---Middleware---",
"...middleware",
"---Extensions---",
"...extensions"
"...extensions",

"---Reference---",
"...reference"
]
}
42 changes: 42 additions & 0 deletions apps/docs/content/docs/orm/next/reference/index.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
title: Prisma Next API reference
description: Reference index for the Prisma Next ORM client, SQL query builder, pipeline builder, raw queries, and runtime APIs.
url: /orm/next/reference
metaTitle: Prisma Next API reference
metaDescription: Reference index for the Prisma Next ORM client, SQL query builder, pipeline builder, raw queries, and runtime APIs.
badge: early-access
---

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](/orm/next/reference/raw-queries); for client lifecycle, transactions, and prepared statements, see [Transactions and runtime](/orm/next/reference/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](/orm/next/fundamentals/reading-data) section:

- [Reading data](/orm/next/fundamentals/reading-data)
- [Writing data](/orm/next/fundamentals/writing-data)
- [Relations and joins](/orm/next/fundamentals/relations-and-joins)
- [Transactions](/orm/next/fundamentals/transactions)
- [Advanced queries](/orm/next/fundamentals/advanced-queries)

<Cards>
<Card href="/orm/next/reference/orm-client" title="ORM client reference" icon={<BookOpen className="text-primary" />}>
Every ORM client method, with PostgreSQL and MongoDB behavior documented side by side.
</Card>
<Card href="/orm/next/reference/sql-query-builder" title="SQL query builder reference" icon={<BookOpen className="text-primary" />}>
Every SQL query builder method for building typed, table-level queries against PostgreSQL.
</Card>
<Card href="/orm/next/reference/pipeline-builder" title="Pipeline builder reference" icon={<BookOpen className="text-primary" />}>
Every MongoDB pipeline-builder stage, accumulator, expression helper, and write terminal.
</Card>
<Card href="/orm/next/reference/raw-queries" title="Raw queries reference" icon={<BookOpen className="text-primary" />}>
Raw escape hatches: PostgreSQL raw SQL fragments and MongoDB raw commands.
</Card>
<Card href="/orm/next/reference/transactions-and-runtime" title="Transactions and runtime reference" icon={<BookOpen className="text-primary" />}>
Client lifecycle, transactions, prepared statements, and execution options.
</Card>
</Cards>
11 changes: 11 additions & 0 deletions apps/docs/content/docs/orm/next/reference/meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"title": "Reference",
"pages": [
"index",
"orm-client",
"sql-query-builder",
"pipeline-builder",
"raw-queries",
"transactions-and-runtime"
]
}
Loading
Loading