跳到主要内容

isEntityMatchWhere()

function isEntityMatchWhere<T>(entity, ruleGroup): boolean;

Defined in: packages/rxdb/src/query/query-matching.utils.ts:358

判断实体是否匹配规则组

Type Parameters​

Type Parameter
T

Parameters​

ParameterTypeDescription
entityobject | null | undefined待判定的实体;null / undefined(INSERT 的 inversePatch、DELETE 的 patch)一律不匹配
ruleGroupRuleGroup<T>规则组

Returns​

boolean

命中返回 true

Remarks​

与 SQL 侧 WHERE 求值同一套语义(空 and 组匹配全部、空 or 组同样匹配全部), 因此可以用它在内存里复算适配器本应下推给 SQL 的过滤条件。