MentDB, The digital brain.  About us Home
Back / All functions / Script

MQL functions can be saved in a script.
You can call these scripts inside the mental processes.
Or directly in web-service.

script create script create|insert|addscript updatescript set delayscript getscript generate createscript generate updatescript copyscript copy allscript renamescript rename allscript existscript showscript show ghostscript export_allscript import_allexecutecallincludescript is grantedscript generate urlscript generate delayscript generate executescript generate stackscript generate callscript generate includescript show groupsscript show usersscript deletescript delete all

script create <method> <scriptName> <activateLog> <nbAttempt> <variables> <desc> <script> <return>

Synonymous

    script create|insert|add

Description

    To create a new script

Parameters

    method:   The method (post|get|put|delete|exe|conf|app) - string - required
    scriptName:   The script name - string - required
    activateLog:   Activate the log activity (true|false) - boolean - required
    nbAttempt:   Nb attempt to execute into the stack - number - required
    variables:   The variables object - string - required
    desc:   The description of the script action - string - required
    script:   The script - string - required
    return:   The description of the return value - string - required
admin
script create post "addition" false 1 (param (var "[v1]" {type is_double [v1]} "description ..." is_null:true is_empty:true "example ...") (var "[v2]" {type is_double [v2]} "description ..." is_null:true is_empty:true "example ...") ) "description ..." { + [v1] [v2]; } "Return ...";
mentdb
Script added with successful.

script update <scriptName> <activateLog> <nbAttempt> <variables> <desc> <script> <return>

Description

    To update a script

Parameters

    scriptName:   The script name - string - required
    activateLog:   Activate the log activity (true|false) - boolean - required
    nbAttempt:   Nb attempt to execute into the stack - number - required
    variables:   The variables separate by ',' - string - required
    desc:   The description of the script action - string - required
    script:   The script - string - required
    return:   The description of the return value - string - required
admin
script update "addition.post" false 1 (param (var "[v1]" {type is_double [v1]} "description ..." is_null:true is_empty:true "example ...") (var "[v2]" {type is_double [v2]} "description ..." is_null:true is_empty:true "example ...") ;) "description ..." { + [v1] [v2]; } "Return ...";
mentdb
Script updated with successful.

script set delay <scriptName> <delayValue> <delayType> <delayCondition>

Description

    To the delay options

Parameters

    scriptName:   The script name - string - required
    delayValue:   The delay value - string - required
    delayType:   The delay type (sec|min|hour|day|month|year) - string - required
    delayCondition:   The delay condition - string - required
admin
script set delay "addition.post" 10 day { true }
mentdb
1

script get <scriptName>

Description

    To get a script object

Parameters

    scriptName:   The script name - string - required
admin
script get "addition.post"
mentdb
{
"delay_condition": "\n\ttrue\n;",
"delay_type": "day",
"activateLog": "0",
"mql": "\n\t\n\t+ [v1] [v2];\n\t\n",
"groups": {
"mentdb": 0
},
"k": "addition.post",
"vars": "param\n \t(var \"[v1]\" {type is_double [v1]} \"description ...\" is_null:true is_empty:true \"example ...\")\n \t(var \"[v2]\" {type is_double [v2]} \"description ...\" is_null:true is_empty:true \"example ...\")\n ;",
"nbAttempt": "1",
"return": "Return ...",
"delay_value": "10",
"desc": "description ..."
}

script generate create <scriptName>

Description

    To generate a create script request

Parameters

    scriptName:   The script name - string - required
admin
script generate create "addition.post"
mentdb
script create post "addition" false 1 (param (var "[v1]" {type is_double [v1]} "description ..." is_null:true is_empty:true "example ...") (var "[v2]" {type is_double [v2]} "description ..." is_null:true is_empty:true "example ...") ;) "description ..." { + [v1] [v2]; } "Return ...";

script generate update <scriptName>

Description

    To generate an update script request

Parameters

    scriptName:   The script name - string - required
admin
script generate update "addition.post"
mentdb
script update "addition.post" false 1 (param (var "[v1]" {type is_double [v1]} "description ..." is_null:true is_empty:true "example ...") (var "[v2]" {type is_double [v2]} "description ..." is_null:true is_empty:true "example ...") ;) "description ..." { + [v1] [v2]; } "Return ...";

script copy <oldScriptName> <method> <newScriptName>

Description

    To copy a script

