Helper class that resolves a SQLite connection and credential parameters, validates them and generates a connection URI.
Implements: IReferenceable, IConfigurable
Description
Within database management, the SqliteConnectionResolver class plays a crucial role as it not only resolves SQLite connections and credential parameters but also takes charge of validating these crucial elements, ensuring their accuracy and security, ultimately leading to the generation of reliable and efficient connection URIs for smooth database interactions.
Important points
- It is able to process multiple connections to SQLite cluster nodes.
Configuration parameters
- connection(s):
- discovery_key: (optional) key to retrieve the connection from IDiscovery
- database: database file path
- uri: resource URI with file:// protocol
References
- *:discovery:*:*:1.0 - (optional) IDiscovery services
- *:credential-store:*:*:1.0 - (optional) ICredentialStore stores to resolve credentials
Fields
Instance methods
configure
Configures a component by passing its configuration parameters.
public
configure(config: ConfigParams): void
- config: ConfigParams - configuration parameters to be set.
resolve
Resolves a SQLite connection URI from connection and credential parameters.
public
resolve(context: IContext): Promise<string>
- context: IContext - (optional) a context to trace execution through a call chain.
- returns: Promise<string> - resolved config.
setReferences
Sets references to dependent components.
public
setReferences(references: IReferences): void
- references: IReferences - references to locate the component’s dependencies.