Modifiers
CHILD
CONN and PLUGIN FUNCTION classes only: modifier processed for each child occurrence.
Example
columns CONN TableColumns,
CHILD = name;
The TableColumns repository function returns every column of a table. For each occurrence
(CHILD), the name rule is processed.
DOM
ATTR and TEMPL classes only: domain name.
Example
tableTriggerTimeAttr ATTR TriggerTime
DOM = tableTriggerTimeDomain;
tableTriggerTimeDomain CDOM ("1", "BEFORE ")
("2", "AFTER ")
(DEFAULT, "");
The TriggerTime repository function returns "1" for a before trigger, "2" for a after trigger
and "3" for an instead of trigger. The result will be "BEFORE" or "AFTER" if the repository
function returns "1" or "2"; if it returns "3' (or any other value), the result will be empty.
EXTERN
TEMPL and GROUP classes only; a flag indicates to include this rule in the list of rules
displayed in the menu command Generate from template.
Example
projectEntryPoint TEMPL "$project;"
EXTERN
FILE = "z.sql.txt";
In this example, the projectEntryPoint rule will be visible in the interface so that the
user can select it as a rule to be executed.
FALSE
COND class only: modifier is processed when the condition returns FALSE.
If the condition is true (if the HTML Boolean variable is true), then the htmlDisplay sub-rule
will be processed and the result will be <code>name<</code>. However, if the condition
is fausse, the plainDisplay will be processed instead.
Example
display COND BOOLWAN (html)
TRUE=htmlDisplay
FALSE=plainDisplay;
htmlDisplay TEMPL "<code>$name;</code>";
plainDisplay TEMPL "$name;";
FILE
TEMPL and GROUP classes only: modifier is processed then it is used to create a new
file which contains the output of the sub-rule processing; the template string must not
contain edition codes. The result must be a file name containing or not the directory
which can be relative or absolute. The creation of a non existing directory is limited to
one level (c:\sub1\sub2\output.txt is not a valid input string to the FILE modifier).
The result string of the FILE modifier is added in the parent output file as a reference
(same as an HTML hyperlink). In order to skip it, a domain can be used.
LOWER
TEMPL and ATTR classes only: the TEMPL rule's output is converted in lowercase letters.
Non-letter characters are not affected.
Example
lowercase TEMPL "$hello;"
LOWER;
hello TEMPL "Hello World!";
The 'lowercase' rule expands to "hello world!".
NULL
ATTR, CONN, TEMPL, COND and GROUP classes: modifier processed when the result
is empty, or when there is no child, like for CONN. Example below.
PREF
ATTR, CONN, TEMPL, COND and GROUP classes: modifier processed and added as
prefix to the result when the result is not empty, or when there is at least one child like for
CONN. Example below.
SEP
CONN, GROUP classes: modifier processed once when there are at least 2 occurrences
(CONN) or 2 variables giving a result (GROUP) and inserted between each pair of result
strings. Example below.
SUF
ATTR, CONN, TEMPL, COND and GROUP classes: modifier processed and added as a
suffix to the result when the result is not empty, or when there is at least one child, like for
CONN. Example for these last four modifiers:
Example:
col_min_max GROUP (col_len, col_dec)
PREF = "Note: "
SEP = " AND "
SUF = "."
NULL = "Note: length and number of decimals are undetermined.";
col_len ATTR ColumnLength
PREF = "$name;'s length is : ";
col_dec ATTR ColumnDecimal
PREF = "$name;'s nb of decimals is : ";
The ColumnLength and ColumnDecimal repository functions return the length of the
number of decimals of a column; if the column is price, the length is 10 and the number
of decimals is 5, the result will be Note: price's length is : 10 AND price's nb of
decimals is : 5. If length is undetermined, the result will be Note: price's nb of
decimals is : 5. If both are undetermined, the result will be : Note: length and
number of decimals are undetermined.
It is not allowed to use
edition codes in a
NULL, PREF, SEP or
SUF string.
TRUE
COND class only: rule processed when the condition returns TRUE.
Example
print_expression TEMPL "$french_english;",
EXTERN;
french_english COND print_in_english,
TRUE="The table name is ",
FALSE="Le nom de la table est ";
If the print_in_english condition is TRUE, then the result will be The table name is.
On the other hand, if the condition is FALSE, then the French expression Le nom de la
table est will be used.
UPPER
TEMPL et ATTR classes only: the TEMPL rule's output is converted in uppercase letters.
Non-letter characters are not affected.
Example
uppercase TEMPL "$hello;"
UPPER;
hello TEMPL "Hello World!";
the 'uppercase' rule becomes "HELLO WORLD!".