Scalar FunctionsType Functions
gettype
Return the runtime type of a value as a string.
Recognised return strings: int, long, real, string, bool,
datetime, timespan, array, dictionary, null.
Divergences from Microsoft Kusto:
- The Berserk engine has no first-class
guidordecimalruntime type — values that Kusto labels"guid"are stored as strings and report"string", and decimals are parsed into reals and report"real". - For dynamic-wrapped reals (e.g.
gettype(dynamic(1.5))) Kusto returns"double"; Berserk normalises to"real"so that the returned string is consistent with the bare-real case.
Syntax
gettype(value)Parameters
Prop
Type
Returns: string
Examples
Example 1
print gettype(1), gettype(1.5), gettype("s"), gettype(true), gettype(dynamic([1, 2])), gettype(
dynamic({"a":1})
)| print_0 (string) | print_1 (string) | print_2 (string) | print_3 (string) | print_4 (string) | print_5 (string) |
|---|---|---|---|---|---|
| long | real | string | bool | array | dictionary |