Qore DatasourceProvider Module Reference  1.0

DatasourceProvider Module Introduction

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


Datasource Provider Modules

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:

public string sub get_mod_ds_string(string str) {}

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:

Unix Example
export QORE_DATASOURCE_PROVIDERS=MyDatasourceProvider:OtherDatasourceProvider
Windows CMD.EXE Example
set QORE_DATASOURCE_PROVIDERS=MyDatasourceProvider;OtherDatasourceProvider
Windows PowerShell Example

Release Notes

DatasourceProvider 1.0