diff --git a/docs/recipe/databases/postgres.md b/docs/recipe/databases/postgres.md index 15c0de24..fbad0498 100644 --- a/docs/recipe/databases/postgres.md +++ b/docs/recipe/databases/postgres.md @@ -26,3 +26,24 @@ const db = new ZenStackClient(schema, { }), }); ``` + +## Using PGlite + +:::danger No Official Support +The PGlite dialect is not officially supported or tested by ZenStack, but you may evaluate it and [report your findings and interest on the GitHub issue](https://github.com/zenstackhq/zenstack/issues/2710). +::: + + + +```ts +import { schema } from './zenstack/schema'; +import { PGlite } from '@electric-sql/pglite'; +import { ZenStackClient } from '@zenstackhq/orm'; +import { PGliteDialect } from 'kysely'; + +const db = new ZenStackClient(schema, { + dialect: new PGliteDialect({ + pglite: new PGlite(), + }), +}); +```