Statement
eval <mql>
Description
Evaluate an MQL expression
Evaluate an MQL expression
Parameters
mql: The MQL source code - string - required
mql: The MQL source code - string - required
admin
eval "log trace OK!;";
mentdb
1
parallel <mql1> <mqlN>
Description
Execute several commands at the same time
Execute several commands at the same time
Parameters
mql1: The first MQL command - String - required
mqlN: The Nth MQL command - String - required
mql1: The first MQL command - String - required
mqlN: The Nth MQL command - String - required
admin
parallel { log trace "1"; } { log trace "2"; } { log trace "3"; };
mentdb
[ { "result": "1", "status": "OK" }, { "result": "1", "status": "OK" }, { "result": "1", "status": "OK" } ]
if <condition> <trueAction> <falseAction>
Description
IF statement
IF statement
Parameters
condition: The condition - string - required
trueAction: The true action - boolean - required
falseAction: The false action - boolean - not required
condition: The condition - string - required
trueAction: The true action - boolean - required
falseAction: The false action - boolean - not required
admin
if (true) { log trace OK! } { log trace KO! };
mentdb
1
admin
if (true) { log trace hello! };
mentdb
1
if force <condition> <trueAction> <falseAction>
Description
IF statement (force true and false execution)
IF statement (force true and false execution)
Parameters
condition: The condition - string - required
trueAction: The true action - boolean - required
falseAction: The false action - boolean - required
condition: The condition - string - required
trueAction: The true action - boolean - required
falseAction: The false action - boolean - required
admin
if force (true) { log trace OK! } { log trace KO! };
mentdb
1
case <condition1> <action1> <conditionN> <actionN> <elseAction>
Description
CASE statement
CASE statement
Parameters
condition1: The condition 1 - boolean - required
action1: The action 1 - string - required
conditionN: The condition N - boolean - required
actionN: The action N - string - required
elseAction: The else action - string - not required
condition1: The condition 1 - boolean - required
action1: The action 1 - string - required
conditionN: The condition N - boolean - required
actionN: The action N - string - required
elseAction: The else action - string - not required
admin
case (true) {A} (false) {B} {C} ;
mentdb
A
switch <valueToSearch> <condition1> <action1> <conditionN> <actionN> <elseAction>
Description
SWITCH statement
SWITCH statement
Parameters
valueToSearch: The value to search - boolean - required
condition1: The condition 1 - boolean - required
action1: The action 1 - string - required
conditionN: The condition N - boolean - required
actionN: The action N - string - required
elseAction: The else action - string - not required
valueToSearch: The value to search - boolean - required
condition1: The condition 1 - boolean - required
action1: The action 1 - string - required
conditionN: The condition N - boolean - required
actionN: The action N - string - required
elseAction: The else action - string - not required
admin
switch (A) (A) {A} (B) {B} {C} ;
mentdb
A
mode <paramMode> <condition1> <action1> <conditionN> <actionN> <elseAction>
Description
SWITCH statement
SWITCH statement
Parameters
paramMode: The parameter mode - string - required
condition1: The condition 1 - boolean - required
action1: The action 1 - string - required
conditionN: The condition N - boolean - required
actionN: The action N - string - required
elseAction: The else action - string - not required
paramMode: The parameter mode - string - required
condition1: The condition 1 - boolean - required
action1: The action 1 - string - required
conditionN: The condition N - boolean - required
actionN: The action N - string - required
elseAction: The else action - string - not required
admin
mode SERVER_MODE (PROD) {A} (DEV) {B} {C} ;
mentdb
A
for <init> <condition> <increment> <action>
Description
FOR statement
FOR statement
Parameters
init: The initialization MQL source code - string - required
condition: The condition - boolean - required
increment: The increment - string - required
action: The action - string - required
init: The initialization MQL source code - string - required
condition: The condition - boolean - required
increment: The increment - string - required
action: The action - string - required
admin
for (-> "[i]" 0) (< [i] 45) (++ "[i]") { log trace [i]; };
mentdb
while <condition> <action>
Description
WHILE statement
WHILE statement
Parameters
condition: The condition - boolean - required
action: The action - string - required
condition: The condition - boolean - required
action: The action - string - required
admin
-> "[i]" 0; while (< [i] 45) { log trace [i]; ++ "[i]"; };
mentdb
repeat <condition> <action>
Description
REPEAT statement
REPEAT statement
Parameters
condition: The condition - boolean - required
action: The action - string - required
condition: The condition - boolean - required
action: The action - string - required
admin
-> "[i]" 0; repeat (< [i] 45) { log trace [i]; ++ "[i]"; };
mentdb
synchronized <key> <action>
Description
Synchronized MQL block
Synchronized MQL block
Parameters
key: The synchronized key - string - required
action: The action - string - required
key: The synchronized key - string - required
action: The action - string - required
admin
synchronized ("KEY") { log trace "OK"; }
mentdb
break
Description
Break a FOR/WHILE/REPEAT/SQL_PARSE/CSV_PARSE/HTML_PARSE/JSON_PARSE_OBJ/JSON_PARSE_ARRAY statement
Break a FOR/WHILE/REPEAT/SQL_PARSE/CSV_PARSE/HTML_PARSE/JSON_PARSE_OBJ/JSON_PARSE_ARRAY statement
admin
break
mentdb
BREAK
continue
Description
Stop the current iteration and continue the loop: FOR/WHILE/REPEAT/SQL_PARSE/CSV_PARSE/HTML_PARSE/JSON_PARSE_OBJ/JSON_PARSE_ARRAY statement
Stop the current iteration and continue the loop: FOR/WHILE/REPEAT/SQL_PARSE/CSV_PARSE/HTML_PARSE/JSON_PARSE_OBJ/JSON_PARSE_ARRAY statement
admin
continue
mentdb
CONTINUE
exception <id> <message>
Description
EXCEPTION statement
EXCEPTION statement
Parameters
id: The error message id - string - required
message: The error message - string - required
id: The error message id - string - required
message: The error message - string - required
admin
exception (1) ("your message ...");
mentdb
1: your message ...
try <action> <errorAction> <idException>
Description
TRY statement
TRY statement
Parameters
action: The main action - string - required
errorAction: The action to execute if an error is raised - string - required
idException: The variable that receives the error message - string - required
action: The main action - string - required
errorAction: The action to execute if an error is raised - string - required
idException: The variable that receives the error message - string - required
admin
try { exception (1) ("your messffage ..."); } { log trace [err]; } "[err]";
mentdb
1
