| Qore DataProvider Module Reference 1.2.1

DataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3
26 namespace DataProvider {
29 class DataProvider {
30
31 public:
33 const FactoryMap = ...;
34
35
37 const TypeMap = ...;
38
39
41 const FactoryModuleList = keys (map {$1: True}, FactoryMap.iterator());
42 // "map" is used above to ensure that the values only appear once in the final list
43
44 protected:
46 static hash<string, AbstractDataProviderFactory> factory_cache;
47
49 static hash<string, string> factory_module_map;
50
52 static Mutex factory_cache_lock();
53
55 static DataProviderTypeCache type_cache();
56
58 static hash<string, string> type_module_map;
59
61
63 static bool allow_env_config = False;
64
66 static bool env_config_locked = False;
67
69 static hash<string, bool> mod_map;
70
71 public:
72
74
78 static registerFactory(AbstractDataProviderFactory factory);
79
81 static *AbstractDataProviderFactory getFactory(string name);
82
84
90 static AbstractDataProviderFactory getFactoryEx(string name);
91
93
98 static AbstractDataProvider getFactoryObject(string path, *hash<auto> options);
99
101
110 static AbstractDataProvider getFactoryObjectFromString(string name);
111
113
122 static AbstractDataProvider getFactoryObjectFromStringUseEnv(string name);
123
125 protected:
126 static hash<FactoryInfo> getFactoryInfoFromString(string name);
127 public:
128
129
131 static *list<string> listFactories();
132
134 static DataProviderTypeCache getTypeCache();
135
137
145 static registerType(string path, AbstractDataProviderType type);
146
148
155 static *AbstractDataProviderType getType(string path);
156
158
167 static AbstractDataProviderType getTypeEx(string path);
168
170 static DataProviderTypeEntry getTypeRoot();
171
173 static lockAllTypes();
174
176
180 static *list<string> listTypes();
181
183 static registerKnownFactories();
184
186 static loadProvidersFromEnvironment();
187
189 static *AbstractDataProvider tryLoadProviderForConnectionFromEnv(string name);
190
192 static registerKnownTypes();
193
195 static loadTypesFromEnvironment();
196
198 static hash<auto> getInfoAsData(hash<auto> info0);
199
201
205 static setAutoConfig();
206
208 static bool getAutoConfig();
209
211 static list<string> getPathList(string path);
212
214 protected:
215 static checkRequest();
216 public:
217
218
220 protected:
221 static *string tryGetFactoryModuleName(string name);
222 public:
223
224
226 protected:
227 static *string tryGetTypeModuleName(string name);
228 public:
229
230
232 protected:
233 static *string tryGetModuleName(string name, string func, string type);
234 public:
235
236
238 protected:
239 static *DataProviderTypeEntry tryLoadTypeFromPath(list<string> type_path);
240 public:
241
242
244 protected:
245 static bool tryLoad(string module_str, *bool verbose);
246 public:
247
248
250 protected:
251 static *object loadFromEnvironment(string func, string type, *hash<SymbolInfo> info);
252 public:
253
254
256 protected:
257 static *object checkSymbol(hash<SymbolInfo> info);
258 public:
259
260
262 protected:
263 static bool checkInjection(object obj, hash<string, string> module_map);
264 public:
265
266 };
267
268 // private hashdecls
269 hashdecl SymbolInfo {
270 // symbol type
271 string type;
272 // symbol name
273 string name;
274 }
275 hashdecl FactoryInfo {
276 // factory name
277 string name;
278 // path to final data provider in factory
279 list<string> path_list;
280 // factory options
281 auto options;
282 }
283 }
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:88
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:27
DataProvider::DataProviderTypeCache
Data provider type cache class.
Definition: DataProviderTypeCache.qc.dox.h:29