JSCalculation
Overview
The JSCalculation
object is a solution model wrapper designed to define and manage custom calculations associated with data sources. It allows for full customization of calculation logic, variable types, and storage options, enabling developers to seamlessly integrate business logic into their data models.
Through its flexible API, the object provides access to essential details like calculation code and metadata while offering tools to evaluate storage status and configuration. This ensures calculations are adaptable to varying application requirements, maintaining both clarity and efficiency in solution development.
Properties Summarized
The full source code of this method (including doc and function declaration).
Get or set the sql type of this variable.
Methods Summarized
This method returns the name of the stored calculation.
Returns the UUID of the calculation.
Check a flag of the calculation.
Returns whether this calculation is a stored one or not.
Properties Detailed
code
The full source code of this method (including doc and function declaration).
Type String
Sample
variableType
Get or set the sql type of this variable. Type should be one of JSVariable.DATETIME, JSVariable.TEXT, JSVariable.NUMBER , JSVariable.INTEGER or JSVariable.MEDIA.
Type Number
Sample
Methods Detailed
getName()
This method returns the name of the stored calculation.
Returns: String the name of the stored calculation
Sample
getUUID()
Returns the UUID of the calculation.
Returns: UUID
Sample
hasFlag(flag)
Check a flag of the calculation. The flags are a bit pattern consisting of 1 or more of the following bits: - JSColumn.UUID_COLUMN
Parameters
Number flag ;
Returns: Boolean boolean whether flag is set.
Sample
isStored()
Returns whether this calculation is a stored one or not.
Returns: Boolean true if the calculation is stored, false otherwise
Sample
Last updated