Helper class that resolves SQLServer connection and credential parameters, validates them and generates a connection URI.
Implements: IReferenceable, IConfigurable
Description
The SqlServerConnectionResolver class allows you to resolve connection and credential parameters, validates these parameters, and generate a connection URI.
Important points
- It is able to process multiple connections to PostgreSQL cluster nodes.
 
Configuration parameters
connection(s):
- discovery_key: (optional) key to retrieve the connection from IDiscovery
 - host: host name or IP address
 - port: port number (default: 27017)
 - database: database name
 - uri: resource URI or connection string with all parameters in it
 
credential(s):
- store_key: (optional) key to retrieve the credentials from ICredentialStore
 - username: username
 - password: user’s password
 
References
- *:discovery:*:*:1.0 - (optional) IDiscovery services
 - *:credential-store:*:*:1.0 - (optional) ICredentialStore stores to resolve credentials
 
Constructors
Creates a new instance of the connection component.
publicSqlServerConnectionResolver()
Fields
Instance methods
configure
Configures the component by passing its configuration parameters.
publicconfigure(config: ConfigParams): void
- config: ConfigParams - configuration parameters to be set.
 
resolve
Resolves SQLServer config from connection and credential parameters.
publicresolve(context: IContext): Promise<string>
- context: IContext - (optional) a context to trace execution through a call chain.
 - returns: Promise<string> - resolved connection config or raise error
 
setReferences
Sets the references to dependent components.
publicsetReferences(references: IReferences): void
- references: IReferences - references to locate the component dependencies.