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

Here you can manage connections.

cm set mentdbcm set as400cm set db2cm set derby_embeddedcm set derby_servercm set firebirdcm set h2_embeddedcm set h2_servercm set hsql_embeddedcm set hsql_servercm set mysqlcm set oraclecm set postgresqlcm set sqlservercm set filecm set ftpcm set ftpscm set sftpcm set sshcm set cifscm set smtpcm set pop3cm set imapcm showcm getcm generate_updatecm existcm remove

cm set mentdb <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_mentdb" {execute "mentdb.remote.config.get" "[hostname]" "localhost" "[port]" "9998" "[key]" "pwd" "[user]" "admin" "[password]" "pwd" "[connectTimeout]" "10000" "[readTimeout]" "30000" ;}
mentdb
1

cm set as400 <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_as400" {execute "db.as400.config.get" "[hostname]" "localhost" "[port]" "8471" "[database]" "test_db" "[user]" "bob" "[password]" "pwd" ;}
mentdb
1

cm set db2 <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_db2" {execute "db.db2.config.get" "[hostname]" "localhost" "[port]" "50000" "[database]" "test_db" "[user]" "db2admin" "[password]" "pwd" ;}
mentdb
1

cm set derby_embedded <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_derby_embedded" {execute "db.derby.embedded.config.get" "[database]" "test_db" "[user]" "sa" "[password]" "sa" ;}
mentdb
1

cm set derby_server <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_derby_server" {execute "db.derby.server.config.get" "[hostname]" "localhost, 127.0.0.1" "[port]" "1527" "[database]" "test_db" "[user]" "sa" "[password]" "sa" ;}
mentdb
1

cm set firebird <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_firebird" {execute "db.firebird.config.get" "[hostname]" "localhost" "[port]" "3050" "[database]" "test_db" "[user]" "SYSDBA" "[password]" "masterkey" ;}
mentdb
1

cm set h2_embedded <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_h2_embedded" {execute "db.h2.embedded.config.get" "[database]" "dir/test_db" "[user]" "sa" "[password]" "sa" ;}
mentdb
1

cm set h2_server <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_h2_server" {execute "db.h2.server.config.get" "[hostname]" "localhost, 127.0.0.1" "[port]" "9091" "[database]" "test_db" "[user]" "sa" "[password]" "sa" ;}
mentdb
1

cm set hsql_embedded <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_hsql_embedded" {execute "db.hsql.embedded.config.get" "[database]" "test_db" "[user]" "SA" "[password]" "SA" ;}
mentdb
1

cm set hsql_server <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_hsql_server" {execute "db.hsql.server.config.get" "[hostname]" "localhost, 127.0.0.1" "[port]" "9001" "[database]" "test_db" "[user]" "SA" "[password]" "SA" ;}
mentdb
1

cm set mysql <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_mysql" {execute "db.mysql.config.get" "[hostname]" "localhost" "[port]" "3306" "[database]" "test_db" "[user]" "bob" "[password]" "pwd" ;}
mentdb
1

cm set oracle <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_oracle" {execute "db.oracle.config.get" "[hostname]" "localhost" "[port]" "1521" "[database]" "xe" "[user]" "sys" "[password]" "pwd" ;}
mentdb
1

cm set postgresql <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_postgresql" {execute "db.postgresql.config.get" "[hostname]" "localhost" "[port]" "5432" "[database]" "test_db" "[user]" "postgres" "[password]" "pwd" ;}
mentdb
1

cm set sqlserver <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_sqlserver" {execute "db.sqlserver.config.get" "[hostname]" "localhost" "[port]" "1195" "[user]" "sa" "[password]" "pwd" ;}
mentdb
1

cm set file <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_file" {execute "file.local.config.get" "[dir]" "/Users/jimmitry/Desktop" ;}
mentdb
1

cm set ftp <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_ftp" {execute "file.remote.ftp.config.get" "[hostname]" "localhost" "[port]" "21" "[user]" "bob" "[password]" "pwd" ;}
mentdb
1

cm set ftps <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_ftps" {execute "file.remote.ftps.config.get" "[hostname]" "localhost" "[port]" "21" "[user]" "bob" "[password]" "pwd" "[protocol]" "TLS" "[isImplicit]" false "[connectTimeout]" 10000 "[dataTimeout]" 30000 "[keepAliveTimeout]" 300 ;}
mentdb
1

