Enumerations of the Megaladata Built-in Entities
The enumerations describing the fields and variables metadata is built in within the JavaScript execution context.
Description of Enumerations
DataType
It represents data types. Enumeration items:
Item | Data type |
---|---|
None | |
Boolean | |
DateTime | |
Float | |
Integer | |
String | |
Variant |
DataKind
It represents data kinds. Enumeration items:
Item | Data kind |
---|---|
Undefined | |
Continuous | |
Discrete |
UsageType
It represents usage type of fields. Enumeration items:
Item | Field usage type |
---|---|
Unspecified | |
Excluded | |
Useless | |
Active | |
Predicted | |
Key | |
Group | |
Value | |
Transaction | |
Item |
Examples of use:
import { OutputTable, DataType, UsageType } from "builtIn/Data";
let col0 = OutputTable.Columns[0];
// Assertion of the property value with the "enumeration" type
if (col0.DataType == DataType.String) {
// We are doing something
}
// Displaying of the numeric representation of the enumeration value
console.log(col0.DefaultUsageType);
// Displaying of the string representation of the enumeration value
console.log(UsageType[col0.DefaultUsageType]);