MentDB, The digital brain.  About me 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 add script create|insert|addscript updatescript getscript generate updatescript existscript showscript export_allscript import_allexecuteincludescript is grantedscript generate urlscript generate executescript generate includescript show groupsscript show usersscript delete

script add <scriptName> <variables> <script>

Synonymous

    script create|insert|add

Description

    To add a new script

Parameters

    scriptName:   The script name - string - required
    variables:   The variables separate by ',' - string - required
    script:   The script - string - required
admin
script add "division" "[v1],[v2]" { / [v1] [v2]; };
mentdb
Script added with successful.

script update <scriptName> <variables> <script>

Description

    To update a script

Parameters

    scriptName:   The script name - string - required
    variables:   The variables separate by ',' - string - required
    script:   The script - string - required
admin
script update "division" "[v1],[v2]" {/ [v1] [v2];};
mentdb
Script updated with successful.

script get <scriptName>

Description

    To get a script object

Parameters

    scriptName:   The script name - string - required
admin
script get "division"
mentdb
{
"mql": "/ [v1] [v2];",
"k": "division",
"vars": "[v1],[v2]"
}

script generate update <scriptName>

Description

    To generate an update script request

Parameters

    scriptName:   The script name - string - required
admin
script generate update "division"
mentdb
script update "division" "[v1],[v2]" {/ [v1] [v2];};

script exist <scriptName>

Description

    To check if a script already exist

Parameters

    scriptName:   The script name - string - required
admin
script exist "division"
mentdb
1

script show

Description

    To show all scripts

admin
script show
mentdb
{
"action.execute_relation_rl": 0,
"brain.internal_stimulation": 0,
"action.execute_relation_ra": 0,
"perf.symbol": 0,
"division": 0,
"action.search_logical": 0,
"action.select_reader": 0,
"server.version": 0,
"action.closed": 0,
"stimulation.last": 0,
"action.get_last_relation": 0,
"action.redirection_relation": 0,
"action.check_relation": 0,
"reset_server_id": 0,
"perf.relation": 0,
"process\u003cclick\u003e": 0,
"action.relation_response": 0,
"server.info": 0,
"perf.thought": 0,
"brain.stimulate": 0,
"create_word_fr_en": 0,
"perf.node": 0,
"process\u003cinitialize\u003e": 0,
"action.basic_search": 0,
"perf.word": 0,
"action.execute_relation_rs": 0,
"action.relation_redirection": 0,
"action.search_strategy": 0
}

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
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 "division" "[v1]" 10 "[v2]" 5
mentdb
2

include <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
include "division" "[v1]" 10 "[v2]" 5
mentdb
2

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 "division" "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 "division"
mentdb
http://localhost:9999/api-rest/?token=ZcbtW2arBcZsANZUrtrBMCa6rdIDIRHFIia5kTGntYzMrAcl7vj2AKkaZcikoQdGVq3wnT&script=division&v1=&v2=

script generate execute <scriptName>

Description

    To generate a MQL execute script

Parameters

    scriptName:   The script name - string - required
admin
script generate execute "division"
mentdb
execute "division"
"[v1]" ""
"[v2]" ""
;

script generate include <scriptName>

Description

    To generate a MQL include script

Parameters

    scriptName:   The script name - string - required
admin
script generate include "division"
mentdb
include "division"
"[v1]" ""
"[v2]" ""
;

script show groups <scriptName>

Description

    To show all groups for a specific script

Parameters

    scriptName:   The script name - string - required
admin
script show groups "division"
mentdb
[
"all"
]

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 "division"
mentdb
[
"mentdb",
"ai",
"admin"
]

script delete <scriptName>

Description

    To delete a script

Parameters

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




© 2012-2017 - Jimmitry Payet.