Common Functions
Mathematical Functions
Function Name | Description | Syntax |
---|---|---|
plus(a, b), a + b | Calculates the sum of two fields | plus(table.field1, table.field2) |
minus(a, b), a - b | Calculates the difference of two fields | minus(table.field1, table.field2) |
multiply(a, b), a * b | Calculates the product of two fields | multiply(table.field1, table.field2) |
divide(a, b), a / b | Calculates the quotient of two fields | divide(table.field1, table.field2) |
modulo(a, b), a % b | Calculates the remainder of two fields | modulo(table.field1, table.field2) |
abs(a) | Returns the absolute value | abs(table.field1) |
negate(a) | Returns the negation | negate(table.field1) |
Comparison Functions
Function Name | Description | Syntax |
---|---|---|
=, == | Checks if equal | table.field1 = value |
!=, <> | Checks if not equal | table.field1 != value |
> | Checks if greater than | table.field1 > value |
>= | Checks if greater than or equal to | table.field1 >= value |
< | Checks if less than | table.field1 < value |
<= | Checks if less than or equal to | table.field1 <= value |
Logical Functions
Function Name | Description | Syntax |
---|---|---|
AND | Both conditions must be met | - |
OR | One of the conditions must be met | - |
NOT | Reverses the condition result | - |
Type Conversion Functions
Note: Conversion functions may overflow, resulting in numbers consistent with data types in C language.
Function Name | Purpose | Usage Scenario |
---|---|---|
toInt(8|16|32|64) | Converts string to integer | toInt8('128') results in -127 |
toUInt(8|16|32|64) | Converts string to unsigned integer | toUInt8('128') results in 128 |
toInt(8|16|32|64)OrZero | Converts string to integer, returns 0 on error | toInt8OrZero('a') results in 0 |
toUInt(8|16|32|64)OrZero | Converts string to integer, returns 0 on error | toUInt8OrZero('a') results in 0 |
toInt(8|16|32|64)OrNull | Converts string to integer, returns NULL on error | toInt8OrNull('a') results in NULL |
toUInt(8|16|32|64)OrNull | Converts string to integer, returns NULL on error | toUInt8OrNull('a') results in NULL |
There are similar functions for floating point numbers or date types. For details, please refer to the official documentation .
Date Functions
Please refer to the official documentation for details.
String Functions
Please refer to the official documentation for details.
UUID
Please refer to the official documentation for details.
JSON Functions
Please refer to the official documentation for details.