DataViewFacade
Wrapper for IDataView.
export declare class DataViewFacade
Remarks
This provides various convenience methods to work with data and metadata stored inside the provided instance of IDataView.
The facade keeps an ephemeral state - such as calculated indexes on top of the headers in the IDataView - to optimize performance of often-used lookups at the cost of extra memory.
The facade is part of the public API and we strongly recommend to use it whenever client code needs to work with data view; ideally, single instance of data view facade
Properties
Property | Modifiers | Type | Description |
|---|---|---|---|
| |||
|
Methods
Method | Modifiers | Description |
|---|---|---|
| ||
| Creates a DataViewFacade with provided execution result. | |
Property details
DataViewFacade.dataViewproperty
readonly dataView: IDataView;
DataViewFacade.definitionproperty
readonly definition: IExecutionDefinition;
Method details
DataViewFacade.context()method
context(): IExecutionContext;
Returns
context metadata attached to the underlying execution
DataViewFacade.data()method
data(config?: DataAccessConfig): IDataAccessMethods;
Parameters
Parameter | Type | Description |
|---|---|---|
config | (Optional) |
Returns
methods to access data in a curated fashion using data slices and data series iterators
DataViewFacade.fingerprint()method
fingerprint(): string;
Returns
string
fingerprint of the data view
Remarks
see IDataView.fingerprint() for more contractual information
DataViewFacade.for()method
static for(dataView: IDataView): DataViewFacade;
Parameters
Parameter | Type | Description |
|---|---|---|
dataView | instance of data view to create the facade for |
Returns
DataViewFacade.forResult()method
Creates a DataViewFacade with provided execution result.
static forResult(result: IExecutionResult): DataViewFacade;
Parameters
Parameter | Type | Description |
|---|---|---|
result | instance of execution result to create the facade for |
Returns
Remarks
Only use this when execution result is unable to load data and some form of DataViewFacade is still needed. Beware that the calculated data view is empty after the creation. Only execution definition and result is defined.
DataViewFacade.result()method
result(): IExecutionResult;
Returns
result of execution which returned this data view
DataViewFacade.warnings()method
warnings(): IResultWarning[];
Returns
execution result warnings