| Qore DbDataProvider Module Reference 2.0

DbDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3
26 namespace DbDataProvider {
28 class DbDataProvider : public AbstractDataProvider {
29
30 public:
32 const ProviderInfo = ...;
33
34
36 const ConstructorOptions = ...;
37
38
40 const SearchOptions = ...;
41
42
44 const ChildCreateOptions = ...;
45
46
47 protected:
49 AbstractDatabase db;
50
52 static *code datasource_lookup;
53
55 static *code table_lookup;
56
57 public:
58
60 constructor(AbstractDatasource ds, *hash<auto> opts);
61
62
64 constructor(AbstractDatabase db);
65
66
68 constructor(*hash<auto> options);
69
70
72 string getName();
73
74
76 *string getDesc();
77
78
80
87 beginTransaction();
88
89
91
96 commit();
97
98
100
105 rollback();
106
107
109
114 static *hash<string, AbstractDataField> getRecordTypeFromDescribeHash(hash<auto> describe_hash);
115
117
121 protected:
122 *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
123 public:
124
125
127
134 protected:
135 AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
136 public:
137
138
140
145 protected:
146 AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
147 public:
148
149
151
153 protected:
154 *list<string> getChildProviderNamesImpl();
155 public:
156
157
159
165 protected:
166 *AbstractDataProvider getChildProviderImpl(string name);
167 public:
168
169
171 protected:
172 hash<DataProviderInfo> getStaticInfoImpl();
173 public:
174
175
177
185 protected:
186 AbstractDataProvider createChildProviderImpl(string name, hash<string, AbstractDataField> fields, *hash<auto> child_create_options);
187 public:
188
189
191
198 protected:
199 deleteChildProviderImpl(string name, *hash<auto> child_delete_options);
200 public:
201
202
204 static setDatasourceLookup(code datasource_lookup);
205
207 static setTableLookup(code table_lookup);
208
210 static AbstractDatasource getDatasource(AbstractDatasource ds);
211
213 static AbstractDatasource getDatasource(string ds_string);
214
216 static AbstractTable getTable(string ds_string, string table_string);
217
219 static AbstractTable getTable(AbstractDatasource ds, string table_string);
220
222 static hash<GenericColumnInfo> getColumnDesc(AbstractDatabase db, AbstractDataField field, *hash<auto> opts);
223
225
227 hash<auto> makeTableDesc(string name, hash<string, AbstractDataField> fields, *hash<auto> opts);
228
229 };
230 };
DbDataProvider::DbDataProvider::getChildProviderNamesImpl
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
DbDataProvider::DbDataProvider::datasource_lookup
static *code datasource_lookup
Lookup to get an abstract datasource from a name.
Definition: DbDataProvider.qc.dox.h:52
DbDataProvider::DbDataProvider::getTable
static AbstractTable getTable(string ds_string, string table_string)
Returns an AbstractTable object from the given datasource and table strings.
DbDataProvider::DbDataProvider::beginTransaction
beginTransaction()
Begins a transaction in the datasource.
DbDataProvider::DbDataProvider::commit
commit()
Commits any transaction in progress in the datasource.
DbDataProvider::DbDataProvider::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.
DbDataProvider::DbDataProvider::getDesc
*string getDesc()
Returns the data provider description.
DbDataProvider::DbDataProvider::searchRecordsImpl
AbstractDataProviderRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
DbDataProvider::DbDataProvider::makeTableDesc
hash< auto > makeTableDesc(string name, hash< string, AbstractDataField > fields, *hash< auto > opts)
Returns a table description hash from a field description.
DbDataProvider::DbDataProvider::db
AbstractDatabase db
The database object.
Definition: DbDataProvider.qc.dox.h:49
DbDataProvider::DbDataProvider::getTable
static AbstractTable getTable(AbstractDatasource ds, string table_string)
Returns an AbstractTable object from the given datasource and table arguments.
DbDataProvider::DbDataProvider::setDatasourceLookup
static setDatasourceLookup(code datasource_lookup)
Sets the datasource lookup.
DbDataProvider::DbDataProvider::getDatasource
static AbstractDatasource getDatasource(AbstractDatasource ds)
Returns the given AbstractDatasource object.
DbDataProvider::DbDataProvider::getStaticInfoImpl
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
DbDataProvider::DbDataProvider::deleteChildProviderImpl
deleteChildProviderImpl(string name, *hash< auto > child_delete_options)
Deletes a child data provider.
DbDataProvider::DbDataProvider::getChildProviderImpl
*AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
DbDataProvider::DbDataProvider::constructor
constructor(AbstractDatasource ds, *hash< auto > opts)
creates the object
DbDataProvider::DbDataProvider::getColumnDesc
static hash< GenericColumnInfo > getColumnDesc(AbstractDatabase db, AbstractDataField field, *hash< auto > opts)
Returns a column description hash for a field.
DbDataProvider::DbDataProvider::getDatasource
static AbstractDatasource getDatasource(string ds_string)
Returns an AbstractDatasource object from the given string.
DbDataProvider::DbDataProvider::getRecordTypeFromDescribeHash
static *hash< string, AbstractDataField > getRecordTypeFromDescribeHash(hash< auto > describe_hash)
Returns the record type description from a describe hash.
DbDataProvider::DbDataProvider::getName
string getName()
Returns the data provider name.
DbDataProvider::DbDataProvider::table_lookup
static *code table_lookup
Lookup to get an abstract table from a datasource and a name.
Definition: DbDataProvider.qc.dox.h:55
DbDataProvider::DbDataProvider::constructor
constructor(AbstractDatabase db)
creates the object
DbDataProvider::DbDataProvider::setTableLookup
static setTableLookup(code table_lookup)
Sets the table lookup.
DbDataProvider::DbDataProvider::getRecordTypeImpl
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.
DbDataProvider::DbDataProvider::createChildProviderImpl
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.
DbDataProvider::DbDataProvider::constructor
constructor(*hash< auto > options)
Creates the object from constructor options.
DbDataProvider::DbDataProvider::rollback
rollback()
Rolls back any transaction in progress in the datasource.
DbDataProvider
Qore AbstractDbRecordIterator class definition.
Definition: AbstractDbRecordIterator.qc.dox.h:26