38 const ProviderInfo = <DataProviderInfo>{
39 "type":
"DbDataProvider",
40 "supports_read":
True,
41 "supports_bulk_read":
True,
42 "supports_children":
True,
43 "constructor_options": ConstructorOptions,
44 "search_options": SearchOptions,
47 "transaction_management":
True,
49 "record_requires_search_options":
True,
53 const ConstructorOptions = {
54 "datasource": <DataProviderOptionInfo>{
56 AbstractDataProviderType::get(StringType),
57 AbstractDataProviderType::get(
new Type(
"AbstractDatasource")),
59 "desc":
"the datasource connection string or an abstract datasource object",
61 "database": <DataProviderOptionInfo>{
62 "type": AbstractDataProviderType::get(
new Type(
"AbstractDatabase")),
63 "desc":
"the database for the object",
68 const SearchOptions = {
69 "sql": <DataProviderOptionInfo>{
70 "type": AbstractDataProviderType::get(StringType),
71 "desc":
"the raw SQL for the select statement",
74 "args": <DataProviderOptionInfo>{
75 "type": AbstractDataProviderType::get(AutoListType),
76 "desc":
"any bind arguments for the select statement",
93 constructor(AbstractDatasource ds, *hash<auto> opts);
97 constructor(AbstractDatabase db);
101 constructor(*hash<auto> options);
126 *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
139 AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(
int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
150 AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
158 *list<string> getChildProviderNamesImpl();
170 *AbstractDataProvider getChildProviderImpl(
string name);
176 hash<DataProviderInfo> getStaticInfoImpl();
181 static setDatasourceLookup(code datasource_lookup);
184 static setTableLookup(code table_lookup);
187 static AbstractDatasource getDatasource(AbstractDatasource ds);
190 static AbstractDatasource getDatasource(
string ds_string);
193 static AbstractTable getTable(
string ds_string,
string table_string);
196 static AbstractTable getTable(AbstractDatasource ds,
string table_string);
static *code datasource_lookup
Lookup to get an abstract datasource from a name.
Definition: DbDataProvider.qc.dox.h:85
AbstractDatabase db
The database object.
Definition: DbDataProvider.qc.dox.h:82
static *code table_lookup
Lookup to get an abstract table from a datasource and a name.
Definition: DbDataProvider.qc.dox.h:88
Qore AbstractDbRecordIterator class definition.
Definition: AbstractDbRecordIterator.qc.dox.h:32