Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Docusaurus: fix:DA-199 update code highlighting name" #5810

Merged
merged 1 commit into from
Apr 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 8 additions & 8 deletions content/100-getting-started/01-quickstart.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,15 @@ import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

async function main() {
// add-start
// highlight-start
const user = await prisma.user.create({
data: {
name: 'Alice',
email: '[email protected]',
},
})
console.log(user)
// add-end
// highlight-end
}

main()
Expand Down Expand Up @@ -210,10 +210,10 @@ import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

async function main() {
// add-start
// highlight-start
const users = await prisma.user.findMany()
console.log(users)
// add-end
// highlight-end
}

main()
Expand Down Expand Up @@ -263,7 +263,7 @@ import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

async function main() {
// add-start
// highlight-start
const user = await prisma.user.create({
data: {
name: 'Bob',
Expand All @@ -276,7 +276,7 @@ async function main() {
},
})
console.log(user)
// add-end
// highlight-end
}

main()
Expand Down Expand Up @@ -322,14 +322,14 @@ import { PrismaClient } from '@prisma/client'
const prisma = new PrismaClient()

async function main() {
// add-start
// highlight-start
const usersWithPosts = await prisma.user.findMany({
include: {
posts: true,
},
})
console.dir(usersWithPosts, { depth: null })
// add-end
// highlight-end
}

main()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,15 @@ npm install prisma --save-dev

This creates a `package.json` with an initial setup for a Node.js app.

<NavigationLinksContainer isFirstLink>

<ButtonLink
color="dark"
type="primary"
href="./relational-databases/connect-your-database-node-cockroachdb"
arrow
>
Connect your database
</ButtonLink>

</NavigationLinksContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,16 @@ This command does two things:
- creates a new directory called `prisma` that contains a file called `schema.prisma`, which contains the Prisma schema with your database connection variable and schema models
- creates the [`.env` file](/orm/more/development-environment/environment-variables/env-files) in the root directory of the project, which is used for defining environment variables (such as your database connection)


<NavigationLinksContainer isFirstLink>

<ButtonLink
color="dark"
type="primary"
href="./relational-databases/connect-your-database-node-mysql"
arrow
>
Connect your database
</ButtonLink>

</NavigationLinksContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,16 @@ This command does two things:

- creates a new directory called `prisma` that contains a file called `schema.prisma`, which contains the Prisma schema with your database connection variable and schema models
- creates the [`.env` file](/orm/more/development-environment/environment-variables/env-files) in the root directory of the project, which is used for defining environment variables (such as your database connection)

<NavigationLinksContainer isFirstLink>

<ButtonLink
color="dark"
type="primary"
href="./relational-databases/connect-your-database-node-planetscale"
arrow
>
Connect your database
</ButtonLink>

</NavigationLinksContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,16 @@ This command does two things:

- creates a new directory called `prisma` that contains a file called `schema.prisma`, which contains the Prisma schema with your database connection variable and schema models
- creates the [`.env` file](/orm/more/development-environment/environment-variables/env-files) in the root directory of the project, which is used for defining environment variables (such as your database connection)

<NavigationLinksContainer isFirstLink>

<ButtonLink
color="dark"
type="primary"
href="./relational-databases/connect-your-database-node-postgresql"
arrow
>
Connect your database
</ButtonLink>

</NavigationLinksContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,16 @@ This command does two things:

- creates a new directory called `prisma` that contains a file called `schema.prisma`, which contains the Prisma schema with your database connection variable and schema models
- creates the [`.env` file](/orm/more/development-environment/environment-variables/env-files) in the root directory of the project, which is used for defining environment variables (such as your database connection)

<NavigationLinksContainer isFirstLink>

<ButtonLink
color="dark"
type="primary"
href="./relational-databases/connect-your-database-node-sqlserver"
arrow
>
Connect your database
</ButtonLink>

</NavigationLinksContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,15 @@ This command does two things:

- creates a new directory called `prisma` that contains a file called `schema.prisma`, which contains the Prisma schema with your database connection variable and schema models
- creates the [`.env` file](/orm/more/development-environment/environment-variables/env-files) in the root directory of the project, which is used for defining environment variables (such as your database connection)
<NavigationLinksContainer isFirstLink>

<ButtonLink
color="dark"
type="primary"
href="./relational-databases/connect-your-database-typescript-cockroachdb"
arrow
>
Connect your database
</ButtonLink>

</NavigationLinksContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,16 @@ This command does two things:

- creates a new directory called `prisma` that contains a file called `schema.prisma`, which contains the Prisma schema with your database connection variable and schema models
- creates the [`.env` file](/orm/more/development-environment/environment-variables/env-files) in the root directory of the project, which is used for defining environment variables (such as your database connection)

<NavigationLinksContainer isFirstLink>

<ButtonLink
color="dark"
type="primary"
href="./relational-databases/connect-your-database-typescript-mysql"
arrow
>
Connect your database
</ButtonLink>

</NavigationLinksContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,16 @@ This command does two things:

- creates a new directory called `prisma` that contains a file called `schema.prisma`, which contains the Prisma schema with your database connection variable and schema models
- creates the [`.env` file](/orm/more/development-environment/environment-variables/env-files) in the root directory of the project, which is used for defining environment variables (such as your database connection)

<NavigationLinksContainer isFirstLink>

<ButtonLink
color="dark"
type="primary"
href="./relational-databases/connect-your-database-typescript-planetscale"
arrow
>
Connect your database
</ButtonLink>

</NavigationLinksContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,16 @@ This command does two things:

- creates a new directory called `prisma` that contains a file called `schema.prisma`, which contains the Prisma schema with your database connection variable and schema models
- creates the [`.env` file](/orm/more/development-environment/environment-variables/env-files) in the root directory of the project, which is used for defining environment variables (such as your database connection)

<NavigationLinksContainer isFirstLink>

<ButtonLink
color="dark"
type="primary"
href="./relational-databases/connect-your-database-typescript-postgresql"
arrow
>
Connect your database
</ButtonLink>

</NavigationLinksContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,16 @@ This command does two things:

- creates a new directory called `prisma` that contains a file called `schema.prisma`, which contains the Prisma schema with your database connection variable and schema models
- creates the [`.env` file](/orm/more/development-environment/environment-variables/env-files) in the root directory of the project, which is used for defining environment variables (such as your database connection)

<NavigationLinksContainer isFirstLink>

<ButtonLink
color="dark"
type="primary"
href="./relational-databases/connect-your-database-typescript-sqlserver"
arrow
>
Connect your database
</ButtonLink>

</NavigationLinksContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pagination_next: getting-started/setup-prisma/start-from-scratch/relational-data

To connect your database, you need to set the `url` field of the `datasource` block in your Prisma schema to your database [connection URL](/orm/reference/connection-urls):

```prisma file=prisma/schema.prisma showLineNumbers
```prisma file=prisma/schema.prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
Expand Down Expand Up @@ -69,3 +69,25 @@ DATABASE_URL="postgresql://root@localhost:26257?sslmode=disable"
```

Your connection string is displayed as part of the welcome text when starting CockroachDB from the command line.

<NavigationLinksContainer>

<ButtonLink
color="dark"
type="primary"
href="/getting-started/setup-prisma/start-from-scratch/relational-databases-node-cockroachdb"
arrowLeft
>
Installation
</ButtonLink>

<ButtonLink
color="dark"
type="primary"
href="./using-prisma-migrate-node-cockroachdb"
arrow
>
Using Prisma Migrate
</ButtonLink>

</NavigationLinksContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pagination_next: getting-started/setup-prisma/start-from-scratch/relational-data

To connect your database, you need to set the `url` field of the `datasource` block in your Prisma schema to your database [connection URL](/orm/reference/connection-urls):

```prisma file=prisma/schema.prisma showLineNumbers
```prisma file=prisma/schema.prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
Expand Down Expand Up @@ -76,3 +76,25 @@ When running MySQL locally, your connection URL typically looks similar to this:
```bash file=.env
DATABASE_URL="mysql://root:randompassword@localhost:3306/mydb"
```

<NavigationLinksContainer>

<ButtonLink
color="dark"
type="primary"
href="/getting-started/setup-prisma/start-from-scratch/relational-databases-node-mysql"
arrowLeft
>
Installation
</ButtonLink>

<ButtonLink
color="dark"
type="primary"
href="./using-prisma-migrate-node-mysql"
arrow
>
Using Prisma Migrate
</ButtonLink>

</NavigationLinksContainer>
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pagination_next: getting-started/setup-prisma/start-from-scratch/relational-data

To connect your database, you need to set the `url` field of the `datasource` block in your Prisma schema to your database [connection URL](/orm/reference/connection-urls):

```prisma file=prisma/schema.prisma showLineNumbers
```prisma file=prisma/schema.prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
Expand All @@ -44,7 +44,7 @@ You will also need to set the relation mode type to `prisma` in order to [emulat
datasource db {
provider = "mysql"
url = env("DATABASE_URL")
//add-next-line
//highlight-next-line
relationMode = "prisma"
}
```
Expand Down Expand Up @@ -104,3 +104,26 @@ pscale connect prisma-test branchname --port PORT
The `--port` flag can be omitted if you are using the default port `3306`.

</details>

<NavigationLinksContainer>

<ButtonLink
color="dark"
type="primary"
href="/getting-started/setup-prisma/start-from-scratch/relational-databases-node-planetscale"
arrowLeft
>
Installation
</ButtonLink>

<ButtonLink
color="dark"
type="primary"
href="./using-prisma-migrate-node-planetscale"
arrow
>
Creating the database schema
</ButtonLink>

</NavigationLinksContainer>

Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pagination_next: getting-started/setup-prisma/start-from-scratch/relational-data

To connect your database, you need to set the `url` field of the `datasource` block in your Prisma schema to your database [connection URL](/orm/reference/connection-urls):

```prisma file=prisma/schema.prisma showLineNumbers
```prisma file=prisma/schema.prisma
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
Expand Down Expand Up @@ -69,4 +69,26 @@ When running PostgreSQL locally on macOS, your user and password as well as the

```bash file=.env
DATABASE_URL="postgresql://janedoe:janedoe@localhost:5432/janedoe?schema=hello-prisma"
```
```

<NavigationLinksContainer>

<ButtonLink
color="dark"
type="primary"
href="/getting-started/setup-prisma/start-from-scratch/relational-databases-node-postgresql"
arrowLeft
>
Installation
</ButtonLink>

<ButtonLink
color="dark"
type="primary"
href="./using-prisma-migrate-node-postgresql"
arrow
>
Using Prisma Migrate
</ButtonLink>

</NavigationLinksContainer>
Loading