Member Junction
    Preparing search index...

    Type Alias RunViewWithCacheCheckResult<T>

    Result for a single RunView with cache check. The server returns 'current' (cache valid), 'differential' (partial update), or 'stale' (full refresh needed).

    type RunViewWithCacheCheckResult<T = unknown> = {
        aggregateResults?: AggregateResult[];
        differentialData?: DifferentialData<T>;
        errorMessage?: string;
        maxUpdatedAt?: string;
        results?: T[];
        rowCount?: number;
        status: "current" | "differential" | "stale" | "error";
        viewIndex: number;
    }

    Type Parameters

    • T = unknown
    Index

    Properties

    aggregateResults?: AggregateResult[]

    Aggregate results - populated when status is 'stale' or 'differential' and aggregates were requested. For 'differential', aggregates are always re-computed fresh (can't be incrementally updated).

    differentialData?: DifferentialData<T>

    Differential update data - only populated when status is 'differential' Contains updated/created rows and deleted record IDs since client's maxUpdatedAt

    errorMessage?: string

    Error message if status is 'error'

    maxUpdatedAt?: string

    The maximum __mj_UpdatedAt from the results - populated when status is 'stale' or 'differential'

    results?: T[]

    The fresh results - only populated when status is 'stale' (full refresh)

    rowCount?: number

    The row count of the results - populated when status is 'stale' or 'differential' For 'differential', this is the NEW total row count after applying the delta

    status: "current" | "differential" | "stale" | "error"

    'current' means the client's cache is still valid - no data returned 'differential' means only changes are returned - client should merge with existing cache 'stale' means full refresh is needed - fresh data is included in results (fallback when entity doesn't track changes) 'error' means there was an error checking/executing the view

    viewIndex: number

    The index of this view in the batch request (for correlation)