Qore DataProvider Module Reference  2.1.1
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  *list<string> children;
257 };
258 
261 
262 public:
263 
264 protected:
266  Logger logger;
267 
269  static bool callbacks_locked = False;
270 
273 
275  static code cb_resolve_value;
276 
278 
284 
285 
286 public:
287 
289  constructor();
290 
291 
293  constructor(Logger logger);
294 
295 
297  setLogger(Logger logger);
298 
299 
301 
305  hash<auto> getInfoAsData(*bool with_type_info);
306 
307 
309  hash<DataProviderInfo> getInfo();
310 
311 
313 
323  *hash<auto> createRecord(hash<auto> rec, *hash<auto> create_options);
324 
325 
327 
334  string upsertRecord(hash<auto> rec, *hash<auto> upsert_options);
335 
336 
338 
343  *hash<auto> searchFirstRecord(hash<auto> where_cond, *hash<auto> search_options);
344 
345 
347 
353  *hash<auto> searchSingleRecord(hash<auto> where_cond, *hash<auto> search_options);
354 
355 
357 
361  AbstractDataProviderRecordIterator getRecordIterator(*hash<auto> search_options);
362 
363 
365 
373 AbstractDataProviderBulkRecordInterface getBulkRecordInterface(int block_size = 1000, *hash<auto> search_options);
374 
375 
377 
386 AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
387 
388 
390 
395  AbstractDataProviderRecordIterator searchRecords(*hash<auto> where_cond, *hash<auto> search_options);
396 
397 
399 
407 AbstractDataProviderRecordIterator requestSearchRecords(auto req, *hash<auto> where_cond, *hash<auto> search_options);
408 
409 
411 
420  bool updateSingleRecord(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
421 
422 
424 
433  int updateRecords(hash<auto> set, *hash<auto> where_cond, *hash<auto> search_options);
434 
435 
437 
446  int deleteRecords(*hash<auto> where_cond, *hash<auto> search_options);
447 
448 
450 
458  auto doRequest(auto req, *hash<auto> request_options);
459 
460 
462 
473 AbstractDataProvider createChildProvider(string name, hash<string, AbstractDataField> fields, *hash<auto> child_create_options);
474 
475 
477 
485  deleteChildProvider(string name, *hash<auto> child_delete_options);
486 
487 
489 
498  addField(AbstractDataField field, *hash<auto> field_add_options);
499 
500 
502 
511  updateField(string name, AbstractDataField field, *hash<auto> field_update_options);
512 
513 
515 
523  deleteField(string name, *hash<auto> field_delete_options);
524 
525 
527 
532 
533 
535 
540 
541 
543 
547  *hash<string, AbstractDataProviderType> getErrorResponseTypes();
548 
549 
551 
559 
560 
562 
564  *list<string> getChildProviderNames();
565 
566 
568 
575 
576 
578 
585 
586 
588 
597 
598 
600 
604 
605 
607 
616 
617 
619 
625  commit();
626 
627 
629 
635  rollback();
636 
637 
639 
644 
645 
647 
652 
653 
655 
659  *hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
660 
661 
663 
666  checkRead();
667 
668 
670 
673  checkCreate();
674 
675 
677 
680  checkUpsert();
681 
682 
684 
687  checkUpdate();
688 
689 
691 
694  checkDelete();
695 
696 
698 
701  checkRequest();
702 
703 
705 
711 
712 
714 
720 
721 
723 
728  checkAddField();
729 
730 
732 
738 
739 
741 
747 
748 
750 
754  static bool setDynamicValueCallbacks();
755 
757 
767  static bool setDynamicValueCallbacks(code value_needs_resolution, code resolve_value);
768 
770 protected:
771  static bool checkCallbacks();
772 public:
773 
774 
776 
778 protected:
779  *hash<auto> validateCreateOptions(*hash<auto> create_options);
780 public:
781 
782 
784 
786 protected:
787  *hash<auto> validateUpsertOptions(*hash<auto> upsert_options);
788 public:
789 
790 
792 
794 protected:
795  *hash<auto> validateSearchOptions(*hash<auto> search_options);
796 public:
797 
798 
800 
802 protected:
803  *hash<auto> validateRequestOptions(*hash<auto> request_options);
804 public:
805 
806 
808 
812 protected:
813  *hash<auto> validateChildCreateOptions(*hash<auto> child_create_options);
814 public:
815 
816 
818 
822 protected:
823  *hash<auto> validateChildDeleteOptions(*hash<auto> child_delete_options);
824 public:
825 
826 
828 
832 protected:
833  *hash<auto> validateFieldAddOptions(*hash<auto> field_add_options);
834 public:
835 
836 
838 
842 protected:
843  *hash<auto> validateFieldUpdateOptions(*hash<auto> field_update_options);
844 public:
845 
846 
848 
852 protected:
853  *hash<auto> validateFieldDeleteOptions(*hash<auto> field_delete_options);
854 public:
855 
856 
858 protected:
859  processConstructorOptions(*hash<string, hash<DataProviderOptionInfo>> option_desc, *hash<auto> options);
860 public:
861 
862 
864 protected:
865  *hash<auto> checkOptions(string err, *hash<string, hash<DataProviderOptionInfo>> option_desc, *hash<auto> options);
866 public:
867 
868 
870 
877 protected:
878  *hash<auto> processFieldValues(*hash<auto> h, *hash<auto> search_options);
879 public:
880 
881 
883 protected:
884  error(string err, string fmt);
885 public:
886 
887 
889 
894 protected:
895  *hash<auto> searchFirstRecordImpl(hash<auto> where_cond, *hash<auto> search_options);
896 public:
897 
898 
900 
907 protected:
908  *hash<auto> searchSingleRecordImpl(hash<auto> where_cond, *hash<auto> search_options);
909 public:
910 
911 
913 
917 protected:
918  *list<string> getChildProviderNamesImpl();
919 public:
920 
921 
923 
925 protected:
927 public:
928 
929 
931 
937  *hash<string, AbstractDataField> getRecordType(*hash<auto> search_options);
938 
939 
941  *hash<string, AbstractDataField> getSoftRecordType(*hash<auto> search_options);
942 
943 
945  *hash<string, AbstractDataField> getOrNothingRecordType(*hash<auto> search_options);
946 
947 
949 
952  *hash<string, hash<DataProviderOptionInfo>> getSearchOptions();
953 
954 
956 
959  *hash<string, hash<DataProviderOptionInfo>> getCreateOptions();
960 
961 
963 
966  *hash<string, hash<DataProviderOptionInfo>> getUpsertOptions();
967 
968 
970 
973  *hash<string, hash<DataProviderOptionInfo>> getRequestOptions();
974 
975 
977 
983  *hash<string, hash<DataProviderOptionInfo>> getChildCreateOptions();
984 
985 
987 
993  *hash<string, hash<DataProviderOptionInfo>> getChildDeleteOptions();
994 
995 
997 
1003  *hash<string, hash<DataProviderOptionInfo>> getFieldAddOptions();
1004 
1005 
1007 
1013  *hash<string, hash<DataProviderOptionInfo>> getFieldUpdateOptions();
1014 
1015 
1017 
1023  *hash<string, hash<DataProviderOptionInfo>> getFieldDeleteOptions();
1024 
1025 
1027 
1029  bool supportsRead();
1030 
1031 
1033 
1035  bool supportsBulkRead();
1036 
1037 
1039 
1041  bool supportsCreate();
1042 
1043 
1045 
1047  bool supportsUpdate();
1048 
1049 
1051 
1053  bool supportsUpsert();
1054 
1055 
1057 
1059  bool supportsDelete();
1060 
1061 
1063 
1065  bool supportsNativeSearch();
1066 
1067 
1069 
1071  bool supportsBulkCreate();
1072 
1073 
1075 
1077  bool supportsBulkUpsert();
1078 
1079 
1081 
1083  bool supportsRequest();
1084 
1085 
1087 
1090 
1091 
1093 
1095  bool hasRecord();
1096 
1097 
1099 
1101  bool supportsCreateChild();
1102 
1103 
1105 
1107  bool supportsDeleteChild();
1108 
1109 
1111 
1113  bool supportsAddField();
1114 
1115 
1117 
1119  bool supportsUpdateField();
1120 
1121 
1123 
1125  bool supportsDeleteField();
1126 
1127 
1129 
1133 protected:
1134  *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
1135 public:
1136 
1137 
1139 
1146 protected:
1147  AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
1148 public:
1149 
1150 
1152 
1157 protected:
1158  AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
1159 public:
1160 
1161 
1163 
1171 protected:
1172  AbstractDataProviderRecordIterator requestSearchRecordsImpl(auto req, *hash<auto> where_cond, *hash<auto> search_options);
1173 public:
1174 
1175 
1177 
1185 protected:
1186  *hash<auto> createRecordImpl(hash<auto> rec, *hash<auto> create_options);
1187 public:
1188 
1189 
1191 
1196 protected:
1197  string upsertRecordImpl(hash<auto> rec, *hash<auto> upsert_options);
1198 public:
1199 
1200 
1202 
1206 protected:
1207  bool updateSingleRecordImpl(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
1208 public:
1209 
1210 
1212 
1218 protected:
1219  int updateRecordsImpl(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
1220 public:
1221 
1222 
1224 
1230 protected:
1231  int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
1232 public:
1233 
1234 
1236 
1241 protected:
1242  auto doRequestImpl(auto req, *hash<auto> request_options);
1243 public:
1244 
1245 
1247 
1255 protected:
1256  AbstractDataProvider createChildProviderImpl(string name, hash<string, AbstractDataField> fields, *hash<auto> child_create_options);
1257 public:
1258 
1259 
1261 
1266 protected:
1267  deleteChildProviderImpl(string name, *hash<auto> child_delete_options);
1268 public:
1269 
1270 
1272 
1278 protected:
1279  addFieldImpl(AbstractDataField field, *hash<auto> field_add_options);
1280 public:
1281 
1282 
1284 
1290 protected:
1291  updateFieldImpl(string name, AbstractDataField field, *hash<auto> field_update_options);
1292 public:
1293 
1294 
1296 
1301 protected:
1302  deleteFieldImpl(string name, *hash<auto> field_delete_options);
1303 public:
1304 
1305 
1307 
1311 protected:
1313 public:
1314 
1315 
1317 
1321 protected:
1323 public:
1324 
1325 
1327 
1331 protected:
1332  *hash<string, AbstractDataProviderType> getErrorResponseTypesImpl();
1333 public:
1334 
1335 
1337 
1343 protected:
1345 public:
1346 
1347 
1349 
1351 protected:
1353 public:
1354 
1355 
1357  abstract string getName();
1358 
1360 protected:
1361  abstract hash<DataProviderInfo> getStaticInfoImpl();
1362 public:
1363 };
1364 };
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:272
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:283
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:260
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:275
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:269
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.
*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:266
*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
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:44
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:256
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