...
Tag | Description |
---|
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="9dedcf45b0f32a2c-bcaf4165-48d44bad-9a45942a-10fe786405128ac0a72e0795"><ac:plain-text-body><![CDATA[ | @VALUE[<param>] | Replace the tag by ]]></ac:plain-text-body></ac:structured-macro> Example:? in the statement and set the value of the prepared parameter to the value of the MIB Explorer variable with name <param> . Code Block |
---|
SELECT ID FROM MXP.MXP_MONITOR WHERE NAME = @VALUE\[NAME\] |
will be rendered to Code Block |
---|
SELECT ID FROM MXP.MXP_MONITOR WHERE NAME = ? |
where ? is assigned with the value of the MIB Explorer variable NAME when the statement is being executed. |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="0c62e5fb91727f4f-926b4549-4790447e-8bf1947a-7294e32b23fbeeb0b2de585b"><ac:plain-text-body><![CDATA[ | @INSERT[<param>] | Replace the tag by the value of MIB Explorer variable with name <param> ]]></ac:plain-text-body></ac:structured-macro> Example: Code Block |
---|
SELECT ID FROM MXP.MXP_MONITOR WHERE NAME = '@INSERT[NAME]' |
will be rendered to Code Block |
---|
SELECT ID FROM MXP.MXP_MONITOR WHERE NAME = 'MyMonitor' |
if the variable NAME has the string value MyMonitor . |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="42a5bc0fab8f535c-4c288d09-475d4ceb-9b8d9c1b-b9535727b37ab8160d24793a"><ac:plain-text-body><![CDATA[ | @USE[<statementName>] | Replace the tag with the rendered content of the statement with name <statementName> of the same context. ]]></ac:plain-text-body></ac:structured-macro> Example: Code Block |
---|
<statement name="select.id"> \\
SELECT ID \\
</statement> \\
<statement name="select.monitor.id.by.name"> \\
@USE[select.id] FROM MXP.MXP_MONITOR WHERE NAME = @VALUE[NAME] \\
</statement> |
will be rendered to Code Block |
---|
SELECT ID FROM MXP.MXP_MONITOR WHERE NAME = 'MyMonitor' |
if the variable NAME has the string value MyMonitor . |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="329eb76a6fe3a73a-7c2c7bd7-415e4634-92189a86-aaefa4d56336d8f04212641a"><ac:plain-text-body><![CDATA[ | @IF[<stmt>,<test>,<value>,..] | Replace the tag with the statement with name <stmt> if the condition <test> is true for the MIB Explorer variable references <value1> through <valueN>. ]]></ac:plain-text-body></ac:structured-macro> Example: Code Block |
---|
<statement name="monitor.dataset.by.id"> \\
SELECT * FROM MXP.MXP_MONITORDATASET WHERE MONITOR_ID = @VALUE\[ID\] \\
@IF\[and.nameOrDataType,not-null,NAME,DATATYPE\] \\
ORDER BY MONITOR_ID,DATATYPE \\
</statement> \\
<statement name="and.nameOrDataType"> \\
AND (NAME = @VALUE\[NAME\] OR DATATYPE = @VALUE\[DATATYPE\]) \\
</statement> |
will be rendered to Code Block |
---|
SELECT * FROM MXP.MXP_MONITORDATASET WHERE MONITOR_ID = ? AND (NAME = ? OR DATATYPE = ?) ORDER BY MONITOR_ID,DATATYPE |
if the MIB Explorer variables NAME and DATATYPE are not null . |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="6484c148f3b3e6da-2c549ce0-49e14cfd-b467a66a-18b8a90bc0406098d8709f9b"><ac:plain-text-body><![CDATA[ | @IFELSE[<stmtTrue>, <stmtFalse>,<test>, <value>..] | Replace the tag with the statement with name <stmtTrue> if the condition <test> is true for the MIB Explorer variable references <value1> through <valueN> . Otherwise, replace the tag with the statement with name <stmtFalse> . ]]></ac:plain-text-body></ac:structured-macro> Example: Code Block |
---|
<statement name="monitor.dataset.by.id"> \\
SELECT * FROM MXP.MXP_MONITORDATASET WHERE MONITOR_ID = @VALUE\[ID\] \\
@IFELSE\[dataTypeNotNull,dataTypeNull,not-null,DATATYPE\] \\
</statement> \\
<statement name="dataTypeNull"> \\
AND DATATYPE IS NULL \\
</statement> \\
<statement name="dataTypeNotNull"> \\
AND DATATYPE IS NOT NULL \\
</statement> |
will be rendered to Code Block |
---|
SELECT * FROM MXP.MXP_MONITORDATASET WHERE MONITOR_ID = ? AND DATATYPE IS NOT NULL |
if the MIB Explorer variables DATATYPE is not null . Otherwise, the statement would be rendered as: Code Block |
---|
SELECT * FROM MXP.MXP_MONITORDATASET WHERE MONITOR_ID = ? AND DATATYPE IS NULL |
|
The tags @IF
and @IFELSE
insert a statement depending on the truth of a condition. The supported condition rules are listed by the following table.
Test Condition | Description |
---|
exists | Is true if all parameters exists. A parameter value might still be null though. |
not-exists | Is true if at least one of the parameters does not exists. |
is-null | Is true if at least one parameter is null or does not exists. |
not-null | Is true if all parameters are not null and exist. |
= | Is true if all parameters are equal to the first parameter. |
!= | Is true if all parameters (starting from the second one) are not equal to the first parameter. |
< | Is true if the first parameter is less than all the following parameters. |
> | Is true if the first parameter is greater than all the following parameters. |
<= | Is true if the first parameter is less or equal than all the following parameters. |
>= | Is true if the first parameter is greater or equal than all the following parameters. |