defWithDimensions()
Home > @gooddata/sdk-model > defWithDimensions
defWithDimensions() function
Configures dimensions in the exec definition.
Signature:
export declare function defWithDimensions(definition: IExecutionDefinition, ...dims: Array<IDimension | DimensionGenerator>): IExecutionDefinition;
Parameters
Parameter | Type | Description |
---|---|---|
definition | IExecutionDefinition | execution definition to alter |
dims | Array<IDimension | DimensionGenerator> | dimensions to set |
Returns:
new execution with the updated dimensions
Remarks
Any dimension settings accumulated so far WILL be wiped out. If dims is array if dimensions, they will be used as is. If it is an array whose first element is dimension generation function, then the function will be called to obtain dimensions.
This function MUST be used to implement IPreparedExecution.withDimensions(); its parameters are constructed in a way that it can handle both signatures of the withDimensions().