Open History to see the last commit
Function: isPredicateSubset()#
function isPredicateSubset(subset, superset): boolean;
Defined in: packages/db/src/query/predicate-utils.ts:887
Check if one predicate (where + orderBy + limit + offset) is a subset of another. Returns true if all aspects of the subset predicate are satisfied by the superset.
Parameters#
subset#
The predicate requirements to check
superset#
The predicate that might satisfy the requirements
Returns#
boolean
true if subset is satisfied by superset
Example#
isPredicateSubset(
{ where: gt(ref('age'), val(20)), limit: 10 },
{ where: gt(ref('age'), val(10)), limit: 20 }
) // true