JSConnectionDefinition

Overview

A runtime data-source server connection, that can be accessed via "datasources.db.myserver.defineClientConnection()" at runtime. You can configure the Database Server to create connections for current client using properties of this JSConnectionDefinition. Things like username, password or connection properties can be adjusted.

Methods Summarized

TypeNameSummary

Registers this JSConnectionDefinition to the server with the current configuration.

void

Destoyes this JSConnectonDefintion, this unregisteres this on the server so it will not use this configuration anymore to create connections.

returns the password that was set by password(string)

Sets the password to use for this client connection.

Set a key value pair that is used as a connection property for this connection definition

returns the username that was set by username(string)

Sets the username to use for this client connection.

Methods Detailed

create()

Registers this JSConnectionDefinition to the server with the current configuration. After this call all connections to that database will use the configuration of this definition.

Returns: JSConnectionDefinition The this if it could be created, this will return null if there was a creating this definition (check logs)

destroy()

Destoyes this JSConnectonDefintion, this unregisteres this on the server so it will not use this configuration anymore to create connections.

Returns: void

password()

returns the password that was set by password(string)

Returns: String the password for this connection.

password(password)

Sets the password to use for this client connection.

Parameters

Returns: JSConnectionDefinition this

setProperty(key, value)

Set a key value pair that is used as a connection property for this connection definition

Parameters

Returns: JSConnectionDefinition this

username()

returns the username that was set by username(string)

Returns: String the username for this connection.

username(username)

Sets the username to use for this client connection.

Parameters

Returns: JSConnectionDefinition this


Last updated