Qore DbDataProvider Module Reference 2.2
Loading...
Searching...
No Matches
DbTableDataProvider.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
26namespace DbDataProvider {
29
30public:
32 const ProviderInfo = ...;
33
34
36
41 const MapperKeyInfo = ...;
42
43
45 const ConstructorOptions = ...;
46
47
49
58 const CreateOptions = ...;
59
60
62
69 const UpsertOptions = ...;
70
71
73
96 const SearchOptions = ...;
97
98
100 const DbUpsertMap = ...;
101
102
103protected:
105 AbstractTable table;
106
108 Mutex db_lock();
109
110public:
111
113 constructor(AbstractTable table, *LoggerInterface logger) ;
114
115
117 constructor(*hash<auto> options);
118
119
121 string getName();
122
123
125 *string getDesc();
126
127
129 hash<DataProviderInfo> getInfo();
130
131
133
141
142
144
150
151
153
159
160
162
164 AbstractDataProviderBulkOperation getBulkInserter();
165
166
168
170 AbstractDataProviderBulkOperation getBulkUpserter();
171
172
174
176 *hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
177
178
180protected:
181 *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
182public:
183
184
186
194protected:
195 *hash<auto> createRecordImpl(hash<auto> rec, *hash<auto> create_options);
196public:
197
198
200
208 string upsertRecordImpl(hash<auto> rec, *hash<auto> upsert_options);
209
210
212
217protected:
218 *hash<auto> searchSingleRecordImpl(*hash<auto> where_cond, *hash<auto> search_options);
219public:
220
221
223
230protected:
231 AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
232public:
233
234
236
244protected:
245 DbTableRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
246public:
247
248
250
259protected:
260 bool updateSingleRecordImpl(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
261public:
262
263
265
274protected:
275 int updateRecordsImpl(hash<auto> set, *hash<auto> where_cond, *hash<auto> search_options);
276public:
277
278
280
291protected:
292 int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
293public:
294
295
297protected:
298 hash<DataProviderInfo> getStaticInfoImpl();
299public:
300
301
303
311protected:
312 addFieldImpl(AbstractDataField field, *hash<auto> field_add_options);
313public:
314
315
317
323protected:
324 updateFieldImpl(string name, AbstractDataField field, *hash<auto> field_update_options);
325public:
326
327
329
334protected:
335 deleteFieldImpl(string name, *hash<auto> field_delete_options);
336public:
337
338
340protected:
341 alignTable(hash<auto> table_desc);
342public:
343
344
346protected:
347 execDdlSql(list<auto> sqll);
348public:
349
350};
351};
The database data provider base class.
Definition DbDataProviderBase.qc.dox.h:28
Defines a data provider based on a single SQL table.
Definition DbTableDataProvider.qc.dox.h:28
execDdlSql(list< auto > sqll)
Executes the given DDL SQL string list.
addFieldImpl(AbstractDataField field, *hash< auto > field_add_options)
Creates a new field.
*string getDesc()
Returns the data provider description.
string getName()
Returns the data provider name.
beginTransaction()
Begins a transaction in the datasource underlying the table.
const MapperKeyInfo
Mapper runtime key info; see details below.
Definition DbTableDataProvider.qc.dox.h:41
const DbUpsertMap
Maps SqlUtil Upsert Result Codes to DB Provider Upsert Result Codes.
Definition DbTableDataProvider.qc.dox.h:100
commit()
Commits data written to the data provider.
const ProviderInfo
Provider info.
Definition DbTableDataProvider.qc.dox.h:32
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
string upsertRecordImpl(hash< auto > rec, *hash< auto > upsert_options)
Upserts the given record to the data provider.
const ConstructorOptions
Constructor options.
Definition DbTableDataProvider.qc.dox.h:45
bool updateSingleRecordImpl(hash< auto > set, hash< auto > where_cond, *hash< auto > search_options)
Updates a single record matching the search options.
const SearchOptions
Search options; see details below.
Definition DbTableDataProvider.qc.dox.h:96
DbTableRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
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.
constructor(AbstractTable table, *LoggerInterface logger)
Creates the object.
alignTable(hash< auto > table_desc)
Align table with the given description.
const CreateOptions
Create options; see details below.
Definition DbTableDataProvider.qc.dox.h:58
*hash< auto > searchSingleRecordImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns a single record matching the search options.
*hash< auto > createRecordImpl(hash< auto > rec, *hash< auto > create_options)
Writes the given record to the data provider.
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.
hash< DataProviderInfo > getInfo()
Returns data provider info.
AbstractDataProviderBulkOperation getBulkUpserter()
Returns a bulk upsert operation object for the data provider.
int deleteRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Deletes zero or more records.
AbstractTable table
the table
Definition DbTableDataProvider.qc.dox.h:105
updateFieldImpl(string name, AbstractDataField field, *hash< auto > field_update_options)
Updates an existing field.
*hash< string, hash< MapperRuntimeKeyInfo > > getMapperRuntimeKeys()
Returns custom data mapper runtime keys.
constructor(*hash< auto > options)
Creates the object from constructor options.
const UpsertOptions
Upsert options; see details below.
Definition DbTableDataProvider.qc.dox.h:69
rollback()
Rolls back data written to the data provider.
deleteFieldImpl(string name, *hash< auto > field_delete_options)
Deletes an existing field.
int updateRecordsImpl(hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
AbstractDataProviderBulkOperation getBulkInserter()
Returns a bulk insert operation object for the data provider.
Defines the record iterator class for Table-based iterators.
Definition DbTableRecordIterator.qc.dox.h:28
Qore AbstractDbRecordIterator class definition.
Definition AbstractDbRecordIterator.qc.dox.h:26