Qore DatasourceProvider Module Reference
1.0
|
The DatasourceProvider module provides an API for providing Datasource connection strings.
To use this module, use "%requires DatasourceProvider"
in your code.
All the public symbols in the module are defined in the DatasourceProvider namespace
Functions:
This module uses the "QORE_DATASOURCE_PROVIDERS"
environment variable to load datasource provider modules. Each datasource provider module must provide a single public function called get_mod_ds_string()
with the following signature:
If the string is not a valid identifier for a datasource, the function should throw an exception (any exception; the exception is not displayed by default).
Datasource provider modules declared in the "QORE_DATASOURCE_PROVIDERS"
environment variable must be separated by the platform-specific PathSep character as in the following examples:
export QORE_DATASOURCE_PROVIDERS=MyDatasourceProvider:OtherDatasourceProvider
set QORE_DATASOURCE_PROVIDERS=MyDatasourceProvider;OtherDatasourceProvider
$env:QORE_DATASOURCE_PROVIDERS="MyDatasourceProvider;OtherDatasourceProvider"