Parameters

    oldScriptName:   The old script name - string - required
    method:   The method (post|get|put|delete) - string - required
    newScriptName:   The new script name - string - required
admin
script copy "addition.post" post "addition2"
mentdb
1

script copy all <startsWithScriptName> <replacement>

Description

    To copy all scripts

Parameters

    startsWithScriptName:   The starts with script name - string - required
    replacement:   The replacement path - string - required
admin
script copy all "addition." "addition3."
mentdb
1

script rename <oldScriptName> <method> <newScriptName>

Description

    To rename a script

Parameters

    oldScriptName:   The old script name - string - required
    method:   The method (post|get|put|delete) - string - required
    newScriptName:   The new script name - string - required
admin
script rename "addition2.post" post "addition4"
mentdb
1

script rename all <startsWithScriptName> <replacement>

Description

    To rename all scripts

Parameters

    startsWithScriptName:   The starts with script name - string - required
    replacement:   The replacement path - string - required
admin
script rename all "addition4." "addition5."
mentdb
1

script exist <scriptName>

Description

    To check if a script already exist

Parameters

    scriptName:   The script name - string - required
admin
script exist "addition.post"
mentdb
1

script show

Description

    To show all scripts

admin
script show
mentdb
{
"app.100.obj.chartjs.time_courbe.exe": 0,
"app.100.template.default.page.login.exe": 0,
"file.remote.sftp.config.get": 0,
"file.remote.ftp.config.get": 0,
"app.100.obj.form.control.checkbox_line.exe": 0,
"app.100.obj.form.control.textbox.mail.exe": 0,
"app.100.obj.chartjs.time_basic.exe": 0,
"file.remote.cifs.config.get": 0,
"app.100.obj.list.begin.exe": 0,
"app.100.obj.chartjs.line_courbe_fill.exe": 0,
"demo.file.pop3.download.post": 0,
"app.100.obj.bootstrap.col.begin.exe": 0,
"app.100.obj.form.control.textbox.date_en.exe": 0,
"brain.mental.action.parser.cut_msg.post": 0,
"app.100.obj.form.control.radio_line.exe": 0,
"app.100.obj.chartjs.line_stepped_before.exe": 0,
"demo.file.sftp.download.post": 0,
"app.100.template.default.html.body_top.exe": 0,
"stimulation.msg.load_last.post": 0,
"app.100.obj.form.control.textbox.tel.exe": 0,
"brain.mental.action.db.search_strategy.post": 0,
"app.100.obj.form.control.textbox.datetime_fr.exe": 0,
"db.sqlserver.config.get": 0,
"app.100.template.jimdev.conf": 0,
"action.execute_relation_rs.post": 0,
"db.postgresql.config.get": 0,
"app.100.template.jimdev.page.user.exe": 0,
"demo.file.ftp.download.post": 0,
"brain.mental.action.strategy.get_last.post": 0,
"app.100.template.default.html.menu_left.exe": 0,
"demo.file.ftps.upload.post": 0,
"brain.mental.process.test.post": 0,
"app.100.template.default.html.bar_top.exe": 0,
"db.hsql.server.config.get": 0,
"mentdb.remote.config.get": 0,
"app.100.template.jimdev.page.login.exe": 0,
"app.100.obj.progress_bar.exe": 0,
"app.100.start.exe": 0,
"app.100.template.jimdev.html.body_bottom.exe": 0,
"action.redirection_relation.post": 0,
"app.100.obj.chartjs.bar_stacked.exe": 0,
"app.100.template.jimdev.page.home.exe": 0,
"app.100.obj.form.begin.exe": 0,
"app.100.obj.form.control.textbox.date_fr.exe": 0,
"app.100.template.jimdev.page.help.exe": 0,
"app.100.obj.form.control.textbox.password.exe": 0,
"db.h2.embedded.config.get": 0,
"app.100.template.default.conf": 0,
"perf.symbol.post": 0,
"db.mysql.config.get": 0,
"demo.file.csv.parse.post": 0,
"mail.imap.config.get": 0,
"app.100.obj.form.control.textbox.text.exe": 0,
"demo.sql.get": 0,
"app.100.obj.chartjs.pie.exe": 0,
"demo.file.copy_text.post": 0,
"db.db2.config.get": 0,
"demo.file.excelx.parse.post": 0,
"app.100.template.jimdev.app": 0,
"db.hsql.embedded.config.get": 0,
"addition.post": 0,
"perf.node.post": 0,
"app.100.obj.onload.exe": 0,
"boot.execute.on.start.post": 0,
"app.100.obj.sparkline.exe": 0,
"app.100.template.default.page.user.exe": 0,
"app.100.obj.bootstrap.col.end.exe": 0,
"data_type.create.post": 0,
"perf.relation.post": 0,
"app.100.template.default.page.home.exe": 0,
"mail.pop3.config.get": 0,
"db.as400.config.get": 0,
"brain.mental.action.exe.check_strategy.post": 0,
"app.100.obj.form.control.select_mono.exe": 0,
"app.100.obj.form.control.hidden.exe": 0,
"file.remote.ftps.config.get": 0,
"db.firebird.config.get": 0,
"app.100.template.jimdev.html.body_top.exe": 0,
"app.100.obj.form.control.select_multiple.exe": 0,
"demo.file.sftp.upload.post": 0,
"app.100.obj.form.control.textbox.range.exe": 0,
"brain.mental.process.click.post": 0,
"db.derby.embedded.config.get": 0,
"demo.file.ftps.download.post": 0,
"app.100.obj.form.control.textbox.file.exe": 0,
"app.100.obj.chartjs.doughnut.exe": 0,
"file.remote.ssh.config.get": 0,
"app.100.obj.form.control.textbox.datetime_en.exe": 0,
"app.100.obj.chartjs.line_point.exe": 0,
"app.100.obj.form.control.textarea.exe": 0,
"app.100.obj.chartjs.bar_horizontal_stacked.exe": 0,
"app.100.obj.chartjs.time_courbe_fill.exe": 0,
"demo.file.copy_bytes.post": 0,
"demo.mentdb.execute.post": 0,
"app.100.obj.chartjs.polar.exe": 0,
"boot.execute.on.shutdown.post": 0,
"thought.create.post": 0,
"app.100.template.default.page.help.exe": 0,
"action.execute_relation_ra.post": 0,
"app.100.template.default.app": 0,
"db.derby.server.config.get": 0,
"db.oracle.config.get": 0,
"stack.process_stack.post": 0,
"brain.mental.action.parser.parse_sentences.post": 0,
"demo.file.json.array.parse.post": 0,
"demo.file.parse_text.post": 0,
"brain.internal.stimulate.post": 0,
"app.100.template.jimdev.html.bar_top.exe": 0,
"demo.file.ftp.upload.post": 0,
"perf.word.post": 0,
"brain.mental.action.exe.start_strategy.post": 0,
"demo.file.json.obj.parse.post": 0,
"word.create.post": 0,
"action.closed.post": 0,
"app.100.obj.kpi.exe": 0,
"app.100.obj.form.control.textbox.time.exe": 0,
"mail.process_mail.post": 0,
"server.version.post": 0,
"app.100.obj.chartjs.line_stepped_after.exe": 0,
"app.100.obj.chartjs.line_courbe.exe": 0,
"mail.smtp.config.get": 0,
"app.100.obj.chartjs.time_basic_fill.exe": 0,
"demo.file.excel.parse.post": 0,
"action.relation_redirection.post": 0,
"app.100.obj.form.control.textbox.number.exe": 0,
"brain.mental.action.db.basic_search.post": 0,
"brain.mental.process.initialize.post": 0,
"file.local.config.get": 0,
"app.100.obj.chartjs.radar.exe": 0,
"demo.file.xml.parse.post": 0,
"app.100.obj.chartjs.dataset.init.exe": 0,
"action.execute_relation_rl.post": 0,
"app.100.obj.chartjs.line_basic_fill.exe": 0,
"action.sentences_closed.post": 0,
"app.100.obj.form.control.textbox.color.exe": 0,
"addition4.post": 0,
"app.100.obj.gauge_meter.exe": 0,
"server.info.post": 0,
"app.100.obj.chartjs.bar_horizontal.exe": 0,
"app.100.template.default.html.body_bottom.exe": 0,
"app.100.obj.form.end.exe": 0,
"perf.thought.post": 0,
"word.create_fr_en.post": 0,
"app.100.obj.chartjs.bar.exe": 0,
"server.reset_id.post": 0,
"demo.file.imap.download.post": 0,
"app.100.obj.chartjs.line_basic.exe": 0,
"brain.ws.stimulate.post": 0,
"app.100.obj.form.control.checkbox_inline.exe": 0,
"w_th.post": 0,
"app.100.template.jimdev.html.menu_left.exe": 0,
"lib.value.check.v1.exe": 0,
"action.relation_response.post": 0,
"brain.mental.action.db.deep_search.post": 0,
"db.h2.server.config.get": 0,
"demo.file.parse_dir.post": 0,
"log.remove_with_retention.post": 0,
"app.100.obj.form.control.radio_inline.exe": 0
}

