function isOffsetLimitSubset(subset, superset): boolean;
function isOffsetLimitSubset(subset, superset): boolean;
Defined in: packages/db/src/query/predicate-utils.ts:811
Check if one offset+limit range is a subset of another. Returns true if the subset range is fully contained within the superset range.
A query with {limit: 10, offset: 0} loads rows [0, 10). A query with {limit: 10, offset: 20} loads rows [20, 30).
For subset to be satisfied by superset:
The offset+limit requirements to check
number
number
The offset+limit that might satisfy the requirements
number
number
boolean
true if subset range is fully contained within superset range
isOffsetLimitSubset({ offset: 0, limit: 5 }, { offset: 0, limit: 10 }) // true
isOffsetLimitSubset({ offset: 5, limit: 5 }, { offset: 0, limit: 10 }) // true (rows 5-9 within 0-9)
isOffsetLimitSubset({ offset: 5, limit: 10 }, { offset: 0, limit: 10 }) // false (rows 5-14 exceed 0-9)
isOffsetLimitSubset({ offset: 20, limit: 10 }, { offset: 0, limit: 10 }) // false (rows 20-29 outside 0-9)
isOffsetLimitSubset({ offset: 0, limit: 5 }, { offset: 0, limit: 10 }) // true
isOffsetLimitSubset({ offset: 5, limit: 5 }, { offset: 0, limit: 10 }) // true (rows 5-9 within 0-9)
isOffsetLimitSubset({ offset: 5, limit: 10 }, { offset: 0, limit: 10 }) // false (rows 5-14 exceed 0-9)
isOffsetLimitSubset({ offset: 20, limit: 10 }, { offset: 0, limit: 10 }) // false (rows 20-29 outside 0-9)
