From 9c4aac88439c505683ab972879722b1932d431e1 Mon Sep 17 00:00:00 2001 From: dswbx Date: Thu, 12 Jun 2025 10:42:49 +0200 Subject: [PATCH] docs: simplified custom postgres description --- docs/usage/database.mdx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/usage/database.mdx b/docs/usage/database.mdx index 3e677ce..bd14c3e 100644 --- a/docs/usage/database.mdx +++ b/docs/usage/database.mdx @@ -114,12 +114,12 @@ Example using `@neondatabase/serverless`: import { createCustomPostgresConnection } from "@bknd/postgres"; import { NeonDialect } from "kysely-neon"; -const connection = createCustomPostgresConnection(NeonDialect)({ - connectionString: process.env.NEON, -}); +const neon = createCustomPostgresConnection(NeonDialect); serve({ - connection: connection, + connection: neon({ + connectionString: process.env.NEON, + }), }); ``` @@ -137,14 +137,14 @@ const xata = new client({ branch: process.env.XATA_BRANCH, }); -const connection = createCustomPostgresConnection(XataDialect, { +const xataConnection = createCustomPostgresConnection(XataDialect, { supports: { batching: false, }, -})({ xata }); +}); serve({ - connection: connection, + connection: xataConnection({ xata }), }); ```