Skip to content

Commit

Permalink
Merge branch 'main' into feat/accelerate-pulse-account-requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
jharrell authored Sep 17, 2024
2 parents 55d14a5 + 405bf33 commit 579ec7b
Show file tree
Hide file tree
Showing 156 changed files with 4,213 additions and 1,615 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/check-all-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ name: Check all content (MDX) links
on:
pull_request:

permissions:
actions: read
checks: read
contents: read
issues: write
pull-requests: write

jobs:
check-for-absolute-urls:
name: "Check for absolute prisma.io urls"
Expand Down Expand Up @@ -41,6 +48,8 @@ jobs:
pull-request: ${{ github.event.pull_request.number }}
body: ${{ steps.absolute-urls.outputs.body }}
body-includes: absolute URLs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: report success
run: |
Expand Down Expand Up @@ -105,3 +114,5 @@ jobs:
pull-request: ${{ github.event.pull_request.number }}
body: ${{ steps.redirects.outputs.body }}
body-includes: following redirects
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/image-optimise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
if: |
github.event_name != 'pull_request' &&
steps.calibre.outputs.markdown != ''
uses: peter-evans/create-pull-request@v6.0.5
uses: peter-evans/create-pull-request@v7.0.3
with:
title: Auto Compress Images
branch-suffix: timestamp
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/list-changed-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ on:
paths:
- "content/**/*"

permissions:
actions: read
checks: read
contents: read
issues: write
pull-requests: write

jobs:
post-files-changed-comment:
name: "Post files changed comment"
Expand All @@ -15,7 +22,7 @@ jobs:

- name: Get all changed markdown files
id: changed-files
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
with:
files: content/**/*.{md,mdx}

Expand Down Expand Up @@ -51,3 +58,5 @@ jobs:
pull-request: ${{ github.event.pull_request.number }}
body: ${{ steps.build-comment-body.outputs.body }}
body-includes: "original | preview"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/lost-pixel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

- name: Get all changed markdown files
id: changed-files
uses: tj-actions/changed-files@v44
uses: tj-actions/changed-files@v45
with:
files: content/**/*.{md,mdx}

Expand Down Expand Up @@ -50,6 +50,6 @@ jobs:
run: sed -i -e 's/_/\//g' -e 's|prisma\.io||g' -re 's/(name.+)(\/)(\")/\1-\3/g' lost-pixel-pages.json

- name: Lost Pixel
uses: lost-pixel/lost-pixel@v3.17.0
uses: lost-pixel/lost-pixel@v3.18.2
env:
LOST_PIXEL_API_KEY: ${{ secrets.LOST_PIXEL_API_KEY }}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ Similar to issues, we do not have hard and fast rules for Pull Requests. If you

The Prisma team may ask for changes before a PR can be merged. As these changes are made, please mark the corresponding comments as "resolved". If you need help on a pull request or would like feedback, please feel free to mention the `@Dev-Connections` team.

As a final note, if you're still working on a PR, please utilize the "Draft Pull Request" feature to let us know that your work is not yet ready.
As a final note, if you're still working on a PR, please utilize the "Draft Pull Request" feature to let us know that your work is not yet ready.

