Qore DataProvider Module Reference  2.1.2
AbstractDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
26 namespace DataProvider {
32 const UpsertResultInserted = "inserted";
34 
36 const UpsertResultUpdated = "updated";
37 
39 const UpsertResultVerified = "verified";
40 
42 const UpsertResultUnchanged = "unchanged";
43 
45 const UpsertResultDeleted = "deleted";
47 
49 public struct DataProviderOptionInfo {
51  softlist<AbstractDataProviderType> type;
52 
54  bool required = False;
55 
57  string desc;
58 };
59 
61 public struct DataProviderInfo {
63 
65  string name;
66 
68 
70  string type;
71 
73 
76 
78 
81 
83 
86 
88 
91 
93 
96 
98 
101 
103 
109 
111 
117 
119 
125 
127 
130 
132 
135 
137 
140 
142 
145 
147 
150 
152 
157 
159 
164 
166 
171 
173 
178 
180 
185 
187 
189  *hash<string, hash<DataProviderOptionInfo>> constructor_options;
190 
192 
194  *hash<string, hash<DataProviderOptionInfo>> create_options;
195 
197 
199  *hash<string, hash<DataProviderOptionInfo>> upsert_options;
200 
202 
204  *hash<string, hash<DataProviderOptionInfo>> search_options;
205 
207 
209  *hash<string, hash<DataProviderOptionInfo>> request_options;
210 
212 
216  *hash<string, hash<DataProviderOptionInfo>> child_create_options;
217 
219 
223  *hash<string, hash<DataProviderOptionInfo>> child_delete_options;
224 
226 
230  *hash<string, hash<DataProviderOptionInfo>> add_field_options;
231 
233 
237  *hash<string, hash<DataProviderOptionInfo>> update_field_options;
238 
240 
244  *hash<string, hash<DataProviderOptionInfo>> delete_field_options;
245 
247 
251  hash<string, hash<MapperRuntimeKeyInfo>> mapper_keys = Mapper::MapperKeyInfo;
252 
254 
256  *string desc;
257 
259 
261  *list<string> children;
262 };
263 
266 
267 public:
268 
269 protected:
271  Logger logger;
272 
274  static bool callbacks_locked = False;
275 
278 
280  static code cb_resolve_value;
281 
283 
289 
290 
291 public:
292 
294  constructor();
295 
296 
298  constructor(Logger logger);
299 
300 
302  setLogger(Logger logger);
303 
304 
306 
310  hash<auto> getInfoAsData(*bool with_type_info);
311 
312 
314  hash<DataProviderInfo> getInfo();
315 
316 
318  *string getDesc();
319 
320 
322 
332  *hash<auto> createRecord(hash<auto> rec, *hash<auto> create_options);
333 
334 
336 
343  string upsertRecord(hash<auto> rec, *hash<auto> upsert_options);
344 
345 
347 
352  *hash<auto> searchFirstRecord(hash<auto> where_cond, *hash<auto> search_options);
353 
354 
356 
362  *hash<auto> searchSingleRecord(hash<auto> where_cond, *hash<auto> search_options);
363 
364 
366 
370  AbstractDataProviderRecordIterator getRecordIterator(*hash<auto> search_options);
371 
372 
374 
382 AbstractDataProviderBulkRecordInterface getBulkRecordInterface(int block_size = 1000, *hash<auto> search_options);
383 
384 
386 
395 AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
396 
397 
399 
404  AbstractDataProviderRecordIterator searchRecords(*hash<auto> where_cond, *hash<auto> search_options);
405 
406 
408 
416 AbstractDataProviderRecordIterator requestSearchRecords(auto req, *hash<auto> where_cond, *hash<auto> search_options);
417 
418 
420 
429  bool updateSingleRecord(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
430 
431 
433 
442  int updateRecords(hash<auto> set, *hash<auto> where_cond, *hash<auto> search_options);
443 
444 
446 
455  int deleteRecords(*hash<auto> where_cond, *hash<auto> search_options);
456 
457 
459 
467  auto doRequest(auto req, *hash<auto> request_options);
468 
469 
471 
482 AbstractDataProvider createChildProvider(string name, hash<string, AbstractDataField> fields, *hash<auto> child_create_options);
483 
484 
486 
494  deleteChildProvider(string name, *hash<auto> child_delete_options);
495 
496 
498 
507  addField(AbstractDataField field, *hash<auto> field_add_options);
508 
509 
511 
520  updateField(string name, AbstractDataField field, *hash<auto> field_update_options);
521 
522 
524 
532  deleteField(string name, *hash<auto> field_delete_options);
533 
534 
536 
541 
542 
544 
549 
550 
552 
556  *hash<string, AbstractDataProviderType> getErrorResponseTypes();
557 
558 
560 
568 
569 
571 
573  *list<string> getChildProviderNames();
574 
575 
577 
584 
585 
587 
594 
595 
597 
606 
607 
609 
613 
614 
616 
625 
626 
628 
634  commit();
635 
636 
638 
644  rollback();
645 
646 
648 
653 
654 
656 
661 
662 
664 
668  *hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
669 
670 
672 
675  checkRead();
676 
677 
679 
682  checkCreate();
683 
684 
686 
689  checkUpsert();
690 
691 
693 
696  checkUpdate();
697 
698 
700 
703  checkDelete();
704 
705 
707 
710  checkRequest();
711 
712 
714 
720 
721 
723 
729 
730 
732 
737  checkAddField();
738 
739 
741 
747 
748 
750 
756 
757 
759 
763  static bool setDynamicValueCallbacks();
764 
766 
776  static bool setDynamicValueCallbacks(code value_needs_resolution, code resolve_value);
777 
779 protected:
780  static bool checkCallbacks();
781 public:
782 
783 
785 
787 protected:
788  *hash<auto> validateCreateOptions(*hash<auto> create_options);
789 public:
790 
791 
793 
795 protected:
796  *hash<auto> validateUpsertOptions(*hash<auto> upsert_options);
797 public:
798 
799 
801 
803 protected:
804  *hash<auto> validateSearchOptions(*hash<auto> search_options);
805 public:
806 
807 
809 
811 protected:
812  *hash<auto> validateRequestOptions(*hash<auto> request_options);
813 public:
814 
815 
817 
821 protected:
822  *hash<auto> validateChildCreateOptions(*hash<auto> child_create_options);
823 public:
824 
825 
827 
831 protected:
832  *hash<auto> validateChildDeleteOptions(*hash<auto> child_delete_options);
833 public:
834 
835 
837 
841 protected:
842  *hash<auto> validateFieldAddOptions(*hash<auto> field_add_options);
843 public:
844 
845 
847 
851 protected:
852  *hash<auto> validateFieldUpdateOptions(*hash<auto> field_update_options);
853 public:
854 
855 
857 
861 protected:
862  *hash<auto> validateFieldDeleteOptions(*hash<auto> field_delete_options);
863 public:
864 
865 
867 protected:
868  processConstructorOptions(*hash<string, hash<DataProviderOptionInfo>> option_desc, *hash<auto> options);
869 public:
870 
871 
873 protected:
874  *hash<auto> checkOptions(string err, *hash<string, hash<DataProviderOptionInfo>> option_desc, *hash<auto> options);
875 public:
876 
877 
879 
886 protected:
887  *hash<auto> processFieldValues(*hash<auto> h, *hash<auto> search_options);
888 public:
889 
890 
892 protected:
893  error(string err, string fmt);
894 public:
895 
896 
898 
903 protected:
904  *hash<auto> searchFirstRecordImpl(hash<auto> where_cond, *hash<auto> search_options);
905 public:
906 
907 
909 
916 protected:
917  *hash<auto> searchSingleRecordImpl(hash<auto> where_cond, *hash<auto> search_options);
918 public:
919 
920 
922 
926 protected:
927  *list<string> getChildProviderNamesImpl();
928 public:
929 
930 
932 
934 protected:
936 public:
937 
938 
940 
946  *hash<string, AbstractDataField> getRecordType(*hash<auto> search_options);
947 
948 
950  *hash<string, AbstractDataField> getSoftRecordType(*hash<auto> search_options);
951 
952 
954  *hash<string, AbstractDataField> getOrNothingRecordType(*hash<auto> search_options);
955 
956 
958 
961  *hash<string, hash<DataProviderOptionInfo>> getSearchOptions();
962 
963 
965 
968  *hash<string, hash<DataProviderOptionInfo>> getCreateOptions();
969 
970 
972 
975  *hash<string, hash<DataProviderOptionInfo>> getUpsertOptions();
976 
977 
979 
982  *hash<string, hash<DataProviderOptionInfo>> getRequestOptions();
983 
984 
986 
992  *hash<string, hash<DataProviderOptionInfo>> getChildCreateOptions();
993 
994 
996 
1002  *hash<string, hash<DataProviderOptionInfo>> getChildDeleteOptions();
1003 
1004 
1006 
1012  *hash<string, hash<DataProviderOptionInfo>> getFieldAddOptions();
1013 
1014 
1016 
1022  *hash<string, hash<DataProviderOptionInfo>> getFieldUpdateOptions();
1023 
1024 
1026 
1032  *hash<string, hash<DataProviderOptionInfo>> getFieldDeleteOptions();
1033 
1034 
1036 
1038  bool supportsRead();
1039 
1040 
1042 
1044  bool supportsBulkRead();
1045 
1046 
1048 
1050  bool supportsCreate();
1051 
1052 
1054 
1056  bool supportsUpdate();
1057 
1058 
1060 
1062  bool supportsUpsert();
1063 
1064 
1066 
1068  bool supportsDelete();
1069 
1070 
1072 
1074  bool supportsNativeSearch();
1075 
1076 
1078 
1080  bool supportsBulkCreate();
1081 
1082 
1084 
1086  bool supportsBulkUpsert();
1087 
1088 
1090 
1092  bool supportsRequest();
1093 
1094 
1096 
1099 
1100 
1102 
1104  bool hasRecord();
1105 
1106 
1108 
1110  bool supportsCreateChild();
1111 
1112 
1114 
1116  bool supportsDeleteChild();
1117 
1118 
1120 
1122  bool supportsAddField();
1123 
1124 
1126 
1128  bool supportsUpdateField();
1129 
1130 
1132 
1134  bool supportsDeleteField();
1135 
1136 
1138 
1142 protected:
1143  *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
1144 public:
1145 
1146 
1148 
1155 protected:
1156  AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
1157 public:
1158 
1159 
1161 
1166 protected:
1167  AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
1168 public:
1169 
1170 
1172 
1180 protected:
1181  AbstractDataProviderRecordIterator requestSearchRecordsImpl(auto req, *hash<auto> where_cond, *hash<auto> search_options);
1182 public:
1183 
1184 
1186 
1194 protected:
1195  *hash<auto> createRecordImpl(hash<auto> rec, *hash<auto> create_options);
1196 public:
1197 
1198 
1200 
1205 protected:
1206  string upsertRecordImpl(hash<auto> rec, *hash<auto> upsert_options);
1207 public:
1208 
1209 
1211 
1215 protected:
1216  bool updateSingleRecordImpl(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
1217 public:
1218 
1219 
1221 
1227 protected:
1228  int updateRecordsImpl(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
1229 public:
1230 
1231 
1233 
1239 protected:
1240  int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
1241 public:
1242 
1243 
1245 
1250 protected:
1251  auto doRequestImpl(auto req, *hash<auto> request_options);
1252 public:
1253 
1254 
1256 
1264 protected:
1265  AbstractDataProvider createChildProviderImpl(string name, hash<string, AbstractDataField> fields, *hash<auto> child_create_options);
1266 public:
1267 
1268 
1270 
1275 protected:
1276  deleteChildProviderImpl(string name, *hash<auto> child_delete_options);
1277 public:
1278 
1279 
1281 
1287 protected:
1288  addFieldImpl(AbstractDataField field, *hash<auto> field_add_options);
1289 public:
1290 
1291 
1293 
1299 protected:
1300  updateFieldImpl(string name, AbstractDataField field, *hash<auto> field_update_options);
1301 public:
1302 
1303 
1305 
1310 protected:
1311  deleteFieldImpl(string name, *hash<auto> field_delete_options);
1312 public:
1313 
1314 
1316 
1320 protected:
1322 public:
1323 
1324 
1326 
1330 protected:
1332 public:
1333 
1334 
1336 
1340 protected:
1341  *hash<string, AbstractDataProviderType> getErrorResponseTypesImpl();
1342 public:
1343 
1344 
1346 
1352 protected:
1354 public:
1355 
1356 
1358 
1360 protected:
1362 public:
1363 
1364 
1366  abstract string getName();
1367 
1369 protected:
1370  abstract hash<DataProviderInfo> getStaticInfoImpl();
1371 public:
1372 };
1373 };
bool supports_update
Does the data provider support record updates?
Definition: AbstractDataProvider.qc.dox.h:85
AbstractDataProviderBulkRecordInterface getBulkRecordInterface(int block_size=1000, *hash< auto > search_options)
Returns an iterator iterating all records with the bulk read API.
*AbstractDataProviderType getResponseTypeImpl()
Returns the description of a response message, if this object represents a response message...
*hash< string, hash< DataProviderOptionInfo > > update_field_options
Update field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:237
updateFieldImpl(string name, AbstractDataField field, *hash< auto > field_update_options)
Updates an existing field.
*hash< string, hash< DataProviderOptionInfo > > getFieldUpdateOptions()
Returns options that can be used for updating fields of the data provider.
*hash< string, hash< DataProviderOptionInfo > > getChildCreateOptions()
Returns options that can be used for creating child data providers.
*hash< auto > searchSingleRecord(hash< auto > where_cond, *hash< auto > search_options)
Returns a single record matching the search options.
Data provider info.
Definition: AbstractDataProvider.qc.dox.h:61
AbstractDataProviderRecordIterator getRecordIterator(*hash< auto > search_options)
Returns an iterator iterating all records.
error(string err, string fmt)
thrown an exception
*hash< string, AbstractDataProviderType > getErrorResponseTypesImpl()
Returns a hash of error responses, if any.
checkUpdate()
Ensures that the data provider supports record upserts.
bool supports_upsert
Does the data provider support record upserts (create or update)?
Definition: AbstractDataProvider.qc.dox.h:90
auto doRequest(auto req, *hash< auto > request_options)
Makes a request and returns the response.
commit()
Commits data written to the data provider.
int updateRecordsImpl(hash< auto > set, hash< auto > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
int deleteRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Deletes zero or more records.
Abstract bulk data operation class.
Definition: AbstractDataProviderBulkOperation.qc.dox.h:33
processConstructorOptions(*hash< string, hash< DataProviderOptionInfo >> option_desc, *hash< auto > options)
processes options passed to the constructor
*AbstractDataProviderType getResponseType()
Returns the description of a response message, if this object represents a response message...
AbstractDataProvider getChildProviderEx(string name)
Returns the given child provider or throws an exception if the given child is unknown.
const UpsertResultUpdated
Indicates that the record was updated.
Definition: AbstractDataProvider.qc.dox.h:36
addFieldImpl(AbstractDataField field, *hash< auto > field_add_options)
Creates a new field.
checkDelete()
Ensures that the data provider supports record deletion.
static code cb_value_needs_resolution
static callback the returns a bool if the value needs dynamic resolution
Definition: AbstractDataProvider.qc.dox.h:277
bool supportsDeleteField()
Returns True if the data provider supports deleting existing fields.
*hash< string, hash< DataProviderOptionInfo > > getCreateOptions()
Returns options that can be used for creating records.
*list< string > getChildProviderNames()
Returns a list of child data provider names, if any.
bool supportsUpdate()
Returns True if the data provider supports the record update API.
hash< auto > getInfoAsData(*bool with_type_info)
Returns static provider information as data; no objects are returned.
addField(AbstractDataField field, *hash< auto > field_add_options)
Creates a new field.
const GenericRecordSearchOptions
Generic record search options; see details below.
Definition: AbstractDataProvider.qc.dox.h:288
static bool setDynamicValueCallbacks()
Ensures that no callbacks can be set for dynamic URI resolution.
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.
bool supportsDeleteChild()
Returns True if the data provider supports creating deleting child data providers.
throwUnimplementedException()
Throws an INVALID-OPERATION exception.
bool supports_delete_field
Does the data provider support deleting fields?
Definition: AbstractDataProvider.qc.dox.h:184
Defines the abstract class for data provider iterators; the destructor releases the iterator...
Definition: AbstractDataProviderRecordIterator.qc.dox.h:276
*hash< auto > createRecord(hash< auto > rec, *hash< auto > create_options)
Creates the given record in the data provider.
const UpsertResultDeleted
Indicates that the record was deleted.
Definition: AbstractDataProvider.qc.dox.h:45
AbstractDataProviderRecordIterator searchRecords(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
*AbstractDataProvider getChildProvider(string name)
Returns the given child provider or NOTHING if the given child is unknown.
The AbstractDataProvider class.
Definition: AbstractDataProvider.qc.dox.h:265
int updateRecords(hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
*AbstractDataProviderType getRequestType()
Returns the description of a successful request message, if any.
*hash< string, hash< DataProviderOptionInfo > > getUpsertOptions()
Returns options that can be used for upserting records.
*hash< string, hash< DataProviderOptionInfo > > create_options
Create options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:194
checkDeleteField()
Ensures that the data provider supports deleting fields.
string name
Data provider name.
Definition: AbstractDataProvider.qc.dox.h:65
const UpsertResultInserted
Indicates that the record was inserted.
Definition: AbstractDataProvider.qc.dox.h:33
deleteChildProviderImpl(string name, *hash< auto > child_delete_options)
Deletes a child data provider.
*hash< auto > checkOptions(string err, *hash< string, hash< DataProviderOptionInfo >> option_desc, *hash< auto > options)
verifies options according to the option
*hash< string, AbstractDataField > getOrNothingRecordType(*hash< auto > search_options)
Returns the description of the record type with "or nothing" types, if any.
*hash< auto > validateSearchOptions(*hash< auto > search_options)
validates search options
bool supportsCreateChild()
Returns True if the data provider supports creating new child data providers.
*hash< string, hash< DataProviderOptionInfo > > getChildDeleteOptions()
Returns options that can be used for deleting child data providers.
AbstractDataProviderRecordIterator requestSearchRecordsImpl(auto req, *hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options according to an API request...
*hash< auto > validateChildDeleteOptions(*hash< auto > child_delete_options)
validates child delete options
string desc
The option description.
Definition: AbstractDataProvider.qc.dox.h:57
checkAddField()
Ensures that the data provider supports adding fields.
*hash< string, hash< DataProviderOptionInfo > > delete_field_options
Delete field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:244
bool updateSingleRecord(hash< auto > set, hash< auto > where_cond, *hash< auto > search_options)
Updates a single record matching the search options.
*hash< string, hash< DataProviderOptionInfo > > constructor_options
Constructor options supported by the data provider for the constructor variant taking a hash...
Definition: AbstractDataProvider.qc.dox.h:189
updateField(string name, AbstractDataField field, *hash< auto > field_update_options)
Updates an existing field.
bool transaction_management
Does the data provider require transaction management?
Definition: AbstractDataProvider.qc.dox.h:139
checkUpsert()
Ensures that the data provider supports record upserts.
*hash< string, AbstractDataProviderType > getErrorResponseTypes()
Returns a hash of error responses, if any.
AbstractDataProviderType getErrorResponseTypeImpl(string error_code)
Returns the type for the given error code.
AbstractDataProvider createChildProvider(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.
deleteField(string name, *hash< auto > field_delete_options)
Deletes an existing field.
bool supports_native_search
Does the data provider support native record searching?
Definition: AbstractDataProvider.qc.dox.h:100
*hash< string, hash< DataProviderOptionInfo > > getRequestOptions()
Returns options that can be used for requests.
const False
static code cb_resolve_value
static callback for dynamic value resolution
Definition: AbstractDataProvider.qc.dox.h:280
bool requiresTransactionManagement()
Returns True if the data provider supports transaction management.
checkCreateChild()
Ensures that the data provider supports creating children.
static bool callbacks_locked
flag if callbacks are locked
Definition: AbstractDataProvider.qc.dox.h:274
bool has_record
Does the data provider provide a record?
Definition: AbstractDataProvider.qc.dox.h:144
*hash< auto > createRecordImpl(hash< auto > rec, *hash< auto > create_options)
Creates the given record to the data provider.
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.
*string getDesc()
Returns the data provider description.
*hash< string, hash< DataProviderOptionInfo > > request_options
Request options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:209
const UpsertResultUnchanged
Indicates that the record was left unchanged.
Definition: AbstractDataProvider.qc.dox.h:42
Logger logger
Logger for logging.
Definition: AbstractDataProvider.qc.dox.h:271
*hash< string, hash< DataProviderOptionInfo > > search_options
Search options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:204
checkCreate()
Ensures that the data provider supports record creation.
abstract hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
*hash< auto > searchSingleRecordImpl(hash< auto > where_cond, *hash< auto > search_options)
Returns a single record matching the search options.
auto doRequestImpl(auto req, *hash< auto > request_options)
Makes a request and returns the response.
AbstractDataProvider getChildProviderPath(string path)
Returns the given child provider from a "/" separated path string.
bool supportsBulkUpsert()
Returns True if the data provider supports bulk upserts.
Defines the abstract class for data provider iterators; the destructor releases the iterator...
Definition: AbstractDataProviderBulkRecordInterface.qc.dox.h:33
*AbstractDataProviderType getRequestTypeImpl()
Returns the description of a successful request message, if any.
hash< DataProviderInfo > getInfo()
Returns data provider info.
checkRead()
Ensures that the data provider supports read operations.
bool supports_add_field
Does the data provider support adding new fields?
Definition: AbstractDataProvider.qc.dox.h:170
AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size=1000, *hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
bool hasRecord()
Returns True if the data provider has a record type.
constructor()
Creates the data provider.
abstract string getName()
Returns the data provider name.
*hash< auto > processFieldValues(*hash< auto > h, *hash< auto > search_options)
processes search or set values to convert types if necessary
setLogger(Logger logger)
Sets or replaces the logger.
checkUpdateField()
Ensures that the data provider supports updating fields.
*hash< auto > validateUpsertOptions(*hash< auto > upsert_options)
validates upsert options
string upsertRecord(hash< auto > rec, *hash< auto > upsert_options)
Upserts the given record in the data provider.
bool supports_children
Does the data provider support children?
Definition: AbstractDataProvider.qc.dox.h:134
*string desc
A markdown description of the data provider.
Definition: AbstractDataProvider.qc.dox.h:256
Data provider option info.
Definition: AbstractDataProvider.qc.dox.h:49
bool supports_read
Does the data provider support reading.
Definition: AbstractDataProvider.qc.dox.h:75
bool supportsUpdateField()
Returns True if the data provider supports updating existing fields.
*hash< auto > searchFirstRecordImpl(hash< auto > where_cond, *hash< auto > search_options)
Returns the first record matching the search options.
checkRequest()
Ensures that the data provider supports the request API.
bool record_requires_search_options
Do we require search options to retrieve the record type?
Definition: AbstractDataProvider.qc.dox.h:149
softlist< AbstractDataProviderType > type
The option value type or types.
Definition: AbstractDataProvider.qc.dox.h:51
bool supportsBulkCreate()
Returns True if the data provider supports bulk creation output.
*hash< string, AbstractDataField > getRecordType(*hash< auto > search_options)
Returns the description of the record type, if any.
bool supports_bulk_create
Does the data provider support native / optimized bulk creation?
Definition: AbstractDataProvider.qc.dox.h:116
bool recordRequiresSearchOptions()
Returns True if the data provider requires search options to retrieve the record type.
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:105
*hash< string, hash< DataProviderOptionInfo > > upsert_options
Upsert options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:199
bool required
Required flag.
Definition: AbstractDataProvider.qc.dox.h:54
*hash< string, hash< DataProviderOptionInfo > > getFieldAddOptions()
Returns options that can be used for adding new fields to the data provider.
*hash< string, hash< DataProviderOptionInfo > > child_delete_options
Child deletion options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:223
*hash< string, AbstractDataField > getSoftRecordType(*hash< auto > search_options)
Returns the description of the record type with soft types, if any.
bool supports_child_create
Does the data provider support creating new child providers?
Definition: AbstractDataProvider.qc.dox.h:156
bool supports_create
Does the data provider support record creation?
Definition: AbstractDataProvider.qc.dox.h:80
bool supportsRead()
Returns True if the data provider supports reading.
hash< auto > hash(object obj)
*hash< string, hash< DataProviderOptionInfo > > getFieldDeleteOptions()
Returns options that can be used for deleting fields from the data provider.
bool supports_delete
Does the data provider support record deletion?
Definition: AbstractDataProvider.qc.dox.h:95
beginTransaction()
Begins a transaction with a data provider.
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.
AbstractDataProviderRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
bool supports_child_delete
Does the data provider support deleting new child providers?
Definition: AbstractDataProvider.qc.dox.h:163
*hash< auto > validateChildCreateOptions(*hash< auto > child_create_options)
validates child create options
AbstractDataProviderRecordIterator requestSearchRecords(auto req, *hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options according to an API request...
describes a data type based on a hashdecl
Definition: AbstractDataField.qc.dox.h:47
string upsertRecordImpl(hash< auto > rec, *hash< auto > upsert_options)
Upserts the given record to the data provider.
AbstractDataProviderBulkOperation getBulkInserter()
Returns a bulk insert operation object for the data provider.
int deleteRecords(*hash< auto > where_cond, *hash< auto > search_options)
Deletes zero or more records.
bool supportsRequest()
Returns True if the data provider supports requests.
bool supports_bulk_read
Does the data provider support native / optimized bulk reads?
Definition: AbstractDataProvider.qc.dox.h:108
bool supportsBulkRead()
Returns True if the data provider supports native bulk reading.
bool supports_request
Does the data provider support the request API?
Definition: AbstractDataProvider.qc.dox.h:129
bool supportsNativeSearch()
Returns True if the data provider supports the record search API natively.
checkDeleteChild()
Ensures that the data provider supports deleting children.
*hash< string, hash< MapperRuntimeKeyInfo > > getMapperRuntimeKeys()
Returns custom data mapper runtime keys.
bool supportsCreate()
Returns True if the data provider supports the record creation API.
AbstractDataProviderBulkOperation getBulkUpserter()
Returns a bulk upsert operation object for the data provider.
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
*AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
deleteFieldImpl(string name, *hash< auto > field_delete_options)
Deletes an existing field.
hash< string, hash< MapperRuntimeKeyInfo > > mapper_keys
A hash of mapper key information.
Definition: AbstractDataProvider.qc.dox.h:251
bool supportsUpsert()
Returns True if the data provider supports the record upsert API.
bool supportsDelete()
Returns True if the data provider supports the record deletion API.
bool updateSingleRecordImpl(hash< auto > set, hash< auto > where_cond, *hash< auto > search_options)
Updates a single record matching the search options.
AbstractDataProviderType getErrorResponseType(string error_code)
Returns the type for the given error code.
*list< string > children
A list of child data providers in this data provider.
Definition: AbstractDataProvider.qc.dox.h:261
deleteChildProvider(string name, *hash< auto > child_delete_options)
Deletes a child data provider.
*hash< auto > validateFieldDeleteOptions(*hash< auto > field_delete_options)
validates field delete options
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
*hash< string, hash< DataProviderOptionInfo > > getSearchOptions()
Returns options that can be used for searching.
*hash< auto > validateRequestOptions(*hash< auto > request_options)
validates request options
bool supports_bulk_upsert
Does the data provider support native / optimized bulk upserts?
Definition: AbstractDataProvider.qc.dox.h:124
*hash< auto > validateFieldUpdateOptions(*hash< auto > field_update_options)
validates field update options
*hash< auto > searchFirstRecord(hash< auto > where_cond, *hash< auto > search_options)
Returns the first record matching the search options.
string type
The name of the provider type.
Definition: AbstractDataProvider.qc.dox.h:70
bool supportsAddField()
Returns True if the data provider supports creating adding new fields.
*hash< auto > validateCreateOptions(*hash< auto > create_options)
validates create options
*hash< string, hash< DataProviderOptionInfo > > add_field_options
Add field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:230
static bool checkCallbacks()
Checks if callbacks have already been set or locked.
rollback()
Rolls back data written to the data provider.
*hash< auto > validateFieldAddOptions(*hash< auto > field_add_options)
validates field add options
bool supports_update_field
Does the data provider support updating existing fields?
Definition: AbstractDataProvider.qc.dox.h:177
const UpsertResultVerified
Indicates that the record was verified as already in the target state.
Definition: AbstractDataProvider.qc.dox.h:39
*hash< string, hash< DataProviderOptionInfo > > child_create_options
Child creation options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:216