Member Junction
    Preparing search index...

    Type Alias RunQueryWithCacheCheckResult<T>

    Result for a single RunQuery with cache check. The server returns either 'current' (cache is valid) or 'stale' (with fresh data).

    type RunQueryWithCacheCheckResult<T = unknown> = {
        errorMessage?: string;
        maxUpdatedAt?: string;
        queryId: string;
        queryIndex: number;
        results?: T[];
        rowCount?: number;
        status: "current" | "stale" | "error" | "no_validation";
    }

    Type Parameters

    • T = unknown
    Index

    Properties

    errorMessage?: string

    Error message if status is 'error'

    maxUpdatedAt?: string

    The maximum __mj_UpdatedAt from the results - only when status is 'stale'

    queryId: string

    The query ID for reference

    queryIndex: number

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

    results?: T[]

    The fresh results - only populated when status is 'stale' or 'no_validation'

    rowCount?: number

    The row count of the results - only when status is 'stale'

    status: "current" | "stale" | "error" | "no_validation"

    'current' means the client's cache is still valid - no data returned 'stale' means the cache is outdated - fresh data is included in results 'error' means there was an error checking/executing the query 'no_validation' means the query doesn't have CacheValidationSQL configured