Qore DataProvider Module Reference  2.2
AbstractDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
27 namespace DataProvider {
33 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 
192 
194 
197  *string schema_type;
198 
200 
202  *hash<string, hash<DataProviderOptionInfo>> constructor_options;
203 
205 
207  *hash<string, hash<DataProviderOptionInfo>> create_options;
208 
210 
212  *hash<string, hash<DataProviderOptionInfo>> upsert_options;
213 
215 
217  *hash<string, hash<DataProviderOptionInfo>> search_options;
218 
220 
222  *hash<string, hash<DataProviderOptionInfo>> request_options;
223 
225 
229  *hash<string, hash<DataProviderOptionInfo>> child_create_options;
230 
232 
236  *hash<string, hash<DataProviderOptionInfo>> child_delete_options;
237 
239 
243  *hash<string, hash<DataProviderOptionInfo>> add_field_options;
244 
246 
250  *hash<string, hash<DataProviderOptionInfo>> update_field_options;
251 
253 
257  *hash<string, hash<DataProviderOptionInfo>> delete_field_options;
258 
260 
264  hash<string, hash<MapperRuntimeKeyInfo>> mapper_keys = Mapper::MapperKeyInfo;
265 
267 
269  *string desc;
270 
272 
274  *list<string> children;
275 };
276 
279 
280 public:
281 
282 protected:
284  Logger logger;
285 
287  static bool callbacks_locked = False;
288 
291 
293  static code cb_resolve_value;
294 
296 
302 
303 
304 public:
305 
308 
309 
312 
313 
315  setLogger(Logger logger);
316 
317 
319 
323  hash<auto> getInfoAsData(*bool with_type_info);
324 
325 
327  hash<DataProviderInfo> getInfo();
328 
329 
331  *string getDesc();
332 
333 
335 
345  *hash<auto> createRecord(hash<auto> rec, *hash<auto> create_options);
346 
347 
349 
356  string upsertRecord(hash<auto> rec, *hash<auto> upsert_options);
357 
358 
360 
365  *hash<auto> searchFirstRecord(hash<auto> where_cond, *hash<auto> search_options);
366 
367 
369 
375  *hash<auto> searchSingleRecord(hash<auto> where_cond, *hash<auto> search_options);
376 
377 
379 
384 
385 
387 
395 AbstractDataProviderBulkRecordInterface getBulkRecordInterface(int block_size = 1000, *hash<auto> search_options);
396 
397 
399 
408 AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
409 
410 
412 
417  AbstractDataProviderRecordIterator searchRecords(*hash<auto> where_cond, *hash<auto> search_options);
418 
419 
421 
429 AbstractDataProviderRecordIterator requestSearchRecords(auto req, *hash<auto> where_cond, *hash<auto> search_options);
430 
431 
433 
442  bool updateSingleRecord(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
443 
444 
446 
455  int updateRecords(hash<auto> set, *hash<auto> where_cond, *hash<auto> search_options);
456 
457 
459 
468  int deleteRecords(*hash<auto> where_cond, *hash<auto> search_options);
469 
470 
472 
480  auto doRequest(auto req, *hash<auto> request_options);
481 
482 
484 
495 AbstractDataProvider createChildProvider(string name, hash<string, AbstractDataField> fields, *hash<auto> child_create_options);
496 
497 
499 
507  deleteChildProvider(string name, *hash<auto> child_delete_options);
508 
509 
511 
520  addField(AbstractDataField field, *hash<auto> field_add_options);
521 
522 
524 
533  updateField(string name, AbstractDataField field, *hash<auto> field_update_options);
534 
535 
537 
545  deleteField(string name, *hash<auto> field_delete_options);
546 
547 
549 
555  object getSchemaObject();
556 
557 
559 
564 
565 
567 
572 
573 
575 
579  *hash<string, AbstractDataProviderType> getErrorResponseTypes();
580 
581 
583 
591 
592 
594 
596  *list<string> getChildProviderNames();
597 
598 
600 
607 
608 
610 
617 
618 
620 
629 
630 
632 
636 
637 
639 
648 
649 
651 
658 
659 
661 
668 
669 
671 
676 
677 
679 
684 
685 
687 
691  *hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
692 
693 
695 
699 
700 
702 
706 
707 
709 
713 
714 
716 
720 
721 
723 
727 
728 
730 
734 
735 
737 
743 
744 
746 
752 
753 
755 
761 
762 
764 
770 
771 
773 
779 
780 
782 
788 
789 
791 
796 
798 
808  static bool setDynamicValueCallbacks(code value_needs_resolution, code resolve_value);
809 
811 protected:
812  static bool checkCallbacks();
813 public:
814 
815 
817 
819 protected:
820  *hash<auto> validateCreateOptions(*hash<auto> create_options);
821 public:
822 
823 
825 
827 protected:
828  *hash<auto> validateUpsertOptions(*hash<auto> upsert_options);
829 public:
830 
831 
833 
835 protected:
836  *hash<auto> validateSearchOptions(*hash<auto> search_options);
837 public:
838 
839 
841 
843 protected:
844  *hash<auto> validateRequestOptions(*hash<auto> request_options);
845 public:
846 
847 
849 
853 protected:
854  *hash<auto> validateChildCreateOptions(*hash<auto> child_create_options);
855 public:
856 
857 
859 
863 protected:
864  *hash<auto> validateChildDeleteOptions(*hash<auto> child_delete_options);
865 public:
866 
867 
869 
873 protected:
874  *hash<auto> validateFieldAddOptions(*hash<auto> field_add_options);
875 public:
876 
877 
879 
883 protected:
884  *hash<auto> validateFieldUpdateOptions(*hash<auto> field_update_options);
885 public:
886 
887 
889 
893 protected:
894  *hash<auto> validateFieldDeleteOptions(*hash<auto> field_delete_options);
895 public:
896 
897 
899 protected:
900  processConstructorOptions(*hash<string, hash<DataProviderOptionInfo>> option_desc, *hash<auto> options);
901 public:
902 
903 
905 protected:
906  *hash<auto> checkOptions(string err, *hash<string, hash<DataProviderOptionInfo>> option_desc, *hash<auto> options);
907 public:
908 
909 
911 
918 protected:
919  *hash<auto> processFieldValues(*hash<auto> h, *hash<auto> search_options);
920 public:
921 
922 
924 protected:
925  error(string err, string fmt);
926 public:
927 
928 
930 
935 protected:
936  *hash<auto> searchFirstRecordImpl(hash<auto> where_cond, *hash<auto> search_options);
937 public:
938 
939 
941 
948 protected:
949  *hash<auto> searchSingleRecordImpl(hash<auto> where_cond, *hash<auto> search_options);
950 public:
951 
952 
954 
958 protected:
959  *list<string> getChildProviderNamesImpl();
960 public:
961 
962 
964 
966 protected:
968 public:
969 
970 
972 
978  *hash<string, AbstractDataField> getRecordType(*hash<auto> search_options);
979 
980 
982  *hash<string, AbstractDataField> getSoftRecordType(*hash<auto> search_options);
983 
984 
986  *hash<string, AbstractDataField> getOrNothingRecordType(*hash<auto> search_options);
987 
988 
990 
993  *hash<string, hash<DataProviderOptionInfo>> getSearchOptions();
994 
995 
997 
1000  *hash<string, hash<DataProviderOptionInfo>> getCreateOptions();
1001 
1002 
1004 
1007  *hash<string, hash<DataProviderOptionInfo>> getUpsertOptions();
1008 
1009 
1011 
1014  *hash<string, hash<DataProviderOptionInfo>> getRequestOptions();
1015 
1016 
1018 
1024  *hash<string, hash<DataProviderOptionInfo>> getChildCreateOptions();
1025 
1026 
1028 
1034  *hash<string, hash<DataProviderOptionInfo>> getChildDeleteOptions();
1035 
1036 
1038 
1044  *hash<string, hash<DataProviderOptionInfo>> getFieldAddOptions();
1045 
1046 
1048 
1054  *hash<string, hash<DataProviderOptionInfo>> getFieldUpdateOptions();
1055 
1056 
1058 
1064  *hash<string, hash<DataProviderOptionInfo>> getFieldDeleteOptions();
1065 
1066 
1068 
1071 
1072 
1074 
1077 
1078 
1080 
1083 
1084 
1086 
1089 
1090 
1092 
1095 
1096 
1098 
1101 
1102 
1104 
1107 
1108 
1110 
1113 
1114 
1116 
1119 
1120 
1122 
1125 
1126 
1128 
1131 
1132 
1134 
1136  bool hasRecord();
1137 
1138 
1140 
1143 
1144 
1146 
1149 
1150 
1152 
1155 
1156 
1158 
1161 
1162 
1164 
1167 
1168 
1170 
1173 
1174 
1176 
1178  *object getSchemaType();
1179 
1180 
1182 
1186 protected:
1187  *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
1188 public:
1189 
1190 
1192 
1199 protected:
1200  AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000, *hash<auto> where_cond, *hash<auto> search_options);
1201 public:
1202 
1203 
1205 
1210 protected:
1211  AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
1212 public:
1213 
1214 
1216 
1224 protected:
1225  AbstractDataProviderRecordIterator requestSearchRecordsImpl(auto req, *hash<auto> where_cond, *hash<auto> search_options);
1226 public:
1227 
1228 
1230 
1238 protected:
1239  *hash<auto> createRecordImpl(hash<auto> rec, *hash<auto> create_options);
1240 public:
1241 
1242 
1244 
1249 protected:
1250  string upsertRecordImpl(hash<auto> rec, *hash<auto> upsert_options);
1251 public:
1252 
1253 
1255 
1259 protected:
1260  bool updateSingleRecordImpl(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
1261 public:
1262 
1263 
1265 
1271 protected:
1272  int updateRecordsImpl(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
1273 public:
1274 
1275 
1277 
1283 protected:
1284  int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
1285 public:
1286 
1287 
1289 
1294 protected:
1295  auto doRequestImpl(auto req, *hash<auto> request_options);
1296 public:
1297 
1298 
1300 
1308 protected:
1309  AbstractDataProvider createChildProviderImpl(string name, hash<string, AbstractDataField> fields, *hash<auto> child_create_options);
1310 public:
1311 
1312 
1314 
1319 protected:
1320  deleteChildProviderImpl(string name, *hash<auto> child_delete_options);
1321 public:
1322 
1323 
1325 
1331 protected:
1332  addFieldImpl(AbstractDataField field, *hash<auto> field_add_options);
1333 public:
1334 
1335 
1337 
1343 protected:
1344  updateFieldImpl(string name, AbstractDataField field, *hash<auto> field_update_options);
1345 public:
1346 
1347 
1349 
1354 protected:
1355  deleteFieldImpl(string name, *hash<auto> field_delete_options);
1356 public:
1357 
1358 
1360 
1364 protected:
1366 public:
1367 
1368 
1370 
1374 protected:
1376 public:
1377 
1378 
1380 
1384 protected:
1386 public:
1387 
1388 
1390 
1394 protected:
1395  *hash<string, AbstractDataProviderType> getErrorResponseTypesImpl();
1396 public:
1397 
1398 
1400 
1406 protected:
1408 public:
1409 
1410 
1412 
1414 protected:
1416 public:
1417 
1418 
1420  abstract string getName();
1421 
1423 protected:
1424  abstract hash<DataProviderInfo> getStaticInfoImpl();
1425 public:
1426 };
1427 };
describes a data type based on a hashdecl
Definition: AbstractDataField.qc.dox.h:47
Abstract bulk data operation class.
Definition: AbstractDataProviderBulkOperation.qc.dox.h:33
Defines the abstract class for data provider iterators; the destructor releases the iterator.
Definition: AbstractDataProviderBulkRecordInterface.qc.dox.h:33
The AbstractDataProvider class.
Definition: AbstractDataProvider.qc.dox.h:278
static code cb_resolve_value
static callback for dynamic value resolution
Definition: AbstractDataProvider.qc.dox.h:293
error(string err, string fmt)
thrown an exception
*hash< string, hash< MapperRuntimeKeyInfo > > getMapperRuntimeKeys()
Returns custom data mapper runtime keys.
*object getSchemaType()
Returns the schema type for this data provider or NOTHING if no schema type is supported.
checkDeleteChild()
Ensures that the data provider supports deleting children.
*hash< auto > searchFirstRecordImpl(hash< auto > where_cond, *hash< auto > search_options)
Returns the first record matching the search options.
deleteChildProvider(string name, *hash< auto > child_delete_options)
Deletes a child data provider.
bool supportsCreate()
Returns True if the data provider supports the record creation API.
*hash< string, hash< DataProviderOptionInfo > > getChildDeleteOptions()
Returns options that can be used for deleting child data providers.
beginTransaction()
Begins a transaction with a data provider.
Logger logger
Logger for logging.
Definition: AbstractDataProvider.qc.dox.h:284
bool supportsSchema()
Returns True if the data provider supports a schema.
*hash< string, AbstractDataProviderType > getErrorResponseTypes()
Returns a hash of error responses, if any.
*list< string > getChildProviderNamesImpl()
Returns a list of child data provider names, if any.
*AbstractDataProviderType getRequestType()
Returns the description of a successful request message, if any.
bool supportsDelete()
Returns True if the data provider supports the record deletion API.
checkUpdate()
Ensures that the data provider supports record upserts.
*hash< string, AbstractDataField > getRecordTypeImpl(*hash< auto > search_options)
Returns the description of the record type, if any.
*hash< string, AbstractDataField > getSoftRecordType(*hash< auto > search_options)
Returns the description of the record type with soft types, if any.
AbstractDataProviderBulkOperation getBulkUpserter()
Returns a bulk upsert operation object for the data provider.
deleteFieldImpl(string name, *hash< auto > field_delete_options)
Deletes an existing field.
hash< auto > getInfoAsData(*bool with_type_info)
Returns static provider information as data; no objects are returned.
bool updateSingleRecordImpl(hash< auto > set, hash< auto > where_cond, *hash< auto > search_options)
Updates a single record matching the search options.
object getSchemaObjectImpl()
Returns the schema object supporting this data provider.
processConstructorOptions(*hash< string, hash< DataProviderOptionInfo >> option_desc, *hash< auto > options)
processes options passed to the constructor
*hash< string, AbstractDataField > getRecordType(*hash< auto > search_options)
Returns the description of the record type, if any.
updateFieldImpl(string name, AbstractDataField field, *hash< auto > field_update_options)
Updates an existing field.
checkUpdateField()
Ensures that the data provider supports updating fields.
bool supportsDeleteField()
Returns True if the data provider supports deleting existing fields.
*hash< auto > validateChildCreateOptions(*hash< auto > child_create_options)
validates child create options
bool supportsRequest()
Returns True if the data provider supports requests.
bool supportsUpdateField()
Returns True if the data provider supports updating existing fields.
*AbstractDataProvider getChildProvider(string name)
Returns the given child provider or NOTHING if the given child is unknown.
hash< DataProviderInfo > getInfo()
Returns data provider info.
int deleteRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Deletes zero or more records.
const GenericRecordSearchOptions
Generic record search options; see details below.
Definition: AbstractDataProvider.qc.dox.h:301
*hash< string, hash< DataProviderOptionInfo > > getRequestOptions()
Returns options that can be used for requests.
*hash< auto > validateFieldUpdateOptions(*hash< auto > field_update_options)
validates field update options
throwUnimplementedException()
Throws an INVALID-OPERATION exception.
commit()
Commits data written to the data provider.
bool supportsNativeSearch()
Returns True if the data provider supports the record search API natively.
bool supportsRead()
Returns True if the data provider supports reading.
bool requiresTransactionManagement()
Returns True if the data provider supports transaction management.
AbstractDataProviderRecordIterator getRecordIterator(*hash< auto > search_options)
Returns an iterator iterating all records.
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 supportsDeleteChild()
Returns True if the data provider supports creating deleting child data providers.
*hash< string, AbstractDataProviderType > getErrorResponseTypesImpl()
Returns a hash of error responses, if any.
constructor()
Creates the data provider.
*hash< auto > createRecord(hash< auto > rec, *hash< auto > create_options)
Creates the given record in the data provider.
setLogger(Logger logger)
Sets or replaces the logger.
deleteField(string name, *hash< auto > field_delete_options)
Deletes an existing field.
*hash< auto > validateCreateOptions(*hash< auto > create_options)
validates create options
bool supportsAddField()
Returns True if the data provider supports creating adding new fields.
*hash< auto > validateFieldDeleteOptions(*hash< auto > field_delete_options)
validates field delete options
*hash< string, hash< DataProviderOptionInfo > > getChildCreateOptions()
Returns options that can be used for creating child data providers.
*hash< auto > validateFieldAddOptions(*hash< auto > field_add_options)
validates field add options
int updateRecordsImpl(hash< auto > set, hash< auto > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
*hash< auto > validateSearchOptions(*hash< auto > search_options)
validates search options
*hash< auto > validateChildDeleteOptions(*hash< auto > child_delete_options)
validates child delete options
string upsertRecordImpl(hash< auto > rec, *hash< auto > upsert_options)
Upserts the given record to the data provider.
rollback()
Rolls back data written to the data provider.
*AbstractDataProviderType getResponseType()
Returns the description of a response message, if this object represents a response message.
*hash< auto > processFieldValues(*hash< auto > h, *hash< auto > search_options)
processes search or set values to convert types if necessary
*AbstractDataProviderType getResponseTypeImpl()
Returns the description of a response message, if this object represents a response message.
abstract hash< DataProviderInfo > getStaticInfoImpl()
Returns data provider static info.
bool recordRequiresSearchOptions()
Returns True if the data provider requires search options to retrieve the record type.
static bool callbacks_locked
flag if callbacks are locked
Definition: AbstractDataProvider.qc.dox.h:287
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.
AbstractDataProviderBulkOperation getBulkInserter()
Returns a bulk insert operation object for the data provider.
AbstractDataProviderRecordIterator searchRecordsImpl(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
bool supportsBulkUpsert()
Returns True if the data provider supports bulk upserts.
*AbstractDataProviderType getRequestTypeImpl()
Returns the description of a successful request message, if any.
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.
static bool setDynamicValueCallbacks()
Ensures that no callbacks can be set for dynamic URI resolution.
bool updateSingleRecord(hash< auto > set, hash< auto > where_cond, *hash< auto > search_options)
Updates a single record matching the search options.
addFieldImpl(AbstractDataField field, *hash< auto > field_add_options)
Creates a new field.
auto doRequest(auto req, *hash< auto > request_options)
Makes a request and returns the response.
*hash< string, hash< DataProviderOptionInfo > > getFieldAddOptions()
Returns options that can be used for adding new fields to the data provider.
static code cb_value_needs_resolution
static callback the returns a bool if the value needs dynamic resolution
Definition: AbstractDataProvider.qc.dox.h:290
*hash< string, AbstractDataField > getOrNothingRecordType(*hash< auto > search_options)
Returns the description of the record type with "or nothing" types, if any.
object getSchemaObject()
Returns the schema supporting this data provider.
checkCreate()
Ensures that the data provider supports record creation.
*hash< string, hash< DataProviderOptionInfo > > getFieldUpdateOptions()
Returns options that can be used for updating fields of the data provider.
*hash< string, hash< DataProviderOptionInfo > > getUpsertOptions()
Returns options that can be used for upserting records.
checkSchema()
Ensures that the data provider supports a schema.
checkRead()
Ensures that the data provider supports read operations.
*string getDesc()
Returns the data provider description.
*hash< auto > searchFirstRecord(hash< auto > where_cond, *hash< auto > search_options)
Returns the first record matching the search options.
*hash< string, hash< DataProviderOptionInfo > > getSearchOptions()
Returns options that can be used for searching.
AbstractDataProviderBulkRecordInterface getBulkRecordInterface(int block_size=1000, *hash< auto > search_options)
Returns an iterator iterating all records with the bulk read API.
*AbstractDataProvider getChildProviderImpl(string name)
Returns the given child provider or NOTHING if the given child is unknown.
int updateRecords(hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
*hash< auto > searchSingleRecord(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.
AbstractDataProviderRecordIterator searchRecords(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
checkDelete()
Ensures that the data provider supports record deletion.
AbstractDataProviderType getErrorResponseType(string error_code)
Returns the type for the given error code.
bool supportsBulkRead()
Returns True if the data provider supports native bulk reading.
checkDeleteField()
Ensures that the data provider supports deleting fields.
AbstractDataProvider getChildProviderPath(string path)
Returns the given child provider from a "/" separated path string.
constructor(Logger logger)
Creates the data provider with the given Logger.
*list< string > getChildProviderNames()
Returns a list of child data provider names, if any.
addField(AbstractDataField field, *hash< auto > field_add_options)
Creates a new field.
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.
string upsertRecord(hash< auto > rec, *hash< auto > upsert_options)
Upserts the given record in the data provider.
*hash< auto > searchSingleRecordImpl(hash< auto > where_cond, *hash< auto > search_options)
Returns a single record matching the search options.
updateField(string name, AbstractDataField field, *hash< auto > field_update_options)
Updates an existing field.
AbstractDataProviderType getErrorResponseTypeImpl(string error_code)
Returns the type for the given error code.
deleteChildProviderImpl(string name, *hash< auto > child_delete_options)
Deletes a child data provider.
abstract string getName()
Returns the data provider name.
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.
bool hasRecord()
Returns True if the data provider has a record type.
static bool setDynamicValueCallbacks(code value_needs_resolution, code resolve_value)
Set callbacks for dynamic URI resolution to allow for variable URI path elements to be resolved at ru...
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 > createRecordImpl(hash< auto > rec, *hash< auto > create_options)
Creates the given record to the data provider.
checkRequest()
Ensures that the data provider supports the request API.
*hash< auto > validateUpsertOptions(*hash< auto > upsert_options)
validates upsert options
bool supportsUpsert()
Returns True if the data provider supports the record upsert API.
AbstractDataProvider getChildProviderEx(string name)
Returns the given child provider or throws an exception if the given child is unknown.
static bool checkCallbacks()
Checks if callbacks have already been set or locked.
checkAddField()
Ensures that the data provider supports adding fields.
checkCreateChild()
Ensures that the data provider supports creating children.
*hash< string, hash< DataProviderOptionInfo > > getFieldDeleteOptions()
Returns options that can be used for deleting fields from the data provider.
*hash< auto > checkOptions(string err, *hash< string, hash< DataProviderOptionInfo >> option_desc, *hash< auto > options)
verifies options according to the option
bool supportsUpdate()
Returns True if the data provider supports the record update API.
int deleteRecords(*hash< auto > where_cond, *hash< auto > search_options)
Deletes zero or more records.
checkUpsert()
Ensures that the data provider supports record upserts.
bool supportsBulkCreate()
Returns True if the data provider supports bulk creation output.
bool supportsCreateChild()
Returns True if the data provider supports creating new child data providers.
*hash< auto > validateRequestOptions(*hash< auto > request_options)
validates request options
*hash< string, hash< DataProviderOptionInfo > > getCreateOptions()
Returns options that can be used for creating records.
Defines the abstract class for data provider iterators; the destructor releases the iterator.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:276
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:108
const False
hash< auto > hash(object obj)
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
const UpsertResultUnchanged
Indicates that the record was left unchanged.
Definition: AbstractDataProvider.qc.dox.h:42
const UpsertResultDeleted
Indicates that the record was deleted.
Definition: AbstractDataProvider.qc.dox.h:45
const UpsertResultInserted
Indicates that the record was inserted.
Definition: AbstractDataProvider.qc.dox.h:33
const UpsertResultVerified
Indicates that the record was verified as already in the target state.
Definition: AbstractDataProvider.qc.dox.h:39
const UpsertResultUpdated
Indicates that the record was updated.
Definition: AbstractDataProvider.qc.dox.h:36
Data provider info.
Definition: AbstractDataProvider.qc.dox.h:61
bool supports_delete
Does the data provider support record deletion?
Definition: AbstractDataProvider.qc.dox.h:95
bool supports_bulk_read
Does the data provider support native / optimized bulk reads?
Definition: AbstractDataProvider.qc.dox.h:108
*hash< string, hash< DataProviderOptionInfo > > add_field_options
Add field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:243
bool transaction_management
Does the data provider require transaction management?
Definition: AbstractDataProvider.qc.dox.h:139
bool supports_child_delete
Does the data provider support deleting new child providers?
Definition: AbstractDataProvider.qc.dox.h:163
string type
The name of the provider type.
Definition: AbstractDataProvider.qc.dox.h:70
bool supports_delete_field
Does the data provider support deleting fields?
Definition: AbstractDataProvider.qc.dox.h:184
bool supports_child_create
Does the data provider support creating new child providers?
Definition: AbstractDataProvider.qc.dox.h:156
*hash< string, hash< DataProviderOptionInfo > > child_delete_options
Child deletion options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:236
bool supports_native_search
Does the data provider support native record searching?
Definition: AbstractDataProvider.qc.dox.h:100
*hash< string, hash< DataProviderOptionInfo > > request_options
Request options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:222
*hash< string, hash< DataProviderOptionInfo > > search_options
Search options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:217
string name
Data provider name.
Definition: AbstractDataProvider.qc.dox.h:65
bool supports_add_field
Does the data provider support adding new fields?
Definition: AbstractDataProvider.qc.dox.h:170
bool supports_bulk_upsert
Does the data provider support native / optimized bulk upserts?
Definition: AbstractDataProvider.qc.dox.h:124
*hash< string, hash< DataProviderOptionInfo > > child_create_options
Child creation options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:229
hash< string, hash< MapperRuntimeKeyInfo > > mapper_keys
A hash of mapper key information.
Definition: AbstractDataProvider.qc.dox.h:264
bool supports_read
Does the data provider support reading.
Definition: AbstractDataProvider.qc.dox.h:75
bool record_requires_search_options
Do we require search options to retrieve the record type?
Definition: AbstractDataProvider.qc.dox.h:149
bool supports_update
Does the data provider support record updates?
Definition: AbstractDataProvider.qc.dox.h:85
*hash< string, hash< DataProviderOptionInfo > > upsert_options
Upsert options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:212
bool supports_update_field
Does the data provider support updating existing fields?
Definition: AbstractDataProvider.qc.dox.h:177
bool supports_request
Does the data provider support the request API?
Definition: AbstractDataProvider.qc.dox.h:129
*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:202
*hash< string, hash< DataProviderOptionInfo > > create_options
Create options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:207
bool supports_create
Does the data provider support record creation?
Definition: AbstractDataProvider.qc.dox.h:80
*list< string > children
A list of child data providers in this data provider.
Definition: AbstractDataProvider.qc.dox.h:274
bool supports_upsert
Does the data provider support record upserts (create or update)?
Definition: AbstractDataProvider.qc.dox.h:90
bool supports_bulk_create
Does the data provider support native / optimized bulk creation?
Definition: AbstractDataProvider.qc.dox.h:116
*hash< string, hash< DataProviderOptionInfo > > delete_field_options
Delete field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:257
bool supports_children
Does the data provider support children?
Definition: AbstractDataProvider.qc.dox.h:134
*hash< string, hash< DataProviderOptionInfo > > update_field_options
Update field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:250
*string desc
A markdown description of the data provider.
Definition: AbstractDataProvider.qc.dox.h:269
bool supports_schema
Does the data provider support a schema?
Definition: AbstractDataProvider.qc.dox.h:191
*string schema_type
Returns the schema type supported by this data provider.
Definition: AbstractDataProvider.qc.dox.h:197
bool has_record
Does the data provider provide a record?
Definition: AbstractDataProvider.qc.dox.h:144
Data provider option info.
Definition: AbstractDataProvider.qc.dox.h:49
softlist< AbstractDataProviderType > type
The option value type or types.
Definition: AbstractDataProvider.qc.dox.h:51
string desc
The option description.
Definition: AbstractDataProvider.qc.dox.h:57
bool required
Required flag.
Definition: AbstractDataProvider.qc.dox.h:54