script show ghost

Description

    To show all ghost scripts

admin
script show ghost
mentdb
{}

script export_all

Description

    To export all scripts

admin
script export_all
mentdb
Scripts exported with successfully.

script import_all

Description

    To import all scripts

admin
script import_all;1
mentdb
Warning, mental scripts are loaded into the editor ...

execute <scriptName> <varName1> <varlue1> <varNameN> <varlueN>

Description

    To execute a script in a new environment

Parameters

    scriptName:   The script name - string - required
    varName1:   The variable name 1 - string - not required
    varlue1:   The value 1 - string - not required
    varNameN:   The variable name N - string - not required
    varlueN:   The value N - string - not required
admin
execute "addition.post" "[v1]" 10 "[v2]" 5
mentdb
15

call <scriptName> <varName1> <varlue1> <varNameN> <varlueN>

Description

    To execute a script in the parent environment

Parameters

    scriptName:   The script name - string - required
    varName1:   The variable name 1 - string - not required
    varlue1:   The value 1 - string - not required
    varNameN:   The variable name N - string - not required
    varlueN:   The value N - string - not required
admin
call "addition.post" "[v1]" 10 "[v2]" 5
mentdb
15

include <scriptName>

Description

    To execute a script in the parent environment

Parameters

    scriptName:   The script name - string - required
