Qore DbDataProvider Module Reference 2.1.1
Loading...
Searching...
No Matches
DbDataProvider.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
26namespace DbDataProvider {
28
31class DbDataProvider : public AbstractDataProvider {
32
33public:
35 const ProviderInfo = ...;
36
37
39
44 const MapperKeyInfo = ...;
45
46
48 const ConstructorOptions = ...;
49
50
52 const SearchOptions = ...;
53
54
56 const ChildCreateOptions = ...;
57
58
59protected:
61 AbstractDatabase db;
62
64 static *code datasource_lookup;
65
67 static *code table_lookup;
68
69public:
70
72 constructor(AbstractDatasource ds, *hash<auto> opts);
73
74
76 constructor(AbstractDatabase db);
77
78
80 constructor(*hash<auto> options);
81
82
84 string getName();
85
86
88 *string getDesc();
89
90
92
100
101
103
109
110
112
118
119
121
123 *hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
124
125
127 int doSequenceKey(string sequence_name, hash<auto> ctx, *reference<bool> missing_input);
128
129
131 int doSequenceCurrvalKey(string sequence_name, hash<auto> ctx, *reference<bool> missing_input);
132
133
135
140 static *hash<string, AbstractDataField> getRecordTypeFromDescribeHash(hash<auto> describe_hash);
141
143
147protected:
148 *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
149public:
150
151
153
160protected:
161 AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
162public:
163
164
166
171protected:
172 AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
173public:
174
175
177 *list<hash<DataProviderSummaryInfo>> getChildProviderSummaryInfo();
178
179
181
183protected:
185public:
186
187
189
195protected:
196 *AbstractDataProvider getChildProviderImpl(string name);
197public:
198
199
201protected:
202 hash<DataProviderInfo> getStaticInfoImpl();
203public:
204
205
207
215protected:
216 AbstractDataProvider createChildProviderImpl(string name, hash<string, AbstractDataField> fields, *hash<auto> child_create_options);
217public:
218
219
221
228protected:
229 deleteChildProviderImpl(string name, *hash<auto> child_delete_options);
230public:
231
232
234 static setDatasourceLookup(code datasource_lookup);
235
237 static setTableLookup(code table_lookup);
238
240 static AbstractDatasource getDatasource(AbstractDatasource ds);
241
243 static AbstractDatasource getDatasource(string ds_string);
244
246 static AbstractTable getTable(string ds_string, string table_string);
247
249 static AbstractTable getTable(AbstractDatasource ds, string table_string);
250
252 static hash<GenericColumnInfo> getColumnDesc(AbstractDatabase db, AbstractDataField field, *hash<auto> opts);
253
255
257 hash<auto> makeTableDesc(string name, hash<string, AbstractDataField> fields, *hash<auto> opts);
258
259};
260};
static *code datasource_lookup
Lookup to get an abstract datasource from a name.
Definition DbDataProvider.qc.dox.h:64
static AbstractTable getTable(string ds_string, string table_string)
Returns an AbstractTable object from the given datasource and table strings.
beginTransaction()
Begins a transaction in the datasource.
commit()
Commits any transaction in progress in the datasource.
static *hash< string, AbstractDataField > getRecordTypeFromDescribeHash(hash< auto > describe_hash)
Returns the record type description from a describe hash.
AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size=1000, *hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
*string getDesc()
Returns the data provider description.
*hash< string, hash< MapperRuntimeKeyInfo > > getMapperRuntimeKeys()
Returns custom data mapper runtime keys.
AbstractDataProviderRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
AbstractDatabase db
The database object.
Definition DbDataProvider.qc.dox.h:61
static AbstractTable getTable(AbstractDatasource ds, string table_string)
Returns an AbstractTable object from the given datasource and table arguments.
int doSequenceKey(string sequence_name, hash< auto > ctx, *reference< bool > missing_input)
Processes the sequence runtime key in mappers as a mapper key handler.
static hash< GenericColumnInfo > getColumnDesc(AbstractDatabase db, AbstractDataField field, *hash< auto > opts)
Returns a column description hash for a field.
static setDatasourceLookup(code datasource_lookup)
Sets the datasource lookup.
static AbstractDatasource getDatasource(AbstractDatasource ds)
Returns the given AbstractDatasource object.
deleteChildProviderImpl(string name, *hash< auto > child_delete_options)
Deletes a child data provider.
*AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
constructor(AbstractDatasource ds, *hash< auto > opts)
creates the object
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
int doSequenceCurrvalKey(string sequence_name, hash< auto > ctx, *reference< bool > missing_input)
Processes the sequence_currval runtime key in mappers as a mapper key handler.
hash< auto > makeTableDesc(string name, hash< string, AbstractDataField > fields, *hash< auto > opts)
Returns a table description hash from a field description.
static AbstractDatasource getDatasource(string ds_string)
Returns an AbstractDatasource object from the given string.
string getName()
Returns the data provider name.
static *code table_lookup
Lookup to get an abstract table from a datasource and a name.
Definition DbDataProvider.qc.dox.h:67
constructor(AbstractDatabase db)
creates the object
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.
static setTableLookup(code table_lookup)
Sets the table lookup.
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
AbstractDataProvider createChildProviderImpl(string name, hash< string, AbstractDataField > fields, *hash< auto > child_create_options)
Creates a new child data provider and returns it after adding as a child.
*list< hash< DataProviderSummaryInfo > > getChildProviderSummaryInfo()
Return data provider summary info.
constructor(*hash< auto > options)
Creates the object from constructor options.
rollback()
Rolls back any transaction in progress in the datasource.
Qore AbstractDbRecordIterator class definition.
Definition AbstractDbRecordIterator.qc.dox.h:26