cm set sftp <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_sftp" {execute "file.remote.sftp.config.get" "[hostname]" "localhost" "[port]" "22" "[user]" "bob" "[password]" "pwd" "[connectTimeout]" 10000 ;}
mentdb
1

cm set ssh <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_ssh" {execute "file.remote.ssh.config.get" "[hostname]" "localhost" "[port]" "22" "[user]" "bob" "[password]" "pwd" "[connectTimeout]" 10000 ;}
mentdb
1

cm set cifs <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_cifs" {execute "file.remote.cifs.config.get" "[hostname]" "192.168.220.130" "[port]" "445" "[domaine]" "domaine" "[user]" "bob" "[password]" "pwd" "[connectTimeout]" "10000" "[readTimeout]" "30000" ;}
mentdb
1

cm set smtp <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_smtp" {execute "mail.smtp.config.get" "[hostname]" "smtp.gmail.com" "[port]" "465" "[sender]" "your-account@gmail.com" "[user]" "your-account@gmail.com" "[password]" "pwd" "[authentication]" true "[tls]" true "[connectTimeout]" "10000" "[sessionTimeout]" "60000" ;}
mentdb
1

cm set pop3 <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_pop3" {execute "mail.pop3.config.get" "[hostname]" "pop.gmail.com" "[port]" "995" "[user]" "your-account@gmail.com" "[password]" "pwd" "[tls]" false "[ssl]" true "[connectTimeout]" "10000" "[sessionTimeout]" "60000" ;}
mentdb
1

cm set imap <key> <object>

Description

    Set a connection

Parameters

    key:   The key - string - required
    object:   The JSON object - string - required
admin
cm set "demo_cm_imap" {execute "mail.imap.config.get" "[hostname]" "imap.gmail.com" "[port]" "993" "[user]" "your-account@gmail.com" "[password]" "pwd" "[auth]" false "[tls]" false "[ssl]" true "[connectTimeout]" "10000" "[sessionTimeout]" "60000" ;}
mentdb
1

cm show

Description

    Show all connections

admin
cm show
mentdb
[
"demo_cm_as400",
"demo_cm_cifs",
"demo_cm_db2",
"demo_cm_derby_embedded",
"demo_cm_derby_server",
"demo_cm_file",
"demo_cm_firebird",
"demo_cm_ftp",
"demo_cm_ftps",
"demo_cm_h2_embedded",
"demo_cm_h2_server",
"demo_cm_hsql_embedded",
"demo_cm_hsql_server",
"demo_cm_imap",
"demo_cm_mentdb",
"demo_cm_mysql",
"demo_cm_oracle",
"demo_cm_pop3",
"demo_cm_postgresql",
"demo_cm_sftp",
"demo_cm_smtp",
"demo_cm_ssh"
]

cm get <key>

Description

    Get a connection

Parameters

    key:   The key - string - required
admin
cm get "demo_cm_mysql"
mentdb
{
"driver": "com.mysql.jdbc.Driver",
"defaultSchema": "test_db",
"subType": "MySQL",
"loginTimeout": "10000",
"jdbc": "jdbc:mysql://localhost:3306/test_db",
"type": "db",
"properties": {
"password": "pwd",
"allowMultiQueries": "true",
"user": "bob"
}
}

cm generate_update <key>

Description

    Update a connection

Parameters

    key:   The key - string - required
admin
cm generate_update "demo_cm_mysql"
mentdb
json load "tmpCm" (cm get "demo_cm_mysql");
json uobject "tmpCm" / "driver" "com.mysql.jdbc.Driver" STR;
json uobject "tmpCm" / "defaultSchema" "test_db" STR;
json uobject "tmpCm" / "subType" "MySQL" STR;
json uobject "tmpCm" / "loginTimeout" "10000" STR;
json uobject "tmpCm" / "jdbc" "jdbc:mysql://localhost:3306/test_db" STR;
json uobject "tmpCm" / "type" "db" STR;
json uobject "tmpCm" /properties "password" "pwd" STR;
json uobject "tmpCm" /properties "allowMultiQueries" "true" STR;
json uobject "tmpCm" /properties "user" "bob" STR;
cm set "demo_cm_mysql" {json doc "tmpCm"};

cm exist <key>

Description

    Check if a connection id already exist

Parameters

    key:   The key - string - required
admin
cm exist "demo_cm_mysql"
mentdb
1

cm remove <key>

Description

    Remove a connection

Parameters

    key:   The key - string - required
admin
cm remove "demo_cm_mysql"
mentdb
1




© 2012 - 2018 - Innov-AI.