From a0e44d03b081a20ec0a4aca996dccd79017b75f1 Mon Sep 17 00:00:00 2001 From: ruheni Date: Tue, 7 Nov 2023 16:45:23 +0100 Subject: [PATCH 1/6] chore: add context to serverless and database driver adapters --- content/200-concepts/100-components/database-drivers.mdx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/content/200-concepts/100-components/database-drivers.mdx b/content/200-concepts/100-components/database-drivers.mdx index 7c5a3c6c22..c082856e10 100644 --- a/content/200-concepts/100-components/database-drivers.mdx +++ b/content/200-concepts/100-components/database-drivers.mdx @@ -17,15 +17,21 @@ 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 +Serverless driver adapters allow you to connect to your database using other protocols, such as HTTP and WebSockets. 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) ### Database driver adapters +Database driver adapters enable you to connect to your database using the default protocol that a database provider offers. For example, Turso only supports HTTP connections. + +Prisma maintains the following database driver adapters: + - [Turso](/guides/database/turso#connect-and-query-your-primary-database) ## Community maintained database driver adapters From ff8ec25aa5853549fb67b8466faef221c204b86f Mon Sep 17 00:00:00 2001 From: ruheni Date: Tue, 7 Nov 2023 16:52:28 +0100 Subject: [PATCH 2/6] redo database drivers description --- content/200-concepts/100-components/database-drivers.mdx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/content/200-concepts/100-components/database-drivers.mdx b/content/200-concepts/100-components/database-drivers.mdx index c082856e10..4e80e190ce 100644 --- a/content/200-concepts/100-components/database-drivers.mdx +++ b/content/200-concepts/100-components/database-drivers.mdx @@ -28,9 +28,7 @@ Serverless driver adapters allow you to connect to your database using other pro ### Database driver adapters -Database driver adapters enable you to connect to your database using the default protocol that a database provider offers. For example, Turso only supports HTTP connections. - -Prisma maintains the following database driver adapters: +Database driver adapters enable you to connect to your database using Node-based database drivers. Prisma maintains the following database driver adapters: - [Turso](/guides/database/turso#connect-and-query-your-primary-database) From 79f57b81b547352477824bc4dc841db686f5e6f7 Mon Sep 17 00:00:00 2001 From: ruheni Date: Tue, 7 Nov 2023 17:56:50 +0100 Subject: [PATCH 3/6] reorder database and serverless drivers --- .../100-components/database-drivers.mdx | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/content/200-concepts/100-components/database-drivers.mdx b/content/200-concepts/100-components/database-drivers.mdx index 4e80e190ce..9d86e0f188 100644 --- a/content/200-concepts/100-components/database-drivers.mdx +++ b/content/200-concepts/100-components/database-drivers.mdx @@ -19,12 +19,10 @@ Prisma will use the Query Engine to transform the Prisma Client query to SQL and ![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 - -Serverless driver adapters allow you to connect to your database using other protocols, such as HTTP and WebSockets. Prisma maintains the following 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 @@ -32,6 +30,13 @@ Database driver adapters enable you to connect to your database using Node-based - [Turso](/guides/database/turso#connect-and-query-your-primary-database) +### Serverless driver adapters + +Serverless driver adapters allow you to connect to your database using other protocols, such as HTTP and WebSockets. 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 - [TiDB](https://github.com/tidbcloud/prisma-adapter) From 7beb0a9431d6b9c0960cee2700ccb421d73033f8 Mon Sep 17 00:00:00 2001 From: ruheni Date: Wed, 8 Nov 2023 09:05:41 +0100 Subject: [PATCH 4/6] update descriptions based on feedback --- content/200-concepts/100-components/database-drivers.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/content/200-concepts/100-components/database-drivers.mdx b/content/200-concepts/100-components/database-drivers.mdx index 9d86e0f188..80b1b0bb27 100644 --- a/content/200-concepts/100-components/database-drivers.mdx +++ b/content/200-concepts/100-components/database-drivers.mdx @@ -26,13 +26,15 @@ There are 2 different types of driver adapters: ### Database driver adapters -Database driver adapters enable you to connect to your database using Node-based database drivers. Prisma maintains the following 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 -Serverless driver adapters allow you to connect to your database using other protocols, such as HTTP and WebSockets. Prisma maintains the following serverless driver adapters: +Database providers, such as Neon and PlanetScale, allow you to connect to your database using other protocols, 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) From 2492a13ed15cb9e3910716f506979f32fd8f88a2 Mon Sep 17 00:00:00 2001 From: ruheni Date: Wed, 8 Nov 2023 09:09:31 +0100 Subject: [PATCH 5/6] apply feedback --- content/200-concepts/100-components/database-drivers.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/200-concepts/100-components/database-drivers.mdx b/content/200-concepts/100-components/database-drivers.mdx index 80b1b0bb27..ff8b5160bc 100644 --- a/content/200-concepts/100-components/database-drivers.mdx +++ b/content/200-concepts/100-components/database-drivers.mdx @@ -32,7 +32,7 @@ You can connect to your database using a Node.js-based driver from Prisma Client ### Serverless driver adapters -Database providers, such as Neon and PlanetScale, allow you to connect to your database using other protocols, such as HTTP and WebSockets. These database drivers are optimized for connecting to your database in serverless and edge environments. +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: From b66c905f030fefdcc79f245724aedef26778046a Mon Sep 17 00:00:00 2001 From: ruheni Date: Wed, 8 Nov 2023 13:54:00 +0100 Subject: [PATCH 6/6] add note about community db driver adapters --- content/200-concepts/100-components/database-drivers.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/content/200-concepts/100-components/database-drivers.mdx b/content/200-concepts/100-components/database-drivers.mdx index ff8b5160bc..7297c7eaec 100644 --- a/content/200-concepts/100-components/database-drivers.mdx +++ b/content/200-concepts/100-components/database-drivers.mdx @@ -41,6 +41,8 @@ Prisma maintains the following serverless driver adapters: ## 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