Member Junction
    Preparing search index...

    Type Alias RunViewResult<T>

    Result of a RunView() execution. Contains the query results along with execution metadata like timing, row counts, and error information.

    type RunViewResult<T = any> = {
        AggregateExecutionTime?: number;
        AggregateResults?: AggregateResult[];
        ErrorMessage: string;
        ExecutionTime: number;
        Results: T[];
        RowCount: number;
        Success: boolean;
        TotalRowCount: number;
        Unsubscribe?: () => void;
        UserViewRunID?: string;
    }

    Type Parameters

    • T = any
    Index

    Properties

    AggregateExecutionTime?: number

    Execution time for aggregate query specifically (in milliseconds). Only present if Aggregates were requested.

    AggregateResults?: AggregateResult[]

    Results of aggregate calculations, in same order as input Aggregates array. Only present if Aggregates were requested in RunViewParams.

    ErrorMessage: string

    If Success is false, this will contain a message describing the error condition.

    ExecutionTime: number

    Time elapsed in executing the view (in milliseconds)

    Results: T[]

    The array of records returned by the view, only valid if Success is true

    RowCount: number

    Number of rows returned in the Results[] array

    Success: boolean

    Was the view run successful or not

    TotalRowCount: number

    Total number of rows that match the view criteria, not just the number returned in the Results[] array This number will only be different when the view is configured to have a UserViewMaxRows value and the criteria of the view in question has more than that # of rows. Otherwise it will be the same value as RowCount.

    Unsubscribe?: () => void

    If an OnDataChanged callback was provided in RunViewParams, this function unregisters that callback. Call this during cleanup (e.g., Angular ngOnDestroy, React effect cleanup) to prevent memory leaks.

    For long-lived callers like engines, this is typically not needed — the callback persists for the process lifetime.

    const result = await rv.RunView({ EntityName: 'Users', OnDataChanged: (e) => { ... } });
    // Later:
    result.Unsubscribe?.();
    UserViewRunID?: string

    The newly created UserViews.ID value - only provided if RunViewParams.SaveViewResults=true