| Qore DbDataProvider Module Reference 1.0

DbTableDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3
25 namespace DbDataProvider {
28 class DbTableDataProvider : public AbstractDataProvider {
29
30 public:
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
103 protected:
105 AbstractTable table;
106
108 AbstractDatabase db;
109
111 Mutex db_lock();
112
113 public:
114
116 constructor(AbstractTable table);
117
118
120 constructor(*hash<auto> options);
121
122
124 string getName();
125
126
128 *AbstractDataProvider getChildProviders();
129
130
132
135 bool requiresTransactionManagement();
136
137
139
141 commit();
142
143
145
147 rollback();
148
149
151
153 AbstractDataProviderBulkOperation getBulkInserter();
154
155
157
159 AbstractDataProviderBulkOperation getBulkUpserter();
160
161
163
165 *hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
166
167
169 protected:
170 *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
171 public:
172
173
175
183 protected:
184 *hash<auto> createRecordImpl(hash<auto> rec, *hash<auto> create_options);
185 public:
186
187
189
197 string upsertRecordImpl(hash<auto> rec, *hash<auto> upsert_options);
198
199
201
205 protected:
206 *hash<auto> searchSingleRecordImpl(hash<auto> where_cond, *hash<auto> search_options);
207 public:
208
209
211
218 protected:
219 AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
220 public:
221
222
224
231 protected:
232 DbTableRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
233 public:
234
235
237
246 protected:
247 bool updateSingleRecordImpl(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
248 public:
249
250
252
261 protected:
262 int updateRecordsImpl(hash<auto> set, *hash<auto> where_cond, *hash<auto> search_options);
263 public:
264
265
267
278 protected:
279 int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
280 public:
281
282
284 protected:
285 hash<DataProviderInfo> getStaticInfoImpl();
286 public:
287
288
290 int doSequenceKey(string sequence_name);
291
292
294 int doSequenceCurrvalKey(string sequence_name);
295
296 };
297 };
DbDataProvider::DbTableDataProvider::getBulkInserter
AbstractDataProviderBulkOperation getBulkInserter()
Returns a bulk insert operation object for the data provider.
DbDataProvider::DbTableRecordIterator
Defines the record iterator class for Table-based iterators.
Definition: DbTableRecordIterator.qc.dox.h:34
DbDataProvider::DbTableDataProvider::doSequenceKey
int doSequenceKey(string sequence_name)
Processes the sequence runtime key in mappers.
DbDataProvider::DbTableDataProvider::doSequenceCurrvalKey
int doSequenceCurrvalKey(string sequence_name)
Processes the sequence_currval runtime key in mappers.
DbDataProvider::DbTableDataProvider::db_lock
Mutex db_lock()
lock for "db"
DbDataProvider::DbTableDataProvider::ProviderInfo
const ProviderInfo
Provider info.
Definition: DbTableDataProvider.qc.dox.h:32
DbDataProvider::DbTableDataProvider::updateRecordsImpl
int updateRecordsImpl(hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
DbDataProvider::DbTableDataProvider::getMapperRuntimeKeys
*hash< string, hash< MapperRuntimeKeyInfo > > getMapperRuntimeKeys()
Returns custom data mapper runtime keys.
DbDataProvider::DbTableDataProvider
Defines a data provider based on a single SQL table.
Definition: DbTableDataProvider.qc.dox.h:28
DbDataProvider::DbTableDataProvider::commit
commit()
Commits data written to the data provider.
DbDataProvider::DbTableDataProvider::deleteRecordsImpl
int deleteRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Deletes zero or more records.
DbDataProvider::DbTableDataProvider::MapperKeyInfo
const MapperKeyInfo
Mapper runtime key info; see details below.
Definition: DbTableDataProvider.qc.dox.h:41
DbDataProvider::DbTableDataProvider::SearchOptions
const SearchOptions
Search options; see details below.
Definition: DbTableDataProvider.qc.dox.h:96
DbDataProvider::DbTableDataProvider::getStaticInfoImpl
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
DbDataProvider::DbTableDataProvider::requiresTransactionManagement
bool requiresTransactionManagement()
Returns True if the data provider supports transaction management.
DbDataProvider::DbTableDataProvider::upsertRecordImpl
string upsertRecordImpl(hash< auto > rec, *hash< auto > upsert_options)
Upserts the given record to the data provider.
DbDataProvider::DbTableDataProvider::getChildProviders
*AbstractDataProvider getChildProviders()
Returns child providers; return NOTHING if there are no child providers.
DbDataProvider::DbTableDataProvider::UpsertOptions
const UpsertOptions
Upsert options; see details below.
Definition: DbTableDataProvider.qc.dox.h:69
DbDataProvider::DbTableDataProvider::db
AbstractDatabase db
the database object, if required
Definition: DbTableDataProvider.qc.dox.h:108
DbDataProvider::DbTableDataProvider::table
AbstractTable table
the table
Definition: DbTableDataProvider.qc.dox.h:105
DbDataProvider::DbTableDataProvider::getRecordTypeImpl
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.
DbDataProvider::DbTableDataProvider::DbUpsertMap
const DbUpsertMap
Maps SqlUtil Upsert Result Codes to DB Provider Upsert Result Codes.
Definition: DbTableDataProvider.qc.dox.h:100
DbDataProvider::DbTableDataProvider::searchSingleRecordImpl
*hash< auto > searchSingleRecordImpl(hash< auto > where_cond, *hash< auto > search_options)
Returns a single record matching the search options.
DbDataProvider::DbTableDataProvider::rollback
rollback()
Rolls back data written to the data provider.
DbDataProvider::DbTableDataProvider::createRecordImpl
*hash< auto > createRecordImpl(hash< auto > rec, *hash< auto > create_options)
Writes the given record to the data provider.
DbDataProvider::DbTableDataProvider::searchRecordsImpl
DbTableRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
DbDataProvider::DbTableDataProvider::getName
string getName()
Returns the data provider name.
DbDataProvider::DbTableDataProvider::CreateOptions
const CreateOptions
Create options; see details below.
Definition: DbTableDataProvider.qc.dox.h:58
DbDataProvider::DbTableDataProvider::constructor
constructor(AbstractTable table)
Creates the object.
DbDataProvider::DbTableDataProvider::updateSingleRecordImpl
bool updateSingleRecordImpl(hash< auto > set, hash< auto > where_cond, *hash< auto > search_options)
Updates a single record matching the search options.
DbDataProvider
Qore AbstractDbRecordIterator class definition.
Definition: AbstractDbRecordIterator.qc.dox.h:32
DbDataProvider::DbTableDataProvider::getBulkUpserter
AbstractDataProviderBulkOperation getBulkUpserter()
Returns a bulk upsert operation object for the data provider.
DbDataProvider::DbTableDataProvider::ConstructorOptions
const ConstructorOptions
Constructor options.
Definition: DbTableDataProvider.qc.dox.h:45
DbDataProvider::DbTableDataProvider::searchRecordsBulkImpl
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.