DataEngine for .NET Standard | ComponentOne
C1.PivotEngine Assembly / C1.PivotEngine Namespace / C1PivotEngine Class / Exec Method / Exec(String,String,Dictionary<String,Object>,CancellationToken,ProgressDelegate) Method
Path in the server's file system where DataEngine data is saved in files.
The name of the DataEngine table on which the view is based.
View definition. It is obtained from a view in JSON format using System.Web.Script.Serialization.JavaScriptSerializer.Deserialize.
Enables task cancellation.
Callback function to report progress updates.

In This Topic
    Exec(String,String,Dictionary<String,Object>,CancellationToken,ProgressDelegate) Method
    In This Topic
    Server-side asynchronous execution of a view returning aggregated results to the caller client.
    Syntax
    'Declaration
     
    Public Overloads Shared Function Exec( _
       ByVal workspace As String, _
       ByVal table As String, _
       ByVal view As Dictionary(Of String,Object), _
       ByVal cancelToken As CancellationToken, _
       ByVal progress As ProgressDelegate _
    ) As Task(Of Dictionary(Of Object(),Object()))

    Parameters

    workspace
    Path in the server's file system where DataEngine data is saved in files.
    table
    The name of the DataEngine table on which the view is based.
    view
    View definition. It is obtained from a view in JSON format using System.Web.Script.Serialization.JavaScriptSerializer.Deserialize.
    cancelToken
    Enables task cancellation.
    progress
    Callback function to report progress updates.

    Return Value

    View execution (aggregation) result
    Remarks

    This method supports multi-user thread-safe execution of views on the server. Result of such execution is intended for passing to a client for visualization on the web or elsewhere.

    It can execute views in multiple DataEngine workspaces and tables. It maintains a pool of Workspace objects internally to enable that.

    Aggregation result is a dictionary mapping keys to values.

    Each value is an array representing values of the value fields in the view in the order those fields are specified in the view. So, for example, if the view has two value fields V1 and V2, then each value is an array [v1, v2] where v1 is the aggregated value of V1 corresponding to the key, and v2 is the aggregated value of V2 corresponding to the same key.

    A key is an array of values of the row and column fields in the view in the order those fields are specified in the view, with row fields coming first followed by column fields. Some or even all elements of that array can be null, which means that the corresponding value is aggregated through all values of the fields whose position in the key contains null. The key where all elements are null (such key is unique in the dictionary) corresponds to the grand total.

    For example, with row field Country, column field Customer, value fields Withdrawal and Deposit with aggregation operation Sum, key ["UK", "Joe"] corresponds to [v1, v2], where v1/v2 is the sum of all withdrawals/deposits of the customer Joe in UK, key ["UK", null] corresponds to [v1, v2], where v1/v2 is the sum of all withdrawals/deposits of all UK customers, key [null, "Joe"] corresponds to [v1, v2], where v1/v2 is the sum of all withdrawals/deposits of all customers (in all countries) whose name is Joe, key [null, null] corresponds to [v1, v2], where v1/v2 is the sum of all withdrawals/deposits of all customers everywhere.

    See Also