IWorkspaceComputedAttributesService
Service for create, update or delete computed attributes and querying them.
export interface IWorkspaceComputedAttributesService
Methods
Method | Description |
|---|---|
Create and save computed attribute for the provided definition. | |
Delete computed attribute with the given reference. | |
Get computed attribute by reference. | |
Get the expression tokens of the computed attribute’s MAQL, with every referenced object resolved to its title. | |
Get objects that reference the computed attribute. | |
Computed attributes query factory. | |
Sets computed attribute certification metadata. | |
Update provided computed attribute. | |
Update metadata of the computed attribute. |
Method details
IWorkspaceComputedAttributesService.createComputedAttribute()method
Create and save computed attribute for the provided definition.
createComputedAttribute(computedAttribute: IComputedAttributeMetadataObjectDefinition): Promise<IComputedAttributeMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
computedAttribute | computed attribute definition |
Returns
Promise<IComputedAttributeMetadataObject>
promise of created computed attribute
IWorkspaceComputedAttributesService.deleteComputedAttribute()method
Delete computed attribute with the given reference.
deleteComputedAttribute(ref: ObjRef): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | ref of the computed attribute to delete |
Returns
Promise<void>
promise of undefined
IWorkspaceComputedAttributesService.getComputedAttribute()method
Get computed attribute by reference.
getComputedAttribute(ref: ObjRef, options?: IGetComputedAttributeOptions): Promise<IComputedAttributeMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | ref of the computed attribute to get | |
options | (Optional) options for getting the computed attribute |
Returns
Promise<IComputedAttributeMetadataObject>
promise of computed attribute
IWorkspaceComputedAttributesService.getComputedAttributeExpressionTokens()method
Get the expression tokens of the computed attribute’s MAQL, with every referenced object resolved to its title.
getComputedAttributeExpressionTokens(ref: ObjRef): Promise<IMeasureExpressionToken[]>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | ref of the computed attribute |
Returns
Promise<IMeasureExpressionToken[]>
promise of the expression tokens
IWorkspaceComputedAttributesService.getComputedAttributeReferencingObjects()method
Get objects that reference the computed attribute.
getComputedAttributeReferencingObjects(ref: ObjRef): Promise<IComputedAttributeReferencing>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | ref of the computed attribute |
Returns
Promise<IComputedAttributeReferencing>
promise of the referencing objects
IWorkspaceComputedAttributesService.getComputedAttributesQuery()method
Computed attributes query factory.
getComputedAttributesQuery(): IComputedAttributesQuery;
Returns
computed attributes query
IWorkspaceComputedAttributesService.setCertification()method
Sets computed attribute certification metadata.
setCertification(ref: ObjRef, certification?: IObjectCertificationWrite): Promise<void>;
Parameters
Parameter | Type | Description |
|---|---|---|
ref | computed attribute reference | |
certification | IObjectCertificationWrite | (Optional) certification state; undefined clears certification |
Returns
Promise<void>
IWorkspaceComputedAttributesService.updateComputedAttribute()method
Update provided computed attribute.
updateComputedAttribute(computedAttribute: IComputedAttributeMetadataObject): Promise<IComputedAttributeMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
computedAttribute | computed attribute to update |
Returns
Promise<IComputedAttributeMetadataObject>
promise of updated computed attribute
IWorkspaceComputedAttributesService.updateComputedAttributeMeta()method
Update metadata of the computed attribute.
updateComputedAttributeMeta(computedAttribute: Partial<IMetadataObjectBase> & IMetadataObjectIdentity): Promise<IComputedAttributeMetadataObject>;
Parameters
Parameter | Type | Description |
|---|---|---|
computedAttribute | Partial<IMetadataObjectBase> & IMetadataObjectIdentity | metadata update to apply |
Returns
Promise<IComputedAttributeMetadataObject>
promise of updated computed attribute