DataProvider.qc.dox.h
// -*- mode: c++; indent-tabs-mode: nil -*-
namespace DataProvider {
class DataProvider {
public:
const FactoryMap = ...;
const TypeMap = ...;
const FactoryModuleList = keys (map {$1: True}, FactoryMap.iterator());
// "map" is used above to ensure that the values only appear once in the final list
protected:
static hash<string, AbstractDataProviderFactory> factory_cache;
static hash<string, string> factory_module_map;
static Mutex factory_cache_lock();
static DataProviderTypeCache type_cache();
static hash<string, string> type_module_map;
static bool allow_env_config = False;
static bool env_config_locked = False;
static hash<string, bool> mod_map;
public:
static registerFactory(AbstractDataProviderFactory factory);
static *AbstractDataProviderFactory getFactory(string name);
static AbstractDataProviderFactory getFactoryEx(string name);
static AbstractDataProvider getFactoryObject(string path, *hash<auto> options);
static AbstractDataProvider getFactoryObjectFromString(string name);
static AbstractDataProvider getFactoryObjectFromStringUseEnv(string name);
protected:
static hash<FactoryInfo> getFactoryInfoFromString(string name);
public:
static *list<string> listFactories();
static DataProviderTypeCache getTypeCache();
static registerType(string path, AbstractDataProviderType type);
static *AbstractDataProviderType getType(string path);
static AbstractDataProviderType getTypeEx(string path);
static DataProviderTypeEntry getTypeRoot();
static lockAllTypes();
static *list<string> listTypes();
static registerKnownFactories();
static loadProvidersFromEnvironment();
static *AbstractDataProvider tryLoadProviderForConnectionFromEnv(string name);
static registerKnownTypes();
static loadTypesFromEnvironment();
static hash<auto> getInfoAsData(hash<auto> info0);
static setAutoConfig();
static bool getAutoConfig();
static list<string> getPathList(string path);
protected:
static checkRequest();
public:
protected:
static *string tryGetFactoryModuleName(string name);
public:
protected:
static *string tryGetTypeModuleName(string name);
public:
protected:
static *string tryGetModuleName(string name, string func, string type);
public:
protected:
static *DataProviderTypeEntry tryLoadTypeFromPath(list<string> type_path);
public:
protected:
static bool tryLoad(string module_str, *bool verbose);
public:
protected:
static *object loadFromEnvironment(string func, string type, *hash<SymbolInfo> info);
public:
protected:
static *object checkSymbol(hash<SymbolInfo> info);
public:
protected:
static bool checkInjection(object obj, hash<string, string> module_map);
public:
};
// private hashdecls
hashdecl SymbolInfo {
// symbol type
string type;
// symbol name
string name;
}
hashdecl FactoryInfo {
// factory name
string name;
// path to final data provider in factory
list<string> path_list;
// factory options
auto options;
}
}
DataProvider::DataProviderTypeEntry
the DataProviderTypeEntry class
Definition: DataProviderTypeEntry.qc.dox.h:55
DataProvider::AbstractDataProvider
The AbstractDataProvider class.
Definition: AbstractDataProvider.qc.dox.h:194
DataProvider::DataProvider::factory_module_map
static hash< string, string > factory_module_map
data provider factory module map
Definition: DataProvider.qc.dox.h:49
True
const True
False
const False
DataProvider::AbstractDataProviderFactory
Data provider factory class.
Definition: AbstractDataProviderFactory.qc.dox.h:28
DataProvider::DataProvider::mod_map
static hash< string, bool > mod_map
set of module already loaded
Definition: DataProvider.qc.dox.h:69
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:93
DataProvider::DataProvider::factory_cache
static hash< string, AbstractDataProviderFactory > factory_cache
data provider factory cache
Definition: DataProvider.qc.dox.h:46
type
string type(auto arg)
DataProvider::DataProvider::type_module_map
static hash< string, string > type_module_map
data provider type module map
Definition: DataProvider.qc.dox.h:58
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:32
DataProvider::DataProviderTypeCache
Data provider type cache class.
Definition: DataProviderTypeCache.qc.dox.h:29