Qore DataProvider Module Reference 2.7.1
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};
176
178public hashdecl DataProviderMessageInfo {
180
182 string desc;
183
186};
187
197
199const MSG_None = "NONE";
200
202
206const MSG_Sync = "SYNC";
207
209
211const MSG_Async = "ASYNC";
213
220const ST_Any = 1;
221
223const ST_Value = 2;
224
226
229const ST_Field = 3;
231
234 ST_Any: "any",
235 ST_Value: "value",
236 ST_Field: "field reference",
237};
238
240const SignatureTypeDescMap = map {$1.value: $1.key.toInt()}, SignatureTypeCodeMap.pairIterator();
241
248const ER_Search = (1 << 0);
249
251const ER_Field = (1 << 1);
252
256
258const RoleCodeMap = {
259 ER_Search: "search",
260};
261
263const RoleDescMap = map {$1.value: $1.key.toInt()}, RoleCodeMap.pairIterator();
264
271const LC_And = (1 << 0);
272
274const LC_Or = (1 << 1);
275
277const LC_All = (LC_And | LC_Or);
279
282 LC_And: "AND",
283 LC_Or: "OR",
284};
285
287const LogicDescMap = map {$1.value: $1.key.toInt()}, LogicCodeMap.pairIterator();
288
293
296};
297
300 "type": AbstractDataProviderTypeMap."any",
301 "type_code": ST_Field,
302};
303
306 "type": AbstractDataProviderTypeMap."any",
307 "type_code": ST_Any,
308};
309
312 "type": AbstractDataProviderTypeMap."string",
313 "type_code": ST_Value,
314};
315
318 "type": AbstractDataProviderTypeMap."*string",
319 "type_code": ST_Value,
320};
321
324 "type": AbstractDataProviderTypeMap."int",
325 "type_code": ST_Value,
326};
327
330 "type": AbstractDataProviderTypeMap."*int",
331 "type_code": ST_Value,
332};
333
336 "type": AbstractDataProviderTypeMap."list",
337 "type_code": ST_Value,
338};
339
342 "type": AbstractDataProviderTypeMap."hash",
343 "type_code": ST_Value,
344};
345
348 "type": AbstractDataProviderTypeMap."bool",
349 "type_code": ST_Any,
350};
351
354 "type": AbstractDataProviderTypeMap."string",
355 "type_code": ST_Any,
356};
357
360 "type": AbstractDataProviderTypeMap."date",
361 "type_code": ST_Any,
362};
363
370const DET_Operator = 1;
371
373const DET_Function = 2;
375
378 DET_Operator: "operator",
379 DET_Function: "function",
380};
381
383const ExpressionTypeDescMap = map {$1.value: $1.key.toInt()}, ExpressionTypeCodeMap.pairIterator();
384
388 int type;
389
391
393 string label;
394
396 string name;
397
399 string desc;
400
402 string symbol;
403
405
408
410 softlist<hash<DataProviderSignatureTypeInfo>> args;
411
414
416 bool varargs = False;
417};
418
422 string field;
423};
424
426public hashdecl DataProviderExpression {
428 string exp;
429
431
434 softlist<auto> args;
435};
436
438public hashdecl 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
478
480
485 bool supports_bulk_read = False;
486
488
494
496
502
504
506 bool supports_request = False;
507
509
511 bool supports_children = False;
512
514
517
519
521 bool has_record = False;
522
524
527
529
534
536
541
543
547 bool supports_add_field = False;
548
550
555
557
562
564
568 bool supports_schema = False;
569
571
576
578
583
585
593
595
598
600
603
605
608
610
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
712
714
718 hash<string, hash<MapperRuntimeKeyInfo>> mapper_keys = Mapper::MapperKeyInfo;
719
721
723 *string desc;
724
726
728 *list<string> children;
729};
730
733
734public:
737 DP_OP_AND: {
739 "type": DET_Operator,
740 "label": DP_OP_AND,
741 "name": "and (&&)",
742 "desc": "logical AND operation supporting logic short-circuiting",
743 "symbol": "&&",
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) {
751 return False;
752 }
753 }
754 return True;
755 },
756 },
757 DP_OP_OR: {
759 "type": DET_Operator,
760 "label": DP_OP_OR,
761 "name": "or (||)",
762 "desc": "logical OR operation supporting logic short-circuiting",
763 "symbol": "||",
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) {
771 return True;
772 }
773 }
774 return False;
775 },
776 },
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": "==",
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 },
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": "!=",
806 "return_type": AbstractDataProviderTypeMap."bool",
807 },
808 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
811 },
812 },
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": "<",
822 "return_type": AbstractDataProviderTypeMap."bool",
823 },
824 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
827 },
828 },
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": "<=",
839 "return_type": AbstractDataProviderTypeMap."bool",
840 },
841 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
844 },
845 },
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": ">",
855 "return_type": AbstractDataProviderTypeMap."bool",
856 },
857 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
860 },
861 },
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": ">=",
872 "return_type": AbstractDataProviderTypeMap."bool",
873 },
874 "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
877 },
878 },
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": (
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 },
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",
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]),
916 },
917 },
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": "!",
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 },
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": (
943 "type": (new HashDataType())
944 .addField(new QoreDataField("pattern", "the regular expression pattern",
946 .addField(new QoreDataField("options", "regular expression options",
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
972protected:
974 *Logger logger;
975
977 static bool callbacks_locked = False;
978
981
983 static code cb_resolve_value;
984
986
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
1006public:
1007
1010
1011
1014
1015
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
1113
1114
1116
1125 *hash<auto> search_options) {
1126 checkRead();
1127 return searchRecordsBulk(block_size, NOTHING, validateSearchOptions(search_options));
1128 }
1129
1131
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
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) {
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
1425
1426
1428
1433
1434
1436
1441
1442
1444
1448 *hash<string, AbstractDataProviderType> getErrorResponseTypes();
1449
1450
1452
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
1529
1530
1532
1539
1540
1542
1551
1552
1554
1558
1559
1561
1570
1571
1573
1580
1581
1583
1590
1591
1593
1598
1599
1601
1606
1607
1609
1613 *hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
1614
1615
1617
1621
1622
1624
1628
1629
1631
1635
1636
1638
1642
1643
1645
1649
1650
1652
1656
1657
1659
1665
1666
1668
1674
1675
1677
1683
1684
1686
1692
1693
1695
1701
1702
1704
1710
1711
1713
1719
1720
1722
1728
1729
1731
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
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
1894protected:
1895 static bool checkCallbacks();
1896public:
1897
1898
1900
1902protected:
1903 *hash<auto> validateCreateOptions(*hash<auto> create_options);
1904public:
1905
1906
1908
1910protected:
1911 *hash<auto> validateUpsertOptions(*hash<auto> upsert_options);
1912public:
1913
1914
1916
1918protected:
1919 *hash<auto> validateSearchOptions(*hash<auto> search_options);
1920public:
1921
1922
1924
1926protected:
1927 *hash<auto> validateRequestOptions(*hash<auto> request_options);
1928public:
1929
1930
1932
1936protected:
1937 *hash<auto> validateChildCreateOptions(*hash<auto> child_create_options);
1938public:
1939
1940
1942
1946protected:
1947 *hash<auto> validateChildDeleteOptions(*hash<auto> child_delete_options);
1948public:
1949
1950
1952
1956protected:
1957 *hash<auto> validateFieldAddOptions(*hash<auto> field_add_options);
1958public:
1959
1960
1962
1966protected:
1967 *hash<auto> validateFieldUpdateOptions(*hash<auto> field_update_options);
1968public:
1969
1970
1972
1976protected:
1977 *hash<auto> validateFieldDeleteOptions(*hash<auto> field_delete_options);
1978public:
1979
1980
1982
1986protected:
1987 *hash<auto> validateSendMessageOptions(*hash<auto> send_message_options);
1988public:
1989
1990
1992protected:
1993 processConstructorOptions(*hash<string, hash<DataProviderOptionInfo>> option_desc, *hash<auto> options);
1994public:
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
2036protected:
2037 *hash<auto> processFieldValues(*hash<auto> h, *hash<auto> search_options);
2038public:
2039
2040
2042protected:
2043 error(string err, string fmt);
2044public:
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
2083protected:
2084 *list<string> getChildProviderNamesImpl();
2085public:
2086
2087
2089
2091protected:
2092 *AbstractDataProvider getChildProviderImpl(string name);
2093public:
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
2345protected:
2346 *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
2347public:
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
2397protected:
2398 *hash<auto> createRecordImpl(hash<auto> rec, *hash<auto> create_options);
2399public:
2400
2401
2403
2408protected:
2409 string upsertRecordImpl(hash<auto> rec, *hash<auto> upsert_options);
2410public:
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
2442protected:
2443 int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
2444public:
2445
2446
2448
2453protected:
2454 auto doRequestImpl(auto req, *hash<auto> request_options);
2455public:
2456
2457
2459
2467 private AbstractDataProvider createChildProviderImpl(string name, hash<string, AbstractDataField> fields,
2468 *hash<auto> child_create_options) {
2469 throwUnimplementedException();
2470 }
2471
2473
2478protected:
2479 deleteChildProviderImpl(string name, *hash<auto> child_delete_options);
2480public:
2481
2482
2484
2490protected:
2491 addFieldImpl(AbstractDataField field, *hash<auto> field_add_options);
2492public:
2493
2494
2496
2502protected:
2503 updateFieldImpl(string name, AbstractDataField field, *hash<auto> field_update_options);
2504public:
2505
2506
2508
2513protected:
2514 deleteFieldImpl(string name, *hash<auto> field_delete_options);
2515public:
2516
2517
2519
2526protected:
2527 sendMessageImpl(string message_id, auto msg, *hash<auto> send_message_options);
2528public:
2529
2530
2532
2536protected:
2537 object getSchemaObjectImpl();
2538public:
2539
2540
2542
2546protected:
2547 *AbstractDataProviderType getRequestTypeImpl();
2548public:
2549
2550
2552
2556protected:
2557 *AbstractDataProviderType getResponseTypeImpl();
2558public:
2559
2560
2562
2566protected:
2567 *hash<string, AbstractDataProviderType> getErrorResponseTypesImpl();
2568public:
2569
2570
2572
2578protected:
2579 AbstractDataProviderType getErrorResponseTypeImpl(string error_code);
2580public:
2581
2582
2584
2594protected:
2595 hash<DataProviderMessageInfo> getEventInfoImpl(string event_id);
2596public:
2597
2598
2600
2606protected:
2607 hash<string, hash<DataProviderMessageInfo>> getEventTypesImpl();
2608public:
2609
2610
2612
2620protected:
2621 hash<DataProviderMessageInfo> getMessageInfoImpl(string message_id);
2622public:
2623
2624
2626
2632protected:
2633 hash<string, hash<DataProviderMessageInfo>> getMessageTypesImpl();
2634public:
2635
2636
2638
2640protected:
2641 throwUnimplementedException();
2642public:
2643
2644
2646 abstract string getName();
2647
2649protected:
2650 abstract hash<DataProviderInfo> getStaticInfoImpl();
2651public:
2652}
2653}
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:732
*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:983
const GenericExpressions
Generic search operator expressions.
Definition: AbstractDataProvider.qc.dox.h:966
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:969
*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:736
*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:991
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 supports transaction management.
AbstractDataProviderRecordIterator getRecordIterator(*hash< auto > search_options)
Returns an iterator iterating all records.
AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size=1000, *hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
Definition: AbstractDataProvider.qc.dox.h:1162
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:974
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:977
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
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:980
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:1775
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:1124
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:1755
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:1179
*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:1341
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:1789
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:1206
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:1142
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:187
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:370
const DET_Function
Indicates a function expression.
Definition: AbstractDataProvider.qc.dox.h:373
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:199
const MSG_Async
Asynchronous output type, output can happen any time.
Definition: AbstractDataProvider.qc.dox.h:211
const MSG_Sync
Synchronous output type, an output message is expected after each observed event.
Definition: AbstractDataProvider.qc.dox.h:206
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:254
const ER_Search
Definition: AbstractDataProvider.qc.dox.h:248
const ER_Field
Indicates an expression that can be used in a field.
Definition: AbstractDataProvider.qc.dox.h:251
const LC_Or
Indicates that boolean expressions can be combined with OR logic.
Definition: AbstractDataProvider.qc.dox.h:274
const LC_And
Definition: AbstractDataProvider.qc.dox.h:271
const LC_All
Indicates that all logic capabilities are supported.
Definition: AbstractDataProvider.qc.dox.h:277
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:223
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
const ST_Any
Definition: AbstractDataProvider.qc.dox.h:220
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
const DataProviderSignatureOptionalIntValueType
Data provider signature *int value type.
Definition: AbstractDataProvider.qc.dox.h:329
const DataProviderSignatureStringType
Data provider signature string type.
Definition: AbstractDataProvider.qc.dox.h:353
const DataProviderSignatureDateType
Data provider signature date type.
Definition: AbstractDataProvider.qc.dox.h:359
const DataProviderSignatureHashValueType
Data provider signature hash value type.
Definition: AbstractDataProvider.qc.dox.h:341
const SignatureTypeDescMap
Maps signature description values to integer codes.
Definition: AbstractDataProvider.qc.dox.h:240
const SignatureTypeCodeMap
Maps signature type codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:233
const DataProviderSignatureOptionalStringValueType
Data provider signature optional string value type.
Definition: AbstractDataProvider.qc.dox.h:317
const LogicDescMap
Logic map from descriptions to integer codes.
Definition: AbstractDataProvider.qc.dox.h:287
const DataProviderSignatureFieldType
Data provider signature field type.
Definition: AbstractDataProvider.qc.dox.h:299
const ExpressionTypeDescMap
Maps DataProvider expression type descriptions to integer codes.
Definition: AbstractDataProvider.qc.dox.h:383
const DataProviderSignatureBoolType
Data provider signature bool type.
Definition: AbstractDataProvider.qc.dox.h:347
const AbstractDataProviderTypeMap
Maps Qore type name constant values to AbstractDataProviderType values.
Definition: AbstractDataProviderType.qc.dox.h:121
const DataProviderSignatureListValueType
Data provider signature list value type.
Definition: AbstractDataProvider.qc.dox.h:335
const DataProviderSignatureStringValueType
Data provider signature string value type.
Definition: AbstractDataProvider.qc.dox.h:311
const DataProviderSignatureAnyType
Data provider signature any type.
Definition: AbstractDataProvider.qc.dox.h:305
const RoleCodeMap
Role map from codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:258
const LogicCodeMap
Logic map from codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:281
const RoleDescMap
Role map from descriptions to codes.
Definition: AbstractDataProvider.qc.dox.h:263
const ExpressionTypeCodeMap
Maps DataProvider expression type codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:377
const DataProviderSignatureIntValueType
Data provider signature int value type.
Definition: AbstractDataProvider.qc.dox.h:323
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:426
string exp
Expression name.
Definition: AbstractDataProvider.qc.dox.h:428
softlist< auto > args
Expression arguments.
Definition: AbstractDataProvider.qc.dox.h:434
Data provider signature info.
Definition: AbstractDataProvider.qc.dox.h:386
string symbol
The symbol to use when rendering expressions.
Definition: AbstractDataProvider.qc.dox.h:402
string name
The display name.
Definition: AbstractDataProvider.qc.dox.h:396
string label
The label used for the expression.
Definition: AbstractDataProvider.qc.dox.h:393
bool varargs
The last argument can be repeated indefinitely.
Definition: AbstractDataProvider.qc.dox.h:416
int role
The expression role code / bitfield.
Definition: AbstractDataProvider.qc.dox.h:407
int type
The type of expression; see DataProvider Expression Type Codes.
Definition: AbstractDataProvider.qc.dox.h:388
softlist< hash< DataProviderSignatureTypeInfo > > args
Argument types.
Definition: AbstractDataProvider.qc.dox.h:410
string desc
The description of the operation.
Definition: AbstractDataProvider.qc.dox.h:399
AbstractDataProviderType return_type
The return type.
Definition: AbstractDataProvider.qc.dox.h:413
Data provider field reference.
Definition: AbstractDataProvider.qc.dox.h:420
string field
The name of the field being referenced.
Definition: AbstractDataProvider.qc.dox.h:422
Data provider info.
Definition: AbstractDataProvider.qc.dox.h:438
string supports_messages
Output message support.
Definition: AbstractDataProvider.qc.dox.h:592
bool supports_delete
Does the data provider support record deletion?
Definition: AbstractDataProvider.qc.dox.h:472
*hash< string, hash< DataProviderMessageInfo > > events
hash of observable events and event types
Definition: AbstractDataProvider.qc.dox.h:699
bool supports_bulk_read
Does the data provider support native / optimized bulk reads?
Definition: AbstractDataProvider.qc.dox.h:485
*hash< string, hash< DataProviderOptionInfo > > add_field_options
Add field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:664
*hash< string, hash< DataProviderMessageInfo > > messages
List of output message IDs and message types.
Definition: AbstractDataProvider.qc.dox.h:706
bool transaction_management
Does the data provider require transaction management?
Definition: AbstractDataProvider.qc.dox.h:516
*hash< string, hash< DataProviderExpressionInfo > > expressions
Expressions (operators and functions) supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:692
bool children_can_support_observers
Can any child data providers support the observer pattern / event API?
Definition: AbstractDataProvider.qc.dox.h:607
bool supports_child_delete
Does the data provider support deleting new child providers?
Definition: AbstractDataProvider.qc.dox.h:540
string type
The name of the provider type.
Definition: AbstractDataProvider.qc.dox.h:447
bool supports_delete_field
Does the data provider support deleting fields?
Definition: AbstractDataProvider.qc.dox.h:561
bool supports_child_create
Does the data provider support creating new child providers?
Definition: AbstractDataProvider.qc.dox.h:533
*hash< string, hash< DataProviderOptionInfo > > child_delete_options
Child deletion options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:657
bool supports_native_search
Does the data provider support native record searching?
Definition: AbstractDataProvider.qc.dox.h:477
*hash< string, hash< DataProviderOptionInfo > > request_options
Request options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:643
*hash< string, hash< DataProviderOptionInfo > > search_options
Search options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:638
string name
Data provider name.
Definition: AbstractDataProvider.qc.dox.h:442
bool supports_add_field
Does the data provider support adding new fields?
Definition: AbstractDataProvider.qc.dox.h:547
bool children_can_support_messages
Can any child data providers support messages?
Definition: AbstractDataProvider.qc.dox.h:612
bool supports_bulk_upsert
Does the data provider support native / optimized bulk upserts?
Definition: AbstractDataProvider.qc.dox.h:501
*hash< string, hash< DataProviderOptionInfo > > child_create_options
Child creation options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:650
hash< string, hash< MapperRuntimeKeyInfo > > mapper_keys
A hash of mapper key information.
Definition: AbstractDataProvider.qc.dox.h:718
bool supports_read
Does the data provider support reading.
Definition: AbstractDataProvider.qc.dox.h:452
bool record_requires_search_options
Do we require search options to retrieve the record type?
Definition: AbstractDataProvider.qc.dox.h:526
bool supports_update
Does the data provider support record updates?
Definition: AbstractDataProvider.qc.dox.h:462
bool supports_search_expressions
Does this data provide support advanced search experssions?
Definition: AbstractDataProvider.qc.dox.h:575
*hash< string, hash< DataProviderOptionInfo > > upsert_options
Upsert options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:633
bool supports_update_field
Does the data provider support updating existing fields?
Definition: AbstractDataProvider.qc.dox.h:554
bool supports_request
Does the data provider support the request API?
Definition: AbstractDataProvider.qc.dox.h:506
*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
*hash< string, hash< DataProviderOptionInfo > > create_options
Create options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:628
bool supports_create
Does the data provider support record creation?
Definition: AbstractDataProvider.qc.dox.h:457
*list< string > children
A list of child data providers in this data provider.
Definition: AbstractDataProvider.qc.dox.h:728
bool supports_observable
Does this data provider support the event API / observer pattern?
Definition: AbstractDataProvider.qc.dox.h:582
bool supports_upsert
Does the data provider support record upserts (create or update)?
Definition: AbstractDataProvider.qc.dox.h:467
bool supports_bulk_create
Does the data provider support native / optimized bulk creation?
Definition: AbstractDataProvider.qc.dox.h:493
*hash< string, hash< DataProviderOptionInfo > > delete_field_options
Delete field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:678
*hash< string, hash< DataProviderOptionInfo > > send_message_options
Send message options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:685
bool supports_children
Does the data provider support children?
Definition: AbstractDataProvider.qc.dox.h:511
bool children_can_support_apis
Can any child data providers offer API services (request - response data providers)?
Definition: AbstractDataProvider.qc.dox.h:597
bool children_can_support_records
Can any child data providers offer record-based providers?
Definition: AbstractDataProvider.qc.dox.h:602
*hash< string, hash< DataProviderOptionInfo > > update_field_options
Update field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:671
*string desc
A markdown description of the data provider.
Definition: AbstractDataProvider.qc.dox.h:723
bool supports_schema
Does the data provider support a schema?
Definition: AbstractDataProvider.qc.dox.h:568
int search_logic_capabilities
Supported search logic capabilities.
Definition: AbstractDataProvider.qc.dox.h:711
*string schema_type
Returns the schema type supported by this data provider.
Definition: AbstractDataProvider.qc.dox.h:618
bool has_record
Does the data provider provide a record?
Definition: AbstractDataProvider.qc.dox.h:521
Data provider message and event info.
Definition: AbstractDataProvider.qc.dox.h:178
string desc
The description of the message or event.
Definition: AbstractDataProvider.qc.dox.h:182
AbstractDataProviderType type
The data type of the message or event.
Definition: AbstractDataProvider.qc.dox.h:185
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:290
int type_code
The signature type code.
Definition: AbstractDataProvider.qc.dox.h:295
AbstractDataProviderType type
Argument types.
Definition: AbstractDataProvider.qc.dox.h:292
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_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