Skip to main content
Skip table of contents

Connection-level Interface Management

All currently available connection-level interface templates are listed in the CliTemplates system table. It has the following fields:

Column Name

Type

Description

id

biginteger

Template ID
namestringTemplate name
createScriptstringCLI script which creates a data source/resource adapter
dropScriptstringCLI script which removes a data source/resource adapter
hiddenPropsstringComma-separated list of properties that will be stored encrypted
creationDatetimestampTemplate creation date
lastModifiedDatetimestampTemplate last modification date
creatorstringName of the user who created the template
modifierstringName of the user who last modified the template
translatorstringTranslator name

SYSADMIN.addCliTemplate

This procedure adds a new CLI template with a specified name.

SQL
CREATE FOREIGN PROCEDURE addCliTemplate(IN name string NOT NULL, IN createScript string NOT NULL, IN dropScript string NOT NULL, IN hiddenProps string, OUT id biginteger NOT NULL RESULT)

Example

SQL
CALL "SYSADMIN.addCliTemplate"(
	"name" => 'mongodb2'/* Optional */,
	"properties" => '
	property "host" {default "localhost"}
	property "server" { default "localhost"; }
	property "port" { type "int"; default "27017" }
	property "database" { required; quoted }
	property "authSource" { quoted }
	property "readMode" { quoted }
	property "options" { quoted }
	property "login" {}
	property "password" { quoted; hidden }
	'/* Optional */,
	"createScript" => '{
	param ra pool size "0" "100";
		start ra "dv-connector-mongodb.rar" "com.datavirtuality.dv.core.resource.adapter.mongodb.MongoDbManagedConnectionFactory";
		ifset (host) {
			param ra "server" host;
		} else {
			param ra server;
		}
		param ra port;
		param ra database;
		ifset (authSource)
			param ra authSource;
		ifset (readMode)
			param ra readMode;
		ifset (options)
			param ra options;
		ifset (login)
			param ra login;
		ifset (login)
			param ra password;
		enable ra;
	}'/* Optional */,
	"dropScript" => '{ remove ds; }'/* Optional */,
	"translator" => 'mongodb'/* Optional */
);;


SYSADMIN.editCliTemplate

This procedure edits a CLI template with a specified id assigning it a new namecreateScript, and dropScriptnamecreateScript, and dropScript may be set to NULLProperties that should be stored encrypted can be specified by providing them as a comma-separated list via hiddenProps.

 Arguments set to NULL will not be changed during the call.

SQL
CREATE FOREIGN PROCEDURE editCliTemplate(IN id biginteger NOT NULL, IN name string, IN createScript string, IN dropScript string, IN hiddenProps string)

Example

SQL
CALL "SYSADMIN.editCliTemplate"(
	"id" => 9/* Mandatory */,
	"name" => 'mongodb2'/* Optional */,
	"properties" => ' 
	property "host" {default "localhost"} 
	property "server" { default "localhost"; }
	property "port" { type "int"; default "27017" }
	property "database" { required; quoted }
	property "authSource" { quoted }
	property "readMode" { quoted }
	property "options" { quoted }
	property "login" {}
	property "password" { quoted; hidden } 
	'/* Optional */,
	"createScript" => '{ 
		param ra pool size "0" "100";
		start ra "dv-connector-mongodb.rar" "com.datavirtuality.dv.core.resource.adapter.mongodb.MongoDbManagedConnectionFactory";
		ifset (host) {
			param ra "server" host;
		} else {
			param ra server;
		}
		param ra port;
		param ra database;
		ifset (authSource)
			param ra authSource;
		ifset (readMode)
			param ra readMode;
		ifset (options)
			param ra options;
		ifset (login)
			param ra login;
		ifset (login)
			param ra password;
		enable ra;
	}'/* Optional */,
	"dropScript" => '{ remove ds; }'/* Optional */,
	"translator" => 'mongodb'/* Optional */
);;

SYSADMIN.dropCliTemplate

This procedure drops a CLI template with the specified id.

SQL
CREATE FOREIGN PROCEDURE dropCliTemplate(IN id biginteger NOT NULL)

SYSADMIN.resetCliTemplates

This procedure restores default templates.

SQL
CREATE FOREIGN PROCEDURE resetCliTemplates()
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.