@clickup/ent-framework

中文文档
2.26.1发布于 2026/03/20MITTypeScriptCommonJS近 30 天下载 10万

A PostgreSQL graph-database-alike library with microsharding and row-level security

此软件包已被标记为弃用

This package is no longer maintained

原始使用文档

Ent Framework

The TypeScript library for working with microsharded PostgreSQL databases.

Core Features

  • Graph-like representation of entities. With Ent Framework, you represent each Ent (a domain object of your business logic) as a TypeScript class with immutable properties. An Ent class instance maps to one row of some table in a relational database (like PostgreSQL). It may look similar to ORM, but has many aspects that traditional ORMs don't have.
  • Row-level security in a graph (privacy layer). You manage data as a graph where each node is an Ent instance, and each edge is a field link (think of foreign keys) to other Ents. To be allowed to read (or update/delete) some Ent, you define a set of explicit rules like "user can read EntA if they can read EntB or EntC". And, consequently, in EntB you define its own set of rules, like "user can read EntB if they can read EntD".
  • Query batching and coalescing. Ent Framework holistically solves the "N+1 selects" problem commonly known in ORM world. You still write you code as if you work with individual Ents and individual IDs, and the framework magically takes care of sending batched requests (both read and write) to the underlying relational database. You do not work with lists and JOINs anymore.
  • Microsharding and replication lag tracking support out of the box. Splitting your database horizontally is like a breeze now: Ent Framework takes care of routing the requests to the proper microshards. When scaling reads, Ent Framework knows whether a replica node is "good enough" for that particular query. It automatically uses the proper replica when possible, falling back to master when not.
  • Pluggable to your existing relational database. If your project already uses some ORM or runs raw SQL queries, Ent Framework can be plugged in.
  • Tens of other features. Some examples: cross-microshards foreign keys, composite fields, triggers, build-in caching etc.

Installation

npm add ent-framework
pnpm add ent-framework
yarn add ent-framework

CI run

版本与发布记录

@clickup/ent-framework 共发布 32 个版本,首次发布于 2024/01/12;过去 12 个月发布了 3 个版本。

版本发布日期距今
2.26.1latest2026/03/207 个月前
2.25.22026/01/0810 个月前
2.24.22026/01/0510 个月前
2.24.12025/11/071 年前
2.23.12025/07/181.3 年前
2.22.22025/06/181.4 年前

关于 @clickup/ent-framework 的常见问题

@clickup/ent-framework 是什么?

A PostgreSQL graph-database-alike library with microsharding and row-level security注意:该包已被作者标记为弃用——This package is no longer maintained

如何安装 @clickup/ent-framework?

在项目目录运行 npm install @clickup/ent-framework,或使用 pnpm add / yarn add / bun add。

@clickup/ent-framework 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@clickup/ent-framework 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

@clickup/ent-framework 可以商用吗?

@clickup/ent-framework 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@clickup/ent-framework 的下载量有多少?

根据 npm 官方下载统计,@clickup/ent-framework 在 2026/10/10 – 2026/11/08 这 30 天内被下载 99,800 次,日均约 3,327 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@clickup/ent-framework 还在维护吗?

最新版本 2.26.1 发布于 2026/03/20(7 个月前);至今共发布 32 个版本,其中过去 12 个月发布了 3 个;首次发布于 2024/01/12。作者已将其标记为弃用,新项目建议寻找替代方案。