Skip to content

Commit

Permalink
include link to README in documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
sophia-bq committed Dec 9, 2024
1 parent 96e1a7f commit 5c35315
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@
- [Plugin Service](../docs/development-guide/PluginService.md)
- [Pipelines](../docs/development-guide/Pipelines.md)
- [Read-Write Splitting Plugin Performance Results](../docs/development-guide/ReadWriteSplittingPerformanceResults.md)
- Using The NodeJS Wrapper with an ORM
- [Prisma Example](./../examples/prisma_example/README.md)
9 changes: 6 additions & 3 deletions examples/prisma_example/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

In this tutorial, you will set up a Prisma application with the AWS Advanced NodeJS Wrapper, and use the Prisma client to execute a simple database operation.

> [!NOTE] This tutorial was written for a PostgreSQL datasource using the following technologies:
> [!NOTE]
> This tutorial was written for a PostgreSQL datasource using the following technologies:
>
> - Prisma 6.0.1
> - AWS Advanced NodeJS Driver 1.0.0
Expand Down Expand Up @@ -45,7 +46,8 @@ Your Prisma project should have the following project hierarchy:
└───index.ts
```

> [!NOTE] The adapter directory will contain all the files that you will need in Step 4. For simplicity, the diagram above only shows the files that either need to be added or require modifications.
> [!NOTE]
> The adapter directory will contain all the files that you will need in Step 4. For simplicity, the diagram above only shows the files that either need to be added or require modifications.
## Step 2: Add the required dependencies

Expand Down Expand Up @@ -88,7 +90,8 @@ Set up an AwsPgClient that connects to your database instance. Details can be fo

To configure Prisma to use the datasource specified in the AwsPgClient, you will need a [driver adapter](https://www.prisma.io/docs/orm/overview/databases/database-drivers). Under the adapter directory of this tutorial is a partially implemented adapter that supports simple queries.

> [!NOTE] This adapter is modeled after Prisma's [adapter-pg](https://github.com/prisma/prisma/tree/main/packages/adapter-pg). For full functionality, the adapter files in this tutorial may need to be adjusted or customized.
> [!NOTE]
> This adapter is modeled after Prisma's [adapter-pg](https://github.com/prisma/prisma/tree/main/packages/adapter-pg). For full functionality, the adapter files in this tutorial may need to be adjusted or customized.
Since driver adapters are currently in Preview, you need to enable its feature flag on the datasource block in your Prisma schema:

Expand Down
6 changes: 6 additions & 0 deletions examples/prisma_example/prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,12 @@ datasource db {
url = env("DATABASE_URL")
}

model bank_test {
id Int @id
name String? @db.VarChar(40)
account_balance Int?
}

model Post {
id Int @id @default(autoincrement())
title String
Expand Down

0 comments on commit 5c35315

Please sign in to comment.