Qore DataProvider Module Reference 2.7.3
Loading...
Searching...
No Matches
AbstractDataProvider.qc.dox.h
1// -*- mode: c++; indent-tabs-mode: nil -*-
3
27namespace DataProvider {
33const UpsertResultInserted = "inserted";
34
36const UpsertResultUpdated = "updated";
37
39const UpsertResultVerified = "verified";
40
42const UpsertResultUnchanged = "unchanged";
43
45const UpsertResultDeleted = "deleted";
47
49public hashdecl AllowedValueInfo {
51 auto value;
52
54 string desc;
55};
56
58public hashdecl DataProviderOptionInfo {
60 softlist<AbstractDataProviderType> type;
61
63 bool required = False;
64
66 string desc;
67
70
72 bool sensitive = False;
73
75 *softlist<hash<AllowedValueInfo>> allowed_values;
76};
77
79public hashdecl 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
106
108
111 bool supports_bulk_read = False;
112
114
118
120
124
126 bool supports_request = False;
127
129 bool supports_children = False;
130
133
135 bool has_record = False;
136
139
141
145
147
155
157
160
162
165
167
170
172
175
177
180};
181
183public hashdecl DataProviderMessageInfo {
185
187 string desc;
188
191};
192
202
204const MSG_None = "NONE";
205
207
211const MSG_Sync = "SYNC";
212
214
216const MSG_Async = "ASYNC";
218
225const ST_Any = 1;
226
228const ST_Value = 2;
229
231
234const ST_Field = 3;
236
239 ST_Any: "any",
240 ST_Value: "value",
241 ST_Field: "field reference",
242};
243
245const SignatureTypeDescMap = map {$1.value: $1.key.toInt()}, SignatureTypeCodeMap.pairIterator();
246
253const ER_Search = (1 << 0);
254
256const ER_Field = (1 << 1);
257
261
263const RoleCodeMap = {
264 ER_Search: "search",
265};
266
268const RoleDescMap = map {$1.value: $1.key.toInt()}, RoleCodeMap.pairIterator();
269
276const LC_And = (1 << 0);
277
279const LC_Or = (1 << 1);
280
282const LC_All = (LC_And | LC_Or);
284
287 LC_And: "AND",
288 LC_Or: "OR",
289};
290
292const LogicDescMap = map {$1.value: $1.key.toInt()}, LogicCodeMap.pairIterator();
293
298
301};
302
305 "type": AbstractDataProviderTypeMap."any",
306 "type_code": ST_Field,
307};
308
311 "type": AbstractDataProviderTypeMap."any",
312 "type_code": ST_Any,
313};
314
317 "type": AbstractDataProviderTypeMap."string",
318 "type_code": ST_Value,
319};
320
323 "type": AbstractDataProviderTypeMap."*string",
324 "type_code": ST_Value,
325};
326
329 "type": AbstractDataProviderTypeMap."int",
330 "type_code": ST_Value,
331};
332
335 "type": AbstractDataProviderTypeMap."*int",
336 "type_code": ST_Value,
337};
338
341 "type": AbstractDataProviderTypeMap."list",
342 "type_code": ST_Value,
343};
344
347 "type": AbstractDataProviderTypeMap."hash",
348 "type_code": ST_Value,
349};
350
353 "type": AbstractDataProviderTypeMap."bool",
354 "type_code": ST_Any,
355};
356
359 "type": AbstractDataProviderTypeMap."string",
360 "type_code": ST_Any,
361};
362
365 "type": AbstractDataProviderTypeMap."date",
366 "type_code": ST_Any,
367};
368
375const DET_Operator = 1;
376
378const DET_Function = 2;
380
383 DET_Operator: "operator",
384 DET_Function: "function",
385};
386
388const ExpressionTypeDescMap = map {$1.value: $1.key.toInt()}, ExpressionTypeCodeMap.pairIterator();
389
393 int type;
394
396
398 string label;
399
401 string name;
402
404 string desc;
405
407 string symbol;
408
410
413
415 softlist<hash<DataProviderSignatureTypeInfo>> args;
416
419
421 bool varargs = False;
422};
423
427 string field;
428};
429
431public hashdecl DataProviderExpression {
433 string exp;
434
436
439 softlist<auto> args;
440};
441
443public hashdecl DataProviderInfo {
445
447 string name;
448
450
452 string type;
453
455
457 bool supports_read = False;
458
460
462 bool supports_create = False;
463
465
467 bool supports_update = False;
468
470
472 bool supports_upsert = False;
473
475
477 bool supports_delete = False;
478
480
483
485
490 bool supports_bulk_read = False;
491
493
499
501
507
509
511 bool supports_request = False;
512
514
516 bool supports_children = False;
517
519
522
524
526 bool has_record = False;
527
529
532
534
539
541
546
548
552 bool supports_add_field = False;
553
555
560
562
567
569
573 bool supports_schema = False;
574
576
581
583
588
590
598
600
603
605
608
610
613
615
618
620
623
625
628 *string schema_type;
629
631
633 *hash<string, hash<DataProviderOptionInfo>> constructor_options;
634
636
638 *hash<string, hash<DataProviderOptionInfo>> create_options;
639
641
643 *hash<string, hash<DataProviderOptionInfo>> upsert_options;
644
646
648 *hash<string, hash<DataProviderOptionInfo>> search_options;
649
651
653 *hash<string, hash<DataProviderOptionInfo>> request_options;
654
656
660 *hash<string, hash<DataProviderOptionInfo>> child_create_options;
661
663
667 *hash<string, hash<DataProviderOptionInfo>> child_delete_options;
668
670
674 *hash<string, hash<DataProviderOptionInfo>> add_field_options;
675
677
681 *hash<string, hash<DataProviderOptionInfo>> update_field_options;
682
684
688 *hash<string, hash<DataProviderOptionInfo>> delete_field_options;
689
691
695 *hash<string, hash<DataProviderOptionInfo>> send_message_options;
696
698
702 *hash<string, hash<DataProviderExpressionInfo>> expressions;
703
705
709 *hash<string, hash<DataProviderMessageInfo>> events;
710
712
716 *hash<string, hash<DataProviderMessageInfo>> messages;
717
719
722
724
728 hash<string, hash<MapperRuntimeKeyInfo>> mapper_keys = Mapper::MapperKeyInfo;
729
731
733 *string desc;
734
736
738 *list<string> children;
739};
740
743
744public:
747 DP_OP_AND: {
749 "type": DET_Operator,
750 "label": DP_OP_AND,
751 "name": "and (&&)",
752 "desc": "logical AND operation supporting logic short-circuiting",
753 "symbol": "&&",
755 "varargs": True,
756 "return_type": AbstractDataProviderTypeMap."bool",
757 },
758 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
759 foreach auto arg in (exp.args) {
761 return False;
762 }
763 }
764 return True;
765 },
766 },
767 DP_OP_OR: {
769 "type": DET_Operator,
770 "label": DP_OP_OR,
771 "name": "or (||)",
772 "desc": "logical OR operation supporting logic short-circuiting",
773 "symbol": "||",
775 "varargs": True,
776 "return_type": AbstractDataProviderTypeMap."bool",
777 },
778 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
779 foreach auto arg in (exp.args) {
781 return True;
782 }
783 }
784 return False;
785 },
786 },
789 "type": DET_Operator,
790 "label": DP_SEARCH_OP_EQ,
791 "name": "equals (=)",
792 "desc": "a value for equality comparisons; the type of the value should correspond to the field "
793 "type",
794 "symbol": "==",
796 "return_type": AbstractDataProviderTypeMap."bool",
797 },
798 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
799 auto arg0 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]);
800 auto arg1 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
801 // for backwards compatibility, if the first argument is a field reference, and the second is a
802 # hash
803
804 return arg0 == arg1;
805 },
806 },
809 "type": DET_Operator,
810 "label": DP_SEARCH_OP_NE,
811 "name": "not equals (!=)",
812 "desc": "a value for not-equals comparisons; the type of the value should correspond to the "
813 "field type",
814 "symbol": "!=",
816 "return_type": AbstractDataProviderTypeMap."bool",
817 },
818 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
821 },
822 },
825 "type": DET_Operator,
826 "label": DP_SEARCH_OP_LT,
827 "name": "less than (<)",
828 "desc": "a value for less than comparisons; if the field value is less than the argument, then "
829 "the operation returns true; the type of the value should correspond to the field type",
830 "symbol": "<",
832 "return_type": AbstractDataProviderTypeMap."bool",
833 },
834 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
837 },
838 },
841 "type": DET_Operator,
842 "label": DP_SEARCH_OP_LE,
843 "name": "less than or equals (<=)",
844 "desc": "a value for less than or equals comparisons; if the field value is less than or equal "
845 "to the argument, then the operation returns true; the type of the value should correspond "
846 "to the field type",
847 "symbol": "<=",
849 "return_type": AbstractDataProviderTypeMap."bool",
850 },
851 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
854 },
855 },
858 "type": DET_Operator,
859 "label": DP_SEARCH_OP_GT,
860 "name": "greater than (>)",
861 "desc": "a value for less than comparisons; if the field value is less than the argument, then "
862 "the operation returns true; the type of the value should correspond to the field type",
863 "symbol": ">",
865 "return_type": AbstractDataProviderTypeMap."bool",
866 },
867 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
870 },
871 },
874 "type": DET_Operator,
875 "label": DP_SEARCH_OP_GE,
876 "name": "greater than or equals (>=)",
877 "desc": "a value for greater than or equals comparisons; if the field value is greater than or "
878 "equal to the argument, then the operation returns true; the type of the value should "
879 "correspond to the field type",
880 "symbol": ">=",
882 "return_type": AbstractDataProviderTypeMap."bool",
883 },
884 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
887 },
888 },
891 "type": DET_Operator,
892 "label": DP_SEARCH_OP_BETWEEN,
893 "name": "between",
894 "desc": "A list with two elements giving the lower and upper bounds of the field value; the list "
895 "element value types must be equal to the field's type",
896 "symbol": "between",
897 "args": (
901 ),
902 "return_type": AbstractDataProviderTypeMap."bool",
903 },
904 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
905 auto arg0 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]);
906 return arg0 > AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1])
907 && arg0 < AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[2]);
908 },
909 },
912 "type": DET_Operator,
913 "label": DP_SEARCH_OP_IN,
914 "name": "in",
915 "desc": "A list giving possible values of the field; if the field's value matches any of the "
916 "values in the list, then the operation returns true; element value types must be equal to "
917 "the field's type",
918 "symbol": "in",
920 "return_type": AbstractDataProviderTypeMap."bool",
921 "varargs": True,
922 },
923 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
924 return inlist(AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]),
926 },
927 },
930 "type": DET_Operator,
931 "label": DP_SEARCH_OP_NOT,
932 "name": "logical not (!)",
933 "desc": "This operator reverses the logcal value of the operator expression given as an argument",
934 "symbol": "!",
936 "return_type": AbstractDataProviderTypeMap."bool",
937 },
938 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
939 return (!AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]));
940 },
941 },
944 "type": DET_Operator,
945 "label": DP_SEARCH_OP_REGEX,
946 "name": "regular expression match",
947 "desc": "regular expression operator; the first argument will be processed with the second as a "
948 "regular expression pattern",
949 "symbol": "regex",
950 "args": (
953 "type": (new HashDataType())
954 .addField(new QoreDataField("pattern", "the regular expression pattern",
956 .addField(new QoreDataField("options", "regular expression options",
958 },
959 ),
960 "return_type": AbstractDataProviderTypeMap."bool",
961 },
962 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
963 auto arg1 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
964 return regex(AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]).toString(),
965 arg1.pattern, arg1.options);
966 },
967 },
968 };
969
971
976 const GenericExpressions = map {$1.key: $1.value.exp}, GenericExpressionImplementations.pairIterator();
977
979 const DataProviderSummaryInfoKeys = map $1.getName(),
980 TypedHash::forName("DataProviderSummaryInfo").getMembers();
981
982protected:
984 *Logger logger;
985
987 static bool callbacks_locked = False;
988
991
993 static code cb_resolve_value;
994
996
1002 "columns": <DataProviderOptionInfo>{
1003 "type": AbstractDataProviderTypeMap."any",
1004 "desc": "allows a subset of fields to be output in searches",
1005 },
1006 "limit": <DataProviderOptionInfo>{
1007 "type": AbstractDataProviderType::get(IntType),
1008 "desc": "the maximum number of records to return",
1009 },
1010 "offset": <DataProviderOptionInfo>{
1011 "type": AbstractDataProviderType::get(IntType),
1012 "desc": "the offset number in records to return",
1013 },
1014 };
1015
1016public:
1017
1020
1021
1024
1025
1028
1029
1031
1035 hash<auto> getInfoAsData(*bool with_type_info);
1036
1037
1039 hash<DataProviderInfo> getInfo();
1040
1041
1043 hash<DataProviderSummaryInfo> getSummaryInfo();
1044
1045
1047 *string getDesc();
1048
1049
1051
1061 *hash<auto> createRecord(hash<auto> rec, *hash<auto> create_options);
1062
1063
1065
1072 string upsertRecord(hash<auto> rec, *hash<auto> upsert_options);
1073
1074
1076
1083 *hash<auto> searchFirstRecord(hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1084
1085
1087
1092 *hash<auto> searchFirstRecord(hash<auto> where_cond, *hash<auto> search_options);
1093
1094
1096
1104 *hash<auto> searchSingleRecord(hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1105
1106
1108
1114 *hash<auto> searchSingleRecord(hash<auto> where_cond, *hash<auto> search_options);
1115
1116
1118
1123
1124
1126
1135 *hash<auto> search_options) {
1136 checkRead();
1137 return searchRecordsBulk(block_size, NOTHING, validateSearchOptions(search_options));
1138 }
1139
1141
1153 *hash<DataProviderExpression> where_cond, *hash<auto> search_options) {
1154 checkRead();
1155 if (block_size <= 0);
1156
1157 search_options = validateSearchOptions(search_options);
1158 return searchRecordsBulkImpl(block_size, processSearchParameters(where_cond, search_options),
1159 search_options);
1160 }
1161
1163
1172 AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size = 1000, *hash<auto> where_cond,
1173 *hash<auto> search_options) {
1174 checkRead();
1175 if (block_size <= 0);
1176
1177 search_options = validateSearchOptions(search_options);
1178 return searchRecordsBulkImpl(block_size, getSearchExpression(where_cond, search_options), search_options);
1179 }
1180
1182
1189 AbstractDataProviderRecordIterator searchRecords(*hash<DataProviderExpression> where_cond,
1190 *hash<auto> search_options) {
1191 checkRead();
1192 search_options = validateSearchOptions(search_options);
1193 return searchRecordsImpl(processSearchParameters(where_cond, search_options), search_options);
1194 }
1195
1197
1202 AbstractDataProviderRecordIterator searchRecords(*hash<auto> where_cond, *hash<auto> search_options);
1203
1204
1206
1216 AbstractDataProviderRecordIterator requestSearchRecords(auto req, *hash<DataProviderExpression> where_cond,
1217 *hash<auto> search_options) {
1218 checkRead();
1219 checkRequest();
1220 return requestSearchRecordsImpl(req, processSearchParameters(where_cond, search_options), search_options);
1221 }
1222
1224
1233 *hash<auto> search_options) {
1234 checkRead();
1235 checkRequest();
1236 return requestSearchRecordsImpl(req, getSearchExpression(where_cond, search_options), search_options);
1237 }
1238
1240
1251 bool updateSingleRecord(hash<auto> set, hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1252
1253
1255
1264 bool updateSingleRecord(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
1265
1266
1268
1280 int updateRecords(hash<auto> set, *hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1281
1282
1284
1294 int updateRecords(hash<auto> set, *hash<auto> where_cond, *hash<auto> search_options);
1295
1296
1298
1310 int deleteRecords(*hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1311
1312
1314
1324 int deleteRecords(*hash<auto> where_cond, *hash<auto> search_options);
1325
1326
1328
1336 auto doRequest(auto req, *hash<auto> request_options);
1337
1338
1340
1351 AbstractDataProvider createChildProvider(string name, hash<string, AbstractDataField> fields,
1352 *hash<auto> child_create_options) {
1354 child_create_options = validateChildCreateOptions(child_create_options);
1355 if (!fields);
1356
1357 on_error if (1.err != 'CREATE-CHILD-PROVIDER-ERROR');
1358
1359 return createChildProviderImpl(name, fields, child_create_options);
1360 }
1361
1363
1371 deleteChildProvider(string name, *hash<auto> child_delete_options);
1372
1373
1375
1384 addField(AbstractDataField field, *hash<auto> field_add_options);
1385
1386
1388
1397 updateField(string name, AbstractDataField field, *hash<auto> field_update_options);
1398
1399
1401
1409 deleteField(string name, *hash<auto> field_delete_options);
1410
1411
1413
1424 sendMessage(string message_id, auto msg, *hash<auto> send_message_options);
1425
1426
1428
1435
1436
1438
1443
1444
1446
1451
1452
1454
1458 *hash<string, AbstractDataProviderType> getErrorResponseTypes();
1459
1460
1462
1470
1471
1473
1482 hash<DataProviderMessageInfo> getEventInfo(string event_id);
1483
1484
1486
1492 hash<string, hash<DataProviderMessageInfo>> getEventTypes();
1493
1494
1496
1505 hash<DataProviderMessageInfo> getMessageInfo(string message_id);
1506
1507
1509
1515 hash<string, hash<DataProviderMessageInfo>> getMessageTypes();
1516
1517
1519
1522 *list<hash<DataProviderSummaryInfo>> getChildProviderSummaryInfo();
1523
1524
1526
1528 *list<string> getChildProviderNames();
1529
1530
1532
1539
1540
1542
1549
1550
1552
1561
1562
1564
1568
1569
1571
1580
1581
1583
1590
1591
1593
1600
1601
1603
1608
1609
1611
1616
1617
1619
1623 *hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
1624
1625
1627
1631
1632
1634
1638
1639
1641
1645
1646
1648
1652
1653
1655
1659
1660
1662
1666
1667
1669
1675
1676
1678
1684
1685
1687
1693
1694
1696
1702
1703
1705
1711
1712
1714
1720
1721
1723
1729
1730
1732
1738
1739
1741
1747
1748
1750
1758 *hash<auto> getSearchExpression(*hash<auto> where_cond, *hash<auto> search_options);
1759
1760
1762
1765 private hash<DataProviderExpression> getSimpleArgumentIntern(int role, hash<DataProviderInfo> info,
1766 hash<DataProviderExpressionInfo> expinfo, string key, auto value) {
1767 // remove any unique suffix from key to get field name
1768 key =~ s/:.*//g;
1769 hash<DataProviderExpression> rv;
1770 if (value.typeCode() == NT_HASH && value.op && value.hasKey('arg'));
1771 else {
1772 rv = getEqualityComparisonExpression(role, info, key, value);
1773 }
1774 int caps = role == ER_Search ? info.search_logic_capabilities : 0;
1775 verifyExpression(role, info.expressions, caps, AbstractDataProviderTypeMap."bool", rv);
1776 return rv;
1777 }
1778
1780
1785 private hash<DataProviderExpression> getEqualityComparisonExpression(int role, hash<DataProviderInfo> info,
1786 string key, auto value) {
1787 if (!info.expressions.'=');
1788
1789 return <DataProviderExpression>{
1790 "exp": "=",
1791 "args": (<DataProviderFieldReference>{"field": key},) + value,
1792 };
1793 }
1794
1796
1799 static private hash<DataProviderExpressionInfo> getExpression(int role, string exp,
1800 *hash<string, hash<DataProviderExpressionInfo>> expmap) {
1801 *hash<DataProviderExpressionInfo> expinfo = expmap{exp};
1802 if (!expinfo);
1803
1804 if (!(expinfo.role & role));
1805
1806 return expinfo;
1807 }
1808
1810
1815
1817
1820 static auto evalGenericExpressionValue(hash<auto> rec, auto val);
1821 return rv;
1822 };
1823 if (val instanceof hash<DataProviderExpression>);
1824
1825 return val;
1826 };
1827
1829
1832 static auto evalGenericExpression(hash<auto> rec, hash<DataProviderExpression> exp);
1833
1835
1845 static bool setDynamicValueCallbacks(code value_needs_resolution, code resolve_value);
1846
1848
1856 static verifyExpression(int role, *hash<string, hash<DataProviderExpressionInfo>> expmap, int caps,
1857 AbstractDataProviderType expected_type, hash<DataProviderExpression> exp) {
1858 hash<DataProviderExpressionInfo> expinfo = AbstractDataProvider::getExpression(role, exp.exp, expmap);
1859 return AbstractDataProvider::verifyExpression(role, expinfo, caps, expected_type, exp);
1860 }
1861
1863
1871 static verifyExpression(int role, hash<DataProviderExpressionInfo> expinfo, int caps,
1872 AbstractDataProviderType expected_type, hash<DataProviderExpression> exp) {
1873 // check arguments
1874 if (exp.args.lsize() > expinfo.args.size() && !expinfo.varargs);
1875
1876 map AbstractDataProvider::verifyExpressionArgValue(role, caps, expinfo, exp.args, //), expinfo.args;
1877 if (exp.args.lsize() > expinfo.args.size());
1878
1879 if (!expected_type.isAssignableFrom(expinfo.return_type));
1880
1881 }
1882
1884
1890 static verifyExpressionArgValue(int role, int caps, hash<DataProviderExpressionInfo> expinfo,
1891 softlist<auto> values, int pos) {
1892 hash<DataProviderSignatureTypeInfo> arginfo = expinfo.args[pos] ?? expinfo.args.last();
1893 if (arginfo.type_code == ST_Any);
1894
1895 auto val = values[pos];
1896 bool is_exp = val instanceof hash<DataProviderExpression>;
1897 bool is_ref = is_exp ? False : val instanceof hash<DataProviderFieldReference>;
1898
1899 switch (arginfo.type_code);
1900
1901 }
1902
1904protected:
1905 static bool checkCallbacks();
1906public:
1907
1908
1910
1912protected:
1913 *hash<auto> validateCreateOptions(*hash<auto> create_options);
1914public:
1915
1916
1918
1920protected:
1921 *hash<auto> validateUpsertOptions(*hash<auto> upsert_options);
1922public:
1923
1924
1926
1928protected:
1929 *hash<auto> validateSearchOptions(*hash<auto> search_options);
1930public:
1931
1932
1934
1936protected:
1937 *hash<auto> validateRequestOptions(*hash<auto> request_options);
1938public:
1939
1940
1942
1946protected:
1947 *hash<auto> validateChildCreateOptions(*hash<auto> child_create_options);
1948public:
1949
1950
1952
1956protected:
1957 *hash<auto> validateChildDeleteOptions(*hash<auto> child_delete_options);
1958public:
1959
1960
1962
1966protected:
1967 *hash<auto> validateFieldAddOptions(*hash<auto> field_add_options);
1968public:
1969
1970
1972
1976protected:
1977 *hash<auto> validateFieldUpdateOptions(*hash<auto> field_update_options);
1978public:
1979
1980
1982
1986protected:
1987 *hash<auto> validateFieldDeleteOptions(*hash<auto> field_delete_options);
1988public:
1989
1990
1992
1996protected:
1997 *hash<auto> validateSendMessageOptions(*hash<auto> send_message_options);
1998public:
1999
2000
2002protected:
2003 processConstructorOptions(*hash<string, hash<DataProviderOptionInfo>> option_desc, *hash<auto> options);
2004public:
2005
2006
2008 private *hash<auto> checkOptions(string err, *hash<string, hash<DataProviderOptionInfo>> option_desc,
2009 *hash<auto> uoptions) {
2010 // to ensure that the return value has type "hash<auto>"
2011 hash<auto> options += uoptions;
2012 if (!option_desc && options);
2013
2014 if (*list<string> invalid_keys = keys (options - (keys option_desc)));
2015
2016 // check types and required keys
2017 foreach hash<auto> i in (option_desc.pairIterator());
2018
2019 return options;
2020 }
2021
2023
2028 private *hash<DataProviderExpression> processSearchParameters(*hash<DataProviderExpression> exp,
2029 *hash<auto> search_options) {
2030 if (!exp);
2031
2032 checkSearchExpressions();
2033 hash<DataProviderInfo> info = getInfo();
2034 verifyExpression(ER_Search, info.expressions, info.search_logic_capabilities,
2035 AbstractDataProviderTypeMap."bool", exp);
2036 return exp;
2037 }
2038
2040
2047protected:
2048 *hash<auto> processFieldValues(*hash<auto> h, *hash<auto> search_options);
2049public:
2050
2051
2053protected:
2054 error(string err, string fmt);
2055public:
2056
2057
2059
2064 private *hash<auto> searchFirstRecordImpl(hash<auto> where_cond,
2065 *hash<auto> search_options) {
2066 // scans the whole data set to find a single record
2067 AbstractDataProviderRecordIterator i = searchRecordsImpl(where_cond, search_options);
2068 if (i.next());
2069
2070 }
2071
2073
2080 private *hash<auto> searchSingleRecordImpl(hash<auto> where_cond,
2081 *hash<auto> search_options) {
2082 // scans the whole data set to find a single record
2083 *list<*hash<auto>> records = map $1, searchRecordsImpl(where_cond, search_options);
2084 if (records.lsize() > 1);
2085
2086 return records[0];
2087 }
2088
2090
2094protected:
2095 *list<string> getChildProviderNamesImpl();
2096public:
2097
2098
2100
2102protected:
2103 *AbstractDataProvider getChildProviderImpl(string name);
2104public:
2105
2106
2108
2114 *hash<string, AbstractDataField> getRecordType(*hash<auto> search_options);
2115
2116
2118 *hash<string, AbstractDataField> getSoftRecordType(*hash<auto> search_options);
2119
2120
2122 *hash<string, AbstractDataField> getOrNothingRecordType(*hash<auto> search_options);
2123
2124
2126
2129 *hash<string, hash<DataProviderOptionInfo>> getSearchOptions();
2130
2131
2133
2136 *hash<string, hash<DataProviderOptionInfo>> getCreateOptions();
2137
2138
2140
2143 *hash<string, hash<DataProviderOptionInfo>> getUpsertOptions();
2144
2145
2147
2150 *hash<string, hash<DataProviderOptionInfo>> getRequestOptions();
2151
2152
2154
2160 *hash<string, hash<DataProviderOptionInfo>> getChildCreateOptions();
2161
2162
2164
2170 *hash<string, hash<DataProviderOptionInfo>> getChildDeleteOptions();
2171
2172
2174
2180 *hash<string, hash<DataProviderOptionInfo>> getFieldAddOptions();
2181
2182
2184
2190 *hash<string, hash<DataProviderOptionInfo>> getFieldUpdateOptions();
2191
2192
2194
2200 *hash<string, hash<DataProviderOptionInfo>> getFieldDeleteOptions();
2201
2202
2204
2210 *hash<string, hash<DataProviderOptionInfo>> getSendMessageOptions();
2211
2212
2214
2216 string getMessageSupport();
2217
2218
2220
2222 bool supportsRead();
2223
2224
2226
2228 bool supportsBulkRead();
2229
2230
2232
2234 bool supportsCreate();
2235
2236
2238
2240 bool supportsUpdate();
2241
2242
2244
2246 bool supportsUpsert();
2247
2248
2250
2252 bool supportsDelete();
2253
2254
2256
2258 bool supportsNativeSearch();
2259
2260
2262
2264 bool supportsBulkCreate();
2265
2266
2268
2270 bool supportsBulkUpsert();
2271
2272
2274
2276 bool supportsRequest();
2277
2278
2280
2282 bool recordRequiresSearchOptions();
2283
2284
2286
2288 bool hasRecord();
2289
2290
2292
2294 bool supportsCreateChild();
2295
2296
2298
2300 bool supportsDeleteChild();
2301
2302
2304
2306 bool supportsAddField();
2307
2308
2310
2312 bool supportsUpdateField();
2313
2314
2316
2318 bool supportsDeleteField();
2319
2320
2322
2324 bool supportsSchema();
2325
2326
2328
2330 bool supportsSearchExpressions();
2331
2332
2334
2336 bool supportsObservable();
2337
2338
2340
2342 bool supportsMessages();
2343
2344
2346
2348 *object getSchemaType();
2349
2350
2352
2356protected:
2357 *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
2358public:
2359
2360
2362
2369 private AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000,
2370 *hash<auto> where_cond, *hash<auto> search_options) {
2371 return new DefaultBulkRecordIterface(block_size, searchRecordsImpl(where_cond, search_options));
2372 }
2373
2375
2380 private AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond,
2381 *hash<auto> search_options) {
2382 throwUnimplementedException();
2383 }
2384
2386
2394 private AbstractDataProviderRecordIterator requestSearchRecordsImpl(auto req,
2395 *hash<auto> where_cond, *hash<auto> search_options) {
2396 throwUnimplementedException();
2397 }
2398
2400
2408protected:
2409 *hash<auto> createRecordImpl(hash<auto> rec, *hash<auto> create_options);
2410public:
2411
2412
2414
2419protected:
2420 string upsertRecordImpl(hash<auto> rec, *hash<auto> upsert_options);
2421public:
2422
2423
2425
2429 private bool updateSingleRecordImpl(hash<auto> set, hash<auto> where_cond,
2430 *hash<auto> search_options) {
2431 throwUnimplementedException();
2432 }
2433
2435
2441 private int updateRecordsImpl(hash<auto> set, *hash<auto> where_cond,
2442 *hash<auto> search_options) {
2443 throwUnimplementedException();
2444 }
2445
2447
2453protected:
2454 int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
2455public:
2456
2457
2459
2464protected:
2465 auto doRequestImpl(auto req, *hash<auto> request_options);
2466public:
2467
2468
2470
2478 private AbstractDataProvider createChildProviderImpl(string name, hash<string, AbstractDataField> fields,
2479 *hash<auto> child_create_options) {
2480 throwUnimplementedException();
2481 }
2482
2484
2489protected:
2490 deleteChildProviderImpl(string name, *hash<auto> child_delete_options);
2491public:
2492
2493
2495
2501protected:
2502 addFieldImpl(AbstractDataField field, *hash<auto> field_add_options);
2503public:
2504
2505
2507
2513protected:
2514 updateFieldImpl(string name, AbstractDataField field, *hash<auto> field_update_options);
2515public:
2516
2517
2519
2524protected:
2525 deleteFieldImpl(string name, *hash<auto> field_delete_options);
2526public:
2527
2528
2530
2537protected:
2538 sendMessageImpl(string message_id, auto msg, *hash<auto> send_message_options);
2539public:
2540
2541
2543
2547protected:
2548 object getSchemaObjectImpl();
2549public:
2550
2551
2553
2557protected:
2558 *AbstractDataProviderType getRequestTypeImpl();
2559public:
2560
2561
2563
2567protected:
2568 *AbstractDataProviderType getResponseTypeImpl();
2569public:
2570
2571
2573
2577protected:
2578 *hash<string, AbstractDataProviderType> getErrorResponseTypesImpl();
2579public:
2580
2581
2583
2589protected:
2590 AbstractDataProviderType getErrorResponseTypeImpl(string error_code);
2591public:
2592
2593
2595
2605protected:
2606 hash<DataProviderMessageInfo> getEventInfoImpl(string event_id);
2607public:
2608
2609
2611
2617protected:
2618 hash<string, hash<DataProviderMessageInfo>> getEventTypesImpl();
2619public:
2620
2621
2623
2631protected:
2632 hash<DataProviderMessageInfo> getMessageInfoImpl(string message_id);
2633public:
2634
2635
2637
2643protected:
2644 hash<string, hash<DataProviderMessageInfo>> getMessageTypesImpl();
2645public:
2646
2647
2649
2651protected:
2652 throwUnimplementedException();
2653public:
2654
2655
2657 abstract string getName();
2658
2660protected:
2661 abstract hash<DataProviderInfo> getStaticInfoImpl();
2662public:
2663}
2664}
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:742
*hash< auto > searchFirstRecord(hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Returns the first record matching the search options.
static code cb_resolve_value
static callback for dynamic value resolution
Definition: AbstractDataProvider.qc.dox.h:993
const GenericExpressions
Generic search operator expressions.
Definition: AbstractDataProvider.qc.dox.h:976
hash< DataProviderSummaryInfo > getSummaryInfo()
Return data provider summary info.
hash< DataProviderMessageInfo > getEventInfo(string event_id)
Returns the description of an observable event, if any.
checkDeleteChild()
Ensures that the data provider supports deleting children.
*hash< string, hash< MapperRuntimeKeyInfo > > getMapperRuntimeKeys()
Returns custom data mapper runtime keys.
deleteChildProvider(string name, *hash< auto > child_delete_options)
Deletes a child data provider.
*hash< auto > searchSingleRecord(hash< auto > where_cond, *hash< auto > search_options)
Returns a single record matching the search options.
beginTransaction()
Begins a transaction with a data provider.
const DataProviderSummaryInfoKeys
A list of members names of the DataProviderSummaryInfoKeys hashdecl.
Definition: AbstractDataProvider.qc.dox.h:979
*AbstractDataProviderType getRequestType()
Returns the description of a successful request message, if any.
hash< auto > getInfoAsData(*bool with_type_info)
Returns static provider information as data; no objects are returned.
checkUpdate()
Ensures that the data provider supports record upserts.
AbstractDataProviderBulkOperation getBulkUpserter()
Returns a bulk upsert operation object for the data provider.
hash< DataProviderMessageInfo > getMessageInfo(string message_id)
Returns the description of an outbound message, if any.
const GenericExpressionImplementations
Generic expression implementations for data providers without native search functionality.
Definition: AbstractDataProvider.qc.dox.h:746
*hash< auto > searchSingleRecord(hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Returns a single record matching the search options.
hash< string, hash< DataProviderMessageInfo > > getEventTypes()
Returns a hash of all supported event types.
checkUpdateField()
Ensures that the data provider supports updating fields.
sendMessage(string message_id, auto msg, *hash< auto > send_message_options)
Sends a message from message-capable data providers.
checkObservable()
Ensures that the data provider supports observer pattern / event API.
*AbstractDataProvider getChildProvider(string name)
Returns the given child provider or NOTHING if the given child is unknown.
const GenericRecordSearchOptions
Generic record search options; see details below.
Definition: AbstractDataProvider.qc.dox.h:1001
commit()
Commits data written to the data provider.
bool updateSingleRecord(hash< auto > set, hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Updates a single record matching the search options.
bool requiresTransactionManagement()
Returns True if the data provider requires 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.
Definition: AbstractDataProvider.qc.dox.h:1172
constructor()
Creates 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 > searchFirstRecord(hash< auto > where_cond, *hash< auto > search_options)
Returns the first record matching the search options.
hash< DataProviderInfo > getInfo()
Returns data provider info.
int deleteRecords(*hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Deletes zero or more records.
*Logger logger
Logger for logging.
Definition: AbstractDataProvider.qc.dox.h:984
rollback()
Rolls back data written to the data provider.
int updateRecords(hash< auto > set, *hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
static auto evalGenericExpressionValue(hash< auto > rec, auto val)
Evaluates the given expression with the generic internal implementation and returns the result.
*AbstractDataProviderType getResponseType()
Returns the description of a response message, if this object represents a response message.
static bool callbacks_locked
flag if callbacks are locked
Definition: AbstractDataProvider.qc.dox.h:987
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:1232
AbstractDataProviderBulkOperation getBulkInserter()
Returns a bulk insert operation object for the data provider.
*hash< auto > createRecord(hash< auto > rec, *hash< auto > create_options)
Creates the given record in the data provider.
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.
auto doRequest(auto req, *hash< auto > request_options)
Makes a request and returns the response.
*list< hash< DataProviderSummaryInfo > > getChildProviderSummaryInfo()
Return data provider summary info.
static code cb_value_needs_resolution
static callback the returns a bool if the value needs dynamic resolution
Definition: AbstractDataProvider.qc.dox.h:990
object getSchemaObject()
Returns the schema supporting this data provider.
checkCreate()
Ensures that the data provider supports record creation.
checkSchema()
Ensures that the data provider supports a schema.
private hash< DataProviderExpression > getEqualityComparisonExpression(int role, hash< DataProviderInfo > info, string key, auto value)
Returns an equality comparison expression.
Definition: AbstractDataProvider.qc.dox.h:1785
checkRead()
Ensures that the data provider supports read operations.
*string getDesc()
Returns the data provider description.
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:1134
int updateRecords(hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
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:1765
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.
hash< string, hash< DataProviderMessageInfo > > getMessageTypes()
Returns a hash of all supported outbound messages.
AbstractDataProviderType getErrorResponseType(string error_code)
Returns the type for the given error code.
checkMessages()
Ensures that the data provider supports sending messages.
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:1189
*hash< string, AbstractDataProviderType > getErrorResponseTypes()
Returns a hash of error responses, if any.
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.
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.
Definition: AbstractDataProvider.qc.dox.h:1351
string upsertRecord(hash< auto > rec, *hash< auto > upsert_options)
Upserts the given record in the data provider.
updateField(string name, AbstractDataField field, *hash< auto > field_update_options)
Updates an existing field.
*hash< auto > getSearchExpression(*hash< auto > where_cond, *hash< auto > search_options)
Returns a search expression for a standard search hash.
checkRequest()
Ensures that the data provider supports the request API.
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:1799
AbstractDataProvider getChildProviderEx(string name)
Returns the given child provider or throws an exception if the given child is unknown.
checkSearchExpressions()
Ensures that the data provider supports advanced search expressions.
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:1216
checkAddField()
Ensures that the data provider supports adding fields.
checkCreateChild()
Ensures that the data provider supports creating children.
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:1152
int deleteRecords(*hash< auto > where_cond, *hash< auto > search_options)
Deletes zero or more records.
checkUpsert()
Ensures that the data provider supports record upserts.
*list< string > getChildProviderNames()
Returns a list of child data provider names, if any.
Defines the abstract class for data provider iterators; the destructor releases the iterator.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:339
describes a data type
Definition: AbstractDataProviderType.qc.dox.h:206
static AbstractDataProviderType get(Type type, *hash< auto > options, *hash< auto > tags)
Returns an appropriate object for the given type.
describes a data type based on a hash
Definition: HashDataType.qc.dox.h:36
describes a data type based on a hashdecl
Definition: QoreDataField.qc.dox.h:34
const False
const DET_Operator
Definition: AbstractDataProvider.qc.dox.h:375
const DET_Function
Indicates a function expression.
Definition: AbstractDataProvider.qc.dox.h:378
const DP_SEARCH_OP_EQ
Identifies the generic data provider equals operator (=) for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:81
const DP_SEARCH_OP_REGEX
Definition: AbstractDataProviderRecordIterator.qc.dox.h:51
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
const DP_SEARCH_OP_IN
Identifies the generic data provider "in" operator for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:91
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
const DP_SEARCH_OP_BETWEEN
Identifies the generic data provider "between" operator for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:86
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
const DP_SEARCH_OP_NOT
Identifies the generic data provider "not" operator for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:96
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
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
const DP_OP_OR
OR logic.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:41
const DP_OP_AND
Definition: AbstractDataProviderRecordIterator.qc.dox.h:38
const MSG_None
Definition: AbstractDataProvider.qc.dox.h:204
const MSG_Async
Asynchronous output type, output can happen any time.
Definition: AbstractDataProvider.qc.dox.h:216
const MSG_Sync
Synchronous output type, an output message is expected after each observed event.
Definition: AbstractDataProvider.qc.dox.h:211
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
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
const ER_All
Indicates an expression that can be used in all contexts.
Definition: AbstractDataProvider.qc.dox.h:259
const ER_Search
Definition: AbstractDataProvider.qc.dox.h:253
const ER_Field
Indicates an expression that can be used in a field.
Definition: AbstractDataProvider.qc.dox.h:256
const LC_Or
Indicates that boolean expressions can be combined with OR logic.
Definition: AbstractDataProvider.qc.dox.h:279
const LC_And
Definition: AbstractDataProvider.qc.dox.h:276
const LC_All
Indicates that all logic capabilities are supported.
Definition: AbstractDataProvider.qc.dox.h:282
number exp(number n)
const ST_Value
Indicates any literal value of the given type; i.e. not an operator or other expression.
Definition: AbstractDataProvider.qc.dox.h:228
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:234
const ST_Any
Definition: AbstractDataProvider.qc.dox.h:225
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
const DataProviderSignatureOptionalIntValueType
Data provider signature *int value type.
Definition: AbstractDataProvider.qc.dox.h:334
const DataProviderSignatureStringType
Data provider signature string type.
Definition: AbstractDataProvider.qc.dox.h:358
const DataProviderSignatureDateType
Data provider signature date type.
Definition: AbstractDataProvider.qc.dox.h:364
const DataProviderSignatureHashValueType
Data provider signature hash value type.
Definition: AbstractDataProvider.qc.dox.h:346
const SignatureTypeDescMap
Maps signature description values to integer codes.
Definition: AbstractDataProvider.qc.dox.h:245
const SignatureTypeCodeMap
Maps signature type codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:238
const DataProviderSignatureOptionalStringValueType
Data provider signature optional string value type.
Definition: AbstractDataProvider.qc.dox.h:322
const LogicDescMap
Logic map from descriptions to integer codes.
Definition: AbstractDataProvider.qc.dox.h:292
const DataProviderSignatureFieldType
Data provider signature field type.
Definition: AbstractDataProvider.qc.dox.h:304
const ExpressionTypeDescMap
Maps DataProvider expression type descriptions to integer codes.
Definition: AbstractDataProvider.qc.dox.h:388
const DataProviderSignatureBoolType
Data provider signature bool type.
Definition: AbstractDataProvider.qc.dox.h:352
const AbstractDataProviderTypeMap
Maps Qore type name constant values to AbstractDataProviderType values.
Definition: AbstractDataProviderType.qc.dox.h:140
const DataProviderSignatureListValueType
Data provider signature list value type.
Definition: AbstractDataProvider.qc.dox.h:340
const DataProviderSignatureStringValueType
Data provider signature string value type.
Definition: AbstractDataProvider.qc.dox.h:316
const DataProviderSignatureAnyType
Data provider signature any type.
Definition: AbstractDataProvider.qc.dox.h:310
const RoleCodeMap
Role map from codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:263
const LogicCodeMap
Logic map from codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:286
const RoleDescMap
Role map from descriptions to codes.
Definition: AbstractDataProvider.qc.dox.h:268
const ExpressionTypeCodeMap
Maps DataProvider expression type codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:382
const DataProviderSignatureIntValueType
Data provider signature int value type.
Definition: AbstractDataProvider.qc.dox.h:328
const MapperKeyInfo
Allowed value hash.
Definition: AbstractDataProvider.qc.dox.h:49
auto value
The value.
Definition: AbstractDataProvider.qc.dox.h:51
string desc
Description for the value.
Definition: AbstractDataProvider.qc.dox.h:54
Data provider expression.
Definition: AbstractDataProvider.qc.dox.h:431
string exp
Expression name.
Definition: AbstractDataProvider.qc.dox.h:433
softlist< auto > args
Expression arguments.
Definition: AbstractDataProvider.qc.dox.h:439
Data provider signature info.
Definition: AbstractDataProvider.qc.dox.h:391
string symbol
The symbol to use when rendering expressions.
Definition: AbstractDataProvider.qc.dox.h:407
string name
The display name.
Definition: AbstractDataProvider.qc.dox.h:401
string label
The label used for the expression.
Definition: AbstractDataProvider.qc.dox.h:398
bool varargs
The last argument can be repeated indefinitely.
Definition: AbstractDataProvider.qc.dox.h:421
int role
The expression role code / bitfield.
Definition: AbstractDataProvider.qc.dox.h:412
int type
The type of expression; see DataProvider Expression Type Codes.
Definition: AbstractDataProvider.qc.dox.h:393
softlist< hash< DataProviderSignatureTypeInfo > > args
Argument types.
Definition: AbstractDataProvider.qc.dox.h:415
string desc
The description of the operation.
Definition: AbstractDataProvider.qc.dox.h:404
AbstractDataProviderType return_type
The return type.
Definition: AbstractDataProvider.qc.dox.h:418
Data provider field reference.
Definition: AbstractDataProvider.qc.dox.h:425
string field
The name of the field being referenced.
Definition: AbstractDataProvider.qc.dox.h:427
Data provider info.
Definition: AbstractDataProvider.qc.dox.h:443
string supports_messages
Output message support.
Definition: AbstractDataProvider.qc.dox.h:597
bool supports_delete
Does the data provider support record deletion?
Definition: AbstractDataProvider.qc.dox.h:477
*hash< string, hash< DataProviderMessageInfo > > events
hash of observable events and event types
Definition: AbstractDataProvider.qc.dox.h:709
bool supports_bulk_read
Does the data provider support native / optimized bulk reads?
Definition: AbstractDataProvider.qc.dox.h:490
*hash< string, hash< DataProviderOptionInfo > > add_field_options
Add field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:674
*hash< string, hash< DataProviderMessageInfo > > messages
List of output message IDs and message types.
Definition: AbstractDataProvider.qc.dox.h:716
bool transaction_management
Does the data provider require transaction management?
Definition: AbstractDataProvider.qc.dox.h:521
*hash< string, hash< DataProviderExpressionInfo > > expressions
Expressions (operators and functions) supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:702
bool children_can_support_observers
Can any child data providers support the observer pattern / event API?
Definition: AbstractDataProvider.qc.dox.h:612
bool supports_child_delete
Does the data provider support deleting new child providers?
Definition: AbstractDataProvider.qc.dox.h:545
string type
The name of the provider type.
Definition: AbstractDataProvider.qc.dox.h:452
bool supports_delete_field
Does the data provider support deleting fields?
Definition: AbstractDataProvider.qc.dox.h:566
bool supports_child_create
Does the data provider support creating new child providers?
Definition: AbstractDataProvider.qc.dox.h:538
*hash< string, hash< DataProviderOptionInfo > > child_delete_options
Child deletion options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:667
bool supports_native_search
Does the data provider support native record searching?
Definition: AbstractDataProvider.qc.dox.h:482
*hash< string, hash< DataProviderOptionInfo > > request_options
Request options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:653
*hash< string, hash< DataProviderOptionInfo > > search_options
Search options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:648
string name
Data provider name.
Definition: AbstractDataProvider.qc.dox.h:447
bool supports_add_field
Does the data provider support adding new fields?
Definition: AbstractDataProvider.qc.dox.h:552
bool children_can_support_messages
Can any child data providers support messages?
Definition: AbstractDataProvider.qc.dox.h:617
bool supports_bulk_upsert
Does the data provider support native / optimized bulk upserts?
Definition: AbstractDataProvider.qc.dox.h:506
*hash< string, hash< DataProviderOptionInfo > > child_create_options
Child creation options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:660
hash< string, hash< MapperRuntimeKeyInfo > > mapper_keys
A hash of mapper key information.
Definition: AbstractDataProvider.qc.dox.h:728
bool supports_read
Does the data provider support reading.
Definition: AbstractDataProvider.qc.dox.h:457
bool record_requires_search_options
Do we require search options to retrieve the record type?
Definition: AbstractDataProvider.qc.dox.h:531
bool supports_update
Does the data provider support record updates?
Definition: AbstractDataProvider.qc.dox.h:467
bool supports_search_expressions
Does this data provide support advanced search experssions?
Definition: AbstractDataProvider.qc.dox.h:580
*hash< string, hash< DataProviderOptionInfo > > upsert_options
Upsert options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:643
bool supports_update_field
Does the data provider support updating existing fields?
Definition: AbstractDataProvider.qc.dox.h:559
bool supports_request
Does the data provider support the request API?
Definition: AbstractDataProvider.qc.dox.h:511
*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:633
*hash< string, hash< DataProviderOptionInfo > > create_options
Create options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:638
bool supports_create
Does the data provider support record creation?
Definition: AbstractDataProvider.qc.dox.h:462
*list< string > children
A list of child data providers in this data provider.
Definition: AbstractDataProvider.qc.dox.h:738
bool supports_observable
Does this data provider support the event API / observer pattern?
Definition: AbstractDataProvider.qc.dox.h:587
bool supports_upsert
Does the data provider support record upserts (create or update)?
Definition: AbstractDataProvider.qc.dox.h:472
bool supports_bulk_create
Does the data provider support native / optimized bulk creation?
Definition: AbstractDataProvider.qc.dox.h:498
*hash< string, hash< DataProviderOptionInfo > > delete_field_options
Delete field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:688
*hash< string, hash< DataProviderOptionInfo > > send_message_options
Send message options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:695
bool supports_children
Does the data provider support children?
Definition: AbstractDataProvider.qc.dox.h:516
bool children_can_support_apis
Can any child data providers offer API services (request - response data providers)?
Definition: AbstractDataProvider.qc.dox.h:602
bool children_can_support_records
Can any child data providers offer record-based providers?
Definition: AbstractDataProvider.qc.dox.h:607
*hash< string, hash< DataProviderOptionInfo > > update_field_options
Update field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:681
*string desc
A markdown description of the data provider.
Definition: AbstractDataProvider.qc.dox.h:733
bool supports_schema
Does the data provider support a schema?
Definition: AbstractDataProvider.qc.dox.h:573
bool children_can_support_transactions
Can any child data providers support transaction management?
Definition: AbstractDataProvider.qc.dox.h:622
int search_logic_capabilities
Supported search logic capabilities.
Definition: AbstractDataProvider.qc.dox.h:721
*string schema_type
Returns the schema type supported by this data provider.
Definition: AbstractDataProvider.qc.dox.h:628
bool has_record
Does the data provider provide a record?
Definition: AbstractDataProvider.qc.dox.h:526
Data provider message and event info.
Definition: AbstractDataProvider.qc.dox.h:183
string desc
The description of the message or event.
Definition: AbstractDataProvider.qc.dox.h:187
AbstractDataProviderType type
The data type of the message or event.
Definition: AbstractDataProvider.qc.dox.h:190
Data provider option info.
Definition: AbstractDataProvider.qc.dox.h:58
softlist< AbstractDataProviderType > type
The option value type or types.
Definition: AbstractDataProvider.qc.dox.h:60
bool sensitive
Is the option value sensitive?
Definition: AbstractDataProvider.qc.dox.h:72
auto default_value
Any default value.
Definition: AbstractDataProvider.qc.dox.h:69
string desc
The option description.
Definition: AbstractDataProvider.qc.dox.h:66
*softlist< hash< AllowedValueInfo > > allowed_values
List of allowed values (enum)
Definition: AbstractDataProvider.qc.dox.h:75
bool required
Required flag.
Definition: AbstractDataProvider.qc.dox.h:63
Data provider signature argument info.
Definition: AbstractDataProvider.qc.dox.h:295
int type_code
The signature type code.
Definition: AbstractDataProvider.qc.dox.h:300
AbstractDataProviderType type
Argument types.
Definition: AbstractDataProvider.qc.dox.h:297
Data provider summary info.
Definition: AbstractDataProvider.qc.dox.h:79
bool supports_observable
Does this data provider support the event API / observer pattern?
Definition: AbstractDataProvider.qc.dox.h:144
bool supports_bulk_upsert
Does the data provider support native / optimized bulk upserts?
Definition: AbstractDataProvider.qc.dox.h:123
bool transaction_management
Does the data provider require transaction management?
Definition: AbstractDataProvider.qc.dox.h:132
bool children_can_support_apis
Can any child data providers offer API services (request - response data providers)?
Definition: AbstractDataProvider.qc.dox.h:159
bool supports_create
Does the data provider support record creation?
Definition: AbstractDataProvider.qc.dox.h:93
string name
The name of the data provider.
Definition: AbstractDataProvider.qc.dox.h:81
bool supports_read
Does the data provider support reading.
Definition: AbstractDataProvider.qc.dox.h:90
string desc
The description of the data provider; supports markdown.
Definition: AbstractDataProvider.qc.dox.h:84
bool has_record
Does the data provider provide a record?
Definition: AbstractDataProvider.qc.dox.h:135
bool children_can_support_transactions
Can any child data providers support transaction management?
Definition: AbstractDataProvider.qc.dox.h:179
bool children_can_support_observers
Can any child data providers support the observer pattern / event API?
Definition: AbstractDataProvider.qc.dox.h:169
bool supports_upsert
Does the data provider support record upserts (create or update)?
Definition: AbstractDataProvider.qc.dox.h:99
bool supports_children
Does the data provider support children?
Definition: AbstractDataProvider.qc.dox.h:129
bool supports_bulk_create
Does the data provider support native / optimized bulk creation?
Definition: AbstractDataProvider.qc.dox.h:117
bool supports_delete
Does the data provider support record deletion?
Definition: AbstractDataProvider.qc.dox.h:102
bool supports_request
Does the data provider support the request API?
Definition: AbstractDataProvider.qc.dox.h:126
bool supports_search_expressions
Does this data provide support advanced search experssions?
Definition: AbstractDataProvider.qc.dox.h:138
bool children_can_support_messages
Can any child data providers support messages?
Definition: AbstractDataProvider.qc.dox.h:174
bool supports_native_search
Does the data provider support native record searching?
Definition: AbstractDataProvider.qc.dox.h:105
string supports_messages
Message support.
Definition: AbstractDataProvider.qc.dox.h:154
string type
The name of the provider type.
Definition: AbstractDataProvider.qc.dox.h:87
bool supports_update
Does the data provider support record updates?
Definition: AbstractDataProvider.qc.dox.h:96
bool supports_bulk_read
Does the data provider support native / optimized bulk reads?
Definition: AbstractDataProvider.qc.dox.h:111
bool children_can_support_records
Can any child data providers offer record-based providers?
Definition: AbstractDataProvider.qc.dox.h:164