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 static *hash<string, AbstractDataField> getRecordTypeFromDescribeHash(hash<auto> describe_hash);
134 *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
147 AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(
int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
158 AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
166 *list<string> getChildProviderNamesImpl();
178 *AbstractDataProvider getChildProviderImpl(
string name);
184 hash<DataProviderInfo> getStaticInfoImpl();
189 static setDatasourceLookup(code datasource_lookup);
192 static setTableLookup(code table_lookup);
195 static AbstractDatasource getDatasource(AbstractDatasource ds);
198 static AbstractDatasource getDatasource(
string ds_string);
201 static AbstractTable getTable(
string ds_string,
string table_string);
204 static AbstractTable getTable(AbstractDatasource ds,
string table_string);