| Qore DbDataProvider Module Reference 1.0

DbDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3
25 // minimum required Qore version
26 // assume local scope for variables, do not use "$" signs
27 // require type definitions everywhere
29 // enable all warnings
30
32 namespace DbDataProvider {
34 class DbDataProvider : public AbstractDataProvider {
35
36 public:
38 const ProviderInfo = ...;
39
40
42 const ConstructorOptions = ...;
43
44
46 const SearchOptions = ...;
47
48
49 protected:
51 AbstractDatabase db;
52
54 static *code datasource_lookup;
55
57 static *code table_lookup;
58
59 public:
60
62 constructor(AbstractDatasource ds, *hash<auto> opts);
63
64
66 constructor(AbstractDatabase db);
67
68
70 constructor(*hash<auto> options);
71
72
74 string getName();
75
76
78
80 commit();
81
82
84
86 rollback();
87
88
90
95 static *hash<string, AbstractDataField> getRecordTypeFromDescribeHash(hash<auto> describe_hash);
96
98
102 protected:
103 *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
104 public:
105
106
108
115 protected:
116 AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
117 public:
118
119
121
126 protected:
127 AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
128 public:
129
130
132
134 protected:
135 *list<string> getChildProviderNamesImpl();
136 public:
137
138
140
146 protected:
147 *AbstractDataProvider getChildProviderImpl(string name);
148 public:
149
150
152 protected:
153 hash<DataProviderInfo> getStaticInfoImpl();
154 public:
155
156
158 static setDatasourceLookup(code datasource_lookup);
159
161 static setTableLookup(code table_lookup);
162
164 static AbstractDatasource getDatasource(AbstractDatasource ds);
165
167 static AbstractDatasource getDatasource(string ds_string);
168
170 static AbstractTable getTable(string ds_string, string table_string);
171
173 static AbstractTable getTable(AbstractDatasource ds, string table_string);
174 };
175 };
DbDataProvider::DbDataProvider::rollback
rollback()
Rolls back any transaction in progress in the datasource.
DbDataProvider::DbDataProvider::getName
string getName()
Returns the data provider name.
DbDataProvider::DbDataProvider::commit
commit()
Commits any transaction in progress in the datasource.
DbDataProvider::DbDataProvider::setTableLookup
static setTableLookup(code table_lookup)
Sets the table lookup.
DbDataProvider::DbDataProvider::constructor
constructor(AbstractDatasource ds, *hash< auto > opts)
creates the object
DbDataProvider::DbDataProvider::datasource_lookup
static *code datasource_lookup
Lookup to get an abstract datasource from a name.
Definition: DbDataProvider.qc.dox.h:54
DbDataProvider::DbDataProvider::getRecordTypeImpl
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.
DbDataProvider::DbDataProvider::getDatasource
static AbstractDatasource getDatasource(string ds_string)
Returns an AbstractDatasource object from the given string.
DbDataProvider::DbDataProvider::getTable
static AbstractTable getTable(AbstractDatasource ds, string table_string)
Returns an AbstractTable object from the given datasource and table arguments.
DbDataProvider::DbDataProvider::getStaticInfoImpl
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
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:57
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::getRecordTypeFromDescribeHash
static *hash< string, AbstractDataField > getRecordTypeFromDescribeHash(hash< auto > describe_hash)
Returns the record type description from a describe hash.
DbDataProvider::DbDataProvider::db
AbstractDatabase db
The database object.
Definition: DbDataProvider.qc.dox.h:51
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::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::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::getChildProviderImpl
*AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
DbDataProvider::DbDataProvider::getChildProviderNamesImpl
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
DbDataProvider
Qore AbstractDbRecordIterator class definition.
Definition: AbstractDbRecordIterator.qc.dox.h:32
DbDataProvider::DbDataProvider::constructor
constructor(AbstractDatabase db)
creates the object
DbDataProvider::DbDataProvider::constructor
constructor(*hash< auto > options)
Creates the object from constructor options.