From 8579b471271e4df118c13554488b8e14c50e3471 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:42:02 +0800 Subject: [PATCH 1/2] doc: v3 beta.27 release --- versioned_docs/version-3.x/faq.md | 5 +++- .../version-3.x/recipe/databases/sqlite.md | 27 +++++++++++++++++-- versioned_docs/version-3.x/samples.md | 6 +++++ 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/versioned_docs/version-3.x/faq.md b/versioned_docs/version-3.x/faq.md index 1517fa7..bc44371 100644 --- a/versioned_docs/version-3.x/faq.md +++ b/versioned_docs/version-3.x/faq.md @@ -14,4 +14,7 @@ Currently only SQLite (with [better-sqlite3](https://github.com/WiseLibs/better- ## What JavaScript runtimes are supported? -Currently only Node.js is tested. Please voice your interest if you want support for other runtimes such as Bun or Deno. +- Node.js: systematically tested. +- Bun: passed basic end-to-end tests. +- Vercel Edge Runtime: passed basic end-to-end tests. +- Deno: not tested. diff --git a/versioned_docs/version-3.x/recipe/databases/sqlite.md b/versioned_docs/version-3.x/recipe/databases/sqlite.md index 581e126..5e0d200 100644 --- a/versioned_docs/version-3.x/recipe/databases/sqlite.md +++ b/versioned_docs/version-3.x/recipe/databases/sqlite.md @@ -6,11 +6,13 @@ import PackageInstall from '../../_components/PackageInstall'; # SQLite -## Installing driver +## Node.js + +### Installing driver -## Creating ZenStackClient +### Creating ZenStackClient ```ts import { schema } from './zenstack/schema'; @@ -22,3 +24,24 @@ const db = new ZenStackClient(schema, { dialect: new SqliteDialect({ database: new SQLite('./dev.db') }), }); ``` + +## Bun + +### Installing driver + +Bun is not compatible with `better-sqlite3`. You can use its builtin `bun:sqlite` module with the `kysely-bun-sqlite` Kysely community dialect. + + + +### Creating ZenStackClient + +```ts +import { schema } from './zenstack/schema'; +import { Database } from 'bun:sqlite'; +import { ZenStackClient } from '@zenstackhq/orm'; +import { BunSqliteDialect } from 'kysely-bun-sqlite'; + +const db = new ZenStackClient(schema, { + dialect: new BunSqliteDialect({ database: new Database('./dev.db') }), +}); +``` \ No newline at end of file diff --git a/versioned_docs/version-3.x/samples.md b/versioned_docs/version-3.x/samples.md index 666ba4b..b9e6048 100644 --- a/versioned_docs/version-3.x/samples.md +++ b/versioned_docs/version-3.x/samples.md @@ -18,3 +18,9 @@ A simple TypeScript application that demonstrates how to model a minimum blog ap https://github.com/zenstackhq/v3-sample-todo-nextjs A multi-tenant Todo app built with Next.js, Auth.js, TanStack Query, and ZenStack v3. + +## Rallly + +https://github.com/zenstackhq/rallly + +Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier. This repo is a fork of the original Rallly repo, replaced Prisma with ZenStack v3. From 8be10a1cbedf11f7de1c835dfa148edde7ae1311 Mon Sep 17 00:00:00 2001 From: ymc9 <104139426+ymc9@users.noreply.github.com> Date: Tue, 2 Dec 2025 13:46:02 +0800 Subject: [PATCH 2/2] update --- versioned_docs/version-3.x/samples.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versioned_docs/version-3.x/samples.md b/versioned_docs/version-3.x/samples.md index b9e6048..67aca60 100644 --- a/versioned_docs/version-3.x/samples.md +++ b/versioned_docs/version-3.x/samples.md @@ -23,4 +23,4 @@ A multi-tenant Todo app built with Next.js, Auth.js, TanStack Query, and ZenStac https://github.com/zenstackhq/rallly -Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier. This repo is a fork of the original Rallly repo, replaced Prisma with ZenStack v3. +[Rallly](https://github.com/lukevella/rallly) is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier. This repo is a fork of the original Rallly repo, replaced Prisma with ZenStack v3.