尚未收集仓库信息。
尚未检测到更新。GitHub 发布版本后会显示在这里。
A Prisma Next extension pack for PostgreSQL's ltree hierarchical tree data type, with type-safe query operators and path manipulation.
翻译准备中
正在加载完整 README。
查看完整 README ↗A Prisma 8 extension pack for PostgreSQL’s
ltree hierarchical-tree data type.
Model category trees, org charts, taxonomies, and filesystem-like paths in Postgres and
query them with type-safe operators: ancestor/descendant checks,
lquery/ltxtquery pattern matching, path manipulation, and lowest-common-ancestor
computation, without dropping to raw SQL.
prisma-ltreedocs/feature-support.mdpnpm add prisma-ltree @prisma/[email protected]
pnpm add -D prisma
Requires Node >=24. Pin @prisma/orm-postgres to 8.0.0-rc.16 (exact SPI pin).
Install prisma-ltree with a caret. You do not need [email protected].
See versioning and compatibility.
The CLI is prisma (npx prisma@latest). Today that is 8.0.0-rc.21, which
depends on @prisma/[email protected].
Add the pack to your prisma.config.ts, author ltree columns, then query them with
type-safe operators:
// prisma.config.ts
import { definePrismaConfig } from "prisma/config";
import { defineConfig as ormConfig } from "@prisma/orm-postgres/config";
import ltree from "prisma-ltree/control";
export default definePrismaConfig({
orm: ormConfig({
contract: "./src/prisma/contract.prisma",
extensions: [ltree],
}),
});
// Find every descendant of "Top.Science"
const rows = await db.orm.Category.where((c) => c.path.isDescendantOf("Top.Science"))
.select("id")
.all();
The full configuration, contract authoring (PSL and TypeScript lanes), runtime setup, and the complete operator reference live in the package README and the docs site.
This is a Vite+ (vp) + pnpm workspace monorepo.
| Path | What |
|---|---|
packages/extension-ltree/ | The published prisma-ltree extension pack (README) |
apps/web/ | Documentation site (Fumadocs + TanStack Start) |
vendor/prisma-next/ | Historical prisma-next git subtree (agent / contributor reference) |
examples/family-tree/ | Tree-of-Life demo (standalone; see its README — build pack, then pnpm setup / setup:db) |
skills/, .agents/ | Agent skills for adoption and query patterns |
docs/ | Prisma 8 architecture notes, ltree reference, specs, and ADRs |
pnpm install # install dependencies
pnpm run ready # check-pins + build + check + test (full gate)
Upstream Prisma source for agents lives at
vendor/prisma-next/ (git subtree; historical
prisma/prisma-next layout). The active product
home is prisma/orm (prisma/prisma redirects there).
Refresh the subtree with pnpm run sync-prisma-next when needed.
See CONTRIBUTING.md for the full workflow (changesets, branch model,
skills) and AGENTS.md for extension-author conventions.
Contributions are welcome. See CONTRIBUTING.md and our
Code of Conduct. For security reports, see SECURITY.md.
Apache-2.0 © 2026 Jason Procka