Skip to content

Commit

Permalink
chore: add context to serverless and database driver adapters (#5436)
Browse files Browse the repository at this point in the history
* chore: add context to serverless and database driver adapters

* redo database drivers description

* reorder database and serverless drivers

* update descriptions based on feedback

* apply feedback

* add note about community db driver adapters
  • Loading branch information
ruheni authored Nov 8, 2023
1 parent 0abf175 commit 6970dc5
Showing 1 changed file with 17 additions and 4 deletions.
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)

### 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

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

1 comment on commit 6970dc5

@vercel
Copy link

@vercel vercel bot commented on 6970dc5 Nov 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

docs – ./

prisma2-docs.vercel.app
docs-prisma.vercel.app
docs-git-main-prisma.vercel.app

Please sign in to comment.