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

chore: add context to serverless and database driver adapters #5436

Merged
merged 7 commits into from
Nov 8, 2023
Merged
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
21 changes: 17 additions & 4 deletions content/200-concepts/100-components/database-drivers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -17,19 +17,32 @@ Prisma Client can connect and run queries against your database using JavaScript

Prisma will use the Query Engine to transform the Prisma Client query to SQL and run the generated SQL queries via the JavaScript database driver.

![Query flow from the user application to the database using Prisma Client and driver adapters](./images//drivers/qe-query-engine-adapter.png)
![Query flow from the user application to the database using Prisma Client and driver adapters](./images/drivers/qe-query-engine-adapter.png)

ruheni marked this conversation as resolved.
Show resolved Hide resolved
### Serverless driver adapters
There are 2 different types of driver adapters:

- [Neon](/guides/database/neon#how-to-use-the-neon-serverless-driver-with-prisma-preview)
- [PlanetScale](/guides/database/planetscale#how-to-use-the-planetscale-serverless-driver-with-prisma-preview)
- [Database driver adapters](#database-driver-adapters)
- [Serverless driver adapters](#serverless-driver-adapters)

### Database driver adapters

You can connect to your database using a Node.js-based driver from Prisma Client using a database driver adapter. Prisma maintains the following database driver adapters:

- [Turso](/guides/database/turso#connect-and-query-your-primary-database)

### Serverless driver adapters

Database providers, such as Neon and PlanetScale, allow you to connect to your database using other protocols besides TCP, such as HTTP and WebSockets. These database drivers are optimized for connecting to your database in serverless and edge environments.

Prisma maintains the following serverless driver adapters:

- [Neon](/guides/database/neon#how-to-use-the-neon-serverless-driver-with-prisma-preview)
- [PlanetScale](/guides/database/planetscale#how-to-use-the-planetscale-serverless-driver-with-prisma-preview)

## Community maintained database driver adapters

ruheni marked this conversation as resolved.
Show resolved Hide resolved
You can also build your own driver adapter for the database you're using. The following is a list of community maintained driver adapters:

- [TiDB](https://github.com/tidbcloud/prisma-adapter)

### How to use driver adapters
Expand Down
Loading