Thank you again for contributing to our documentation!
9 changes: 7 additions & 2 deletions cSpell.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@
"Zenstack",
"Streamdal",
"leaderboard",
"typesense"
"typesense",
"Solidstart",
"Astro"
],
"ignoreWords": [
"Ania",
Expand All @@ -98,7 +100,10 @@
"Nikolas",
"Supavisor",
"inshellisense",
"janedoe"
"janedoe",
"unindexed",
"Hyperdrive",
"pgcat"
],
"patterns": [
{
Expand Down
29 changes: 28 additions & 1 deletion content/100-getting-started/01-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Finally, set up Prisma ORM with the `init` command of the Prisma CLI:
npx prisma init --datasource-provider sqlite
```

This creates a new `prisma` directory with a `prisma.schema` file and configures SQLite as your database. You're now ready to model your data and create your database with some tables.
This creates a new `prisma` directory with a `schema.prisma` file and configures SQLite as your database. You're now ready to model your data and create your database with some tables.

## 2. Model your data in the Prisma schema

Expand Down Expand Up @@ -427,6 +427,33 @@ If you want to move forward with Prisma ORM using your own PostgreSQL, MySQL, Mo

Check out the [`prisma-examples`](https://github.com/prisma/prisma-examples/) repository on GitHub to see how Prisma ORM can be used with your favorite library. The repo contains examples with Express, NestJS, GraphQL as well as fullstack examples with Next.js and Vue.js, and a lot more.

### Build real-time apps with Prisma Pulse

[Prisma Pulse](/pulse) enables you to create applications that instantly react to changes in your database, allowing you to build type-safe real-time features and applications easily:

| Demo | Description |
| ------------------------------------------------------------------------ | ------------------------------------------------------------------------ |
| [`starter`](https://github.com/prisma/prisma-examples/tree/latest/pulse/starter) | A Prisma Pulse starter app |
| [`email-with-resend`](https://github.com/prisma/prisma-examples/tree/latest/pulse/email-with-resend) | An example app to send emails to new users using Prisma Pulse and Resend |
| [`fullstack-leaderboard`](https://github.com/prisma/prisma-examples/tree/latest/pulse/fullstack-leaderboard) | A live leaderboard (built with Next.js) |
| [`fullstack-simple-chat`](https://github.com/prisma/prisma-examples/tree/latest/pulse/fullstack-simple-chat) | A simple chat app (built with Next.js & Express) |
| [`product-search-with-typesense`](https://github.com/prisma/prisma-examples/tree/latest/pulse/product-search-with-typesense) | A cron job that syncs data into Typesense (built with Hono.js) |
| [`data-sync-with-bigquery`](https://github.com/prisma/prisma-examples/tree/latest/pulse/data-sync-with-bigquery) | A script that automatically syncs data into Google BigQuery |

### Speed up your database queries with Prisma Accelerate

[Prisma Accelerate](/accelerate) is a connection pooler and global database cache that can drastically speed up your database queries. Check out the [Speed Test](https://accelerate-speed-test.prisma.io/) or try Accelerate with your favorite framework:

| Demo | Description |
| ----------------------------------------------- | -------------------------------------------------------------------------- |
| [`nextjs-starter`](https://github.com/prisma/prisma-examples/tree/latest/accelerate/nextjs-starter) | A Next.js project using Prisma Accelerate's caching and connection pooling |
| [`svelte-starter`](https://github.com/prisma/prisma-examples/tree/latest/accelerate/svelte-starter) | A SvelteKit project using Prisma Accelerate's caching and connection pooling |
| [`solidstart-starter`](https://github.com/prisma/prisma-examples/tree/latest/accelerate/solidstart-starter) | A Solidstart project using Prisma Accelerate's caching and connection pooling |
| [`remix-starter`](https://github.com/prisma/prisma-examples/tree/latest/accelerate/remix-starter) | A Remix project using Prisma Accelerate's caching and connection pooling |
| [`nuxt-starter`](https://github.com/prisma/prisma-examples/tree/latest/accelerate/nuxtjs-starter) | A Nuxt.js project using Prisma Accelerate's caching and connection pooling |
| [`astro-starter`](https://github.com/prisma/prisma-examples/tree/latest/accelerate/astro-starter) | An Astro project using Prisma Accelerate's caching and connection pooling |


### Build an app with Prisma ORM

The Prisma blog features comprehensive tutorials about Prisma ORM, check out our latest ones:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,5 @@ Here's a short explanation of each component:
- `HOST`: The host where a [`mongod`](https://docs.mongodb.com/manual/reference/program/mongod/#mongodb-binary-bin.mongod) (or [`mongos`](https://docs.mongodb.com/manual/reference/program/mongos/#mongodb-binary-bin.mongos)) instance is running
- `PORT`: The port where your database server is running (typically `27017` for MongoDB)
- `DATABASE`: The name of the database

If you see the following error: `Error in connector: SCRAM failure: Authentication failed.`, you can specify the source database for the authentication by adding `?authSource=admin` to the end of the connection string. See [this GitHub discussion](https://github.com/prisma/prisma/discussions/9994#discussioncomment-1562283) for additional details.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ To evolve the app, you need to follow the same flow of the tutorial:
The [`prisma-examples`](https://github.com/prisma/prisma-examples/) repository contains a number of ready-to-run examples:
<TabbedContent>
<TabbedContent fullWidth>
<TabItem value="TypeScript">
Expand Down
28 changes: 25 additions & 3 deletions content/100-getting-started/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
Bolt,
BorderBox,
BoxTitle,
Inspect,
Database,
Grid,
LinkCard,
Expand All @@ -33,9 +34,11 @@ Explore our products that make it easy to build and scale data-driven applicatio

[**<Database />Prisma ORM**](/orm/overview/introduction/what-is-prisma) is a next-generation Node.js and TypeScript ORM that unlocks a new level of developer experience when working with databases thanks to its intuitive data model, automated migrations, type-safety & auto-completion.

[**<Bolt />Prisma Accelerate**](/accelerate/what-is-accelerate) is a global database cache with scalable connection pooling to make your queries fast.
[**<Inspect />Prisma Optimize**](/optimize/) helps you analyze queries, generate insights, and provides recommendations to make your database queries faster.

[**<SignalStream />Prisma Pulse**](/pulse/what-is-pulse) allows you to react to database changes with type-safe model subscriptions.
[**<Bolt />Prisma Accelerate**](/accelerate) is a global database cache with scalable connection pooling to make your queries fast.

[**<SignalStream />Prisma Pulse**](/pulse) allows you to react to database changes with type-safe model streams in real-time.

</BorderBox>

Expand Down Expand Up @@ -68,7 +71,7 @@ _These options don't require you to have your own database running._

_Select one of these options if you want to connect Prisma ORM to your own database._

<TabbedContent gettingStarted>
<TabbedContent>
<TabItem value="New database">
<p>
Set up Prisma ORM <b>from scratch</b> with your favorite database and
Expand Down Expand Up @@ -194,3 +197,22 @@ Build real-time applications by subscribing to data changes in your database usi
link="https://github.com/prisma/prisma-examples?tab=readme-ov-file#prisma-pulse"
/>
</Grid>

## <Inspect color="#16A394" width="27" height="24" /> Prisma Optimize

Make your database queries faster by using the insights and recommendations generated by Prisma Optimize.

<Grid>
<LinkCard
icon="fa-solid fa-arrow-right"
title="Get started"
desc="Add Optimize to your app to gather useful insights and receive recommendations to improve query performance."
link="/optimize/getting-started"
/>
<LinkCard
icon="fa-brands fa-github"
title="Examples"
desc="Explore our ready-to-run examples using Prisma Optimize."
link="https://github.com/prisma/prisma-examples?tab=readme-ov-file#prisma-optimize"
/>
</Grid>
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ Prisma ORM is the only _fully_ type-safe ORM in the TypeScript ecosystem. The ge
Development of Prisma ORM's open source tools is happening in the open. Most of it happens directly on GitHub in the main [`prisma/prisma`](https://github.com/prisma/prisma) repo:

- issues and PRs in our repos are triaged and prioritized (usually within 1-2 days)
- there is a public [roadmap](https://pris.ly/roadmap) that is kept up to date with our plans
- new [releases](https://github.com/prisma/prisma/releases) with new features and improvements are issued every three weeks
- we have a dedicated support team that responds to questions in [GitHub Discussions](https://github.com/prisma/prisma/discussions)

Expand Down Expand Up @@ -104,7 +103,7 @@ _Alternatives_: [Hasura](https://hasura.io/), [Postgraphile](https://www.graphil

### ... you want to use raw, type-safe SQL for querying your database

While Prisma ORM does allow you to [send plain SQL queries](/orm/prisma-client/queries/raw-database-access/raw-queries) to your database, it might not be the best fit if you prefer to work with a SQL-based abstraction that you want to be type-safe. Prisma ORM's main benefit is to provide an abstraction layer that makes you more productive compared to writing SQL.
While Prisma ORM does allow you to [send plain SQL queries](/orm/prisma-client/using-raw-sql/raw-queries) to your database, it might not be the best fit if you prefer to work with a SQL-based abstraction that is type-safe. Prisma ORM's main benefit is to provide an abstraction layer that makes you more productive compared to writing SQL directly.

If you're a solo developer that is very comfortable with SQL, and you just want to be sure that your database layer is type-safe, a lower-level TypeScript database library might be better for you.

Expand Down
2 changes: 1 addition & 1 deletion content/200-orm/050-overview/500-databases/600-mongodb.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ Migrating your database over time is an important part of the development cycle.

<Admonition type="info">

When using MongoDB, be aware that the “coupling” between your schema and the database is purposefully designed to be less rigid than with with SQL databases; MongoDB will not enforce the schema, so you have to verify data integrity.
When using MongoDB, be aware that the “coupling” between your schema and the database is purposefully designed to be less rigid than with SQL databases; MongoDB will not enforce the schema, so you have to verify data integrity.

</Admonition>

Expand Down
Loading

0 comments on commit 579ec7b

Please sign in to comment.