@mocanvas/store · type

QueryValueMatcher

type QueryValueMatcher<T> = {
    eq: T;
} | {
    neq: T;
} | {
    gt: number;
}

How one property of a record is matched.

SEMANTICS-ASSUMED: three comparisons — equality, inequality and a numeric greater-than — are what an index can answer without scanning, which is the whole reason queries are data rather than functions. gt is deliberately numeric: the only ordered property records carry is a number.

mocanvas is built by Symbio. Free for non-commercial, non-profit and development use; commercial use needs an agreement. Not affiliated with or endorsed by tldraw.