Qore DataProvider Module Reference  2.5
AbstractDataProvider.qc.dox.h
1 // -*- mode: c++; indent-tabs-mode: nil -*-
3 
27 namespace DataProvider {
33 const UpsertResultInserted = "inserted";
34 
36 const UpsertResultUpdated = "updated";
37 
39 const UpsertResultVerified = "verified";
40 
42 const UpsertResultUnchanged = "unchanged";
43 
45 const UpsertResultDeleted = "deleted";
47 
49 public struct AllowedValueInfo {
51  auto value;
52 
54  string desc;
55 };
56 
58 public struct DataProviderOptionInfo {
60  softlist<AbstractDataProviderType> type;
61 
63  bool required = False;
64 
66  string desc;
67 
70 
72  bool sensitive = False;
73 
75  *softlist<hash<AllowedValueInfo>> allowed_values;
76 };
77 
79 public struct DataProviderSummaryInfo {
81  string name;
82 
84  string desc;
85 
87  string type;
88 
91 
94 
97 
100 
103 
106 
108 
112 
114 
118 
120 
124 
127 
130 
133 
136 
139 
141 
145 
147 
155 };
156 
158 public struct DataProviderMessageInfo {
160 
162  string desc;
163 
166 };
167 
177 
179 const MSG_None = "NONE";
180 
182 
186 const MSG_Sync = "SYNC";
187 
189 
191 const MSG_Async = "ASYNC";
193 
200 const ST_Any = 1;
201 
203 const ST_Value = 2;
204 
206 
209 const ST_Field = 3;
211 
214  ST_Any: "any",
215  ST_Value: "value",
216  ST_Field: "field reference",
217 };
218 
220 const SignatureTypeDescMap = map {$1.value: $1.key.toInt()}, SignatureTypeCodeMap.pairIterator();
221 
228 const ER_Search = (1 << 0);
229 
231 const ER_Field = (1 << 1);
232 
236 
238 const RoleCodeMap = {
239  ER_Search: "search",
240 };
241 
243 const RoleDescMap = map {$1.value: $1.key.toInt()}, RoleCodeMap.pairIterator();
244 
251 const LC_And = (1 << 0);
252 
254 const LC_Or = (1 << 1);
255 
257 const LC_All = (LC_And | LC_Or);
259 
261 const LogicCodeMap = {
262  LC_And: "AND",
263  LC_Or: "OR",
264 };
265 
267 const LogicDescMap = map {$1.value: $1.key.toInt()}, LogicCodeMap.pairIterator();
268 
273 
276 };
277 
280  "type": AbstractDataProviderTypeMap."any",
281  "type_code": ST_Field,
282 };
283 
286  "type": AbstractDataProviderTypeMap."any",
287  "type_code": ST_Any,
288 };
289 
292  "type": AbstractDataProviderTypeMap."string",
293  "type_code": ST_Value,
294 };
295 
298  "type": AbstractDataProviderTypeMap."*string",
299  "type_code": ST_Value,
300 };
301 
304  "type": AbstractDataProviderTypeMap."int",
305  "type_code": ST_Value,
306 };
307 
310  "type": AbstractDataProviderTypeMap."*int",
311  "type_code": ST_Value,
312 };
313 
316  "type": AbstractDataProviderTypeMap."list",
317  "type_code": ST_Value,
318 };
319 
322  "type": AbstractDataProviderTypeMap."hash",
323  "type_code": ST_Value,
324 };
325 
328  "type": AbstractDataProviderTypeMap."bool",
329  "type_code": ST_Any,
330 };
331 
334  "type": AbstractDataProviderTypeMap."string",
335  "type_code": ST_Any,
336 };
337 
340  "type": AbstractDataProviderTypeMap."date",
341  "type_code": ST_Any,
342 };
343 
350 const DET_Operator = 1;
351 
353 const DET_Function = 2;
355 
358  DET_Operator: "operator",
359  DET_Function: "function",
360 };
361 
363 const ExpressionTypeDescMap = map {$1.value: $1.key.toInt()}, ExpressionTypeCodeMap.pairIterator();
364 
368  int type;
369 
371 
373  string label;
374 
376  string name;
377 
379  string desc;
380 
382  string symbol;
383 
385 
387  int role = ER_All;
388 
390  softlist<hash<DataProviderSignatureTypeInfo>> args;
391 
394 
396  bool varargs = False;
397 };
398 
402  string field;
403 };
404 
406 public struct DataProviderExpression {
408  string exp;
409 
411 
414  softlist<auto> args;
415 };
416 
418 public struct DataProviderInfo {
420 
422  string name;
423 
425 
427  string type;
428 
430 
433 
435 
438 
440 
443 
445 
448 
450 
453 
455 
458 
460 
466 
468 
474 
476 
482 
484 
487 
489 
492 
494 
497 
499 
502 
504 
507 
509 
514 
516 
521 
523 
528 
530 
535 
537 
542 
544 
549 
551 
556 
558 
563 
565 
573 
575 
578 
580 
583 
585 
588 
590 
593  *string schema_type;
594 
596 
598  *hash<string, hash<DataProviderOptionInfo>> constructor_options;
599 
601 
603  *hash<string, hash<DataProviderOptionInfo>> create_options;
604 
606 
608  *hash<string, hash<DataProviderOptionInfo>> upsert_options;
609 
611 
613  *hash<string, hash<DataProviderOptionInfo>> search_options;
614 
616 
618  *hash<string, hash<DataProviderOptionInfo>> request_options;
619 
621 
625  *hash<string, hash<DataProviderOptionInfo>> child_create_options;
626 
628 
632  *hash<string, hash<DataProviderOptionInfo>> child_delete_options;
633 
635 
639  *hash<string, hash<DataProviderOptionInfo>> add_field_options;
640 
642 
646  *hash<string, hash<DataProviderOptionInfo>> update_field_options;
647 
649 
653  *hash<string, hash<DataProviderOptionInfo>> delete_field_options;
654 
656 
660  *hash<string, hash<DataProviderOptionInfo>> send_message_options;
661 
663 
667  *hash<string, hash<DataProviderExpressionInfo>> expressions;
668 
670 
674  *hash<string, hash<DataProviderMessageInfo>> events;
675 
677 
681  *hash<string, hash<DataProviderMessageInfo>> messages;
682 
684 
687 
689 
693  hash<string, hash<MapperRuntimeKeyInfo>> mapper_keys = Mapper::MapperKeyInfo;
694 
696 
698  *string desc;
699 
701 
703  *list<string> children;
704 };
705 
708 
709 public:
712  DP_OP_AND: {
714  "type": DET_Operator,
715  "label": DP_OP_AND,
716  "name": "and (&&)",
717  "desc": "logical AND operation supporting logic short-circuiting",
718  "symbol": "&&",
720  "varargs": True,
721  "return_type": AbstractDataProviderTypeMap."bool",
722  },
723  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
724  foreach auto arg in (exp.args) {
726  return False;
727  }
728  }
729  return True;
730  },
731  },
732  DP_OP_OR: {
734  "type": DET_Operator,
735  "label": DP_OP_OR,
736  "name": "or (||)",
737  "desc": "logical OR operation supporting logic short-circuiting",
738  "symbol": "||",
740  "varargs": True,
741  "return_type": AbstractDataProviderTypeMap."bool",
742  },
743  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
744  foreach auto arg in (exp.args) {
746  return True;
747  }
748  }
749  return False;
750  },
751  },
752  DP_SEARCH_OP_EQ: {
754  "type": DET_Operator,
755  "label": DP_SEARCH_OP_EQ,
756  "name": "equals (=)",
757  "desc": "a value for equality comparisons; the type of the value should correspond to the field "
758  "type",
759  "symbol": "==",
761  "return_type": AbstractDataProviderTypeMap."bool",
762  },
763  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
764  auto arg0 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]);
765  auto arg1 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
766  // for backwards compatibility, if the first argument is a field reference, and the second is a
767  # hash
768 
769  return arg0 == arg1;
770  },
771  },
772  DP_SEARCH_OP_NE: {
774  "type": DET_Operator,
775  "label": DP_SEARCH_OP_NE,
776  "name": "not equals (!=)",
777  "desc": "a value for not-equals comparisons; the type of the value should correspond to the "
778  "field type",
779  "symbol": "!=",
781  "return_type": AbstractDataProviderTypeMap."bool",
782  },
783  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
786  },
787  },
788  DP_SEARCH_OP_LT: {
790  "type": DET_Operator,
791  "label": DP_SEARCH_OP_LT,
792  "name": "less than (<)",
793  "desc": "a value for less than comparisons; if the field value is less than the argument, then "
794  "the operation returns true; the type of the value should correspond to the field type",
795  "symbol": "<",
797  "return_type": AbstractDataProviderTypeMap."bool",
798  },
799  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
802  },
803  },
804  DP_SEARCH_OP_LE: {
806  "type": DET_Operator,
807  "label": DP_SEARCH_OP_LE,
808  "name": "less than or equals (<=)",
809  "desc": "a value for less than or equals comparisons; if the field value is less than or equal "
810  "to the argument, then the operation returns true; the type of the value should correspond "
811  "to the field type",
812  "symbol": "<=",
814  "return_type": AbstractDataProviderTypeMap."bool",
815  },
816  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
819  },
820  },
821  DP_SEARCH_OP_GT: {
823  "type": DET_Operator,
824  "label": DP_SEARCH_OP_GT,
825  "name": "greater than (>)",
826  "desc": "a value for less than comparisons; if the field value is less than the argument, then "
827  "the operation returns true; the type of the value should correspond to the field type",
828  "symbol": ">",
830  "return_type": AbstractDataProviderTypeMap."bool",
831  },
832  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
835  },
836  },
837  DP_SEARCH_OP_GE: {
839  "type": DET_Operator,
840  "label": DP_SEARCH_OP_GE,
841  "name": "greater than or equals (>=)",
842  "desc": "a value for greater than or equals comparisons; if the field value is greater than or "
843  "equal to the argument, then the operation returns true; the type of the value should "
844  "correspond to the field type",
845  "symbol": ">=",
847  "return_type": AbstractDataProviderTypeMap."bool",
848  },
849  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
852  },
853  },
856  "type": DET_Operator,
857  "label": DP_SEARCH_OP_BETWEEN,
858  "name": "between",
859  "desc": "A list with two elements giving the lower and upper bounds of the field value; the list "
860  "element value types must be equal to the field's type",
861  "symbol": "between",
862  "args": (
866  ),
867  "return_type": AbstractDataProviderTypeMap."bool",
868  },
869  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
870  auto arg0 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]);
871  return arg0 > AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1])
873  },
874  },
875  DP_SEARCH_OP_IN: {
877  "type": DET_Operator,
878  "label": DP_SEARCH_OP_IN,
879  "name": "in",
880  "desc": "A list giving possible values of the field; if the field's value matches any of the "
881  "values in the list, then the operation returns true; element value types must be equal to "
882  "the field's type",
883  "symbol": "in",
885  "return_type": AbstractDataProviderTypeMap."bool",
886  "varargs": True,
887  },
888  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
891  },
892  },
895  "type": DET_Operator,
896  "label": DP_SEARCH_OP_NOT,
897  "name": "logical not (!)",
898  "desc": "This operator reverses the logcal value of the operator expression given as an argument",
899  "symbol": "!",
901  "return_type": AbstractDataProviderTypeMap."bool",
902  },
903  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
905  },
906  },
909  "type": DET_Operator,
910  "label": DP_SEARCH_OP_REGEX,
911  "name": "regular expression match",
912  "desc": "regular expression operator; the first argument will be processed with the second as a "
913  "regular expression pattern",
914  "symbol": "regex",
915  "args": (
918  "type": (new HashDataType())
919  .addField(new QoreDataField("pattern", "the regular expression pattern",
920  AbstractDataProviderTypeMap."string"))
921  .addField(new QoreDataField("options", "regular expression options",
923  },
924  ),
925  "return_type": AbstractDataProviderTypeMap."bool",
926  },
927  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
928  auto arg1 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
929  return regex(AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]).toString(),
930  arg1.pattern, arg1.options);
931  },
932  },
933  };
934 
936 
941  const GenericExpressions = map {$1.key: $1.value.exp}, GenericExpressionImplementations.pairIterator();
942 
944  const DataProviderSummaryInfoKeys = map $1.getName(),
945  TypedHash::forName("DataProviderSummaryInfo").getMembers();
946 
947 protected:
949  *Logger logger;
950 
952  static bool callbacks_locked = False;
953 
956 
958  static code cb_resolve_value;
959 
961 
967  "columns": <DataProviderOptionInfo>{
968  "type": AbstractDataProviderTypeMap."any",
969  "desc": "allows a subset of fields to be output in searches",
970  },
971  "limit": <DataProviderOptionInfo>{
972  "type": AbstractDataProviderType::get(IntType),
973  "desc": "the maximum number of records to return",
974  },
975  "offset": <DataProviderOptionInfo>{
976  "type": AbstractDataProviderType::get(IntType),
977  "desc": "the offset number in records to return",
978  },
979  };
980 
981 public:
982 
985 
986 
989 
990 
992  setLogger(Logger logger);
993 
994 
996 
1000  hash<auto> getInfoAsData(*bool with_type_info);
1001 
1002 
1004  hash<DataProviderInfo> getInfo();
1005 
1006 
1008  hash<DataProviderSummaryInfo> getSummaryInfo();
1009 
1010 
1012  *string getDesc();
1013 
1014 
1016 
1026  *hash<auto> createRecord(hash<auto> rec, *hash<auto> create_options);
1027 
1028 
1030 
1037  string upsertRecord(hash<auto> rec, *hash<auto> upsert_options);
1038 
1039 
1041 
1048  *hash<auto> searchFirstRecord(hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1049 
1050 
1052 
1057  *hash<auto> searchFirstRecord(hash<auto> where_cond, *hash<auto> search_options);
1058 
1059 
1061 
1069  *hash<auto> searchSingleRecord(hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1070 
1071 
1073 
1079  *hash<auto> searchSingleRecord(hash<auto> where_cond, *hash<auto> search_options);
1080 
1081 
1083 
1088 
1089 
1091 
1100  *hash<auto> search_options) {
1101  checkRead();
1102  return searchRecordsBulk(block_size, NOTHING, validateSearchOptions(search_options));
1103  }
1104 
1106 
1118  *hash<DataProviderExpression> where_cond, *hash<auto> search_options) {
1119  checkRead();
1120  if (block_size <= 0);
1121 
1122  search_options = validateSearchOptions(search_options);
1123  return searchRecordsBulkImpl(block_size, processSearchParameters(where_cond, search_options),
1124  search_options);
1125  }
1126 
1128 
1137  AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size = 1000, *hash<auto> where_cond,
1138  *hash<auto> search_options) {
1139  checkRead();
1140  if (block_size <= 0);
1141 
1142  search_options = validateSearchOptions(search_options);
1143  return searchRecordsBulkImpl(block_size, getSearchExpression(where_cond, search_options), search_options);
1144  }
1145 
1147 
1154  AbstractDataProviderRecordIterator searchRecords(*hash<DataProviderExpression> where_cond,
1155  *hash<auto> search_options) {
1156  checkRead();
1157  search_options = validateSearchOptions(search_options);
1158  return searchRecordsImpl(processSearchParameters(where_cond, search_options), search_options);
1159  }
1160 
1162 
1167  AbstractDataProviderRecordIterator searchRecords(*hash<auto> where_cond, *hash<auto> search_options);
1168 
1169 
1171 
1181  AbstractDataProviderRecordIterator requestSearchRecords(auto req, *hash<DataProviderExpression> where_cond,
1182  *hash<auto> search_options) {
1183  checkRead();
1184  checkRequest();
1185  return requestSearchRecordsImpl(req, processSearchParameters(where_cond, search_options), search_options);
1186  }
1187 
1189 
1198  *hash<auto> search_options) {
1199  checkRead();
1200  checkRequest();
1201  return requestSearchRecordsImpl(req, getSearchExpression(where_cond, search_options), search_options);
1202  }
1203 
1205 
1216  bool updateSingleRecord(hash<auto> set, hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1217 
1218 
1220 
1229  bool updateSingleRecord(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
1230 
1231 
1233 
1245  int updateRecords(hash<auto> set, *hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1246 
1247 
1249 
1259  int updateRecords(hash<auto> set, *hash<auto> where_cond, *hash<auto> search_options);
1260 
1261 
1263 
1275  int deleteRecords(*hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1276 
1277 
1279 
1289  int deleteRecords(*hash<auto> where_cond, *hash<auto> search_options);
1290 
1291 
1293 
1301  auto doRequest(auto req, *hash<auto> request_options);
1302 
1303 
1305 
1316  AbstractDataProvider createChildProvider(string name, hash<string, AbstractDataField> fields,
1317  *hash<auto> child_create_options) {
1318  checkCreateChild();
1319  child_create_options = validateChildCreateOptions(child_create_options);
1320  if (!fields);
1321 
1322  on_error if (1.err != 'CREATE-CHILD-PROVIDER-ERROR');
1323 
1324  return createChildProviderImpl(name, fields, child_create_options);
1325  }
1326 
1328 
1336  deleteChildProvider(string name, *hash<auto> child_delete_options);
1337 
1338 
1340 
1349  addField(AbstractDataField field, *hash<auto> field_add_options);
1350 
1351 
1353 
1362  updateField(string name, AbstractDataField field, *hash<auto> field_update_options);
1363 
1364 
1366 
1374  deleteField(string name, *hash<auto> field_delete_options);
1375 
1376 
1378 
1389  sendMessage(string message_id, auto msg, *hash<auto> send_message_options);
1390 
1391 
1393 
1400 
1401 
1403 
1408 
1409 
1411 
1416 
1417 
1419 
1423  *hash<string, AbstractDataProviderType> getErrorResponseTypes();
1424 
1425 
1427 
1435 
1436 
1438 
1447  hash<DataProviderMessageInfo> getEventInfo(string event_id);
1448 
1449 
1451 
1457  hash<string, hash<DataProviderMessageInfo>> getEventTypes();
1458 
1459 
1461 
1470  hash<DataProviderMessageInfo> getMessageInfo(string message_id);
1471 
1472 
1474 
1480  hash<string, hash<DataProviderMessageInfo>> getMessageTypes();
1481 
1482 
1484 
1487  *list<hash<DataProviderSummaryInfo>> getChildProviderSummaryInfo();
1488 
1489 
1491 
1493  *list<string> getChildProviderNames();
1494 
1495 
1497 
1504 
1505 
1507 
1514 
1515 
1517 
1526 
1527 
1529 
1533 
1534 
1536 
1545 
1546 
1548 
1555 
1556 
1558 
1565 
1566 
1568 
1573 
1574 
1576 
1581 
1582 
1584 
1588  *hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
1589 
1590 
1592 
1596 
1597 
1599 
1603 
1604 
1606 
1610 
1611 
1613 
1617 
1618 
1620 
1624 
1625 
1627 
1631 
1632 
1634 
1640 
1641 
1643 
1649 
1650 
1652 
1658 
1659 
1661 
1667 
1668 
1670 
1676 
1677 
1679 
1685 
1686 
1688 
1694 
1695 
1697 
1703 
1704 
1706 
1712 
1713 
1715 
1723  *hash<auto> getSearchExpression(*hash<auto> where_cond, *hash<auto> search_options);
1724 
1725 
1727 
1730  private hash<DataProviderExpression> getSimpleArgumentIntern(int role, hash<DataProviderInfo> info,
1731  hash<DataProviderExpressionInfo> expinfo, string key, auto value) {
1732  // remove any unique suffix from key to get field name
1733  key =~ s/:.*//g;
1734  hash<DataProviderExpression> rv;
1735  if (value.typeCode() == NT_HASH && value.op && value.hasKey('arg'));
1736  else {
1737  rv = getEqualityComparisonExpression(role, info, key, value);
1738  }
1739  int caps = role == ER_Search ? info.search_logic_capabilities : 0;
1740  verifyExpression(role, info.expressions, caps, AbstractDataProviderTypeMap."bool", rv);
1741  return rv;
1742  }
1743 
1745 
1750  private hash<DataProviderExpression> getEqualityComparisonExpression(int role, hash<DataProviderInfo> info,
1751  string key, auto value) {
1752  if (!info.expressions.'=');
1753 
1754  return <DataProviderExpression>{
1755  "exp": "=",
1756  "args": (<DataProviderFieldReference>{"field": key},) + value,
1757  };
1758  }
1759 
1761 
1764  static private hash<DataProviderExpressionInfo> getExpression(int role, string exp,
1765  *hash<string, hash<DataProviderExpressionInfo>> expmap) {
1766  *hash<DataProviderExpressionInfo> expinfo = expmap{exp};
1767  if (!expinfo);
1768 
1769  if (!(expinfo.role & role));
1770 
1771  return expinfo;
1772  }
1773 
1775 
1780 
1782 
1785  static auto evalGenericExpressionValue(hash<auto> rec, auto val);
1786  return rv;
1787  };
1788  if (val instanceof hash<DataProviderExpression>);
1789 
1790  return val;
1791  };
1792 
1794 
1797  static auto evalGenericExpression(hash<auto> rec, hash<DataProviderExpression> exp);
1798 
1800 
1810  static bool setDynamicValueCallbacks(code value_needs_resolution, code resolve_value);
1811 
1813 
1821  static verifyExpression(int role, *hash<string, hash<DataProviderExpressionInfo>> expmap, int caps,
1822  AbstractDataProviderType expected_type, hash<DataProviderExpression> exp) {
1823  hash<DataProviderExpressionInfo> expinfo = AbstractDataProvider::getExpression(role, exp.exp, expmap);
1824  return AbstractDataProvider::verifyExpression(role, expinfo, caps, expected_type, exp);
1825  }
1826 
1828 
1836  static verifyExpression(int role, hash<DataProviderExpressionInfo> expinfo, int caps,
1837  AbstractDataProviderType expected_type, hash<DataProviderExpression> exp) {
1838  // check arguments
1839  if (exp.args.lsize() > expinfo.args.size() && !expinfo.varargs);
1840 
1841  map AbstractDataProvider::verifyExpressionArgValue(role, caps, expinfo, exp.args, //), expinfo.args;
1842  if (exp.args.lsize() > expinfo.args.size());
1843 
1844  if (!expected_type.isAssignableFrom(expinfo.return_type));
1845 
1846  }
1847 
1849 
1855  static verifyExpressionArgValue(int role, int caps, hash<DataProviderExpressionInfo> expinfo,
1856  softlist<auto> values, int pos) {
1857  hash<DataProviderSignatureTypeInfo> arginfo = expinfo.args[pos] ?? expinfo.args.last();
1858  if (arginfo.type_code == ST_Any);
1859 
1860  auto val = values[pos];
1861  bool is_exp = val instanceof hash<DataProviderExpression>;
1862  bool is_ref = is_exp ? False : val instanceof hash<DataProviderFieldReference>;
1863 
1864  switch (arginfo.type_code);
1865 
1866  }
1867 
1869 protected:
1870  static bool checkCallbacks();
1871 public:
1872 
1873 
1875 
1877 protected:
1878  *hash<auto> validateCreateOptions(*hash<auto> create_options);
1879 public:
1880 
1881 
1883 
1885 protected:
1886  *hash<auto> validateUpsertOptions(*hash<auto> upsert_options);
1887 public:
1888 
1889 
1891 
1893 protected:
1894  *hash<auto> validateSearchOptions(*hash<auto> search_options);
1895 public:
1896 
1897 
1899 
1901 protected:
1902  *hash<auto> validateRequestOptions(*hash<auto> request_options);
1903 public:
1904 
1905 
1907 
1911 protected:
1912  *hash<auto> validateChildCreateOptions(*hash<auto> child_create_options);
1913 public:
1914 
1915 
1917 
1921 protected:
1922  *hash<auto> validateChildDeleteOptions(*hash<auto> child_delete_options);
1923 public:
1924 
1925 
1927 
1931 protected:
1932  *hash<auto> validateFieldAddOptions(*hash<auto> field_add_options);
1933 public:
1934 
1935 
1937 
1941 protected:
1942  *hash<auto> validateFieldUpdateOptions(*hash<auto> field_update_options);
1943 public:
1944 
1945 
1947 
1951 protected:
1952  *hash<auto> validateFieldDeleteOptions(*hash<auto> field_delete_options);
1953 public:
1954 
1955 
1957 
1961 protected:
1962  *hash<auto> validateSendMessageOptions(*hash<auto> send_message_options);
1963 public:
1964 
1965 
1967 protected:
1968  processConstructorOptions(*hash<string, hash<DataProviderOptionInfo>> option_desc, *hash<auto> options);
1969 public:
1970 
1971 
1973  private *hash<auto> checkOptions(string err, *hash<string, hash<DataProviderOptionInfo>> option_desc,
1974  *hash<auto> options) {
1975  if (!option_desc && options);
1976 
1977  if (*list<string> invalid_keys = keys (options - (keys option_desc)));
1978 
1979  bool updated;
1980  // check types and required keys
1981  foreach hash<auto> i in (option_desc.pairIterator());
1982 
1983  return options;
1984  }
1985 
1987 
1992  private *hash<DataProviderExpression> processSearchParameters(*hash<DataProviderExpression> exp,
1993  *hash<auto> search_options) {
1994  if (!exp);
1995 
1996  checkSearchExpressions();
1997  hash<DataProviderInfo> info = getInfo();
1998  verifyExpression(ER_Search, info.expressions, info.search_logic_capabilities,
2000  return exp;
2001  }
2002 
2004 
2011 protected:
2012  *hash<auto> processFieldValues(*hash<auto> h, *hash<auto> search_options);
2013 public:
2014 
2015 
2017 protected:
2018  error(string err, string fmt);
2019 public:
2020 
2021 
2023 
2028  private *hash<auto> searchFirstRecordImpl(hash<auto> where_cond,
2029  *hash<auto> search_options) {
2030  // scans the whole data set to find a single record
2031  AbstractDataProviderRecordIterator i = searchRecordsImpl(where_cond, search_options);
2032  if (i.next());
2033 
2034  }
2035 
2037 
2044  private *hash<auto> searchSingleRecordImpl(hash<auto> where_cond,
2045  *hash<auto> search_options) {
2046  // scans the whole data set to find a single record
2047  *list<*hash<auto>> records = map $1, searchRecordsImpl(where_cond, search_options);
2048  if (records.lsize() > 1);
2049 
2050  return records[0];
2051  }
2052 
2054 
2058 protected:
2059  *list<string> getChildProviderNamesImpl();
2060 public:
2061 
2062 
2064 
2066 protected:
2067  *AbstractDataProvider getChildProviderImpl(string name);
2068 public:
2069 
2070 
2072 
2078  *hash<string, AbstractDataField> getRecordType(*hash<auto> search_options);
2079 
2080 
2082  *hash<string, AbstractDataField> getSoftRecordType(*hash<auto> search_options);
2083 
2084 
2086  *hash<string, AbstractDataField> getOrNothingRecordType(*hash<auto> search_options);
2087 
2088 
2090 
2093  *hash<string, hash<DataProviderOptionInfo>> getSearchOptions();
2094 
2095 
2097 
2100  *hash<string, hash<DataProviderOptionInfo>> getCreateOptions();
2101 
2102 
2104 
2107  *hash<string, hash<DataProviderOptionInfo>> getUpsertOptions();
2108 
2109 
2111 
2114  *hash<string, hash<DataProviderOptionInfo>> getRequestOptions();
2115 
2116 
2118 
2124  *hash<string, hash<DataProviderOptionInfo>> getChildCreateOptions();
2125 
2126 
2128 
2134  *hash<string, hash<DataProviderOptionInfo>> getChildDeleteOptions();
2135 
2136 
2138 
2144  *hash<string, hash<DataProviderOptionInfo>> getFieldAddOptions();
2145 
2146 
2148 
2154  *hash<string, hash<DataProviderOptionInfo>> getFieldUpdateOptions();
2155 
2156 
2158 
2164  *hash<string, hash<DataProviderOptionInfo>> getFieldDeleteOptions();
2165 
2166 
2168 
2174  *hash<string, hash<DataProviderOptionInfo>> getSendMessageOptions();
2175 
2176 
2178 
2180  string getMessageSupport();
2181 
2182 
2184 
2186  bool supportsRead();
2187 
2188 
2190 
2192  bool supportsBulkRead();
2193 
2194 
2196 
2198  bool supportsCreate();
2199 
2200 
2202 
2204  bool supportsUpdate();
2205 
2206 
2208 
2210  bool supportsUpsert();
2211 
2212 
2214 
2216  bool supportsDelete();
2217 
2218 
2220 
2222  bool supportsNativeSearch();
2223 
2224 
2226 
2228  bool supportsBulkCreate();
2229 
2230 
2232 
2234  bool supportsBulkUpsert();
2235 
2236 
2238 
2240  bool supportsRequest();
2241 
2242 
2244 
2246  bool recordRequiresSearchOptions();
2247 
2248 
2250 
2252  bool hasRecord();
2253 
2254 
2256 
2258  bool supportsCreateChild();
2259 
2260 
2262 
2264  bool supportsDeleteChild();
2265 
2266 
2268 
2270  bool supportsAddField();
2271 
2272 
2274 
2276  bool supportsUpdateField();
2277 
2278 
2280 
2282  bool supportsDeleteField();
2283 
2284 
2286 
2288  bool supportsSchema();
2289 
2290 
2292 
2294  bool supportsSearchExpressions();
2295 
2296 
2298 
2300  bool supportsObservable();
2301 
2302 
2304 
2306  bool supportsMessages();
2307 
2308 
2310 
2312  *object getSchemaType();
2313 
2314 
2316 
2320 protected:
2321  *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
2322 public:
2323 
2324 
2326 
2333  private AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000,
2334  *hash<auto> where_cond, *hash<auto> search_options) {
2335  return new DefaultBulkRecordIterface(block_size, searchRecordsImpl(where_cond, search_options));
2336  }
2337 
2339 
2344  private AbstractDataProviderRecordIterator searchRecordsImpl(hash<auto> where_cond,
2345  *hash<auto> search_options) {
2346  throwUnimplementedException();
2347  }
2348 
2350 
2358  private AbstractDataProviderRecordIterator requestSearchRecordsImpl(auto req,
2359  *hash<auto> where_cond, *hash<auto> search_options) {
2360  throwUnimplementedException();
2361  }
2362 
2364 
2372 protected:
2373  *hash<auto> createRecordImpl(hash<auto> rec, *hash<auto> create_options);
2374 public:
2375 
2376 
2378 
2383 protected:
2384  string upsertRecordImpl(hash<auto> rec, *hash<auto> upsert_options);
2385 public:
2386 
2387 
2389 
2393  private bool updateSingleRecordImpl(hash<auto> set, hash<auto> where_cond,
2394  *hash<auto> search_options) {
2395  throwUnimplementedException();
2396  }
2397 
2399 
2405  private int updateRecordsImpl(hash<auto> set, *hash<auto> where_cond,
2406  *hash<auto> search_options) {
2407  throwUnimplementedException();
2408  }
2409 
2411 
2417 protected:
2418  int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
2419 public:
2420 
2421 
2423 
2428 protected:
2429  auto doRequestImpl(auto req, *hash<auto> request_options);
2430 public:
2431 
2432 
2434 
2442  private AbstractDataProvider createChildProviderImpl(string name, hash<string, AbstractDataField> fields,
2443  *hash<auto> child_create_options) {
2444  throwUnimplementedException();
2445  }
2446 
2448 
2453 protected:
2454  deleteChildProviderImpl(string name, *hash<auto> child_delete_options);
2455 public:
2456 
2457 
2459 
2465 protected:
2466  addFieldImpl(AbstractDataField field, *hash<auto> field_add_options);
2467 public:
2468 
2469 
2471 
2477 protected:
2478  updateFieldImpl(string name, AbstractDataField field, *hash<auto> field_update_options);
2479 public:
2480 
2481 
2483 
2488 protected:
2489  deleteFieldImpl(string name, *hash<auto> field_delete_options);
2490 public:
2491 
2492 
2494 
2501 protected:
2502  sendMessageImpl(string message_id, auto msg, *hash<auto> send_message_options);
2503 public:
2504 
2505 
2507 
2511 protected:
2512  object getSchemaObjectImpl();
2513 public:
2514 
2515 
2517 
2521 protected:
2522  *AbstractDataProviderType getRequestTypeImpl();
2523 public:
2524 
2525 
2527 
2531 protected:
2532  *AbstractDataProviderType getResponseTypeImpl();
2533 public:
2534 
2535 
2537 
2541 protected:
2542  *hash<string, AbstractDataProviderType> getErrorResponseTypesImpl();
2543 public:
2544 
2545 
2547 
2553 protected:
2554  AbstractDataProviderType getErrorResponseTypeImpl(string error_code);
2555 public:
2556 
2557 
2559 
2569 protected:
2570  hash<DataProviderMessageInfo> getEventInfoImpl(string event_id);
2571 public:
2572 
2573 
2575 
2581 protected:
2582  hash<string, hash<DataProviderMessageInfo>> getEventTypesImpl();
2583 public:
2584 
2585 
2587 
2595 protected:
2596  hash<DataProviderMessageInfo> getMessageInfoImpl(string message_id);
2597 public:
2598 
2599 
2601 
2607 protected:
2608  hash<string, hash<DataProviderMessageInfo>> getMessageTypesImpl();
2609 public:
2610 
2611 
2613 
2615 protected:
2616  throwUnimplementedException();
2617 public:
2618 
2619 
2621  abstract string getName();
2622 
2624 protected:
2625  abstract hash<DataProviderInfo> getStaticInfoImpl();
2626 public:
2627 }
2628 }
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:707
static code cb_resolve_value
static callback for dynamic value resolution
Definition: AbstractDataProvider.qc.dox.h:958
const GenericExpressions
Generic search operator expressions.
Definition: AbstractDataProvider.qc.dox.h:941
*hash< string, hash< MapperRuntimeKeyInfo > > getMapperRuntimeKeys()
Returns custom data mapper runtime keys.
checkDeleteChild()
Ensures that the data provider supports deleting children.
deleteChildProvider(string name, *hash< auto > child_delete_options)
Deletes a child data provider.
*list< hash< DataProviderSummaryInfo > > getChildProviderSummaryInfo()
Return data provider summary info.
beginTransaction()
Begins a transaction with a data provider.
const DataProviderSummaryInfoKeys
A list of members names of the DataProviderSummaryInfoKeys hashdecl.
Definition: AbstractDataProvider.qc.dox.h:944
*hash< string, AbstractDataProviderType > getErrorResponseTypes()
Returns a hash of error responses, if any.
*AbstractDataProviderType getRequestType()
Returns the description of a successful request message, if any.
checkUpdate()
Ensures that the data provider supports record upserts.
AbstractDataProviderBulkOperation getBulkUpserter()
Returns a bulk upsert operation object for the data provider.
hash< auto > getInfoAsData(*bool with_type_info)
Returns static provider information as data; no objects are returned.
const GenericExpressionImplementations
Generic expression implementations for data providers without native search functionality.
Definition: AbstractDataProvider.qc.dox.h:711
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.
hash< DataProviderInfo > getInfo()
Returns data provider info.
const GenericRecordSearchOptions
Generic record search options; see details below.
Definition: AbstractDataProvider.qc.dox.h:966
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:1137
constructor()
Creates the data provider.
*hash< auto > createRecord(hash< auto > rec, *hash< auto > create_options)
Creates the given record in the data provider.
hash< DataProviderMessageInfo > getEventInfo(string event_id)
Returns the description of an observable event, if any.
setLogger(Logger logger)
Sets or replaces the logger.
hash< DataProviderMessageInfo > getMessageInfo(string message_id)
Returns the description of an outbound message, if any.
deleteField(string name, *hash< auto > field_delete_options)
Deletes an existing field.
int deleteRecords(*hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Deletes zero or more records.
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:1764
*Logger logger
Logger for logging.
Definition: AbstractDataProvider.qc.dox.h:949
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.
*hash< auto > searchFirstRecord(hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Returns the first record matching the search options.
*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:952
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:1197
AbstractDataProviderBulkOperation getBulkInserter()
Returns a bulk insert operation object for 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.
static code cb_value_needs_resolution
static callback the returns a bool if the value needs dynamic resolution
Definition: AbstractDataProvider.qc.dox.h:955
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.
checkRead()
Ensures that the data provider supports read operations.
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:1730
*string getDesc()
Returns the data provider description.
*hash< auto > searchFirstRecord(hash< auto > where_cond, *hash< auto > search_options)
Returns the first record matching the search options.
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:1099
int updateRecords(hash< auto > set, *hash< auto > where_cond, *hash< auto > search_options)
Updates zero or more records matching the search options.
*hash< auto > searchSingleRecord(hash< auto > where_cond, *hash< auto > search_options)
Returns a single record matching the search options.
hash< DataProviderSummaryInfo > getSummaryInfo()
Return data provider summary info.
*hash< auto > getSearchExpression(*hash< auto > where_cond, *hash< auto > search_options)
Returns a search expression for a standard search hash.
*hash< auto > searchSingleRecord(hash< DataProviderExpression > where_cond, *hash< auto > search_options)
Returns a single record matching the search options.
hash< string, hash< DataProviderMessageInfo > > getMessageTypes()
Returns a hash of all supported outbound messages.
AbstractDataProviderRecordIterator searchRecords(*hash< auto > where_cond, *hash< auto > search_options)
Returns an iterator for zero or more records matching the search options.
checkDelete()
Ensures that the data provider supports record deletion.
AbstractDataProviderType getErrorResponseType(string error_code)
Returns the type for the given error code.
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:1154
checkDeleteField()
Ensures that the data provider supports deleting fields.
AbstractDataProvider getChildProviderPath(string path)
Returns the given child provider from a "/" separated path string.
constructor(Logger logger)
Creates the data provider with the given Logger.
*list< string > getChildProviderNames()
Returns a list of child data provider names, if any.
addField(AbstractDataField field, *hash< auto > field_add_options)
Creates a new field.
AbstractDataProvider createChildProvider(string name, hash< string, AbstractDataField > fields, *hash< auto > child_create_options)
Creates a new child data provider and returns it after adding as a child.
Definition: AbstractDataProvider.qc.dox.h:1316
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.
private hash< DataProviderExpression > getEqualityComparisonExpression(int role, hash< DataProviderInfo > info, string key, auto value)
Returns an equality comparison expression.
Definition: AbstractDataProvider.qc.dox.h:1750
checkRequest()
Ensures that the data provider supports the request API.
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:1181
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:1117
int deleteRecords(*hash< auto > where_cond, *hash< auto > search_options)
Deletes zero or more records.
checkUpsert()
Ensures that the data provider supports record upserts.
hash< string, hash< DataProviderMessageInfo > > getEventTypes()
Returns a hash of all supported event types.
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 True
const False
bool inlist()
number exp(number n)
const NOTHING
bool regex(string str, string regex, int options=0)
const NT_HASH
hash< auto > hash(object obj)
Qore AbstractDataField class definition.
Definition: AbstractDataField.qc.dox.h:27
const UpsertResultUnchanged
Indicates that the record was left unchanged.
Definition: AbstractDataProvider.qc.dox.h:42
const UpsertResultDeleted
Indicates that the record was deleted.
Definition: AbstractDataProvider.qc.dox.h:45
const DP_SEARCH_OP_EQ
Identifies the generic data provider equals operator (=) for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:81
const ER_All
Indicates an expression that can be used in all contexts.
Definition: AbstractDataProvider.qc.dox.h:234
const UpsertResultInserted
Indicates that the record was inserted.
Definition: AbstractDataProvider.qc.dox.h:33
const DP_OP_OR
OR logic.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:41
const DP_SEARCH_OP_REGEX
Identifies the regex operator for use in generic search criteria.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:51
const MSG_None
No output type.
Definition: AbstractDataProvider.qc.dox.h:179
const ST_Value
Indicates any literal value of the given type; i.e. not an operator or other expression.
Definition: AbstractDataProvider.qc.dox.h:203
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 DataProviderSignatureOptionalIntValueType
Data provider signature *int value type.
Definition: AbstractDataProvider.qc.dox.h:309
const DataProviderSignatureStringType
Data provider signature string type.
Definition: AbstractDataProvider.qc.dox.h:333
const DataProviderSignatureDateType
Data provider signature date type.
Definition: AbstractDataProvider.qc.dox.h:339
const LC_Or
Indicates that boolean expressions can be combined with OR logic.
Definition: AbstractDataProvider.qc.dox.h:254
const DataProviderSignatureHashValueType
Data provider signature hash value type.
Definition: AbstractDataProvider.qc.dox.h:321
const ER_Search
Indicates an expression that can be used in a search operation.
Definition: AbstractDataProvider.qc.dox.h:228
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 SignatureTypeDescMap
Maps signature description values to integer codes.
Definition: AbstractDataProvider.qc.dox.h:220
const SignatureTypeCodeMap
Maps signature type codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:213
const DET_Operator
Indicates an operator expression.
Definition: AbstractDataProvider.qc.dox.h:350
const DataProviderSignatureOptionalStringValueType
Data provider signature optional string value type.
Definition: AbstractDataProvider.qc.dox.h:297
const LogicDescMap
Logic map from descriptions to integer codes.
Definition: AbstractDataProvider.qc.dox.h:267
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 LC_And
Indicates that boolean expressions can be combined with AND logic.
Definition: AbstractDataProvider.qc.dox.h:251
const DET_Function
Indicates a function expression.
Definition: AbstractDataProvider.qc.dox.h:353
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_OP_AND
AND logic.
Definition: AbstractDataProviderRecordIterator.qc.dox.h:38
const DataProviderSignatureFieldType
Data provider signature field type.
Definition: AbstractDataProvider.qc.dox.h:279
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 ExpressionTypeDescMap
Maps DataProvider expression type descriptions to integer codes.
Definition: AbstractDataProvider.qc.dox.h:363
const DataProviderSignatureBoolType
Data provider signature bool type.
Definition: AbstractDataProvider.qc.dox.h:327
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:315
const DataProviderSignatureStringValueType
Data provider signature string value type.
Definition: AbstractDataProvider.qc.dox.h:291
const DataProviderSignatureAnyType
Data provider signature any type.
Definition: AbstractDataProvider.qc.dox.h:285
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:209
const UpsertResultVerified
Indicates that the record was verified as already in the target state.
Definition: AbstractDataProvider.qc.dox.h:39
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 RoleCodeMap
Role map from codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:238
const UpsertResultUpdated
Indicates that the record was updated.
Definition: AbstractDataProvider.qc.dox.h:36
const MSG_Async
Asynchronous output type, output can happen any time.
Definition: AbstractDataProvider.qc.dox.h:191
const LC_All
Indicates that all logic capabilities are supported.
Definition: AbstractDataProvider.qc.dox.h:257
const ST_Any
Indicates any valid expression that returns the given type (default)
Definition: AbstractDataProvider.qc.dox.h:200
const LogicCodeMap
Logic map from codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:261
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 RoleDescMap
Role map from descriptions to codes.
Definition: AbstractDataProvider.qc.dox.h:243
const ER_Field
Indicates an expression that can be used in a field.
Definition: AbstractDataProvider.qc.dox.h:231
const ExpressionTypeCodeMap
Maps DataProvider expression type codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:357
const MSG_Sync
Synchronous output type, an output message is expected after each observed event.
Definition: AbstractDataProvider.qc.dox.h:186
const DataProviderSignatureIntValueType
Data provider signature int value type.
Definition: AbstractDataProvider.qc.dox.h:303
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:406
string exp
Expression name.
Definition: AbstractDataProvider.qc.dox.h:408
softlist< auto > args
Expression arguments.
Definition: AbstractDataProvider.qc.dox.h:414
Data provider signature info.
Definition: AbstractDataProvider.qc.dox.h:366
string symbol
The symbol to use when rendering expressions.
Definition: AbstractDataProvider.qc.dox.h:382
string name
The display name.
Definition: AbstractDataProvider.qc.dox.h:376
string label
The label used for the expression.
Definition: AbstractDataProvider.qc.dox.h:373
bool varargs
The last argument can be repeated indefinitely.
Definition: AbstractDataProvider.qc.dox.h:396
int role
The expression role code / bitfield.
Definition: AbstractDataProvider.qc.dox.h:387
int type
The type of expression; see DataProvider Expression Type Codes.
Definition: AbstractDataProvider.qc.dox.h:368
softlist< hash< DataProviderSignatureTypeInfo > > args
Argument types.
Definition: AbstractDataProvider.qc.dox.h:390
string desc
The description of the operation.
Definition: AbstractDataProvider.qc.dox.h:379
AbstractDataProviderType return_type
The return type.
Definition: AbstractDataProvider.qc.dox.h:393
Data provider field reference.
Definition: AbstractDataProvider.qc.dox.h:400
string field
The name of the field being referenced.
Definition: AbstractDataProvider.qc.dox.h:402
Data provider info.
Definition: AbstractDataProvider.qc.dox.h:418
string supports_messages
Output message support.
Definition: AbstractDataProvider.qc.dox.h:572
bool supports_delete
Does the data provider support record deletion?
Definition: AbstractDataProvider.qc.dox.h:452
*hash< string, hash< DataProviderMessageInfo > > events
hash of observable events and event types
Definition: AbstractDataProvider.qc.dox.h:674
bool supports_bulk_read
Does the data provider support native / optimized bulk reads?
Definition: AbstractDataProvider.qc.dox.h:465
*hash< string, hash< DataProviderOptionInfo > > add_field_options
Add field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:639
*hash< string, hash< DataProviderMessageInfo > > messages
List of output message IDs and message types.
Definition: AbstractDataProvider.qc.dox.h:681
bool transaction_management
Does the data provider require transaction management?
Definition: AbstractDataProvider.qc.dox.h:496
*hash< string, hash< DataProviderExpressionInfo > > expressions
Expressions (operators and functions) supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:667
bool children_can_support_observers
Can any child data providers support the observer pattern / event API?
Definition: AbstractDataProvider.qc.dox.h:587
bool supports_child_delete
Does the data provider support deleting new child providers?
Definition: AbstractDataProvider.qc.dox.h:520
string type
The name of the provider type.
Definition: AbstractDataProvider.qc.dox.h:427
bool supports_delete_field
Does the data provider support deleting fields?
Definition: AbstractDataProvider.qc.dox.h:541
bool supports_child_create
Does the data provider support creating new child providers?
Definition: AbstractDataProvider.qc.dox.h:513
*hash< string, hash< DataProviderOptionInfo > > child_delete_options
Child deletion options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:632
bool supports_native_search
Does the data provider support native record searching?
Definition: AbstractDataProvider.qc.dox.h:457
*hash< string, hash< DataProviderOptionInfo > > request_options
Request options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:618
*hash< string, hash< DataProviderOptionInfo > > search_options
Search options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:613
string name
Data provider name.
Definition: AbstractDataProvider.qc.dox.h:422
bool supports_add_field
Does the data provider support adding new fields?
Definition: AbstractDataProvider.qc.dox.h:527
bool supports_bulk_upsert
Does the data provider support native / optimized bulk upserts?
Definition: AbstractDataProvider.qc.dox.h:481
*hash< string, hash< DataProviderOptionInfo > > child_create_options
Child creation options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:625
hash< string, hash< MapperRuntimeKeyInfo > > mapper_keys
A hash of mapper key information.
Definition: AbstractDataProvider.qc.dox.h:693
bool supports_read
Does the data provider support reading.
Definition: AbstractDataProvider.qc.dox.h:432
bool record_requires_search_options
Do we require search options to retrieve the record type?
Definition: AbstractDataProvider.qc.dox.h:506
bool supports_update
Does the data provider support record updates?
Definition: AbstractDataProvider.qc.dox.h:442
bool supports_search_expressions
Does this data provide support advanced search experssions?
Definition: AbstractDataProvider.qc.dox.h:555
*hash< string, hash< DataProviderOptionInfo > > upsert_options
Upsert options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:608
bool supports_update_field
Does the data provider support updating existing fields?
Definition: AbstractDataProvider.qc.dox.h:534
bool supports_request
Does the data provider support the request API?
Definition: AbstractDataProvider.qc.dox.h:486
*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:598
*hash< string, hash< DataProviderOptionInfo > > create_options
Create options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:603
bool supports_create
Does the data provider support record creation?
Definition: AbstractDataProvider.qc.dox.h:437
*list< string > children
A list of child data providers in this data provider.
Definition: AbstractDataProvider.qc.dox.h:703
bool supports_observable
Does this data provider support the event API / observer pattern?
Definition: AbstractDataProvider.qc.dox.h:562
bool supports_upsert
Does the data provider support record upserts (create or update)?
Definition: AbstractDataProvider.qc.dox.h:447
bool supports_bulk_create
Does the data provider support native / optimized bulk creation?
Definition: AbstractDataProvider.qc.dox.h:473
*hash< string, hash< DataProviderOptionInfo > > delete_field_options
Delete field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:653
*hash< string, hash< DataProviderOptionInfo > > send_message_options
Send message options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:660
bool supports_children
Does the data provider support children?
Definition: AbstractDataProvider.qc.dox.h:491
bool children_can_support_apis
Can any child data providers offer API services (request - response data providers)?
Definition: AbstractDataProvider.qc.dox.h:577
bool children_can_support_records
Can any child data providers offer record-based providers?
Definition: AbstractDataProvider.qc.dox.h:582
*hash< string, hash< DataProviderOptionInfo > > update_field_options
Update field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:646
*string desc
A markdown description of the data provider.
Definition: AbstractDataProvider.qc.dox.h:698
bool supports_schema
Does the data provider support a schema?
Definition: AbstractDataProvider.qc.dox.h:548
int search_logic_capabilities
Supported search logic capabilities.
Definition: AbstractDataProvider.qc.dox.h:686
*string schema_type
Returns the schema type supported by this data provider.
Definition: AbstractDataProvider.qc.dox.h:593
bool has_record
Does the data provider provide a record?
Definition: AbstractDataProvider.qc.dox.h:501
Data provider message and event info.
Definition: AbstractDataProvider.qc.dox.h:158
string desc
The description of the message or event.
Definition: AbstractDataProvider.qc.dox.h:162
AbstractDataProviderType type
The data type of the message or event.
Definition: AbstractDataProvider.qc.dox.h:165
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:270
int type_code
The signature type code.
Definition: AbstractDataProvider.qc.dox.h:275
AbstractDataProviderType type
Argument types.
Definition: AbstractDataProvider.qc.dox.h:272
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 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 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 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