Type alias RunQueryWithCacheCheckResult<T>

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

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

Type Parameters

  • T = unknown

Type declaration

  • Optional errorMessage?: string

    Error message if status is 'error'

  • Optional 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)

  • Optional results?: T[]

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

  • Optional 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