SqliteConnectionResolver

Helper class that resolves a SQLite connection and credential parameters, validates them and generates a connection URI.

Implements: IReferenceable, IConfigurable

Description

The SqliteConnectionResolver class is used to resolve SQLite connections and credential paramters, validate them and generate connection URIs.

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

_connectionResolver

Connection resolver

protected _connectionResolver: ConnectionResolver

_credentialResolver

Credential resolver

protected _credentialResolver: CredentialResolver

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(correlationId: string): Promise<string>

  • correlationId: string - (optional) transaction id used to trace execution through the 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.