admin
include "addition.post" "[v1]" 10 "[v2]" 5
mentdb
15

script is granted <scriptName> <login>

Description

    To check if a script is granted to a specific user

Parameters

    scriptName:   The script name - string - required
    login:   The login - string - required
admin
script is granted "addition.post" "admin"
mentdb
1

script generate url <scriptName>

Description

    To generate an URL to execute a mental script

Parameters

    scriptName:   The script name - string - required
admin
script generate url "addition.post"
mentdb
Method Header x-token = (empty or not define the first time) x-user = mentdb (required the first time) x-password = ***** (required the first time) URL https://localhost:9999/api/?x-token=&x-user=&x-password=&v1=&v2=

script generate delay <scriptName>

Description

    To generate delay options

Parameters

    scriptName:   The script name - string - required
admin
script generate delay "addition.post"
mentdb
j23i88m90m76i39t04r09y35p14a96y09e57t36script set delay "addition.post" 10 day { true ;};

script generate execute <scriptName>

Description

    To generate a MQL execute script

Parameters

    scriptName:   The script name - string - required
admin
script generate execute "addition.post"
mentdb
execute "addition.post" "[v1]" "example ..." "[v2]" "example ..." ;

script generate stack <scriptName>

Description

    To generate a MQL stack script

Parameters

    scriptName:   The script name - string - required
admin
script generate stack "addition.post"
mentdb
stack (date now) "addition.post" "[v1]" "example ..." "[v2]" "example ..." ;

script generate call <scriptName>

Description

    To generate a MQL call script

Parameters

    scriptName:   The script name - string - required
admin
script generate call "addition.post"
mentdb
call "addition.post" "[v1]" "example ..." "[v2]" "example ..." ;

script generate include <scriptName>

Description

    To generate a MQL call script

Parameters

    scriptName:   The script name - string - required
admin
script generate include "addition.post"
mentdb
include "addition.post" "[v1]" "example ..." "[v2]" "example ..." ;

script show groups <scriptName>

Description

    To show all groups for a specific script

Parameters

    scriptName:   The script name - string - required
admin
script show groups "addition.post"
mentdb
{ "sys": 0, "mentdb": 0 }

script show users <scriptName>

Description

    To show all granted users for a specific script

Parameters

    scriptName:   The script name - string - required
admin
script show users "addition.post"
mentdb
{ "ai": 0, "admin": 0, "mentdb": 0 }

script delete <scriptName>

Description

    To delete a script

Parameters

    scriptName:   The script name - string - required
admin
script delete "addition.post"
mentdb
Script deleted with successful.

script delete all <startsWithScriptName>

Description

    To delete all scripts

Parameters

    startsWithScriptName:   The starts with script name - string - required
admin
script delete all "addition"
mentdb
1




© 2012 - 2018 - Innov-AI.