To add a new connection use:
shell.storedSessions.add(name, connectionData[, override])
name: Mandatory parameter, it is the session name that identifies the connection data. This must be a valid identifier.
connectionData: Mandatory parameter, it contains the connection information and can be either a string in URI format or a connection data map containing any of the following values:
To store the connection data at least the host and dbUser parameter should be specified, the rest are optional.
override : Optional boolean parameter, used to indicate the desired behavior in case there is a stored connection data associated to the same name. Default value is false.
If override is false and connection data with the same name already exists, an error is generated.
In the same scenario, if the new connection data overrides the previous data and an error is not generated.