| Qore DataProvider Module Reference 2.7.1

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 AllowedValueInfo {
51 auto value;
52
54 string desc;
55 };
56
58 public struct DataProviderOptionInfo {
60 softlist<AbstractDataProviderType> type;
61
63 bool required = False;
64
66 string desc;
67
69 auto default_value;
70
72 bool sensitive = False;
73
75 *softlist<hash<AllowedValueInfo>> allowed_values;
76 };
77
79 public struct DataProviderSummaryInfo {
81 string name;
82
84 string desc;
85
87 string type;
88
90 bool supports_read = False;
91
93 bool supports_create = False;
94
96 bool supports_update = False;
97
99 bool supports_upsert = False;
100
102 bool supports_delete = False;
103
105 bool supports_native_search = False;
106
108
111 bool supports_bulk_read = False;
112
114
117 bool supports_bulk_create = False;
118
120
123 bool supports_bulk_upsert = False;
124
126 bool supports_request = False;
127
129 bool supports_children = False;
130
132 bool transaction_management = False;
133
135 bool has_record = False;
136
138 bool supports_search_expressions = False;
139
141
144 bool supports_observable = False;
145
147
154 string supports_messages = MSG_None;
155
157
159 bool children_can_support_apis = False;
160
162
164 bool children_can_support_records = False;
165
167
169 bool children_can_support_observers = False;
170
172
174 bool children_can_support_messages = False;
175 };
176
178 public struct DataProviderMessageInfo {
180
182 string desc;
183
185 AbstractDataProviderType type;
186 };
187
197
199 const MSG_None = "NONE";
200
202
206 const MSG_Sync = "SYNC";
207
209
211 const MSG_Async = "ASYNC";
213
220 const ST_Any = 1;
221
223 const ST_Value = 2;
224
226
229 const ST_Field = 3;
231
233 const SignatureTypeCodeMap = {
234 ST_Any: "any",
235 ST_Value: "value",
236 ST_Field: "field reference",
237 };
238
240 const SignatureTypeDescMap = map {$1.value: $1.key.toInt()}, SignatureTypeCodeMap.pairIterator();
241
248 const ER_Search = (1 << 0);
249
251 const ER_Field = (1 << 1);
252
254 const ER_All = ER_Search | ER_Field;
256
258 const RoleCodeMap = {
259 ER_Search: "search",
260 };
261
263 const RoleDescMap = map {$1.value: $1.key.toInt()}, RoleCodeMap.pairIterator();
264
271 const LC_And = (1 << 0);
272
274 const LC_Or = (1 << 1);
275
277 const LC_All = (LC_And | LC_Or);
279
281 const LogicCodeMap = {
282 LC_And: "AND",
283 LC_Or: "OR",
284 };
285
287 const LogicDescMap = map {$1.value: $1.key.toInt()}, LogicCodeMap.pairIterator();
288
290 public struct DataProviderSignatureTypeInfo {
292 AbstractDataProviderType type;
293
295 int type_code = ST_Any;
296 };
297
299 const DataProviderSignatureFieldType = <DataProviderSignatureTypeInfo>{
300 "type": AbstractDataProviderTypeMap."any",
301 "type_code": ST_Field,
302 };
303
305 const DataProviderSignatureAnyType = <DataProviderSignatureTypeInfo>{
306 "type": AbstractDataProviderTypeMap."any",
307 "type_code": ST_Any,
308 };
309
311 const DataProviderSignatureStringValueType = <DataProviderSignatureTypeInfo>{
312 "type": AbstractDataProviderTypeMap."string",
313 "type_code": ST_Value,
314 };
315
317 const DataProviderSignatureOptionalStringValueType = <DataProviderSignatureTypeInfo>{
318 "type": AbstractDataProviderTypeMap."*string",
319 "type_code": ST_Value,
320 };
321
323 const DataProviderSignatureIntValueType = <DataProviderSignatureTypeInfo>{
324 "type": AbstractDataProviderTypeMap."int",
325 "type_code": ST_Value,
326 };
327
329 const DataProviderSignatureOptionalIntValueType = <DataProviderSignatureTypeInfo>{
330 "type": AbstractDataProviderTypeMap."*int",
331 "type_code": ST_Value,
332 };
333
335 const DataProviderSignatureListValueType = <DataProviderSignatureTypeInfo>{
336 "type": AbstractDataProviderTypeMap."list",
337 "type_code": ST_Value,
338 };
339
341 const DataProviderSignatureHashValueType = <DataProviderSignatureTypeInfo>{
342 "type": AbstractDataProviderTypeMap."hash",
343 "type_code": ST_Value,
344 };
345
347 const DataProviderSignatureBoolType = <DataProviderSignatureTypeInfo>{
348 "type": AbstractDataProviderTypeMap."bool",
349 "type_code": ST_Any,
350 };
351
353 const DataProviderSignatureStringType = <DataProviderSignatureTypeInfo>{
354 "type": AbstractDataProviderTypeMap."string",
355 "type_code": ST_Any,
356 };
357
359 const DataProviderSignatureDateType = <DataProviderSignatureTypeInfo>{
360 "type": AbstractDataProviderTypeMap."date",
361 "type_code": ST_Any,
362 };
363
370 const DET_Operator = 1;
371
373 const DET_Function = 2;
375
377 const ExpressionTypeCodeMap = {
378 DET_Operator: "operator",
379 DET_Function: "function",
380 };
381
383 const ExpressionTypeDescMap = map {$1.value: $1.key.toInt()}, ExpressionTypeCodeMap.pairIterator();
384
386 public struct DataProviderExpressionInfo {
388 int type;
389
391
393 string label;
394
396 string name;
397
399 string desc;
400
402 string symbol;
403
405
407 int role = ER_All;
408
410 softlist<hash<DataProviderSignatureTypeInfo>> args;
411
413 AbstractDataProviderType return_type;
414
416 bool varargs = False;
417 };
418
420 public struct DataProviderFieldReference {
422 string field;
423 };
424
426 public struct DataProviderExpression {
428 string exp;
429
431
434 softlist<auto> args;
435 };
436
438 public struct DataProviderInfo {
440
442 string name;
443
445
447 string type;
448
450
452 bool supports_read = False;
453
455
457 bool supports_create = False;
458
460
462 bool supports_update = False;
463
465
467 bool supports_upsert = False;
468
470
472 bool supports_delete = False;
473
475
477 bool supports_native_search = False;
478
480
485 bool supports_bulk_read = False;
486
488
493 bool supports_bulk_create = False;
494
496
501 bool supports_bulk_upsert = False;
502
504
506 bool supports_request = False;
507
509
511 bool supports_children = False;
512
514
516 bool transaction_management = False;
517
519
521 bool has_record = False;
522
524
526 bool record_requires_search_options = False;
527
529
533 bool supports_child_create = False;
534
536
540 bool supports_child_delete = False;
541
543
547 bool supports_add_field = False;
548
550
554 bool supports_update_field = False;
555
557
561 bool supports_delete_field = False;
562
564
568 bool supports_schema = False;
569
571
575 bool supports_search_expressions = False;
576
578
582 bool supports_observable = False;
583
585
592 string supports_messages = MSG_None;
593
595
597 bool children_can_support_apis = False;
598
600
602 bool children_can_support_records = False;
603
605
607 bool children_can_support_observers = False;
608
610
612 bool children_can_support_messages = False;
613
615
618 *string schema_type;
619
621
623 *hash<string, hash<DataProviderOptionInfo>> constructor_options;
624
626
628 *hash<string, hash<DataProviderOptionInfo>> create_options;
629
631
633 *hash<string, hash<DataProviderOptionInfo>> upsert_options;
634
636
638 *hash<string, hash<DataProviderOptionInfo>> search_options;
639
641
643 *hash<string, hash<DataProviderOptionInfo>> request_options;
644
646
650 *hash<string, hash<DataProviderOptionInfo>> child_create_options;
651
653
657 *hash<string, hash<DataProviderOptionInfo>> child_delete_options;
658
660
664 *hash<string, hash<DataProviderOptionInfo>> add_field_options;
665
667
671 *hash<string, hash<DataProviderOptionInfo>> update_field_options;
672
674
678 *hash<string, hash<DataProviderOptionInfo>> delete_field_options;
679
681
685 *hash<string, hash<DataProviderOptionInfo>> send_message_options;
686
688
692 *hash<string, hash<DataProviderExpressionInfo>> expressions;
693
695
699 *hash<string, hash<DataProviderMessageInfo>> events;
700
702
706 *hash<string, hash<DataProviderMessageInfo>> messages;
707
709
711 int search_logic_capabilities = LC_All;
712
714
718 hash<string, hash<MapperRuntimeKeyInfo>> mapper_keys = Mapper::MapperKeyInfo;
719
721
723 *string desc;
724
726
728 *list<string> children;
729 };
730
732 class AbstractDataProvider {
733
734 public:
736 const GenericExpressionImplementations = {
737 DP_OP_AND: {
738 "exp": <DataProviderExpressionInfo>{
739 "type": DET_Operator,
740 "label": DP_OP_AND,
741 "name": "and (&&)",
742 "desc": "logical AND operation supporting logic short-circuiting",
743 "symbol": "&&",
744 "args": (DataProviderSignatureBoolType),
745 "varargs": True,
746 "return_type": AbstractDataProviderTypeMap."bool",
747 },
748 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
749 foreach auto arg in (exp.args) {
750 if (!AbstractDataProvider::evalGenericExpressionValue(rec, arg)) {
751 return False;
752 }
753 }
754 return True;
755 },
756 },
757 DP_OP_OR: {
758 "exp": <DataProviderExpressionInfo>{
759 "type": DET_Operator,
760 "label": DP_OP_OR,
761 "name": "or (||)",
762 "desc": "logical OR operation supporting logic short-circuiting",
763 "symbol": "||",
764 "args": (DataProviderSignatureBoolType),
765 "varargs": True,
766 "return_type": AbstractDataProviderTypeMap."bool",
767 },
768 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
769 foreach auto arg in (exp.args) {
770 if (AbstractDataProvider::evalGenericExpressionValue(rec, arg)) {
771 return True;
772 }
773 }
774 return False;
775 },
776 },
777 DP_SEARCH_OP_EQ: {
778 "exp": <DataProviderExpressionInfo>{
779 "type": DET_Operator,
780 "label": DP_SEARCH_OP_EQ,
781 "name": "equals (=)",
782 "desc": "a value for equality comparisons; the type of the value should correspond to the field "
783 "type",
784 "symbol": "==",
785 "args": (DataProviderSignatureAnyType, DataProviderSignatureAnyType),
786 "return_type": AbstractDataProviderTypeMap."bool",
787 },
788 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
789 auto arg0 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]);
790 auto arg1 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
791 // for backwards compatibility, if the first argument is a field reference, and the second is a
792 # hash
793
794 return arg0 == arg1;
795 },
796 },
797 DP_SEARCH_OP_NE: {
798 "exp": <DataProviderExpressionInfo>{
799 "type": DET_Operator,
800 "label": DP_SEARCH_OP_NE,
801 "name": "not equals (!=)",
802 "desc": "a value for not-equals comparisons; the type of the value should correspond to the "
803 "field type",
804 "symbol": "!=",
805 "args": (DataProviderSignatureAnyType, DataProviderSignatureAnyType),
806 "return_type": AbstractDataProviderTypeMap."bool",
807 },
808 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
809 return AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0])
810 != AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
811 },
812 },
813 DP_SEARCH_OP_LT: {
814 "exp": <DataProviderExpressionInfo>{
815 "type": DET_Operator,
816 "label": DP_SEARCH_OP_LT,
817 "name": "less than (<)",
818 "desc": "a value for less than comparisons; if the field value is less than the argument, then "
819 "the operation returns true; the type of the value should correspond to the field type",
820 "symbol": "<",
821 "args": (DataProviderSignatureAnyType, DataProviderSignatureAnyType),
822 "return_type": AbstractDataProviderTypeMap."bool",
823 },
824 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
825 return AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0])
826 < AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
827 },
828 },
829 DP_SEARCH_OP_LE: {
830 "exp": <DataProviderExpressionInfo>{
831 "type": DET_Operator,
832 "label": DP_SEARCH_OP_LE,
833 "name": "less than or equals (<=)",
834 "desc": "a value for less than or equals comparisons; if the field value is less than or equal "
835 "to the argument, then the operation returns true; the type of the value should correspond "
836 "to the field type",
837 "symbol": "<=",
838 "args": (DataProviderSignatureAnyType, DataProviderSignatureAnyType),
839 "return_type": AbstractDataProviderTypeMap."bool",
840 },
841 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
842 return AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0])
843 <= AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
844 },
845 },
846 DP_SEARCH_OP_GT: {
847 "exp": <DataProviderExpressionInfo>{
848 "type": DET_Operator,
849 "label": DP_SEARCH_OP_GT,
850 "name": "greater than (>)",
851 "desc": "a value for less than comparisons; if the field value is less than the argument, then "
852 "the operation returns true; the type of the value should correspond to the field type",
853 "symbol": ">",
854 "args": (DataProviderSignatureAnyType, DataProviderSignatureAnyType),
855 "return_type": AbstractDataProviderTypeMap."bool",
856 },
857 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
858 return AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0])
859 > AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
860 },
861 },
862 DP_SEARCH_OP_GE: {
863 "exp": <DataProviderExpressionInfo>{
864 "type": DET_Operator,
865 "label": DP_SEARCH_OP_GE,
866 "name": "greater than or equals (>=)",
867 "desc": "a value for greater than or equals comparisons; if the field value is greater than or "
868 "equal to the argument, then the operation returns true; the type of the value should "
869 "correspond to the field type",
870 "symbol": ">=",
871 "args": (DataProviderSignatureAnyType, DataProviderSignatureAnyType),
872 "return_type": AbstractDataProviderTypeMap."bool",
873 },
874 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
875 return AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0])
876 >= AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
877 },
878 },
879 DP_SEARCH_OP_BETWEEN: {
880 "exp": <DataProviderExpressionInfo>{
881 "type": DET_Operator,
882 "label": DP_SEARCH_OP_BETWEEN,
883 "name": "between",
884 "desc": "A list with two elements giving the lower and upper bounds of the field value; the list "
885 "element value types must be equal to the field's type",
886 "symbol": "between",
887 "args": (
888 DataProviderSignatureAnyType,
889 DataProviderSignatureAnyType,
890 DataProviderSignatureAnyType,
891 ),
892 "return_type": AbstractDataProviderTypeMap."bool",
893 },
894 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
895 auto arg0 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]);
896 return arg0 > AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1])
897 && arg0 < AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[2]);
898 },
899 },
900 DP_SEARCH_OP_IN: {
901 "exp": <DataProviderExpressionInfo>{
902 "type": DET_Operator,
903 "label": DP_SEARCH_OP_IN,
904 "name": "in",
905 "desc": "A list giving possible values of the field; if the field's value matches any of the "
906 "values in the list, then the operation returns true; element value types must be equal to "
907 "the field's type",
908 "symbol": "in",
909 "args": (DataProviderSignatureAnyType),
910 "return_type": AbstractDataProviderTypeMap."bool",
911 "varargs": True,
912 },
913 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
914 return inlist(AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]),
915 AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]));
916 },
917 },
918 DP_SEARCH_OP_NOT: {
919 "exp": <DataProviderExpressionInfo>{
920 "type": DET_Operator,
921 "label": DP_SEARCH_OP_NOT,
922 "name": "logical not (!)",
923 "desc": "This operator reverses the logcal value of the operator expression given as an argument",
924 "symbol": "!",
925 "args": (DataProviderSignatureBoolType,),
926 "return_type": AbstractDataProviderTypeMap."bool",
927 },
928 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
929 return (!AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]));
930 },
931 },
932 DP_SEARCH_OP_REGEX: {
933 "exp": <DataProviderExpressionInfo>{
934 "type": DET_Operator,
935 "label": DP_SEARCH_OP_REGEX,
936 "name": "regular expression match",
937 "desc": "regular expression operator; the first argument will be processed with the second as a "
938 "regular expression pattern",
939 "symbol": "regex",
940 "args": (
941 DataProviderSignatureStringType,
942 <DataProviderSignatureTypeInfo>{
943 "type": (new HashDataType())
944 .addField(new QoreDataField("pattern", "the regular expression pattern",
945 AbstractDataProviderTypeMap."string"))
946 .addField(new QoreDataField("options", "regular expression options",
947 AbstractDataProviderTypeMap."*int")),
948 },
949 ),
950 "return_type": AbstractDataProviderTypeMap."bool",
951 },
952 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
953 auto arg1 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
954 return regex(AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]).toString(),
955 arg1.pattern, arg1.options);
956 },
957 },
958 };
959
961
966 const GenericExpressions = map {$1.key: $1.value.exp}, GenericExpressionImplementations.pairIterator();
967
969 const DataProviderSummaryInfoKeys = map $1.getName(),
970 TypedHash::forName("DataProviderSummaryInfo").getMembers();
971
972 protected:
974 *Logger logger;
975
977 static bool callbacks_locked = False;
978
980 static code cb_value_needs_resolution;
981
983 static code cb_resolve_value;
984
986
991 const GenericRecordSearchOptions = {
992 "columns": <DataProviderOptionInfo>{
993 "type": AbstractDataProviderTypeMap."any",
994 "desc": "allows a subset of fields to be output in searches",
995 },
996 "limit": <DataProviderOptionInfo>{
997 "type": AbstractDataProviderType::get(IntType),
998 "desc": "the maximum number of records to return",
999 },
1000 "offset": <DataProviderOptionInfo>{
1001 "type": AbstractDataProviderType::get(IntType),
1002 "desc": "the offset number in records to return",
1003 },
1004 };
1005
1006 public:
1007
1009 constructor();
1010
1011
1013 constructor(Logger logger);
1014
1015
1017 setLogger(Logger logger);
1018
1019
1021
1025 hash<auto> getInfoAsData(*bool with_type_info);
1026
1027
1029 hash<DataProviderInfo> getInfo();
1030
1031
1033 hash<DataProviderSummaryInfo> getSummaryInfo();
1034
1035
1037 *string getDesc();
1038
1039
1041
1051 *hash<auto> createRecord(hash<auto> rec, *hash<auto> create_options);
1052
1053
1055
1062 string upsertRecord(hash<auto> rec, *hash<auto> upsert_options);
1063
1064
1066
1073 *hash<auto> searchFirstRecord(hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1074
1075
1077
1082 *hash<auto> searchFirstRecord(hash<auto> where_cond, *hash<auto> search_options);
1083
1084
1086
1094 *hash<auto> searchSingleRecord(hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1095
1096
1098
1104 *hash<auto> searchSingleRecord(hash<auto> where_cond, *hash<auto> search_options);
1105
1106
1108
1112 AbstractDataProviderRecordIterator getRecordIterator(*hash<auto> search_options);
1113
1114
1116
1124 AbstractDataProviderBulkRecordInterface getBulkRecordInterface(int block_size = 1000,
1125 *hash<auto> search_options) {
1126 checkRead();
1127 return searchRecordsBulk(block_size, NOTHING, validateSearchOptions(search_options));
1128 }
1129
1131
1142 AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size = 1000,
1143 *hash<DataProviderExpression> where_cond, *hash<auto> search_options) {
1144 checkRead();
1145 if (block_size <= 0);
1146
1147 search_options = validateSearchOptions(search_options);
1148 return searchRecordsBulkImpl(block_size, processSearchParameters(where_cond, search_options),
1149 search_options);
1150 }
1151
1153
1162 AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size = 1000, *hash<auto> where_cond,
1163 *hash<auto> search_options) {
1164 checkRead();
1165 if (block_size <= 0);
1166
1167 search_options = validateSearchOptions(search_options);
1168 return searchRecordsBulkImpl(block_size, getSearchExpression(where_cond, search_options), search_options);
1169 }
1170
1172
1179 AbstractDataProviderRecordIterator searchRecords(*hash<DataProviderExpression> where_cond,
1180 *hash<auto> search_options) {
1181 checkRead();
1182 search_options = validateSearchOptions(search_options);
1183 return searchRecordsImpl(processSearchParameters(where_cond, search_options), search_options);
1184 }
1185
1187
1192 AbstractDataProviderRecordIterator searchRecords(*hash<auto> where_cond, *hash<auto> search_options);
1193
1194
1196
1206 AbstractDataProviderRecordIterator requestSearchRecords(auto req, *hash<DataProviderExpression> where_cond,
1207 *hash<auto> search_options) {
1208 checkRead();
1209 checkRequest();
1210 return requestSearchRecordsImpl(req, processSearchParameters(where_cond, search_options), search_options);
1211 }
1212
1214
1222 AbstractDataProviderRecordIterator requestSearchRecords(auto req, *hash<auto> where_cond,
1223 *hash<auto> search_options) {
1224 checkRead();
1225 checkRequest();
1226 return requestSearchRecordsImpl(req, getSearchExpression(where_cond, search_options), search_options);
1227 }
1228
1230
1241 bool updateSingleRecord(hash<auto> set, hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1242
1243
1245
1254 bool updateSingleRecord(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
1255
1256
1258
1270 int updateRecords(hash<auto> set, *hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1271
1272
1274
1284 int updateRecords(hash<auto> set, *hash<auto> where_cond, *hash<auto> search_options);
1285
1286
1288
1300 int deleteRecords(*hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1301
1302
1304
1314 int deleteRecords(*hash<auto> where_cond, *hash<auto> search_options);
1315
1316
1318
1326 auto doRequest(auto req, *hash<auto> request_options);
1327
1328
1330
1341 AbstractDataProvider createChildProvider(string name, hash<string, AbstractDataField> fields,
1342 *hash<auto> child_create_options) {
1343 checkCreateChild();
1344 child_create_options = validateChildCreateOptions(child_create_options);
1345 if (!fields);
1346
1347 on_error if (1.err != 'CREATE-CHILD-PROVIDER-ERROR');
1348
1349 return createChildProviderImpl(name, fields, child_create_options);
1350 }
1351
1353
1361 deleteChildProvider(string name, *hash<auto> child_delete_options);
1362
1363
1365
1374 addField(AbstractDataField field, *hash<auto> field_add_options);
1375
1376
1378
1387 updateField(string name, AbstractDataField field, *hash<auto> field_update_options);
1388
1389
1391
1399 deleteField(string name, *hash<auto> field_delete_options);
1400
1401
1403
1414 sendMessage(string message_id, auto msg, *hash<auto> send_message_options);
1415
1416
1418
1424 object getSchemaObject();
1425
1426
1428
1432 *AbstractDataProviderType getRequestType();
1433
1434
1436
1440 *AbstractDataProviderType getResponseType();
1441
1442
1444
1448 *hash<string, AbstractDataProviderType> getErrorResponseTypes();
1449
1450
1452
1459 AbstractDataProviderType getErrorResponseType(string error_code);
1460
1461
1463
1472 hash<DataProviderMessageInfo> getEventInfo(string event_id);
1473
1474
1476
1482 hash<string, hash<DataProviderMessageInfo>> getEventTypes();
1483
1484
1486
1495 hash<DataProviderMessageInfo> getMessageInfo(string message_id);
1496
1497
1499
1505 hash<string, hash<DataProviderMessageInfo>> getMessageTypes();
1506
1507
1509
1512 *list<hash<DataProviderSummaryInfo>> getChildProviderSummaryInfo();
1513
1514
1516
1518 *list<string> getChildProviderNames();
1519
1520
1522
1528 *AbstractDataProvider getChildProvider(string name);
1529
1530
1532
1538 AbstractDataProvider getChildProviderEx(string name);
1539
1540
1542
1550 AbstractDataProvider getChildProviderPath(string path);
1551
1552
1554
1557 bool requiresTransactionManagement();
1558
1559
1561
1569 beginTransaction();
1570
1571
1573
1579 commit();
1580
1581
1583
1589 rollback();
1590
1591
1593
1597 AbstractDataProviderBulkOperation getBulkInserter();
1598
1599
1601
1605 AbstractDataProviderBulkOperation getBulkUpserter();
1606
1607
1609
1613 *hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
1614
1615
1617
1620 checkRead();
1621
1622
1624
1627 checkCreate();
1628
1629
1631
1634 checkUpsert();
1635
1636
1638
1641 checkUpdate();
1642
1643
1645
1648 checkDelete();
1649
1650
1652
1655 checkRequest();
1656
1657
1659
1664 checkCreateChild();
1665
1666
1668
1673 checkDeleteChild();
1674
1675
1677
1682 checkAddField();
1683
1684
1686
1691 checkUpdateField();
1692
1693
1695
1700 checkDeleteField();
1701
1702
1704
1709 checkSchema();
1710
1711
1713
1718 checkSearchExpressions();
1719
1720
1722
1727 checkObservable();
1728
1729
1731
1736 checkMessages();
1737
1738
1740
1748 *hash<auto> getSearchExpression(*hash<auto> where_cond, *hash<auto> search_options);
1749
1750
1752
1755 private hash<DataProviderExpression> getSimpleArgumentIntern(int role, hash<DataProviderInfo> info,
1756 hash<DataProviderExpressionInfo> expinfo, string key, auto value) {
1757 // remove any unique suffix from key to get field name
1758 key =~ s/:.*//g;
1759 hash<DataProviderExpression> rv;
1760 if (value.typeCode() == NT_HASH && value.op && value.hasKey('arg'));
1761 else {
1762 rv = getEqualityComparisonExpression(role, info, key, value);
1763 }
1764 int caps = role == ER_Search ? info.search_logic_capabilities : 0;
1765 verifyExpression(role, info.expressions, caps, AbstractDataProviderTypeMap."bool", rv);
1766 return rv;
1767 }
1768
1770
1775 private hash<DataProviderExpression> getEqualityComparisonExpression(int role, hash<DataProviderInfo> info,
1776 string key, auto value) {
1777 if (!info.expressions.'=');
1778
1779 return <DataProviderExpression>{
1780 "exp": "=",
1781 "args": (<DataProviderFieldReference>{"field": key},) + value,
1782 };
1783 }
1784
1786
1789 static private hash<DataProviderExpressionInfo> getExpression(int role, string exp,
1790 *hash<string, hash<DataProviderExpressionInfo>> expmap) {
1791 *hash<DataProviderExpressionInfo> expinfo = expmap{exp};
1792 if (!expinfo);
1793
1794 if (!(expinfo.role & role));
1795
1796 return expinfo;
1797 }
1798
1800
1804 static bool setDynamicValueCallbacks();
1805
1807
1810 static auto evalGenericExpressionValue(hash<auto> rec, auto val);
1811 return rv;
1812 };
1813 if (val instanceof hash<DataProviderExpression>);
1814
1815 return val;
1816 };
1817
1819
1822 static auto evalGenericExpression(hash<auto> rec, hash<DataProviderExpression> exp);
1823
1825
1835 static bool setDynamicValueCallbacks(code value_needs_resolution, code resolve_value);
1836
1838
1846 static verifyExpression(int role, *hash<string, hash<DataProviderExpressionInfo>> expmap, int caps,
1847 AbstractDataProviderType expected_type, hash<DataProviderExpression> exp) {
1848 hash<DataProviderExpressionInfo> expinfo = AbstractDataProvider::getExpression(role, exp.exp, expmap);
1849 return AbstractDataProvider::verifyExpression(role, expinfo, caps, expected_type, exp);
1850 }
1851
1853
1861 static verifyExpression(int role, hash<DataProviderExpressionInfo> expinfo, int caps,
1862 AbstractDataProviderType expected_type, hash<DataProviderExpression> exp) {
1863 // check arguments
1864 if (exp.args.lsize() > expinfo.args.size() && !expinfo.varargs);
1865
1866 map AbstractDataProvider::verifyExpressionArgValue(role, caps, expinfo, exp.args, //), expinfo.args;
1867 if (exp.args.lsize() > expinfo.args.size());
1868
1869 if (!expected_type.isAssignableFrom(expinfo.return_type));
1870
1871 }
1872
1874
1880 static verifyExpressionArgValue(int role, int caps, hash<DataProviderExpressionInfo> expinfo,
1881 softlist<auto> values, int pos) {
1882 hash<DataProviderSignatureTypeInfo> arginfo = expinfo.args[pos] ?? expinfo.args.last();
1883 if (arginfo.type_code == ST_Any);
1884
1885 auto val = values[pos];
1886 bool is_exp = val instanceof hash<DataProviderExpression>;
1887 bool is_ref = is_exp ? False : val instanceof hash<DataProviderFieldReference>;
1888
1889 switch (arginfo.type_code);
1890
1891 }
1892
1894 protected:
1895 static bool checkCallbacks();
1896 public:
1897
1898
1900
1902 protected:
1903 *hash<auto> validateCreateOptions(*hash<auto> create_options);
1904 public:
1905
1906
1908
1910 protected:
1911 *hash<auto> validateUpsertOptions(*hash<auto> upsert_options);
1912 public:
1913
1914
1916
1918 protected:
1919 *hash<auto> validateSearchOptions(*hash<auto> search_options);
1920 public:
1921
1922
1924
1926 protected:
1927 *hash<auto> validateRequestOptions(*hash<auto> request_options);
1928 public:
1929
1930
1932
1936 protected:
1937 *hash<auto> validateChildCreateOptions(*hash<auto> child_create_options);
1938 public:
1939
1940
1942
1946 protected:
1947 *hash<auto> validateChildDeleteOptions(*hash<auto> child_delete_options);
1948 public:
1949
1950
1952
1956 protected:
1957 *hash<auto> validateFieldAddOptions(*hash<auto> field_add_options);
1958 public:
1959
1960
1962
1966 protected:
1967 *hash<auto> validateFieldUpdateOptions(*hash<auto> field_update_options);
1968 public:
1969
1970
1972
1976 protected:
1977 *hash<auto> validateFieldDeleteOptions(*hash<auto> field_delete_options);
1978 public:
1979
1980
1982
1986 protected:
1987 *hash<auto> validateSendMessageOptions(*hash<auto> send_message_options);
1988 public:
1989
1990
1992 protected:
1993 processConstructorOptions(*hash<string, hash<DataProviderOptionInfo>> option_desc, *hash<auto> options);
1994 public:
1995
1996
1998 private *hash<auto> checkOptions(string err, *hash<string, hash<DataProviderOptionInfo>> option_desc,
1999 *hash<auto> options) {
2000 if (!option_desc && options);
2001
2002 if (*list<string> invalid_keys = keys (options - (keys option_desc)));
2003
2004 bool updated;
2005 // check types and required keys
2006 foreach hash<auto> i in (option_desc.pairIterator());
2007
2008 return options;
2009 }
2010
2012
2017 private *hash<DataProviderExpression> processSearchParameters(*hash<DataProviderExpression> exp,
2018 *hash<auto> search_options) {
2019 if (!exp);
2020
2021 checkSearchExpressions();
2022 hash<DataProviderInfo> info = getInfo();
2023 verifyExpression(ER_Search, info.expressions, info.search_logic_capabilities,
2024 AbstractDataProviderTypeMap."bool", exp);
2025 return exp;
2026 }
2027
2029
2036 protected:
2037 *hash<auto> processFieldValues(*hash<auto> h, *hash<auto> search_options);
2038 public:
2039
2040
2042 protected:
2043 error(string err, string fmt);
2044 public:
2045
2046
2048
2053 private *hash<auto> searchFirstRecordImpl(hash<auto> where_cond,
2054 *hash<auto> search_options) {
2055 // scans the whole data set to find a single record
2056 AbstractDataProviderRecordIterator i = searchRecordsImpl(where_cond, search_options);
2057 if (i.next());
2058
2059 }
2060
2062
2069 private *hash<auto> searchSingleRecordImpl(hash<auto> where_cond,
2070 *hash<auto> search_options) {
2071 // scans the whole data set to find a single record
2072 *list<*hash<auto>> records = map $1, searchRecordsImpl(where_cond, search_options);
2073 if (records.lsize() > 1);
2074
2075 return records[0];
2076 }
2077
2079
2083 protected:
2084 *list<string> getChildProviderNamesImpl();
2085 public:
2086
2087
2089
2091 protected:
2092 *AbstractDataProvider getChildProviderImpl(string name);
2093 public:
2094
2095
2097
2103 *hash<string, AbstractDataField> getRecordType(*hash<auto> search_options);
2104
2105
2107 *hash<string, AbstractDataField> getSoftRecordType(*hash<auto> search_options);
2108
2109
2111 *hash<string, AbstractDataField> getOrNothingRecordType(*hash<auto> search_options);
2112
2113
2115
2118 *hash<string, hash<DataProviderOptionInfo>> getSearchOptions();
2119
2120
2122
2125 *hash<string, hash<DataProviderOptionInfo>> getCreateOptions();
2126
2127
2129
2132 *hash<string, hash<DataProviderOptionInfo>> getUpsertOptions();
2133
2134
2136
2139 *hash<string, hash<DataProviderOptionInfo>> getRequestOptions();
2140
2141
2143
2149 *hash<string, hash<DataProviderOptionInfo>> getChildCreateOptions();
2150
2151
2153
2159 *hash<string, hash<DataProviderOptionInfo>> getChildDeleteOptions();
2160
2161
2163
2169 *hash<string, hash<DataProviderOptionInfo>> getFieldAddOptions();
2170
2171
2173
2179 *hash<string, hash<DataProviderOptionInfo>> getFieldUpdateOptions();
2180
2181
2183
2189 *hash<string, hash<DataProviderOptionInfo>> getFieldDeleteOptions();
2190
2191
2193
2199 *hash<string, hash<DataProviderOptionInfo>> getSendMessageOptions();
2200
2201
2203
2205 string getMessageSupport();
2206
2207
2209
2211 bool supportsRead();
2212
2213
2215
2217 bool supportsBulkRead();
2218
2219
2221
2223 bool supportsCreate();
2224
2225
2227
2229 bool supportsUpdate();
2230
2231
2233
2235 bool supportsUpsert();
2236
2237
2239
2241 bool supportsDelete();
2242
2243
2245
2247 bool supportsNativeSearch();
2248
2249
2251
2253 bool supportsBulkCreate();
2254
2255
2257
2259 bool supportsBulkUpsert();
2260
2261
2263
2265 bool supportsRequest();
2266
2267
2269
2271 bool recordRequiresSearchOptions();
2272
2273
2275
2277 bool hasRecord();
2278
2279
2281
2283 bool supportsCreateChild();
2284
2285
2287
2289 bool supportsDeleteChild();
2290
2291
2293
2295 bool supportsAddField();
2296
2297
2299
2301 bool supportsUpdateField();
2302
2303
2305
2307 bool supportsDeleteField();
2308
2309
2311
2313 bool supportsSchema();
2314
2315
2317
2319 bool supportsSearchExpressions();
2320
2321
2323
2325 bool supportsObservable();
2326
2327
2329
2331 bool supportsMessages();
2332
2333
2335
2337 *object getSchemaType();
2338
2339
2341
2345 protected:
2346 *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
2347 public:
2348
2349
2351
2358 private AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000,
2359 *hash<auto> where_cond, *hash<auto> search_options) {
2360 return new DefaultBulkRecordIterface(block_size, searchRecordsImpl(where_cond, search_options));
2361 }
2362
2364
2369 private AbstractDataProviderRecordIterator searchRecordsImpl(hash<auto> where_cond,
2370 *hash<auto> search_options) {
2371 throwUnimplementedException();
2372 }
2373
2375
2383 private AbstractDataProviderRecordIterator requestSearchRecordsImpl(auto req,
2384 *hash<auto> where_cond, *hash<auto> search_options) {
2385 throwUnimplementedException();
2386 }
2387
2389
2397 protected:
2398 *hash<auto> createRecordImpl(hash<auto> rec, *hash<auto> create_options);
2399 public:
2400
2401
2403
2408 protected:
2409 string upsertRecordImpl(hash<auto> rec, *hash<auto> upsert_options);
2410 public:
2411
2412
2414
2418 private bool updateSingleRecordImpl(hash<auto> set, hash<auto> where_cond,
2419 *hash<auto> search_options) {
2420 throwUnimplementedException();
2421 }
2422
2424
2430 private int updateRecordsImpl(hash<auto> set, *hash<auto> where_cond,
2431 *hash<auto> search_options) {
2432 throwUnimplementedException();
2433 }
2434
2436
2442 protected:
2443 int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
2444 public:
2445
2446
2448
2453 protected:
2454 auto doRequestImpl(auto req, *hash<auto> request_options);
2455 public:
2456
2457
2459
2467 private AbstractDataProvider createChildProviderImpl(string name, hash<string, AbstractDataField> fields,
2468 *hash<auto> child_create_options) {
2469 throwUnimplementedException();
2470 }
2471
2473
2478 protected:
2479 deleteChildProviderImpl(string name, *hash<auto> child_delete_options);
2480 public:
2481
2482
2484
2490 protected:
2491 addFieldImpl(AbstractDataField field, *hash<auto> field_add_options);
2492 public:
2493
2494
2496
2502 protected:
2503 updateFieldImpl(string name, AbstractDataField field, *hash<auto> field_update_options);
2504 public:
2505
2506
2508
2513 protected:
2514 deleteFieldImpl(string name, *hash<auto> field_delete_options);
2515 public:
2516
2517
2519
2526 protected:
2527 sendMessageImpl(string message_id, auto msg, *hash<auto> send_message_options);
2528 public:
2529
2530
2532
2536 protected:
2537 object getSchemaObjectImpl();
2538 public:
2539
2540
2542
2546 protected:
2547 *AbstractDataProviderType getRequestTypeImpl();
2548 public:
2549
2550
2552
2556 protected:
2557 *AbstractDataProviderType getResponseTypeImpl();
2558 public:
2559
2560
2562
2566 protected:
2567 *hash<string, AbstractDataProviderType> getErrorResponseTypesImpl();
2568 public:
2569
2570
2572
2578 protected:
2579 AbstractDataProviderType getErrorResponseTypeImpl(string error_code);
2580 public:
2581
2582
2584
2594 protected:
2595 hash<DataProviderMessageInfo> getEventInfoImpl(string event_id);
2596 public:
2597
2598
2600
2606 protected:
2607 hash<string, hash<DataProviderMessageInfo>> getEventTypesImpl();
2608 public:
2609
2610
2612
2620 protected:
2621 hash<DataProviderMessageInfo> getMessageInfoImpl(string message_id);
2622 public:
2623
2624
2626
2632 protected:
2633 hash<string, hash<DataProviderMessageInfo>> getMessageTypesImpl();
2634 public:
2635
2636
2638
2640 protected:
2641 throwUnimplementedException();
2642 public:
2643
2644
2646 abstract string getName();
2647
2649 protected:
2650 abstract hash<DataProviderInfo> getStaticInfoImpl();
2651 public:
2652 }
2653 }
DataProvider::AbstractDataField
describes a data type based on a hashdecl
Definition: AbstractDataField.qc.dox.h:47
DataProvider::AbstractDataProviderBulkOperation
Abstract bulk data operation class.
Definition: AbstractDataProviderBulkOperation.qc.dox.h:33
DataProvider::AbstractDataProviderBulkRecordInterface
Defines the abstract class for data provider iterators; the destructor releases the iterator.
Definition: AbstractDataProviderBulkRecordInterface.qc.dox.h:33
DataProvider::AbstractDataProvider
The AbstractDataProvider class.
Definition: AbstractDataProvider.qc.dox.h:732
DataProvider::AbstractDataProvider::cb_resolve_value
static code cb_resolve_value
static callback for dynamic value resolution
Definition: AbstractDataProvider.qc.dox.h:983
DataProvider::AbstractDataProvider::GenericExpressions
const GenericExpressions
Generic search operator expressions.
Definition: AbstractDataProvider.qc.dox.h:966
DataProvider::AbstractDataProvider::getMapperRuntimeKeys
*hash< string, hash< MapperRuntimeKeyInfo > > getMapperRuntimeKeys()
Returns custom data mapper runtime keys.
DataProvider::AbstractDataProvider::checkDeleteChild
checkDeleteChild()
Ensures that the data provider supports deleting children.
DataProvider::AbstractDataProvider::deleteChildProvider
deleteChildProvider(string name, *hash< auto > child_delete_options)
Deletes a child data provider.
DataProvider::AbstractDataProvider::getChildProviderSummaryInfo
*list< hash< DataProviderSummaryInfo > > getChildProviderSummaryInfo()
Return data provider summary info.
DataProvider::AbstractDataProvider::beginTransaction
beginTransaction()
Begins a transaction with a data provider.
DataProvider::AbstractDataProvider::DataProviderSummaryInfoKeys
const DataProviderSummaryInfoKeys
A list of members names of the DataProviderSummaryInfoKeys hashdecl.
Definition: AbstractDataProvider.qc.dox.h:969
DataProvider::AbstractDataProvider::getErrorResponseTypes
*hash< string, AbstractDataProviderType > getErrorResponseTypes()
Returns a hash of error responses, if any.
DataProvider::AbstractDataProvider::getRequestType
*AbstractDataProviderType getRequestType()
Returns the description of a successful request message, if any.
DataProvider::AbstractDataProvider::checkUpdate
checkUpdate()
Ensures that the data provider supports record upserts.
DataProvider::AbstractDataProvider::getBulkUpserter
AbstractDataProviderBulkOperation getBulkUpserter()
Returns a bulk upsert operation object for the data provider.
DataProvider::AbstractDataProvider::getInfoAsData
hash< auto > getInfoAsData(*bool with_type_info)
Returns static provider information as data; no objects are returned.
DataProvider::AbstractDataProvider::GenericExpressionImplementations
const GenericExpressionImplementations
Generic expression implementations for data providers without native search functionality.
Definition: AbstractDataProvider.qc.dox.h:736
DataProvider::AbstractDataProvider::checkUpdateField
checkUpdateField()
Ensures that the data provider supports updating fields.
DataProvider::AbstractDataProvider::sendMessage
sendMessage(string message_id, auto msg, *hash< auto > send_message_options)
Sends a message from message-capable data providers.
DataProvider::AbstractDataProvider::checkObservable
checkObservable()
Ensures that the data provider supports observer pattern / event API.
DataProvider::AbstractDataProvider::getChildProvider
*AbstractDataProvider getChildProvider(string name)
Returns the given child provider or NOTHING if the given child is unknown.
DataProvider::AbstractDataProvider::getInfo
hash< DataProviderInfo > getInfo()
Returns data provider info.
DataProvider::AbstractDataProvider::GenericRecordSearchOptions
const GenericRecordSearchOptions
Generic record search options; see details below.
Definition: AbstractDataProvider.qc.dox.h:991
DataProvider::AbstractDataProvider::commit
commit()
Commits data written to the data provider.
DataProvider::AbstractDataProvider::updateSingleRecord
bool updateSingleRecord(hash< auto > set, hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Updates a single record matching the search options.
DataProvider::AbstractDataProvider::requiresTransactionManagement
bool requiresTransactionManagement()
Returns True if the data provider supports transaction management.
DataProvider::AbstractDataProvider::getRecordIterator
AbstractDataProviderRecordIterator getRecordIterator(*hash< auto > search_options)
Returns an iterator iterating all records.
DataProvider::AbstractDataProvider::searchRecordsBulk
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.
Definition: AbstractDataProvider.qc.dox.h:1162
DataProvider::AbstractDataProvider::constructor
constructor()
Creates the data provider.
DataProvider::AbstractDataProvider::createRecord
*hash< auto > createRecord(hash< auto > rec, *hash< auto > create_options)
Creates the given record in the data provider.
DataProvider::AbstractDataProvider::getEventInfo
hash< DataProviderMessageInfo > getEventInfo(string event_id)
Returns the description of an observable event, if any.
DataProvider::AbstractDataProvider::setLogger
setLogger(Logger logger)
Sets or replaces the logger.
DataProvider::AbstractDataProvider::getMessageInfo
hash< DataProviderMessageInfo > getMessageInfo(string message_id)
Returns the description of an outbound message, if any.
DataProvider::AbstractDataProvider::deleteField
deleteField(string name, *hash< auto > field_delete_options)
Deletes an existing field.
DataProvider::AbstractDataProvider::deleteRecords
int deleteRecords(*hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Deletes zero or more records.
DataProvider::AbstractDataProvider::getExpression
static private hash< DataProviderExpressionInfo > getExpression(int role, string exp, *hash< string, hash< DataProviderExpressionInfo >> expmap)
Returns an expression definition for an expression code or throws an exception.
Definition: AbstractDataProvider.qc.dox.h:1789
DataProvider::AbstractDataProvider::logger
*Logger logger
Logger for logging.
Definition: AbstractDataProvider.qc.dox.h:974
DataProvider::AbstractDataProvider::rollback
rollback()
Rolls back data written to the data provider.
DataProvider::AbstractDataProvider::updateRecords
int updateRecords(hash< auto > set, *hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
DataProvider::AbstractDataProvider::evalGenericExpressionValue
static auto evalGenericExpressionValue(hash< auto > rec, auto val)
Evaluates the given expression with the generic internal implementation and returns the result.
DataProvider::AbstractDataProvider::searchFirstRecord
*hash< auto > searchFirstRecord(hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Returns the first record matching the search options.
DataProvider::AbstractDataProvider::getResponseType
*AbstractDataProviderType getResponseType()
Returns the description of a response message, if this object represents a response message.
DataProvider::AbstractDataProvider::callbacks_locked
static bool callbacks_locked
flag if callbacks are locked
Definition: AbstractDataProvider.qc.dox.h:977
DataProvider::AbstractDataProvider::requestSearchRecords
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.
Definition: AbstractDataProvider.qc.dox.h:1222
DataProvider::AbstractDataProvider::getBulkInserter
AbstractDataProviderBulkOperation getBulkInserter()
Returns a bulk insert operation object for the data provider.
DataProvider::AbstractDataProvider::setDynamicValueCallbacks
static bool setDynamicValueCallbacks()
Ensures that no callbacks can be set for dynamic URI resolution.
DataProvider::AbstractDataProvider::updateSingleRecord
bool updateSingleRecord(hash< auto > set, hash< auto > where_cond, *hash< auto > search_options)
Updates a single record matching the search options.
DataProvider::AbstractDataProvider::doRequest
auto doRequest(auto req, *hash< auto > request_options)
Makes a request and returns the response.
DataProvider::AbstractDataProvider::cb_value_needs_resolution
static code cb_value_needs_resolution
static callback the returns a bool if the value needs dynamic resolution
Definition: AbstractDataProvider.qc.dox.h:980
DataProvider::AbstractDataProvider::getSchemaObject
object getSchemaObject()
Returns the schema supporting this data provider.
DataProvider::AbstractDataProvider::checkCreate
checkCreate()
Ensures that the data provider supports record creation.
DataProvider::AbstractDataProvider::checkSchema
checkSchema()
Ensures that the data provider supports a schema.
DataProvider::AbstractDataProvider::checkRead
checkRead()
Ensures that the data provider supports read operations.
DataProvider::AbstractDataProvider::getSimpleArgumentIntern
private hash< DataProviderExpression > getSimpleArgumentIntern(int role, hash< DataProviderInfo > info, hash< DataProviderExpressionInfo > expinfo, string key, auto value)
Returns an argument for an expression.
Definition: AbstractDataProvider.qc.dox.h:1755
DataProvider::AbstractDataProvider::getDesc
*string getDesc()
Returns the data provider description.
DataProvider::AbstractDataProvider::searchFirstRecord
*hash< auto > searchFirstRecord(hash< auto > where_cond, *hash< auto > search_options)
Returns the first record matching the search options.
DataProvider::AbstractDataProvider::getBulkRecordInterface
AbstractDataProviderBulkRecordInterface getBulkRecordInterface(int block_size=1000, *hash< auto > search_options)
Returns an iterator iterating all records with the bulk read API.
Definition: AbstractDataProvider.qc.dox.h:1124
DataProvider::AbstractDataProvider::updateRecords
int updateRecords(hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
DataProvider::AbstractDataProvider::searchSingleRecord
*hash< auto > searchSingleRecord(hash< auto > where_cond, *hash< auto > search_options)
Returns a single record matching the search options.
DataProvider::AbstractDataProvider::getSummaryInfo
hash< DataProviderSummaryInfo > getSummaryInfo()
Return data provider summary info.
DataProvider::AbstractDataProvider::getSearchExpression
*hash< auto > getSearchExpression(*hash< auto > where_cond, *hash< auto > search_options)
Returns a search expression for a standard search hash.
DataProvider::AbstractDataProvider::searchSingleRecord
*hash< auto > searchSingleRecord(hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Returns a single record matching the search options.
DataProvider::AbstractDataProvider::getMessageTypes
hash< string, hash< DataProviderMessageInfo > > getMessageTypes()
Returns a hash of all supported outbound messages.
DataProvider::AbstractDataProvider::searchRecords
AbstractDataProviderRecordIterator searchRecords(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
DataProvider::AbstractDataProvider::checkDelete
checkDelete()
Ensures that the data provider supports record deletion.
DataProvider::AbstractDataProvider::getErrorResponseType
AbstractDataProviderType getErrorResponseType(string error_code)
Returns the type for the given error code.
DataProvider::AbstractDataProvider::checkMessages
checkMessages()
Ensures that the data provider supports sending messages.
DataProvider::AbstractDataProvider::searchRecords
AbstractDataProviderRecordIterator searchRecords(*hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
Definition: AbstractDataProvider.qc.dox.h:1179
DataProvider::AbstractDataProvider::checkDeleteField
checkDeleteField()
Ensures that the data provider supports deleting fields.
DataProvider::AbstractDataProvider::getChildProviderPath
AbstractDataProvider getChildProviderPath(string path)
Returns the given child provider from a "/" separated path string.
DataProvider::AbstractDataProvider::constructor
constructor(Logger logger)
Creates the data provider with the given Logger.
DataProvider::AbstractDataProvider::getChildProviderNames
*list< string > getChildProviderNames()
Returns a list of child data provider names, if any.
DataProvider::AbstractDataProvider::addField
addField(AbstractDataField field, *hash< auto > field_add_options)
Creates a new field.
DataProvider::AbstractDataProvider::createChildProvider
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.
Definition: AbstractDataProvider.qc.dox.h:1341
DataProvider::AbstractDataProvider::upsertRecord
string upsertRecord(hash< auto > rec, *hash< auto > upsert_options)
Upserts the given record in the data provider.
DataProvider::AbstractDataProvider::updateField
updateField(string name, AbstractDataField field, *hash< auto > field_update_options)
Updates an existing field.
DataProvider::AbstractDataProvider::getEqualityComparisonExpression
private hash< DataProviderExpression > getEqualityComparisonExpression(int role, hash< DataProviderInfo > info, string key, auto value)
Returns an equality comparison expression.
Definition: AbstractDataProvider.qc.dox.h:1775
DataProvider::AbstractDataProvider::checkRequest
checkRequest()
Ensures that the data provider supports the request API.
DataProvider::AbstractDataProvider::getChildProviderEx
AbstractDataProvider getChildProviderEx(string name)
Returns the given child provider or throws an exception if the given child is unknown.
DataProvider::AbstractDataProvider::checkSearchExpressions
checkSearchExpressions()
Ensures that the data provider supports advanced search expressions.
DataProvider::AbstractDataProvider::requestSearchRecords
AbstractDataProviderRecordIterator requestSearchRecords(auto req, *hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options according to an API request.
Definition: AbstractDataProvider.qc.dox.h:1206
DataProvider::AbstractDataProvider::checkAddField
checkAddField()
Ensures that the data provider supports adding fields.
DataProvider::AbstractDataProvider::checkCreateChild
checkCreateChild()
Ensures that the data provider supports creating children.
DataProvider::AbstractDataProvider::searchRecordsBulk
AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size=1000, *hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
Definition: AbstractDataProvider.qc.dox.h:1142
DataProvider::AbstractDataProvider::deleteRecords
int deleteRecords(*hash< auto > where_cond, *hash< auto > search_options)
Deletes zero or more records.
DataProvider::AbstractDataProvider::checkUpsert
checkUpsert()
Ensures that the data provider supports record upserts.
DataProvider::AbstractDataProvider::getEventTypes
hash< string, hash< DataProviderMessageInfo > > getEventTypes()
Returns a hash of all supported event types.
DataProvider::AbstractDataProviderRecordIterator
Defines the abstract class for data provider iterators; the destructor releases the iterator.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:339
DataProvider::AbstractDataProviderType
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:187
DataProvider::AbstractDataProviderType::get
static AbstractDataProviderType get(Type type, *hash< auto > options, *hash< auto > tags)
Returns an appropriate object for the given type.
DataProvider::HashDataType
describes a data type based on a hash
Definition: HashDataType.qc.dox.h:36
DataProvider::QoreDataField
describes a data type based on a hashdecl
Definition: QoreDataField.qc.dox.h:34
True
const True
False
const False
inlist
bool inlist()
exp
number exp(number n)
NOTHING
const NOTHING
regex
bool regex(string str, string regex, int options=0)
NT_HASH
const NT_HASH
hash
hash< auto > hash(object obj)
DataProvider
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
DataProvider::UpsertResultUnchanged
const UpsertResultUnchanged
Indicates that the record was left unchanged.
Definition: AbstractDataProvider.qc.dox.h:42
DataProvider::UpsertResultDeleted
const UpsertResultDeleted
Indicates that the record was deleted.
Definition: AbstractDataProvider.qc.dox.h:45
DataProvider::DP_SEARCH_OP_EQ
const DP_SEARCH_OP_EQ
Identifies the generic data provider equals operator (=) for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:81
DataProvider::ER_All
const ER_All
Indicates an expression that can be used in all contexts.
Definition: AbstractDataProvider.qc.dox.h:254
DataProvider::UpsertResultInserted
const UpsertResultInserted
Indicates that the record was inserted.
Definition: AbstractDataProvider.qc.dox.h:33
DataProvider::DP_OP_OR
const DP_OP_OR
OR logic.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:41
DataProvider::DP_SEARCH_OP_REGEX
const DP_SEARCH_OP_REGEX
Identifies the regex operator for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:51
DataProvider::MSG_None
const MSG_None
No output type.
Definition: AbstractDataProvider.qc.dox.h:199
DataProvider::ST_Value
const ST_Value
Indicates any literal value of the given type; i.e. not an operator or other expression.
Definition: AbstractDataProvider.qc.dox.h:223
DataProvider::DP_SEARCH_OP_GT
const DP_SEARCH_OP_GT
Identifies the generic data provider greater than operator (>) for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:66
DataProvider::DataProviderSignatureOptionalIntValueType
const DataProviderSignatureOptionalIntValueType
Data provider signature *int value type.
Definition: AbstractDataProvider.qc.dox.h:329
DataProvider::DataProviderSignatureStringType
const DataProviderSignatureStringType
Data provider signature string type.
Definition: AbstractDataProvider.qc.dox.h:353
DataProvider::DataProviderSignatureDateType
const DataProviderSignatureDateType
Data provider signature date type.
Definition: AbstractDataProvider.qc.dox.h:359
DataProvider::LC_Or
const LC_Or
Indicates that boolean expressions can be combined with OR logic.
Definition: AbstractDataProvider.qc.dox.h:274
DataProvider::DataProviderSignatureHashValueType
const DataProviderSignatureHashValueType
Data provider signature hash value type.
Definition: AbstractDataProvider.qc.dox.h:341
DataProvider::ER_Search
const ER_Search
Indicates an expression that can be used in a search operation.
Definition: AbstractDataProvider.qc.dox.h:248
DataProvider::DP_SEARCH_OP_IN
const DP_SEARCH_OP_IN
Identifies the generic data provider "in" operator for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:91
DataProvider::SignatureTypeDescMap
const SignatureTypeDescMap
Maps signature description values to integer codes.
Definition: AbstractDataProvider.qc.dox.h:240
DataProvider::SignatureTypeCodeMap
const SignatureTypeCodeMap
Maps signature type codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:233
DataProvider::DET_Operator
const DET_Operator
Indicates an operator expression.
Definition: AbstractDataProvider.qc.dox.h:370
DataProvider::DataProviderSignatureOptionalStringValueType
const DataProviderSignatureOptionalStringValueType
Data provider signature optional string value type.
Definition: AbstractDataProvider.qc.dox.h:317
DataProvider::LogicDescMap
const LogicDescMap
Logic map from descriptions to integer codes.
Definition: AbstractDataProvider.qc.dox.h:287
DataProvider::DP_SEARCH_OP_GE
const DP_SEARCH_OP_GE
Identifies the generic data provider greater than or equals operator (>=) for use in generic search c...
Definition: AbstractDataProviderRecordIterator.qc.dox.h:71
DataProvider::LC_And
const LC_And
Indicates that boolean expressions can be combined with AND logic.
Definition: AbstractDataProvider.qc.dox.h:271
DataProvider::DET_Function
const DET_Function
Indicates a function expression.
Definition: AbstractDataProvider.qc.dox.h:373
DataProvider::DP_SEARCH_OP_BETWEEN
const DP_SEARCH_OP_BETWEEN
Identifies the generic data provider "between" operator for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:86
DataProvider::DP_OP_AND
const DP_OP_AND
AND logic.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:38
DataProvider::DataProviderSignatureFieldType
const DataProviderSignatureFieldType
Data provider signature field type.
Definition: AbstractDataProvider.qc.dox.h:299
DataProvider::DP_SEARCH_OP_NE
const DP_SEARCH_OP_NE
Identifies the generic data provider not equals operator (!= or <>) for use in generic search criteri...
Definition: AbstractDataProviderRecordIterator.qc.dox.h:76
DataProvider::DP_SEARCH_OP_NOT
const DP_SEARCH_OP_NOT
Identifies the generic data provider "not" operator for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:96
DataProvider::ExpressionTypeDescMap
const ExpressionTypeDescMap
Maps DataProvider expression type descriptions to integer codes.
Definition: AbstractDataProvider.qc.dox.h:383
DataProvider::DataProviderSignatureBoolType
const DataProviderSignatureBoolType
Data provider signature bool type.
Definition: AbstractDataProvider.qc.dox.h:347
DataProvider::AbstractDataProviderTypeMap
const AbstractDataProviderTypeMap
Maps Qore type name constant values to AbstractDataProviderType values.
Definition: AbstractDataProviderType.qc.dox.h:121
DataProvider::DataProviderSignatureListValueType
const DataProviderSignatureListValueType
Data provider signature list value type.
Definition: AbstractDataProvider.qc.dox.h:335
DataProvider::DataProviderSignatureStringValueType
const DataProviderSignatureStringValueType
Data provider signature string value type.
Definition: AbstractDataProvider.qc.dox.h:311
DataProvider::DataProviderSignatureAnyType
const DataProviderSignatureAnyType
Data provider signature any type.
Definition: AbstractDataProvider.qc.dox.h:305
DataProvider::ST_Field
const ST_Field
The signature type indicates a string field name when used as an argument, and the type is the field ...
Definition: AbstractDataProvider.qc.dox.h:229
DataProvider::UpsertResultVerified
const UpsertResultVerified
Indicates that the record was verified as already in the target state.
Definition: AbstractDataProvider.qc.dox.h:39
DataProvider::DP_SEARCH_OP_LT
const DP_SEARCH_OP_LT
Identifies the generic data provider less than (<) operator for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:56
DataProvider::RoleCodeMap
const RoleCodeMap
Role map from codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:258
DataProvider::UpsertResultUpdated
const UpsertResultUpdated
Indicates that the record was updated.
Definition: AbstractDataProvider.qc.dox.h:36
DataProvider::MSG_Async
const MSG_Async
Asynchronous output type, output can happen any time.
Definition: AbstractDataProvider.qc.dox.h:211
DataProvider::LC_All
const LC_All
Indicates that all logic capabilities are supported.
Definition: AbstractDataProvider.qc.dox.h:277
DataProvider::ST_Any
const ST_Any
Indicates any valid expression that returns the given type (default)
Definition: AbstractDataProvider.qc.dox.h:220
DataProvider::LogicCodeMap
const LogicCodeMap
Logic map from codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:281
DataProvider::DP_SEARCH_OP_LE
const DP_SEARCH_OP_LE
Identifies the generic data provider less than or equals (<=) operator for use in generic search crit...
Definition: AbstractDataProviderRecordIterator.qc.dox.h:61
DataProvider::RoleDescMap
const RoleDescMap
Role map from descriptions to codes.
Definition: AbstractDataProvider.qc.dox.h:263
DataProvider::ER_Field
const ER_Field
Indicates an expression that can be used in a field.
Definition: AbstractDataProvider.qc.dox.h:251
DataProvider::ExpressionTypeCodeMap
const ExpressionTypeCodeMap
Maps DataProvider expression type codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:377
DataProvider::MSG_Sync
const MSG_Sync
Synchronous output type, an output message is expected after each observed event.
Definition: AbstractDataProvider.qc.dox.h:206
DataProvider::DataProviderSignatureIntValueType
const DataProviderSignatureIntValueType
Data provider signature int value type.
Definition: AbstractDataProvider.qc.dox.h:323
DataProvider::AllowedValueInfo
Allowed value hash.
Definition: AbstractDataProvider.qc.dox.h:49
DataProvider::AllowedValueInfo::value
auto value
The value.
Definition: AbstractDataProvider.qc.dox.h:51
DataProvider::AllowedValueInfo::desc
string desc
Description for the value.
Definition: AbstractDataProvider.qc.dox.h:54
DataProvider::DataProviderExpression
Data provider expression.
Definition: AbstractDataProvider.qc.dox.h:426
DataProvider::DataProviderExpression::exp
string exp
Expression name.
Definition: AbstractDataProvider.qc.dox.h:428
DataProvider::DataProviderExpression::args
softlist< auto > args
Expression arguments.
Definition: AbstractDataProvider.qc.dox.h:434
DataProvider::DataProviderExpressionInfo
Data provider signature info.
Definition: AbstractDataProvider.qc.dox.h:386
DataProvider::DataProviderExpressionInfo::symbol
string symbol
The symbol to use when rendering expressions.
Definition: AbstractDataProvider.qc.dox.h:402
DataProvider::DataProviderExpressionInfo::name
string name
The display name.
Definition: AbstractDataProvider.qc.dox.h:396
DataProvider::DataProviderExpressionInfo::label
string label
The label used for the expression.
Definition: AbstractDataProvider.qc.dox.h:393
DataProvider::DataProviderExpressionInfo::varargs
bool varargs
The last argument can be repeated indefinitely.
Definition: AbstractDataProvider.qc.dox.h:416
DataProvider::DataProviderExpressionInfo::role
int role
The expression role code / bitfield.
Definition: AbstractDataProvider.qc.dox.h:407
DataProvider::DataProviderExpressionInfo::type
int type
The type of expression; see DataProvider Expression Type Codes.
Definition: AbstractDataProvider.qc.dox.h:388
DataProvider::DataProviderExpressionInfo::args
softlist< hash< DataProviderSignatureTypeInfo > > args
Argument types.
Definition: AbstractDataProvider.qc.dox.h:410
DataProvider::DataProviderExpressionInfo::desc
string desc
The description of the operation.
Definition: AbstractDataProvider.qc.dox.h:399
DataProvider::DataProviderExpressionInfo::return_type
AbstractDataProviderType return_type
The return type.
Definition: AbstractDataProvider.qc.dox.h:413
DataProvider::DataProviderFieldReference
Data provider field reference.
Definition: AbstractDataProvider.qc.dox.h:420
DataProvider::DataProviderFieldReference::field
string field
The name of the field being referenced.
Definition: AbstractDataProvider.qc.dox.h:422
DataProvider::DataProviderInfo
Data provider info.
Definition: AbstractDataProvider.qc.dox.h:438
DataProvider::DataProviderInfo::supports_messages
string supports_messages
Output message support.
Definition: AbstractDataProvider.qc.dox.h:592
DataProvider::DataProviderInfo::supports_delete
bool supports_delete
Does the data provider support record deletion?
Definition: AbstractDataProvider.qc.dox.h:472
DataProvider::DataProviderInfo::events
*hash< string, hash< DataProviderMessageInfo > > events
hash of observable events and event types
Definition: AbstractDataProvider.qc.dox.h:699
DataProvider::DataProviderInfo::supports_bulk_read
bool supports_bulk_read
Does the data provider support native / optimized bulk reads?
Definition: AbstractDataProvider.qc.dox.h:485
DataProvider::DataProviderInfo::add_field_options
*hash< string, hash< DataProviderOptionInfo > > add_field_options
Add field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:664
DataProvider::DataProviderInfo::messages
*hash< string, hash< DataProviderMessageInfo > > messages
List of output message IDs and message types.
Definition: AbstractDataProvider.qc.dox.h:706
DataProvider::DataProviderInfo::transaction_management
bool transaction_management
Does the data provider require transaction management?
Definition: AbstractDataProvider.qc.dox.h:516
DataProvider::DataProviderInfo::expressions
*hash< string, hash< DataProviderExpressionInfo > > expressions
Expressions (operators and functions) supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:692
DataProvider::DataProviderInfo::children_can_support_observers
bool children_can_support_observers
Can any child data providers support the observer pattern / event API?
Definition: AbstractDataProvider.qc.dox.h:607
DataProvider::DataProviderInfo::supports_child_delete
bool supports_child_delete
Does the data provider support deleting new child providers?
Definition: AbstractDataProvider.qc.dox.h:540
DataProvider::DataProviderInfo::type
string type
The name of the provider type.
Definition: AbstractDataProvider.qc.dox.h:447
DataProvider::DataProviderInfo::supports_delete_field
bool supports_delete_field
Does the data provider support deleting fields?
Definition: AbstractDataProvider.qc.dox.h:561
DataProvider::DataProviderInfo::supports_child_create
bool supports_child_create
Does the data provider support creating new child providers?
Definition: AbstractDataProvider.qc.dox.h:533
DataProvider::DataProviderInfo::child_delete_options
*hash< string, hash< DataProviderOptionInfo > > child_delete_options
Child deletion options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:657
DataProvider::DataProviderInfo::supports_native_search
bool supports_native_search
Does the data provider support native record searching?
Definition: AbstractDataProvider.qc.dox.h:477
DataProvider::DataProviderInfo::request_options
*hash< string, hash< DataProviderOptionInfo > > request_options
Request options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:643
DataProvider::DataProviderInfo::search_options
*hash< string, hash< DataProviderOptionInfo > > search_options
Search options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:638
DataProvider::DataProviderInfo::name
string name
Data provider name.
Definition: AbstractDataProvider.qc.dox.h:442
DataProvider::DataProviderInfo::supports_add_field
bool supports_add_field
Does the data provider support adding new fields?
Definition: AbstractDataProvider.qc.dox.h:547
DataProvider::DataProviderInfo::children_can_support_messages
bool children_can_support_messages
Can any child data providers support messages?
Definition: AbstractDataProvider.qc.dox.h:612
DataProvider::DataProviderInfo::supports_bulk_upsert
bool supports_bulk_upsert
Does the data provider support native / optimized bulk upserts?
Definition: AbstractDataProvider.qc.dox.h:501
DataProvider::DataProviderInfo::child_create_options
*hash< string, hash< DataProviderOptionInfo > > child_create_options
Child creation options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:650
DataProvider::DataProviderInfo::mapper_keys
hash< string, hash< MapperRuntimeKeyInfo > > mapper_keys
A hash of mapper key information.
Definition: AbstractDataProvider.qc.dox.h:718
DataProvider::DataProviderInfo::supports_read
bool supports_read
Does the data provider support reading.
Definition: AbstractDataProvider.qc.dox.h:452
DataProvider::DataProviderInfo::record_requires_search_options
bool record_requires_search_options
Do we require search options to retrieve the record type?
Definition: AbstractDataProvider.qc.dox.h:526
DataProvider::DataProviderInfo::supports_update
bool supports_update
Does the data provider support record updates?
Definition: AbstractDataProvider.qc.dox.h:462
DataProvider::DataProviderInfo::supports_search_expressions
bool supports_search_expressions
Does this data provide support advanced search experssions?
Definition: AbstractDataProvider.qc.dox.h:575
DataProvider::DataProviderInfo::upsert_options
*hash< string, hash< DataProviderOptionInfo > > upsert_options
Upsert options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:633
DataProvider::DataProviderInfo::supports_update_field
bool supports_update_field
Does the data provider support updating existing fields?
Definition: AbstractDataProvider.qc.dox.h:554
DataProvider::DataProviderInfo::supports_request
bool supports_request
Does the data provider support the request API?
Definition: AbstractDataProvider.qc.dox.h:506
DataProvider::DataProviderInfo::constructor_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:623
DataProvider::DataProviderInfo::create_options
*hash< string, hash< DataProviderOptionInfo > > create_options
Create options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:628
DataProvider::DataProviderInfo::supports_create
bool supports_create
Does the data provider support record creation?
Definition: AbstractDataProvider.qc.dox.h:457
DataProvider::DataProviderInfo::children
*list< string > children
A list of child data providers in this data provider.
Definition: AbstractDataProvider.qc.dox.h:728
DataProvider::DataProviderInfo::supports_observable
bool supports_observable
Does this data provider support the event API / observer pattern?
Definition: AbstractDataProvider.qc.dox.h:582
DataProvider::DataProviderInfo::supports_upsert
bool supports_upsert
Does the data provider support record upserts (create or update)?
Definition: AbstractDataProvider.qc.dox.h:467
DataProvider::DataProviderInfo::supports_bulk_create
bool supports_bulk_create
Does the data provider support native / optimized bulk creation?
Definition: AbstractDataProvider.qc.dox.h:493
DataProvider::DataProviderInfo::delete_field_options
*hash< string, hash< DataProviderOptionInfo > > delete_field_options
Delete field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:678
DataProvider::DataProviderInfo::send_message_options
*hash< string, hash< DataProviderOptionInfo > > send_message_options
Send message options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:685
DataProvider::DataProviderInfo::supports_children
bool supports_children
Does the data provider support children?
Definition: AbstractDataProvider.qc.dox.h:511
DataProvider::DataProviderInfo::children_can_support_apis
bool children_can_support_apis
Can any child data providers offer API services (request - response data providers)?
Definition: AbstractDataProvider.qc.dox.h:597
DataProvider::DataProviderInfo::children_can_support_records
bool children_can_support_records
Can any child data providers offer record-based providers?
Definition: AbstractDataProvider.qc.dox.h:602
DataProvider::DataProviderInfo::update_field_options
*hash< string, hash< DataProviderOptionInfo > > update_field_options
Update field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:671
DataProvider::DataProviderInfo::desc
*string desc
A markdown description of the data provider.
Definition: AbstractDataProvider.qc.dox.h:723
DataProvider::DataProviderInfo::supports_schema
bool supports_schema
Does the data provider support a schema?
Definition: AbstractDataProvider.qc.dox.h:568
DataProvider::DataProviderInfo::search_logic_capabilities
int search_logic_capabilities
Supported search logic capabilities.
Definition: AbstractDataProvider.qc.dox.h:711
DataProvider::DataProviderInfo::schema_type
*string schema_type
Returns the schema type supported by this data provider.
Definition: AbstractDataProvider.qc.dox.h:618
DataProvider::DataProviderInfo::has_record
bool has_record
Does the data provider provide a record?
Definition: AbstractDataProvider.qc.dox.h:521
DataProvider::DataProviderMessageInfo
Data provider message and event info.
Definition: AbstractDataProvider.qc.dox.h:178
DataProvider::DataProviderMessageInfo::desc
string desc
The description of the message or event.
Definition: AbstractDataProvider.qc.dox.h:182
DataProvider::DataProviderMessageInfo::type
AbstractDataProviderType type
The data type of the message or event.
Definition: AbstractDataProvider.qc.dox.h:185
DataProvider::DataProviderOptionInfo
Data provider option info.
Definition: AbstractDataProvider.qc.dox.h:58
DataProvider::DataProviderOptionInfo::type
softlist< AbstractDataProviderType > type
The option value type or types.
Definition: AbstractDataProvider.qc.dox.h:60
DataProvider::DataProviderOptionInfo::sensitive
bool sensitive
Is the option value sensitive?
Definition: AbstractDataProvider.qc.dox.h:72
DataProvider::DataProviderOptionInfo::default_value
auto default_value
Any default value.
Definition: AbstractDataProvider.qc.dox.h:69
DataProvider::DataProviderOptionInfo::desc
string desc
The option description.
Definition: AbstractDataProvider.qc.dox.h:66
DataProvider::DataProviderOptionInfo::allowed_values
*softlist< hash< AllowedValueInfo > > allowed_values
List of allowed values (enum)
Definition: AbstractDataProvider.qc.dox.h:75
DataProvider::DataProviderOptionInfo::required
bool required
Required flag.
Definition: AbstractDataProvider.qc.dox.h:63
DataProvider::DataProviderSignatureTypeInfo
Data provider signature argument info.
Definition: AbstractDataProvider.qc.dox.h:290
DataProvider::DataProviderSignatureTypeInfo::type_code
int type_code
The signature type code.
Definition: AbstractDataProvider.qc.dox.h:295
DataProvider::DataProviderSignatureTypeInfo::type
AbstractDataProviderType type
Argument types.
Definition: AbstractDataProvider.qc.dox.h:292
DataProvider::DataProviderSummaryInfo
Data provider summary info.
Definition: AbstractDataProvider.qc.dox.h:79
DataProvider::DataProviderSummaryInfo::supports_observable
bool supports_observable
Does this data provider support the event API / observer pattern?
Definition: AbstractDataProvider.qc.dox.h:144
DataProvider::DataProviderSummaryInfo::supports_bulk_upsert
bool supports_bulk_upsert
Does the data provider support native / optimized bulk upserts?
Definition: AbstractDataProvider.qc.dox.h:123
DataProvider::DataProviderSummaryInfo::transaction_management
bool transaction_management
Does the data provider require transaction management?
Definition: AbstractDataProvider.qc.dox.h:132
DataProvider::DataProviderSummaryInfo::children_can_support_apis
bool children_can_support_apis
Can any child data providers offer API services (request - response data providers)?
Definition: AbstractDataProvider.qc.dox.h:159
DataProvider::DataProviderSummaryInfo::supports_create
bool supports_create
Does the data provider support record creation?
Definition: AbstractDataProvider.qc.dox.h:93
DataProvider::DataProviderSummaryInfo::name
string name
The name of the data provider.
Definition: AbstractDataProvider.qc.dox.h:81
DataProvider::DataProviderSummaryInfo::supports_read
bool supports_read
Does the data provider support reading.
Definition: AbstractDataProvider.qc.dox.h:90
DataProvider::DataProviderSummaryInfo::desc
string desc
The description of the data provider; supports markdown.
Definition: AbstractDataProvider.qc.dox.h:84
DataProvider::DataProviderSummaryInfo::has_record
bool has_record
Does the data provider provide a record?
Definition: AbstractDataProvider.qc.dox.h:135
DataProvider::DataProviderSummaryInfo::children_can_support_observers
bool children_can_support_observers
Can any child data providers support the observer pattern / event API?
Definition: AbstractDataProvider.qc.dox.h:169
DataProvider::DataProviderSummaryInfo::supports_upsert
bool supports_upsert
Does the data provider support record upserts (create or update)?
Definition: AbstractDataProvider.qc.dox.h:99
DataProvider::DataProviderSummaryInfo::supports_children
bool supports_children
Does the data provider support children?
Definition: AbstractDataProvider.qc.dox.h:129
DataProvider::DataProviderSummaryInfo::supports_bulk_create
bool supports_bulk_create
Does the data provider support native / optimized bulk creation?
Definition: AbstractDataProvider.qc.dox.h:117
DataProvider::DataProviderSummaryInfo::supports_delete
bool supports_delete
Does the data provider support record deletion?
Definition: AbstractDataProvider.qc.dox.h:102
DataProvider::DataProviderSummaryInfo::supports_request
bool supports_request
Does the data provider support the request API?
Definition: AbstractDataProvider.qc.dox.h:126
DataProvider::DataProviderSummaryInfo::supports_search_expressions
bool supports_search_expressions
Does this data provide support advanced search experssions?
Definition: AbstractDataProvider.qc.dox.h:138
DataProvider::DataProviderSummaryInfo::children_can_support_messages
bool children_can_support_messages
Can any child data providers support messages?
Definition: AbstractDataProvider.qc.dox.h:174
DataProvider::DataProviderSummaryInfo::supports_native_search
bool supports_native_search
Does the data provider support native record searching?
Definition: AbstractDataProvider.qc.dox.h:105
DataProvider::DataProviderSummaryInfo::supports_messages
string supports_messages
Message support.
Definition: AbstractDataProvider.qc.dox.h:154
DataProvider::DataProviderSummaryInfo::type
string type
The name of the provider type.
Definition: AbstractDataProvider.qc.dox.h:87
DataProvider::DataProviderSummaryInfo::supports_update
bool supports_update
Does the data provider support record updates?
Definition: AbstractDataProvider.qc.dox.h:96
DataProvider::DataProviderSummaryInfo::supports_bulk_read
bool supports_bulk_read
Does the data provider support native / optimized bulk reads?
Definition: AbstractDataProvider.qc.dox.h:111
DataProvider::DataProviderSummaryInfo::children_can_support_records
bool children_can_support_records
Can any child data providers offer record-based providers?
Definition: AbstractDataProvider.qc.dox.h:164