isSystemEntity()
function isSystemEntity(EntityClass): boolean;
Defined in: packages/rxdb/src/system/system-entities.ts:143
判断一个实体类是不是 RxDB 注入的系统表
Parameters
| Parameter | Type | Description |
|---|---|---|
EntityClass | EntityType | 待判定的实体类 |
Returns
boolean
命中 SYSTEM_ENTITIES 时为 true
Remarks
系统表不是接入方数据:它们没有自己的 sync,因此在
getSyncType 眼里会跟随库级配置,被判成与业务实体同一个同步类型。
凡是「按同步类型枚举接入方仓库」的地方都得先用本谓词把它们摘出去,
否则库级配置一变,系统表就跟着被送进它们从不参与的管道。
Example
isSystemEntity(RxDBBranch); // true
isSystemEntity(Recipe); // false