Qore DbDataProvider Module Reference  1.0.1
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 
86 
87 
89 
94  commit();
95 
96 
98 
104 
105 
107 
112  static *hash<string, AbstractDataField> getRecordTypeFromDescribeHash(hash<auto> describe_hash);
113 
115 
119 protected:
120  *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
121 public:
122 
123 
125 
132 protected:
133  AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
134 public:
135 
136 
138 
143 protected:
144  AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
145 public:
146 
147 
149 
151 protected:
152  *list<string> getChildProviderNamesImpl();
153 public:
154 
155 
157 
163 protected:
164  *AbstractDataProvider getChildProviderImpl(string name);
165 public:
166 
167 
169 protected:
170  hash<DataProviderInfo> getStaticInfoImpl();
171 public:
172 
173 
175  static setDatasourceLookup(code datasource_lookup);
176 
178  static setTableLookup(code table_lookup);
179 
181  static AbstractDatasource getDatasource(AbstractDatasource ds);
182 
184  static AbstractDatasource getDatasource(string ds_string);
185 
187  static AbstractTable getTable(string ds_string, string table_string);
188 
190  static AbstractTable getTable(AbstractDatasource ds, string table_string);
191 };
192 };
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
static *code datasource_lookup
Lookup to get an abstract datasource from a name.
Definition: DbDataProvider.qc.dox.h:54
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.
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.
commit()
Commits any transaction in progress in the datasource.
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:51
static AbstractTable getTable(AbstractDatasource ds, string table_string)
Returns an AbstractTable object from the given datasource and table arguments.
static setDatasourceLookup(code datasource_lookup)
Sets the datasource lookup.
static AbstractDatasource getDatasource(AbstractDatasource ds)
Returns the given AbstractDatasource object.
hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
*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
static AbstractDatasource getDatasource(string ds_string)
Returns an AbstractDatasource object from the given string.
static *hash< string, AbstractDataField > getRecordTypeFromDescribeHash(hash< auto > describe_hash)
Returns the record type description from a describe hash.
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:57
constructor(AbstractDatabase db)
creates the object
static setTableLookup(code table_lookup)
Sets the table lookup.
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.
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:32