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  __7_ 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  __7_ string schema_type;
579 
581 
583  __7_ hash<string, hash<DataProviderOptionInfo>> constructor_options;
584 
586 
588  __7_ hash<string, hash<DataProviderOptionInfo>> create_options;
589 
591 
593  __7_ hash<string, hash<DataProviderOptionInfo>> upsert_options;
594 
596 
598  __7_ hash<string, hash<DataProviderOptionInfo>> search_options;
599 
601 
603  __7_ hash<string, hash<DataProviderOptionInfo>> request_options;
604 
606 
610  __7_ hash<string, hash<DataProviderOptionInfo>> child_create_options;
611 
613 
617  __7_ hash<string, hash<DataProviderOptionInfo>> child_delete_options;
618 
620 
624  __7_ hash<string, hash<DataProviderOptionInfo>> add_field_options;
625 
627 
631  __7_ hash<string, hash<DataProviderOptionInfo>> update_field_options;
632 
634 
638  __7_ hash<string, hash<DataProviderOptionInfo>> delete_field_options;
639 
641 
645  __7_ hash<string, hash<DataProviderOptionInfo>> send_message_options;
646 
648 
652  __7_ hash<string, hash<DataProviderExpressionInfo>> expressions;
653 
655 
659  __7_ hash<string, hash<DataProviderMessageInfo>> events;
660 
662 
666  __7_ hash<string, hash<DataProviderMessageInfo>> messages;
667 
669 
672 
674 
678  hash<string, hash<MapperRuntimeKeyInfo>> mapper_keys = Mapper::MapperKeyInfo;
679 
681 
683  __7_ string desc;
684 
686 
688  __7_ list<string> children;
689 };
690 
693 
694 public:
697  DP_OP_AND: {
699  "type": DET_Operator,
700  "label": DP_OP_AND,
701  "name": "and (&&)",
702  "desc": "logical AND operation supporting logic short-circuiting",
703  "symbol": "&&",
705  "varargs": True,
706  "return_type": AbstractDataProviderTypeMap."bool",
707  },
708  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
709  foreach auto arg in (exp.args) {
711  return False;
712  }
713  }
714  return True;
715  },
716  },
717  DP_OP_OR: {
719  "type": DET_Operator,
720  "label": DP_OP_OR,
721  "name": "or (||)",
722  "desc": "logical OR operation supporting logic short-circuiting",
723  "symbol": "||",
725  "varargs": True,
726  "return_type": AbstractDataProviderTypeMap."bool",
727  },
728  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
729  foreach auto arg in (exp.args) {
731  return True;
732  }
733  }
734  return False;
735  },
736  },
737  DP_SEARCH_OP_EQ: {
739  "type": DET_Operator,
740  "label": DP_SEARCH_OP_EQ,
741  "name": "equals (=)",
742  "desc": "a value for equality comparisons; the type of the value should correspond to the field "
743  "type",
744  "symbol": "==",
746  "return_type": AbstractDataProviderTypeMap."bool",
747  },
748  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
749  auto arg0 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]);
750  auto arg1 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
751  // for backwards compatibility, if the first argument is a field reference, and the second is a
752  # hash
753 
754  return arg0 == arg1;
755  },
756  },
757  DP_SEARCH_OP_NE: {
759  "type": DET_Operator,
760  "label": DP_SEARCH_OP_NE,
761  "name": "not equals (!=)",
762  "desc": "a value for not-equals comparisons; the type of the value should correspond to the "
763  "field type",
764  "symbol": "!=",
766  "return_type": AbstractDataProviderTypeMap."bool",
767  },
768  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
771  },
772  },
773  DP_SEARCH_OP_LT: {
775  "type": DET_Operator,
776  "label": DP_SEARCH_OP_LT,
777  "name": "less than (<)",
778  "desc": "a value for less than comparisons; if the field value is less than the argument, then "
779  "the operation returns true; the type of the value should correspond to the field type",
780  "symbol": "<",
782  "return_type": AbstractDataProviderTypeMap."bool",
783  },
784  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
787  },
788  },
789  DP_SEARCH_OP_LE: {
791  "type": DET_Operator,
792  "label": DP_SEARCH_OP_LE,
793  "name": "less than or equals (<=)",
794  "desc": "a value for less than or equals comparisons; if the field value is less than or equal "
795  "to the argument, then the operation returns true; the type of the value should correspond "
796  "to the field type",
797  "symbol": "<=",
799  "return_type": AbstractDataProviderTypeMap."bool",
800  },
801  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
804  },
805  },
806  DP_SEARCH_OP_GT: {
808  "type": DET_Operator,
809  "label": DP_SEARCH_OP_GT,
810  "name": "greater than (>)",
811  "desc": "a value for less than comparisons; if the field value is less than the argument, then "
812  "the operation returns true; the type of the value should correspond to the field type",
813  "symbol": ">",
815  "return_type": AbstractDataProviderTypeMap."bool",
816  },
817  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
820  },
821  },
822  DP_SEARCH_OP_GE: {
824  "type": DET_Operator,
825  "label": DP_SEARCH_OP_GE,
826  "name": "greater than or equals (>=)",
827  "desc": "a value for greater than or equals comparisons; if the field value is greater than or "
828  "equal to the argument, then the operation returns true; the type of the value should "
829  "correspond to the field type",
830  "symbol": ">=",
832  "return_type": AbstractDataProviderTypeMap."bool",
833  },
834  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
837  },
838  },
841  "type": DET_Operator,
842  "label": DP_SEARCH_OP_BETWEEN,
843  "name": "between",
844  "desc": "A list with two elements giving the lower and upper bounds of the field value; the list "
845  "element value types must be equal to the field's type",
846  "symbol": "between",
847  "args": (
851  ),
852  "return_type": AbstractDataProviderTypeMap."bool",
853  },
854  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
855  auto arg0 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]);
856  return arg0 > AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1])
858  },
859  },
860  DP_SEARCH_OP_IN: {
862  "type": DET_Operator,
863  "label": DP_SEARCH_OP_IN,
864  "name": "in",
865  "desc": "A list giving possible values of the field; if the field's value matches any of the "
866  "values in the list, then the operation returns true; element value types must be equal to "
867  "the field's type",
868  "symbol": "in",
870  "return_type": AbstractDataProviderTypeMap."bool",
871  "varargs": True,
872  },
873  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
876  },
877  },
880  "type": DET_Operator,
881  "label": DP_SEARCH_OP_NOT,
882  "name": "logical not (!)",
883  "desc": "This operator reverses the logcal value of the operator expression given as an argument",
884  "symbol": "!",
886  "return_type": AbstractDataProviderTypeMap."bool",
887  },
888  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
890  },
891  },
894  "type": DET_Operator,
895  "label": DP_SEARCH_OP_REGEX,
896  "name": "regular expression match",
897  "desc": "regular expression operator; the first argument will be processed with the second as a "
898  "regular expression pattern",
899  "symbol": "regex",
900  "args": (
903  "type": (new HashDataType())
904  .addField(new QoreDataField("pattern", "the regular expression pattern",
905  AbstractDataProviderTypeMap."string"))
906  .addField(new QoreDataField("options", "regular expression options",
908  },
909  ),
910  "return_type": AbstractDataProviderTypeMap."bool",
911  },
912  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
913  auto arg1 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
914  return regex(AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]).toString(),
915  arg1.pattern, arg1.options);
916  },
917  },
918  };
919 
921 
926  const GenericExpressions = map {$1.key: $1.value.exp}, GenericExpressionImplementations.pairIterator();
927 
929  const DataProviderSummaryInfoKeys = map $1.getName(),
930  TypedHash::forName("DataProviderSummaryInfo").getMembers();
931 
932 protected:
934  __7_ Logger logger;
935 
937  static bool callbacks_locked = False;
938 
941 
943  static code cb_resolve_value;
944 
946 
952  "columns": <DataProviderOptionInfo>{
953  "type": AbstractDataProviderTypeMap."any",
954  "desc": "allows a subset of fields to be output in searches",
955  },
956  "limit": <DataProviderOptionInfo>{
957  "type": AbstractDataProviderType::get(IntType),
958  "desc": "the maximum number of records to return",
959  },
960  "offset": <DataProviderOptionInfo>{
961  "type": AbstractDataProviderType::get(IntType),
962  "desc": "the offset number in records to return",
963  },
964  };
965 
966 public:
967 
970 
971 
974 
975 
977  setLogger(Logger logger);
978 
979 
981 
985  hash<auto> getInfoAsData(__7_ bool with_type_info);
986 
987 
989  hash<DataProviderInfo> getInfo();
990 
991 
993  hash<DataProviderSummaryInfo> getSummaryInfo();
994 
995 
997  __7_ string getDesc();
998 
999 
1001 
1011  __7_ hash<auto> createRecord(hash<auto> rec, __7_ hash<auto> create_options);
1012 
1013 
1015 
1022  string upsertRecord(hash<auto> rec, __7_ hash<auto> upsert_options);
1023 
1024 
1026 
1033  __7_ hash<auto> searchFirstRecord(hash<DataProviderExpression> where_cond, __7_ hash<auto> search_options);
1034 
1035 
1037 
1042  __7_ hash<auto> searchFirstRecord(hash<auto> where_cond, __7_ hash<auto> search_options);
1043 
1044 
1046 
1054  __7_ hash<auto> searchSingleRecord(hash<DataProviderExpression> where_cond, __7_ hash<auto> search_options);
1055 
1056 
1058 
1064  __7_ hash<auto> searchSingleRecord(hash<auto> where_cond, __7_ hash<auto> search_options);
1065 
1066 
1068 
1073 
1074 
1076 
1085  *hash<auto> search_options) {
1086  checkRead();
1087  return searchRecordsBulk(block_size, NOTHING, validateSearchOptions(search_options));
1088  }
1089 
1091 
1103  *hash<DataProviderExpression> where_cond, *hash<auto> search_options) {
1104  checkRead();
1105  if (block_size <= 0);
1106 
1107  search_options = validateSearchOptions(search_options);
1108  return searchRecordsBulkImpl(block_size, processSearchParameters(where_cond, search_options),
1109  search_options);
1110  }
1111 
1113 
1122  AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size = 1000, __7_ hash<auto> where_cond,
1123  *hash<auto> search_options) {
1124  checkRead();
1125  if (block_size <= 0);
1126 
1127  search_options = validateSearchOptions(search_options);
1128  return searchRecordsBulkImpl(block_size, getSearchExpression(where_cond, search_options), search_options);
1129  }
1130 
1132 
1139  AbstractDataProviderRecordIterator searchRecords(__7_ hash<DataProviderExpression> where_cond,
1140  *hash<auto> search_options) {
1141  checkRead();
1142  search_options = validateSearchOptions(search_options);
1143  return searchRecordsImpl(processSearchParameters(where_cond, search_options), search_options);
1144  }
1145 
1147 
1152  AbstractDataProviderRecordIterator searchRecords(__7_ hash<auto> where_cond, __7_ hash<auto> search_options);
1153 
1154 
1156 
1166  AbstractDataProviderRecordIterator requestSearchRecords(auto req, __7_ hash<DataProviderExpression> where_cond,
1167  *hash<auto> search_options) {
1168  checkRead();
1169  checkRequest();
1170  return requestSearchRecordsImpl(req, processSearchParameters(where_cond, search_options), search_options);
1171  }
1172 
1174 
1182  AbstractDataProviderRecordIterator requestSearchRecords(auto req, __7_ hash<auto> where_cond,
1183  *hash<auto> search_options) {
1184  checkRead();
1185  checkRequest();
1186  return requestSearchRecordsImpl(req, getSearchExpression(where_cond, search_options), search_options);
1187  }
1188 
1190 
1201  bool updateSingleRecord(hash<auto> set, hash<DataProviderExpression> where_cond, __7_ hash<auto> search_options);
1202 
1203 
1205 
1214  bool updateSingleRecord(hash<auto> set, hash<auto> where_cond, __7_ hash<auto> search_options);
1215 
1216 
1218 
1230  int updateRecords(hash<auto> set, __7_ hash<DataProviderExpression> where_cond, __7_ hash<auto> search_options);
1231 
1232 
1234 
1244  int updateRecords(hash<auto> set, __7_ hash<auto> where_cond, __7_ hash<auto> search_options);
1245 
1246 
1248 
1260  int deleteRecords(__7_ hash<DataProviderExpression> where_cond, __7_ hash<auto> search_options);
1261 
1262 
1264 
1274  int deleteRecords(__7_ hash<auto> where_cond, __7_ hash<auto> search_options);
1275 
1276 
1278 
1286  auto doRequest(auto req, __7_ hash<auto> request_options);
1287 
1288 
1290 
1301  AbstractDataProvider createChildProvider(string name, hash<string, AbstractDataField> fields,
1302  *hash<auto> child_create_options) {
1303  checkCreateChild();
1304  child_create_options = validateChildCreateOptions(child_create_options);
1305  if (!fields);
1306 
1307  on_error if (1.err != 'CREATE-CHILD-PROVIDER-ERROR');
1308 
1309  return createChildProviderImpl(name, fields, child_create_options);
1310  }
1311 
1313 
1321  deleteChildProvider(string name, __7_ hash<auto> child_delete_options);
1322 
1323 
1325 
1334  addField(AbstractDataField field, __7_ hash<auto> field_add_options);
1335 
1336 
1338 
1347  updateField(string name, AbstractDataField field, __7_ hash<auto> field_update_options);
1348 
1349 
1351 
1359  deleteField(string name, __7_ hash<auto> field_delete_options);
1360 
1361 
1363 
1374  sendMessage(string message_id, auto msg, __7_ hash<auto> send_message_options);
1375 
1376 
1378 
1385 
1386 
1388 
1393 
1394 
1396 
1401 
1402 
1404 
1408  __7_ hash<string, AbstractDataProviderType> getErrorResponseTypes();
1409 
1410 
1412 
1420 
1421 
1423 
1432  hash<DataProviderMessageInfo> getEventInfo(string event_id);
1433 
1434 
1436 
1442  hash<string, hash<DataProviderMessageInfo>> getEventTypes();
1443 
1444 
1446 
1455  hash<DataProviderMessageInfo> getMessageInfo(string message_id);
1456 
1457 
1459 
1465  hash<string, hash<DataProviderMessageInfo>> getMessageTypes();
1466 
1467 
1469 
1472  __7_ list<hash<DataProviderSummaryInfo>> getChildProviderSummaryInfo();
1473 
1474 
1476 
1478  __7_ list<string> getChildProviderNames();
1479 
1480 
1482 
1489 
1490 
1492 
1499 
1500 
1502 
1511 
1512 
1514 
1518 
1519 
1521 
1530 
1531 
1533 
1540 
1541 
1543 
1550 
1551 
1553 
1558 
1559 
1561 
1566 
1567 
1569 
1573  __7_ hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
1574 
1575 
1577 
1581 
1582 
1584 
1588 
1589 
1591 
1595 
1596 
1598 
1602 
1603 
1605 
1609 
1610 
1612 
1616 
1617 
1619 
1625 
1626 
1628 
1634 
1635 
1637 
1643 
1644 
1646 
1652 
1653 
1655 
1661 
1662 
1664 
1670 
1671 
1673 
1679 
1680 
1682 
1688 
1689 
1691 
1697 
1698 
1700 
1708  __7_ hash<auto> getSearchExpression(__7_ hash<auto> where_cond, __7_ hash<auto> search_options);
1709 
1710 
1712 
1715  private hash<DataProviderExpression> getSimpleArgumentIntern(int role, hash<DataProviderInfo> info,
1716  hash<DataProviderExpressionInfo> expinfo, string key, auto value) {
1717  // remove any unique suffix from key to get field name
1718  key =~ s/:.*//g;
1719  hash<DataProviderExpression> rv;
1720  if (value.typeCode() == NT_HASH && value.op && value.hasKey('arg'));
1721  else {
1722  rv = getEqualityComparisonExpression(role, info, key, value);
1723  }
1724  int caps = role == ER_Search ? info.search_logic_capabilities : 0;
1725  verifyExpression(role, info.expressions, caps, AbstractDataProviderTypeMap."bool", rv);
1726  return rv;
1727  }
1728 
1730 
1735  private hash<DataProviderExpression> getEqualityComparisonExpression(int role, hash<DataProviderInfo> info,
1736  string key, auto value) {
1737  if (!info.expressions.'=');
1738 
1739  return <DataProviderExpression>{
1740  "exp": "=",
1741  "args": (<DataProviderFieldReference>{"field": key},) + value,
1742  };
1743  }
1744 
1746 
1749  static private hash<DataProviderExpressionInfo> getExpression(int role, string exp,
1750  *hash<string, hash<DataProviderExpressionInfo>> expmap) {
1751  __7_ hash<DataProviderExpressionInfo> expinfo = expmap{exp};
1752  if (!expinfo);
1753 
1754  if (!(expinfo.role & role));
1755 
1756  return expinfo;
1757  }
1758 
1760 
1765 
1767 
1770  static auto evalGenericExpressionValue(hash<auto> rec, auto val);
1771  return rv;
1772  };
1773  if (val instanceof hash<DataProviderExpression>);
1774 
1775  return val;
1776  };
1777 
1779 
1782  static auto evalGenericExpression(hash<auto> rec, hash<DataProviderExpression> exp);
1783 
1785 
1795  static bool setDynamicValueCallbacks(code value_needs_resolution, code resolve_value);
1796 
1798 
1806  static verifyExpression(int role, __7_ hash<string, hash<DataProviderExpressionInfo>> expmap, int caps,
1807  AbstractDataProviderType expected_type, hash<DataProviderExpression> exp) {
1808  hash<DataProviderExpressionInfo> expinfo = AbstractDataProvider::getExpression(role, exp.exp, expmap);
1809  return AbstractDataProvider::verifyExpression(role, expinfo, caps, expected_type, exp);
1810  }
1811 
1813 
1821  static verifyExpression(int role, hash<DataProviderExpressionInfo> expinfo, int caps,
1822  AbstractDataProviderType expected_type, hash<DataProviderExpression> exp) {
1823  // check arguments
1824  if (exp.args.lsize() > expinfo.args.size() && !expinfo.varargs);
1825 
1826  map AbstractDataProvider::verifyExpressionArgValue(role, caps, expinfo, exp.args, //), expinfo.args;
1827  if (exp.args.lsize() > expinfo.args.size());
1828 
1829  if (!expected_type.isAssignableFrom(expinfo.return_type));
1830 
1831  }
1832 
1834 
1840  static verifyExpressionArgValue(int role, int caps, hash<DataProviderExpressionInfo> expinfo,
1841  softlist<auto> values, int pos) {
1842  hash<DataProviderSignatureTypeInfo> arginfo = expinfo.args[pos] ?? expinfo.args.last();
1843  if (arginfo.type_code == ST_Any);
1844 
1845  auto val = values[pos];
1846  bool is_exp = val instanceof hash<DataProviderExpression>;
1847  bool is_ref = is_exp ? False : val instanceof hash<DataProviderFieldReference>;
1848 
1849  switch (arginfo.type_code);
1850 
1851  }
1852 
1854 protected:
1855  static bool checkCallbacks();
1856 public:
1857 
1858 
1860 
1862 protected:
1863  __7_ hash<auto> validateCreateOptions(__7_ hash<auto> create_options);
1864 public:
1865 
1866 
1868 
1870 protected:
1871  __7_ hash<auto> validateUpsertOptions(__7_ hash<auto> upsert_options);
1872 public:
1873 
1874 
1876 
1878 protected:
1879  __7_ hash<auto> validateSearchOptions(__7_ hash<auto> search_options);
1880 public:
1881 
1882 
1884 
1886 protected:
1887  __7_ hash<auto> validateRequestOptions(__7_ hash<auto> request_options);
1888 public:
1889 
1890 
1892 
1896 protected:
1897  __7_ hash<auto> validateChildCreateOptions(__7_ hash<auto> child_create_options);
1898 public:
1899 
1900 
1902 
1906 protected:
1907  __7_ hash<auto> validateChildDeleteOptions(__7_ hash<auto> child_delete_options);
1908 public:
1909 
1910 
1912 
1916 protected:
1917  __7_ hash<auto> validateFieldAddOptions(__7_ hash<auto> field_add_options);
1918 public:
1919 
1920 
1922 
1926 protected:
1927  __7_ hash<auto> validateFieldUpdateOptions(__7_ hash<auto> field_update_options);
1928 public:
1929 
1930 
1932 
1936 protected:
1937  __7_ hash<auto> validateFieldDeleteOptions(__7_ hash<auto> field_delete_options);
1938 public:
1939 
1940 
1942 
1946 protected:
1947  __7_ hash<auto> validateSendMessageOptions(__7_ hash<auto> send_message_options);
1948 public:
1949 
1950 
1952 protected:
1953  processConstructorOptions(__7_ hash<string, hash<DataProviderOptionInfo>> option_desc, __7_ hash<auto> options);
1954 public:
1955 
1956 
1958  private __7_ hash<auto> checkOptions(string err, __7_ hash<string, hash<DataProviderOptionInfo>> option_desc,
1959  *hash<auto> options) {
1960  if (!option_desc && options);
1961 
1962  if (__7_ list<string> invalid_keys = keys (options - (keys option_desc)));
1963 
1964  bool updated;
1965  // check types and required keys
1966  foreach hash<auto> i in (option_desc.pairIterator());
1967 
1968  return options;
1969  }
1970 
1972 
1977  private __7_ hash<DataProviderExpression> processSearchParameters(__7_ hash<DataProviderExpression> exp,
1978  *hash<auto> search_options) {
1979  if (!exp);
1980 
1981  checkSearchExpressions();
1982  hash<DataProviderInfo> info = getInfo();
1983  verifyExpression(ER_Search, info.expressions, info.search_logic_capabilities,
1985  return exp;
1986  }
1987 
1989 
1996 protected:
1997  __7_ hash<auto> processFieldValues(__7_ hash<auto> h, __7_ hash<auto> search_options);
1998 public:
1999 
2000 
2002 protected:
2003  error(string err, string fmt);
2004 public:
2005 
2006 
2008 
2013  private __7_ hash<auto> searchFirstRecordImpl(hash<auto> where_cond,
2014  *hash<auto> search_options) {
2015  // scans the whole data set to find a single record
2016  AbstractDataProviderRecordIterator i = searchRecordsImpl(where_cond, search_options);
2017  if (i.next());
2018 
2019  }
2020 
2022 
2029  private __7_ hash<auto> searchSingleRecordImpl(hash<auto> where_cond,
2030  *hash<auto> search_options) {
2031  // scans the whole data set to find a single record
2032  __7_ list<__7_ hash<auto>> records = map $1, searchRecordsImpl(where_cond, search_options);
2033  if (records.lsize() > 1);
2034 
2035  return records[0];
2036  }
2037 
2039 
2043 protected:
2044  __7_ list<string> getChildProviderNamesImpl();
2045 public:
2046 
2047 
2049 
2051 protected:
2052  __7_ AbstractDataProvider getChildProviderImpl(string name);
2053 public:
2054 
2055 
2057 
2063  __7_ hash<string, AbstractDataField> getRecordType(__7_ hash<auto> search_options);
2064 
2065 
2067  __7_ hash<string, AbstractDataField> getSoftRecordType(__7_ hash<auto> search_options);
2068 
2069 
2071  __7_ hash<string, AbstractDataField> getOrNothingRecordType(__7_ hash<auto> search_options);
2072 
2073 
2075 
2078  __7_ hash<string, hash<DataProviderOptionInfo>> getSearchOptions();
2079 
2080 
2082 
2085  __7_ hash<string, hash<DataProviderOptionInfo>> getCreateOptions();
2086 
2087 
2089 
2092  __7_ hash<string, hash<DataProviderOptionInfo>> getUpsertOptions();
2093 
2094 
2096 
2099  __7_ hash<string, hash<DataProviderOptionInfo>> getRequestOptions();
2100 
2101 
2103 
2109  __7_ hash<string, hash<DataProviderOptionInfo>> getChildCreateOptions();
2110 
2111 
2113 
2119  __7_ hash<string, hash<DataProviderOptionInfo>> getChildDeleteOptions();
2120 
2121 
2123 
2129  __7_ hash<string, hash<DataProviderOptionInfo>> getFieldAddOptions();
2130 
2131 
2133 
2139  __7_ hash<string, hash<DataProviderOptionInfo>> getFieldUpdateOptions();
2140 
2141 
2143 
2149  __7_ hash<string, hash<DataProviderOptionInfo>> getFieldDeleteOptions();
2150 
2151 
2153 
2159  __7_ hash<string, hash<DataProviderOptionInfo>> getSendMessageOptions();
2160 
2161 
2163 
2165  string getMessageSupport();
2166 
2167 
2169 
2171  bool supportsRead();
2172 
2173 
2175 
2177  bool supportsBulkRead();
2178 
2179 
2181 
2183  bool supportsCreate();
2184 
2185 
2187 
2189  bool supportsUpdate();
2190 
2191 
2193 
2195  bool supportsUpsert();
2196 
2197 
2199 
2201  bool supportsDelete();
2202 
2203 
2205 
2207  bool supportsNativeSearch();
2208 
2209 
2211 
2213  bool supportsBulkCreate();
2214 
2215 
2217 
2219  bool supportsBulkUpsert();
2220 
2221 
2223 
2225  bool supportsRequest();
2226 
2227 
2229 
2231  bool recordRequiresSearchOptions();
2232 
2233 
2235 
2237  bool hasRecord();
2238 
2239 
2241 
2243  bool supportsCreateChild();
2244 
2245 
2247 
2249  bool supportsDeleteChild();
2250 
2251 
2253 
2255  bool supportsAddField();
2256 
2257 
2259 
2261  bool supportsUpdateField();
2262 
2263 
2265 
2267  bool supportsDeleteField();
2268 
2269 
2271 
2273  bool supportsSchema();
2274 
2275 
2277 
2279  bool supportsSearchExpressions();
2280 
2281 
2283 
2285  bool supportsObservable();
2286 
2287 
2289 
2291  bool supportsMessages();
2292 
2293 
2295 
2297  __7_ object getSchemaType();
2298 
2299 
2301 
2305 protected:
2306  __7_ hash<string, AbstractDataField> getRecordTypeImpl(__7_ hash<auto> search_options);
2307 public:
2308 
2309 
2311 
2318  private AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000,
2319  *hash<auto> where_cond, *hash<auto> search_options) {
2320  return new DefaultBulkRecordIterface(block_size, searchRecordsImpl(where_cond, search_options));
2321  }
2322 
2324 
2329  private AbstractDataProviderRecordIterator searchRecordsImpl(hash<auto> where_cond,
2330  *hash<auto> search_options) {
2331  throwUnimplementedException();
2332  }
2333 
2335 
2343  private AbstractDataProviderRecordIterator requestSearchRecordsImpl(auto req,
2344  *hash<auto> where_cond, *hash<auto> search_options) {
2345  throwUnimplementedException();
2346  }
2347 
2349 
2357 protected:
2358  __7_ hash<auto> createRecordImpl(hash<auto> rec, __7_ hash<auto> create_options);
2359 public:
2360 
2361 
2363 
2368 protected:
2369  string upsertRecordImpl(hash<auto> rec, __7_ hash<auto> upsert_options);
2370 public:
2371 
2372 
2374 
2378  private bool updateSingleRecordImpl(hash<auto> set, hash<auto> where_cond,
2379  *hash<auto> search_options) {
2380  throwUnimplementedException();
2381  }
2382 
2384 
2390  private int updateRecordsImpl(hash<auto> set, __7_ hash<auto> where_cond,
2391  *hash<auto> search_options) {
2392  throwUnimplementedException();
2393  }
2394 
2396 
2402 protected:
2403  int deleteRecordsImpl(__7_ hash<auto> where_cond, __7_ hash<auto> search_options);
2404 public:
2405 
2406 
2408 
2413 protected:
2414  auto doRequestImpl(auto req, __7_ hash<auto> request_options);
2415 public:
2416 
2417 
2419 
2427  private AbstractDataProvider createChildProviderImpl(string name, hash<string, AbstractDataField> fields,
2428  *hash<auto> child_create_options) {
2429  throwUnimplementedException();
2430  }
2431 
2433 
2438 protected:
2439  deleteChildProviderImpl(string name, __7_ hash<auto> child_delete_options);
2440 public:
2441 
2442 
2444 
2450 protected:
2451  addFieldImpl(AbstractDataField field, __7_ hash<auto> field_add_options);
2452 public:
2453 
2454 
2456 
2462 protected:
2463  updateFieldImpl(string name, AbstractDataField field, __7_ hash<auto> field_update_options);
2464 public:
2465 
2466 
2468 
2473 protected:
2474  deleteFieldImpl(string name, __7_ hash<auto> field_delete_options);
2475 public:
2476 
2477 
2479 
2486 protected:
2487  sendMessageImpl(string message_id, auto msg, __7_ hash<auto> send_message_options);
2488 public:
2489 
2490 
2492 
2496 protected:
2497  object getSchemaObjectImpl();
2498 public:
2499 
2500 
2502 
2506 protected:
2507  __7_ AbstractDataProviderType getRequestTypeImpl();
2508 public:
2509 
2510 
2512 
2516 protected:
2517  __7_ AbstractDataProviderType getResponseTypeImpl();
2518 public:
2519 
2520 
2522 
2526 protected:
2527  __7_ hash<string, AbstractDataProviderType> getErrorResponseTypesImpl();
2528 public:
2529 
2530 
2532 
2538 protected:
2539  AbstractDataProviderType getErrorResponseTypeImpl(string error_code);
2540 public:
2541 
2542 
2544 
2554 protected:
2555  hash<DataProviderMessageInfo> getEventInfoImpl(string event_id);
2556 public:
2557 
2558 
2560 
2566 protected:
2567  hash<string, hash<DataProviderMessageInfo>> getEventTypesImpl();
2568 public:
2569 
2570 
2572 
2580 protected:
2581  hash<DataProviderMessageInfo> getMessageInfoImpl(string message_id);
2582 public:
2583 
2584 
2586 
2592 protected:
2593  hash<string, hash<DataProviderMessageInfo>> getMessageTypesImpl();
2594 public:
2595 
2596 
2598 
2600 protected:
2601  throwUnimplementedException();
2602 public:
2603 
2604 
2606  abstract string getName();
2607 
2609 protected:
2610  abstract hash<DataProviderInfo> getStaticInfoImpl();
2611 public:
2612 }
2613 }
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:692
static code cb_resolve_value
static callback for dynamic value resolution
Definition: AbstractDataProvider.qc.dox.h:943
const GenericExpressions
Generic search operator expressions.
Definition: AbstractDataProvider.qc.dox.h:926
__7_ hash< string, hash< MapperRuntimeKeyInfo > > getMapperRuntimeKeys()
Returns custom data mapper runtime keys.
checkDeleteChild()
Ensures that the data provider supports deleting children.
deleteChildProvider(string name, __7_ hash< auto > child_delete_options)
Deletes a child data provider.
__7_ 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:929
__7_ hash< string, AbstractDataProviderType > getErrorResponseTypes()
Returns a hash of error responses, if any.
__7_ 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(__7_ 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:696
checkUpdateField()
Ensures that the data provider supports updating fields.
sendMessage(string message_id, auto msg, __7_ hash< auto > send_message_options)
Sends a message from message-capable data providers.
checkObservable()
Ensures that the data provider supports observer pattern / event API.
__7_ 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:951
commit()
Commits data written to the data provider.
bool updateSingleRecord(hash< auto > set, hash< DataProviderExpression > where_cond, __7_ 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(__7_ hash< auto > search_options)
Returns an iterator iterating all records.
AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size=1000, __7_ 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:1122
constructor()
Creates the data provider.
__7_ hash< auto > createRecord(hash< auto > rec, __7_ 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, __7_ hash< auto > field_delete_options)
Deletes an existing field.
int deleteRecords(__7_ hash< DataProviderExpression > where_cond, __7_ 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:1749
__7_ Logger logger
Logger for logging.
Definition: AbstractDataProvider.qc.dox.h:934
rollback()
Rolls back data written to the data provider.
int updateRecords(hash< auto > set, __7_ hash< DataProviderExpression > where_cond, __7_ 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.
__7_ hash< auto > searchFirstRecord(hash< DataProviderExpression > where_cond, __7_ hash< auto > search_options)
Returns the first record matching the search options.
__7_ 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:937
AbstractDataProviderRecordIterator requestSearchRecords(auto req, __7_ 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:1182
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, __7_ hash< auto > search_options)
Updates a single record matching the search options.
auto doRequest(auto req, __7_ 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:940
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:1715
__7_ string getDesc()
Returns the data provider description.
__7_ hash< auto > searchFirstRecord(hash< auto > where_cond, __7_ 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:1084
int updateRecords(hash< auto > set, __7_ hash< auto > where_cond, __7_ hash< auto > search_options)
Updates zero or more records matching the search options.
__7_ hash< auto > searchSingleRecord(hash< auto > where_cond, __7_ hash< auto > search_options)
Returns a single record matching the search options.
hash< DataProviderSummaryInfo > getSummaryInfo()
Return data provider summary info.
__7_ hash< auto > getSearchExpression(__7_ hash< auto > where_cond, __7_ hash< auto > search_options)
Returns a search expression for a standard search hash.
__7_ hash< auto > searchSingleRecord(hash< DataProviderExpression > where_cond, __7_ 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(__7_ hash< auto > where_cond, __7_ 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(__7_ 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:1139
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.
__7_ list< string > getChildProviderNames()
Returns a list of child data provider names, if any.
addField(AbstractDataField field, __7_ 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:1301
string upsertRecord(hash< auto > rec, __7_ hash< auto > upsert_options)
Upserts the given record in the data provider.
updateField(string name, AbstractDataField field, __7_ 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:1735
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, __7_ 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:1166
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:1102
int deleteRecords(__7_ hash< auto > where_cond, __7_ 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, __7_ hash< auto > options, __7_ 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 __7_ 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
__7_ hash< string, hash< DataProviderMessageInfo > > events
hash of observable events and event types
Definition: AbstractDataProvider.qc.dox.h:659
bool supports_bulk_read
Does the data provider support native / optimized bulk reads?
Definition: AbstractDataProvider.qc.dox.h:465
__7_ hash< string, hash< DataProviderOptionInfo > > add_field_options
Add field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:624
__7_ hash< string, hash< DataProviderMessageInfo > > messages
List of output message IDs and message types.
Definition: AbstractDataProvider.qc.dox.h:666
bool transaction_management
Does the data provider require transaction management?
Definition: AbstractDataProvider.qc.dox.h:496
__7_ hash< string, hash< DataProviderExpressionInfo > > expressions
Expressions (operators and functions) supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:652
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
__7_ hash< string, hash< DataProviderOptionInfo > > child_delete_options
Child deletion options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:617
bool supports_native_search
Does the data provider support native record searching?
Definition: AbstractDataProvider.qc.dox.h:457
__7_ hash< string, hash< DataProviderOptionInfo > > request_options
Request options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:603
__7_ hash< string, hash< DataProviderOptionInfo > > search_options
Search options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:598
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
__7_ hash< string, hash< DataProviderOptionInfo > > child_create_options
Child creation options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:610
hash< string, hash< MapperRuntimeKeyInfo > > mapper_keys
A hash of mapper key information.
Definition: AbstractDataProvider.qc.dox.h:678
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
__7_ hash< string, hash< DataProviderOptionInfo > > upsert_options
Upsert options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:593
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
__7_ 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:583
__7_ hash< string, hash< DataProviderOptionInfo > > create_options
Create options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:588
bool supports_create
Does the data provider support record creation?
Definition: AbstractDataProvider.qc.dox.h:437
__7_ list< string > children
A list of child data providers in this data provider.
Definition: AbstractDataProvider.qc.dox.h:688
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
__7_ hash< string, hash< DataProviderOptionInfo > > delete_field_options
Delete field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:638
__7_ hash< string, hash< DataProviderOptionInfo > > send_message_options
Send message options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:645
bool supports_children
Does the data provider support children?
Definition: AbstractDataProvider.qc.dox.h:491
__7_ hash< string, hash< DataProviderOptionInfo > > update_field_options
Update field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:631
__7_ string desc
A markdown description of the data provider.
Definition: AbstractDataProvider.qc.dox.h:683
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:671
__7_ string schema_type
Returns the schema type supported by this data provider.
Definition: AbstractDataProvider.qc.dox.h:578
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
__7_ 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