You can modify the diagnostic rule expression. The following tables describe the syntax of the diagnostic rule expression of SQL Diagnoser.
Data types
| Type | Description |
|---|---|
| Numeric | For example, 1, 1.1, and -2.3. |
| String | For example, 'a' and "abc". |
| Boolean | For example, true and false. The value is case-insensitive. |
| Context variable | The class attribute, which is used to fetch object attributes from the context. A dollar sign ($) must be prefixed to each attribute, such as $elapsedTime. The value is case-sensitive. |
Object computing
| Type | Description |
|---|---|
| Attribute access | Specifies to access an attribute of an object. For example, $a.b specifies to access the b attribute of a in the context. |
| Method access | Specifies to access a method of an object. Method access can be used together with attribute access. For example, $a.f1() specifies to access the f1 method of a in the context. Method access is not available for use now. |
Aggregate operation
| Type | Description |
|---|---|
| COUNT, AVG, STD, VAR, MIN, MAX, SUM, and DISTINCT | Specifies to perform operations on sets, which is the same as that in SQL. |
| Set projection | Specifies to extract an attribute of each element in a set and form a new set, similar to projected columns in SQL. For example, if $tableList in $tableList.tableName is a set, the tableName attribute is extracted from each element to form a new set. The value is case-insensitive. |
Relational operation
| Type | Description |
|---|---|
| !=/<>, =/==, <=, <, >=, and > | The same as that in SQL. |
| IN | The same as that in SQL. It is used to determine whether an element exists in a set. The value is case-insensitive. |
Boolean operation
| Type | Description |
|---|---|
| AND, OR, and NOT | The same as that in SQL. The value is case-insensitive. |
Other operations
| Type | Description |
|---|---|
| ISNULL, NOTNULL, NOTEMPTY, and ISEMPTY | ISNULL and NOTNULL are used to determine whether an object exists. NOTEMPTY and ISEMPTY are used to determine whether a set is empty. The value is case-insensitive. |