Various components of a Domain need to compute values based on some expression involving constants, field values, and environment variables. The Domain Expression Language (DomEL) was created to fill this need. Currently, the following features in XML design files are expressed in DomEL:
• | The on and where clauses of derived tables |
• | The on clause of join statements |
• | Calculated fields |
• | Filter expressions in Domains and Domain topics (equivalent to where clauses) |
• | The testProfileAttribute function |
• | Row-level security (see The Domain Security File) |
A DomEL expression is a shorthand way of writing a complex query. When processing a report based on a Domain, the server interprets DomEL expressions to generate parts of the SQL expression that perform the desired query. Depending on the data policy, either the augmented SQL is passed to the data source, or the server performs a simpler query and applies the DomEL expressions to the full dataset in memory.
Datatypes
The following simple datatypes may be declared as constants, used in expressions, and returned as values:
Simple Type | Description | Example of Constant |
boolean | Expressions such as comparison operators return boolean values, but true and false constants are undefined and cannot be used. | none |
integer | Whole numbers. | 123 or -123 |
decimal | Floating point numbers. Decimal separator must be a period (.); other separators such as comma (,) are not supported. | 123.45 or -123.45 |
string | Character string entered with single quotes ('); double quotes (") are not supported. | 'hello world' |
date | ANSI standard date. | d'2009-03-31' or |
timestamp | ANSI standard date and time. | ts'2009-03-31 23:59:59' or |
The composite datatypes, shown in the following table, may be declared as constants and used with the in set or in range operator. The values in these composite types are not necessarily constant, they could be determined by field values.
Composite Type | Description | Example |
set | Contains any number of any simple type above. | (1, 2, 3)('apples','oranges') |
range | Inclusive range applicable to numbers and dates, including fields that are number or date types. | (0:12) or (0.0:12.34)(d'2009-01-01':d'2009-12-31')(limit_min:limit_max) |
Recommended Comments
There are no comments to display.