Skip to content

docs: add PGlite section#617

Open
sanny-io wants to merge 2 commits into
zenstackhq:mainfrom
sanny-io:docs/pglite
Open

docs: add PGlite section#617
sanny-io wants to merge 2 commits into
zenstackhq:mainfrom
sanny-io:docs/pglite

Conversation

@sanny-io

@sanny-io sanny-io commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Documentation
    • Added a new "Using PGlite" guide with installation instructions and code examples for integrating PGlite with the platform. Note: PGlite dialect is not officially supported or tested.

@vercel

vercel Bot commented Jun 13, 2026

Copy link
Copy Markdown

@sanny-io is attempting to deploy a commit to the ZenStack Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai

coderabbitai Bot commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR adds a new documentation section to the PostgreSQL recipe guide describing how to use the PGlite dialect. The section includes a support disclaimer, installation instructions for required packages, and a TypeScript code example showing ZenStackClient configuration with PGliteDialect.

Changes

PGlite Usage Documentation

Layer / File(s) Summary
Using PGlite section
docs/recipe/databases/postgres.md
New documentation section describing PGlite dialect setup, including a disclaimer that PGlite dialect is not officially supported/tested, package installation guidance, and a TypeScript example for instantiating ZenStackClient with PGliteDialect and PGlite.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related issues

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely summarizes the main change: adding documentation about PGlite to the PostgreSQL recipe documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/recipe/databases/postgres.md`:
- Around line 30-49: Add the missing AvailableSince component for the "Using
PGlite" section: import AvailableSince from "_components/AvailableSince" near
the other imports, then insert <AvailableSince version="vX.Y.Z" /> immediately
under the "Using PGlite" heading; replace vX.Y.Z with the actual release version
when PGlite dialect support was introduced.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 010955ac-b9b8-4708-99e3-4c912e9a1e6a

📥 Commits

Reviewing files that changed from the base of the PR and between 113ab39 and 3eeb6cd.

📒 Files selected for processing (1)
  • docs/recipe/databases/postgres.md

Comment on lines +30 to +49
## 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).
:::

<PackageInstall dependencies={['@electric-sql/pglite', 'kysely']} />

```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(),
}),
});
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Add missing <AvailableSince> component per coding guidelines.

The new "Using PGlite" section introduces a documented feature but is missing the required <AvailableSince version="vX.Y.Z" /> component. According to coding guidelines, documentation files that introduce new features must include this component immediately under the heading, and the component must be imported from _components/AvailableSince.

🔧 Proposed fix

First, add the import at the top of the file (after line 5):

 import PackageInstall from '../../_components/PackageInstall';
+import AvailableSince from '../../_components/AvailableSince';

Then, add the component immediately under the heading (after line 30):

 ## Using PGlite
+
+<AvailableSince version="vX.Y.Z" />
+
 :::danger No Official Support

Action required: Replace vX.Y.Z with the actual version in which PGlite dialect support was first introduced.

🧰 Tools
🪛 LanguageTool

[grammar] ~36-~36: Ensure spelling is correct
Context: ...geInstall dependencies={['@electric-sql/pglite', 'kysely']} /> 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(), }), });

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/recipe/databases/postgres.md` around lines 30 - 49, Add the missing
AvailableSince component for the "Using PGlite" section: import AvailableSince
from "_components/AvailableSince" near the other imports, then insert
<AvailableSince version="vX.Y.Z" /> immediately under the "Using PGlite"
heading; replace vX.Y.Z with the actual release version when PGlite dialect
support was introduced.

Source: Coding guidelines

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant