Qore DataProvider Module Reference  2.4
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 DataProviderOptionInfo {
51  softlist<AbstractDataProviderType> type;
52 
54  bool required = False;
55 
57  string desc;
58 
61 };
62 
64 public struct DataProviderSummaryInfo {
66  string name;
67 
69  string desc;
70 
72  string type;
73 
76 
79 
82 
85 
88 
91 
93 
97 
99 
103 
105 
109 
112 
115 
118 
121 
124 };
125 
132 const ST_Any = 1;
133 
135 const ST_Value = 2;
136 
138 
141 const ST_Field = 3;
143 
146  ST_Any: "any",
147  ST_Value: "value",
148  ST_Field: "field reference",
149 };
150 
152 const SignatureTypeDescMap = map {$1.value: $1.key.toInt()}, SignatureTypeCodeMap.pairIterator();
153 
160 const ER_Search = (1 << 0);
161 
163 const ER_Field = (1 << 1);
164 
168 
170 const RoleCodeMap = {
171  ER_Search: "search",
172 };
173 
175 const RoleDescMap = map {$1.value: $1.key.toInt()}, RoleCodeMap.pairIterator();
176 
183 const LC_And = (1 << 0);
184 
186 const LC_Or = (1 << 1);
187 
189 const LC_All = (LC_And | LC_Or);
191 
193 const LogicCodeMap = {
194  LC_And: "AND",
195  LC_Or: "OR",
196 };
197 
199 const LogicDescMap = map {$1.value: $1.key.toInt()}, LogicCodeMap.pairIterator();
200 
205 
208 };
209 
212  "type": AbstractDataProviderTypeMap."any",
213  "type_code": ST_Field,
214 };
215 
218  "type": AbstractDataProviderTypeMap."any",
219  "type_code": ST_Any,
220 };
221 
224  "type": AbstractDataProviderTypeMap."string",
225  "type_code": ST_Value,
226 };
227 
230  "type": AbstractDataProviderTypeMap."*string",
231  "type_code": ST_Value,
232 };
233 
236  "type": AbstractDataProviderTypeMap."int",
237  "type_code": ST_Value,
238 };
239 
242  "type": AbstractDataProviderTypeMap."*int",
243  "type_code": ST_Value,
244 };
245 
248  "type": AbstractDataProviderTypeMap."list",
249  "type_code": ST_Value,
250 };
251 
254  "type": AbstractDataProviderTypeMap."hash",
255  "type_code": ST_Value,
256 };
257 
260  "type": AbstractDataProviderTypeMap."bool",
261  "type_code": ST_Any,
262 };
263 
266  "type": AbstractDataProviderTypeMap."string",
267  "type_code": ST_Any,
268 };
269 
272  "type": AbstractDataProviderTypeMap."date",
273  "type_code": ST_Any,
274 };
275 
282 const DET_Operator = 1;
283 
285 const DET_Function = 2;
287 
290  DET_Operator: "operator",
291  DET_Function: "function",
292 };
293 
295 const ExpressionTypeDescMap = map {$1.value: $1.key.toInt()}, ExpressionTypeCodeMap.pairIterator();
296 
300  int type;
301 
303 
305  string label;
306 
308  string name;
309 
311  string desc;
312 
314  string symbol;
315 
317 
319  int role = ER_All;
320 
322  softlist<hash<DataProviderSignatureTypeInfo>> args;
323 
326 
328  bool varargs = False;
329 };
330 
334  string field;
335 };
336 
338 public struct DataProviderExpression {
340  string exp;
341 
343 
346  softlist<auto> args;
347 };
348 
350 public struct DataProviderInfo {
352 
354  string name;
355 
357 
359  string type;
360 
362 
365 
367 
370 
372 
375 
377 
380 
382 
385 
387 
390 
392 
398 
400 
406 
408 
414 
416 
419 
421 
424 
426 
429 
431 
434 
436 
439 
441 
446 
448 
453 
455 
460 
462 
467 
469 
474 
476 
481 
483 
488 
490 
493  *string schema_type;
494 
496 
498  *hash<string, hash<DataProviderOptionInfo>> constructor_options;
499 
501 
503  *hash<string, hash<DataProviderOptionInfo>> create_options;
504 
506 
508  *hash<string, hash<DataProviderOptionInfo>> upsert_options;
509 
511 
513  *hash<string, hash<DataProviderOptionInfo>> search_options;
514 
516 
518  *hash<string, hash<DataProviderOptionInfo>> request_options;
519 
521 
525  *hash<string, hash<DataProviderOptionInfo>> child_create_options;
526 
528 
532  *hash<string, hash<DataProviderOptionInfo>> child_delete_options;
533 
535 
539  *hash<string, hash<DataProviderOptionInfo>> add_field_options;
540 
542 
546  *hash<string, hash<DataProviderOptionInfo>> update_field_options;
547 
549 
553  *hash<string, hash<DataProviderOptionInfo>> delete_field_options;
554 
556 
560  *hash<string, hash<DataProviderExpressionInfo>> expressions;
561 
563 
566 
568 
572  hash<string, hash<MapperRuntimeKeyInfo>> mapper_keys = Mapper::MapperKeyInfo;
573 
575 
577  *string desc;
578 
580 
582  *list<string> children;
583 };
584 
587 
588 public:
591  DP_OP_AND: {
593  "type": DET_Operator,
594  "label": DP_OP_AND,
595  "name": "and (&&)",
596  "desc": "logical AND operation supporting logic short-circuiting",
597  "symbol": "&&",
599  "varargs": True,
600  "return_type": AbstractDataProviderTypeMap."bool",
601  },
602  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
603  foreach auto arg in (exp.args) {
605  return False;
606  }
607  }
608  return True;
609  },
610  },
611  DP_OP_OR: {
613  "type": DET_Operator,
614  "label": DP_OP_OR,
615  "name": "or (||)",
616  "desc": "logical OR operation supporting logic short-circuiting",
617  "symbol": "||",
619  "varargs": True,
620  "return_type": AbstractDataProviderTypeMap."bool",
621  },
622  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
623  foreach auto arg in (exp.args) {
625  return True;
626  }
627  }
628  return False;
629  },
630  },
631  DP_SEARCH_OP_EQ: {
633  "type": DET_Operator,
634  "label": DP_SEARCH_OP_EQ,
635  "name": "equals (=)",
636  "desc": "a value for equality comparisons; the type of the value should correspond to the field "
637  "type",
638  "symbol": "==",
640  "return_type": AbstractDataProviderTypeMap."bool",
641  },
642  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
643  auto arg0 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]);
644  auto arg1 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
645  // for backwards compatibility, if the first argument is a field reference, and the second is a
646  # hash
647 
648  return arg0 == arg1;
649  },
650  },
651  DP_SEARCH_OP_NE: {
653  "type": DET_Operator,
654  "label": DP_SEARCH_OP_NE,
655  "name": "not equals (!=)",
656  "desc": "a value for not-equals comparisons; the type of the value should correspond to the "
657  "field type",
658  "symbol": "!=",
660  "return_type": AbstractDataProviderTypeMap."bool",
661  },
662  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
665  },
666  },
667  DP_SEARCH_OP_LT: {
669  "type": DET_Operator,
670  "label": DP_SEARCH_OP_LT,
671  "name": "less than (<)",
672  "desc": "a value for less than comparisons; if the field value is less than the argument, then "
673  "the operation returns true; the type of the value should correspond to the field type",
674  "symbol": "<",
676  "return_type": AbstractDataProviderTypeMap."bool",
677  },
678  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
681  },
682  },
683  DP_SEARCH_OP_LE: {
685  "type": DET_Operator,
686  "label": DP_SEARCH_OP_LE,
687  "name": "less than or equals (<=)",
688  "desc": "a value for less than or equals comparisons; if the field value is less than or equal "
689  "to the argument, then the operation returns true; the type of the value should correspond "
690  "to the field type",
691  "symbol": "<=",
693  "return_type": AbstractDataProviderTypeMap."bool",
694  },
695  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
698  },
699  },
700  DP_SEARCH_OP_GT: {
702  "type": DET_Operator,
703  "label": DP_SEARCH_OP_GT,
704  "name": "greater than (>)",
705  "desc": "a value for less than comparisons; if the field value is less than the argument, then "
706  "the operation returns true; the type of the value should correspond to the field type",
707  "symbol": ">",
709  "return_type": AbstractDataProviderTypeMap."bool",
710  },
711  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
714  },
715  },
716  DP_SEARCH_OP_GE: {
718  "type": DET_Operator,
719  "label": DP_SEARCH_OP_GE,
720  "name": "greater than or equals (>=)",
721  "desc": "a value for greater than or equals comparisons; if the field value is greater than or "
722  "equal to the argument, then the operation returns true; the type of the value should "
723  "correspond to the field type",
724  "symbol": ">=",
726  "return_type": AbstractDataProviderTypeMap."bool",
727  },
728  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
731  },
732  },
735  "type": DET_Operator,
736  "label": DP_SEARCH_OP_BETWEEN,
737  "name": "between",
738  "desc": "A list with two elements giving the lower and upper bounds of the field value; the list "
739  "element value types must be equal to the field's type",
740  "symbol": "between",
741  "args": (
745  ),
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  return arg0 > AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1])
752  },
753  },
754  DP_SEARCH_OP_IN: {
756  "type": DET_Operator,
757  "label": DP_SEARCH_OP_IN,
758  "name": "in",
759  "desc": "A list giving possible values of the field; if the field's value matches any of the "
760  "values in the list, then the operation returns true; element value types must be equal to "
761  "the field's type",
762  "symbol": "in",
764  "return_type": AbstractDataProviderTypeMap."bool",
765  "varargs": True,
766  },
767  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
770  },
771  },
774  "type": DET_Operator,
775  "label": DP_SEARCH_OP_NOT,
776  "name": "logical not (!)",
777  "desc": "This operator reverses the logcal value of the operator expression given as an argument",
778  "symbol": "!",
780  "return_type": AbstractDataProviderTypeMap."bool",
781  },
782  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
784  },
785  },
788  "type": DET_Operator,
789  "label": DP_SEARCH_OP_REGEX,
790  "name": "regular expression match",
791  "desc": "regular expression operator; the first argument will be processed with the second as a "
792  "regular expression pattern",
793  "symbol": "regex",
794  "args": (
797  "type": (new HashDataType())
798  .addField(new QoreDataField("pattern", "the regular expression pattern",
799  AbstractDataProviderTypeMap."string"))
800  .addField(new QoreDataField("options", "regular expression options",
802  },
803  ),
804  "return_type": AbstractDataProviderTypeMap."bool",
805  },
806  "impl": auto sub (hash<auto> rec, hash<DataProviderExpression> exp) {
807  auto arg1 = AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[1]);
808  return regex(AbstractDataProvider::evalGenericExpressionValue(rec, exp.args[0]).toString(),
809  arg1.pattern, arg1.options);
810  },
811  },
812  };
813 
815 
820  const GenericExpressions = map {$1.key: $1.value.exp}, GenericExpressionImplementations.pairIterator();
821 
823  const DataProviderSummaryInfoKeys = map $1.getName(),
824  TypedHash::forName("DataProviderSummaryInfo").getMembers();
825 
826 protected:
828  Logger logger;
829 
831  static bool callbacks_locked = False;
832 
835 
837  static code cb_resolve_value;
838 
840 
846  "columns": <DataProviderOptionInfo>{
847  "type": AbstractDataProviderTypeMap."any",
848  "desc": "allows a subset of fields to be output in searches",
849  },
850  "limit": <DataProviderOptionInfo>{
851  "type": AbstractDataProviderType::get(IntType),
852  "desc": "the maximum number of records to return",
853  },
854  "offset": <DataProviderOptionInfo>{
855  "type": AbstractDataProviderType::get(IntType),
856  "desc": "the offset number in records to return",
857  },
858  };
859 
860 public:
861 
864 
865 
868 
869 
871  setLogger(Logger logger);
872 
873 
875 
879  hash<auto> getInfoAsData(*bool with_type_info);
880 
881 
883  hash<DataProviderInfo> getInfo();
884 
885 
887  hash<DataProviderSummaryInfo> getSummaryInfo();
888 
889 
891  *string getDesc();
892 
893 
895 
905  *hash<auto> createRecord(hash<auto> rec, *hash<auto> create_options);
906 
907 
909 
916  string upsertRecord(hash<auto> rec, *hash<auto> upsert_options);
917 
918 
920 
927  *hash<auto> searchFirstRecord(hash<DataProviderExpression> where_cond, *hash<auto> search_options);
928 
929 
931 
936  *hash<auto> searchFirstRecord(hash<auto> where_cond, *hash<auto> search_options);
937 
938 
940 
948  *hash<auto> searchSingleRecord(hash<DataProviderExpression> where_cond, *hash<auto> search_options);
949 
950 
952 
958  *hash<auto> searchSingleRecord(hash<auto> where_cond, *hash<auto> search_options);
959 
960 
962 
967 
968 
970 
979  *hash<auto> search_options) {
980  checkRead();
981  return searchRecordsBulk(block_size, NOTHING, validateSearchOptions(search_options));
982  }
983 
985 
997  *hash<DataProviderExpression> where_cond, *hash<auto> search_options) {
998  checkRead();
999  if (block_size <= 0);
1000 
1001  search_options = validateSearchOptions(search_options);
1002  return searchRecordsBulkImpl(block_size, processSearchParameters(where_cond, search_options),
1003  search_options);
1004  }
1005 
1007 
1016  AbstractDataProviderBulkRecordInterface searchRecordsBulk(int block_size = 1000, *hash<auto> where_cond,
1017  *hash<auto> search_options) {
1018  checkRead();
1019  if (block_size <= 0);
1020 
1021  search_options = validateSearchOptions(search_options);
1022  return searchRecordsBulkImpl(block_size, getSearchExpression(where_cond, search_options), search_options);
1023  }
1024 
1026 
1033  AbstractDataProviderRecordIterator searchRecords(*hash<DataProviderExpression> where_cond,
1034  *hash<auto> search_options) {
1035  checkRead();
1036  search_options = validateSearchOptions(search_options);
1037  return searchRecordsImpl(processSearchParameters(where_cond, search_options), search_options);
1038  }
1039 
1041 
1046  AbstractDataProviderRecordIterator searchRecords(*hash<auto> where_cond, *hash<auto> search_options);
1047 
1048 
1050 
1060  AbstractDataProviderRecordIterator requestSearchRecords(auto req, *hash<DataProviderExpression> where_cond,
1061  *hash<auto> search_options) {
1062  checkRead();
1063  checkRequest();
1064  return requestSearchRecordsImpl(req, processSearchParameters(where_cond, search_options), search_options);
1065  }
1066 
1068 
1077  *hash<auto> search_options) {
1078  checkRead();
1079  checkRequest();
1080  return requestSearchRecordsImpl(req, getSearchExpression(where_cond, search_options), search_options);
1081  }
1082 
1084 
1095  bool updateSingleRecord(hash<auto> set, hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1096 
1097 
1099 
1108  bool updateSingleRecord(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options);
1109 
1110 
1112 
1124  int updateRecords(hash<auto> set, *hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1125 
1126 
1128 
1138  int updateRecords(hash<auto> set, *hash<auto> where_cond, *hash<auto> search_options);
1139 
1140 
1142 
1154  int deleteRecords(*hash<DataProviderExpression> where_cond, *hash<auto> search_options);
1155 
1156 
1158 
1168  int deleteRecords(*hash<auto> where_cond, *hash<auto> search_options);
1169 
1170 
1172 
1180  auto doRequest(auto req, *hash<auto> request_options);
1181 
1182 
1184 
1195  AbstractDataProvider createChildProvider(string name, hash<string, AbstractDataField> fields,
1196  *hash<auto> child_create_options) {
1197  checkCreateChild();
1198  child_create_options = validateChildCreateOptions(child_create_options);
1199  if (!fields);
1200 
1201  on_error if (1.err != 'CREATE-CHILD-PROVIDER-ERROR');
1202 
1203  return createChildProviderImpl(name, fields, child_create_options);
1204  }
1205 
1207 
1215  deleteChildProvider(string name, *hash<auto> child_delete_options);
1216 
1217 
1219 
1228  addField(AbstractDataField field, *hash<auto> field_add_options);
1229 
1230 
1232 
1241  updateField(string name, AbstractDataField field, *hash<auto> field_update_options);
1242 
1243 
1245 
1253  deleteField(string name, *hash<auto> field_delete_options);
1254 
1255 
1257 
1264 
1265 
1267 
1272 
1273 
1275 
1280 
1281 
1283 
1287  *hash<string, AbstractDataProviderType> getErrorResponseTypes();
1288 
1289 
1291 
1299 
1300 
1302 
1305  *list<hash<DataProviderSummaryInfo>> getChildProviderSummaryInfo();
1306 
1307 
1309 
1311  *list<string> getChildProviderNames();
1312 
1313 
1315 
1322 
1323 
1325 
1332 
1333 
1335 
1344 
1345 
1347 
1351 
1352 
1354 
1363 
1364 
1366 
1373 
1374 
1376 
1383 
1384 
1386 
1391 
1392 
1394 
1399 
1400 
1402 
1406  *hash<string, hash<MapperRuntimeKeyInfo>> getMapperRuntimeKeys();
1407 
1408 
1410 
1414 
1415 
1417 
1421 
1422 
1424 
1428 
1429 
1431 
1435 
1436 
1438 
1442 
1443 
1445 
1449 
1450 
1452 
1458 
1459 
1461 
1467 
1468 
1470 
1476 
1477 
1479 
1485 
1486 
1488 
1494 
1495 
1497 
1503 
1504 
1506 
1512 
1513 
1515 
1523  *hash<auto> getSearchExpression(*hash<auto> where_cond, *hash<auto> search_options);
1524 
1525 
1527 
1530  private hash<DataProviderExpression> getSimpleArgumentIntern(int role, hash<DataProviderInfo> info,
1531  hash<DataProviderExpressionInfo> expinfo, string key, auto value) {
1532  // remove any unique suffix from key to get field name
1533  key =~ s/:.*//g;
1534  hash<DataProviderExpression> rv;
1535  if (value.typeCode() == NT_HASH && value.op && value.hasKey('arg'));
1536  else {
1537  rv = getEqualityComparisonExpression(role, info, key, value);
1538  }
1539  int caps = role == ER_Search ? info.search_logic_capabilities : 0;
1540  verifyExpression(role, info.expressions, caps, AbstractDataProviderTypeMap."bool", rv);
1541  return rv;
1542  }
1543 
1545 
1550  private hash<DataProviderExpression> getEqualityComparisonExpression(int role, hash<DataProviderInfo> info,
1551  string key, auto value) {
1552  if (!info.expressions.'=');
1553 
1554  return <DataProviderExpression>{
1555  "exp": "=",
1556  "args": (<DataProviderFieldReference>{"field": key},) + value,
1557  };
1558  }
1559 
1561 
1564  static private hash<DataProviderExpressionInfo> getExpression(int role, string exp,
1565  *hash<string, hash<DataProviderExpressionInfo>> expmap) {
1566  *hash<DataProviderExpressionInfo> expinfo = expmap{exp};
1567  if (!expinfo);
1568 
1569  if (!(expinfo.role & role));
1570 
1571  return expinfo;
1572  }
1573 
1575 
1580 
1582 
1585  static auto evalGenericExpressionValue(hash<auto> rec, auto val);
1586  return rv;
1587  };
1588  if (val instanceof hash<DataProviderExpression>);
1589 
1590  return val;
1591  };
1592 
1594 
1597  static auto evalGenericExpression(hash<auto> rec, hash<DataProviderExpression> exp);
1598 
1600 
1610  static bool setDynamicValueCallbacks(code value_needs_resolution, code resolve_value);
1611 
1613 
1621  static verifyExpression(int role, *hash<string, hash<DataProviderExpressionInfo>> expmap, int caps,
1622  AbstractDataProviderType expected_type, hash<DataProviderExpression> exp) {
1623  hash<DataProviderExpressionInfo> expinfo = AbstractDataProvider::getExpression(role, exp.exp, expmap);
1624  return AbstractDataProvider::verifyExpression(role, expinfo, caps, expected_type, exp);
1625  }
1626 
1628 
1636  static verifyExpression(int role, hash<DataProviderExpressionInfo> expinfo, int caps,
1637  AbstractDataProviderType expected_type, hash<DataProviderExpression> exp) {
1638  // check arguments
1639  if (exp.args.lsize() > expinfo.args.size() && !expinfo.varargs);
1640 
1641  map AbstractDataProvider::verifyExpressionArgValue(role, caps, expinfo, exp.args, //), expinfo.args;
1642  if (exp.args.lsize() > expinfo.args.size());
1643 
1644  if (!expected_type.isAssignableFrom(expinfo.return_type));
1645 
1646  }
1647 
1649 
1655  static verifyExpressionArgValue(int role, int caps, hash<DataProviderExpressionInfo> expinfo,
1656  softlist<auto> values, int pos) {
1657  hash<DataProviderSignatureTypeInfo> arginfo = expinfo.args[pos] ?? expinfo.args.last();
1658  if (arginfo.type_code == ST_Any);
1659 
1660  auto val = values[pos];
1661  bool is_exp = val instanceof hash<DataProviderExpression>;
1662  bool is_ref = is_exp ? False : val instanceof hash<DataProviderFieldReference>;
1663 
1664  switch (arginfo.type_code);
1665 
1666  }
1667 
1669 protected:
1670  static bool checkCallbacks();
1671 public:
1672 
1673 
1675 
1677 protected:
1678  *hash<auto> validateCreateOptions(*hash<auto> create_options);
1679 public:
1680 
1681 
1683 
1685 protected:
1686  *hash<auto> validateUpsertOptions(*hash<auto> upsert_options);
1687 public:
1688 
1689 
1691 
1693 protected:
1694  *hash<auto> validateSearchOptions(*hash<auto> search_options);
1695 public:
1696 
1697 
1699 
1701 protected:
1702  *hash<auto> validateRequestOptions(*hash<auto> request_options);
1703 public:
1704 
1705 
1707 
1711 protected:
1712  *hash<auto> validateChildCreateOptions(*hash<auto> child_create_options);
1713 public:
1714 
1715 
1717 
1721 protected:
1722  *hash<auto> validateChildDeleteOptions(*hash<auto> child_delete_options);
1723 public:
1724 
1725 
1727 
1731 protected:
1732  *hash<auto> validateFieldAddOptions(*hash<auto> field_add_options);
1733 public:
1734 
1735 
1737 
1741 protected:
1742  *hash<auto> validateFieldUpdateOptions(*hash<auto> field_update_options);
1743 public:
1744 
1745 
1747 
1751 protected:
1752  *hash<auto> validateFieldDeleteOptions(*hash<auto> field_delete_options);
1753 public:
1754 
1755 
1757 protected:
1758  processConstructorOptions(*hash<string, hash<DataProviderOptionInfo>> option_desc, *hash<auto> options);
1759 public:
1760 
1761 
1763  private *hash<auto> checkOptions(string err, *hash<string, hash<DataProviderOptionInfo>> option_desc,
1764  *hash<auto> options) {
1765  if (!option_desc && options);
1766 
1767  if (*list<string> invalid_keys = keys (options - (keys option_desc)));
1768 
1769  bool updated;
1770  // check types and required keys
1771  foreach hash<auto> i in (option_desc.pairIterator());
1772 
1773  return options;
1774  }
1775 
1777 
1782  private *hash<DataProviderExpression> processSearchParameters(*hash<DataProviderExpression> exp,
1783  *hash<auto> search_options) {
1784  if (!exp);
1785 
1786  checkSearchExpressions();
1787  hash<DataProviderInfo> info = getInfo();
1788  verifyExpression(ER_Search, info.expressions, info.search_logic_capabilities,
1790  return exp;
1791  }
1792 
1794 
1801 protected:
1802  *hash<auto> processFieldValues(*hash<auto> h, *hash<auto> search_options);
1803 public:
1804 
1805 
1807 protected:
1808  error(string err, string fmt);
1809 public:
1810 
1811 
1813 
1818  private *hash<auto> searchFirstRecordImpl(hash<auto> where_cond,
1819  *hash<auto> search_options) {
1820  // scans the whole data set to find a single record
1821  AbstractDataProviderRecordIterator i = searchRecordsImpl(where_cond, search_options);
1822  if (i.next());
1823 
1824  }
1825 
1827 
1834  private *hash<auto> searchSingleRecordImpl(hash<auto> where_cond,
1835  *hash<auto> search_options) {
1836  // scans the whole data set to find a single record
1837  *list<*hash<auto>> records = map $1, searchRecordsImpl(where_cond, search_options);
1838  if (records.lsize() > 1);
1839 
1840  return records[0];
1841  }
1842 
1844 
1848 protected:
1849  *list<string> getChildProviderNamesImpl();
1850 public:
1851 
1852 
1854 
1856 protected:
1857  *AbstractDataProvider getChildProviderImpl(string name);
1858 public:
1859 
1860 
1862 
1868  *hash<string, AbstractDataField> getRecordType(*hash<auto> search_options);
1869 
1870 
1872  *hash<string, AbstractDataField> getSoftRecordType(*hash<auto> search_options);
1873 
1874 
1876  *hash<string, AbstractDataField> getOrNothingRecordType(*hash<auto> search_options);
1877 
1878 
1880 
1883  *hash<string, hash<DataProviderOptionInfo>> getSearchOptions();
1884 
1885 
1887 
1890  *hash<string, hash<DataProviderOptionInfo>> getCreateOptions();
1891 
1892 
1894 
1897  *hash<string, hash<DataProviderOptionInfo>> getUpsertOptions();
1898 
1899 
1901 
1904  *hash<string, hash<DataProviderOptionInfo>> getRequestOptions();
1905 
1906 
1908 
1914  *hash<string, hash<DataProviderOptionInfo>> getChildCreateOptions();
1915 
1916 
1918 
1924  *hash<string, hash<DataProviderOptionInfo>> getChildDeleteOptions();
1925 
1926 
1928 
1934  *hash<string, hash<DataProviderOptionInfo>> getFieldAddOptions();
1935 
1936 
1938 
1944  *hash<string, hash<DataProviderOptionInfo>> getFieldUpdateOptions();
1945 
1946 
1948 
1954  *hash<string, hash<DataProviderOptionInfo>> getFieldDeleteOptions();
1955 
1956 
1958 
1960  bool supportsRead();
1961 
1962 
1964 
1966  bool supportsBulkRead();
1967 
1968 
1970 
1972  bool supportsCreate();
1973 
1974 
1976 
1978  bool supportsUpdate();
1979 
1980 
1982 
1984  bool supportsUpsert();
1985 
1986 
1988 
1990  bool supportsDelete();
1991 
1992 
1994 
1996  bool supportsNativeSearch();
1997 
1998 
2000 
2002  bool supportsBulkCreate();
2003 
2004 
2006 
2008  bool supportsBulkUpsert();
2009 
2010 
2012 
2014  bool supportsRequest();
2015 
2016 
2018 
2020  bool recordRequiresSearchOptions();
2021 
2022 
2024 
2026  bool hasRecord();
2027 
2028 
2030 
2032  bool supportsCreateChild();
2033 
2034 
2036 
2038  bool supportsDeleteChild();
2039 
2040 
2042 
2044  bool supportsAddField();
2045 
2046 
2048 
2050  bool supportsUpdateField();
2051 
2052 
2054 
2056  bool supportsDeleteField();
2057 
2058 
2060 
2062  bool supportsSchema();
2063 
2064 
2066 
2068  bool supportsSearchExpressions();
2069 
2070 
2072 
2074  *object getSchemaType();
2075 
2076 
2078 
2082 protected:
2083  *hash<string, AbstractDataField> getRecordTypeImpl(*hash<auto> search_options);
2084 public:
2085 
2086 
2088 
2095  private AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000,
2096  *hash<auto> where_cond, *hash<auto> search_options) {
2097  return new DefaultBulkRecordIterface(block_size, searchRecordsImpl(where_cond, search_options));
2098  }
2099 
2101 
2108  /*
2109  private AbstractDataProviderBulkRecordInterface searchRecordsBulkImpl(int block_size = 1000,
2110  *hash<auto> where_cond, *hash<auto> search_options) {
2111  return new DefaultBulkRecordIterface(block_size, searchRecordsImpl(where_cond, search_options));
2112  }
2113  */
2114 
2116 
2121  private AbstractDataProviderRecordIterator searchRecordsImpl(hash<auto> where_cond,
2122  *hash<auto> search_options) {
2123  throwUnimplementedException();
2124  }
2125 
2127 
2132  /*
2133  private AbstractDataProviderRecordIterator searchRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options) {
2134  throwUnimplementedException();
2135  }
2136  */
2137 
2139 
2147  private AbstractDataProviderRecordIterator requestSearchRecordsImpl(auto req,
2148  *hash<auto> where_cond, *hash<auto> search_options) {
2149  throwUnimplementedException();
2150  }
2151 
2153 
2161  /*
2162  private AbstractDataProviderRecordIterator requestSearchRecordsImpl(auto req, *hash<auto> where_cond,
2163  *hash<auto> search_options) {
2164  throwUnimplementedException();
2165  }
2166  */
2167 
2169 
2177 protected:
2178  *hash<auto> createRecordImpl(hash<auto> rec, *hash<auto> create_options);
2179 public:
2180 
2181 
2183 
2188 protected:
2189  string upsertRecordImpl(hash<auto> rec, *hash<auto> upsert_options);
2190 public:
2191 
2192 
2194 
2198  private bool updateSingleRecordImpl(hash<auto> set, hash<auto> where_cond,
2199  *hash<auto> search_options) {
2200  throwUnimplementedException();
2201  }
2202 
2204 
2208  /*
2209  private bool updateSingleRecordImpl(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options) {
2210  throwUnimplementedException();
2211  }
2212  */
2213 
2215 
2221  private int updateRecordsImpl(hash<auto> set, *hash<auto> where_cond,
2222  *hash<auto> search_options) {
2223  throwUnimplementedException();
2224  }
2225 
2227 
2233  /*
2234  private int updateRecordsImpl(hash<auto> set, hash<auto> where_cond, *hash<auto> search_options) {
2235  throwUnimplementedException();
2236  }
2237  */
2238 
2240 
2246 protected:
2247  int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options);
2248 public:
2249 
2250 
2252 
2258  /*
2259  private int deleteRecordsImpl(*hash<auto> where_cond, *hash<auto> search_options) {
2260  throwUnimplementedException();
2261  }
2262  */
2263 
2265 
2270 protected:
2271  auto doRequestImpl(auto req, *hash<auto> request_options);
2272 public:
2273 
2274 
2276 
2284  private AbstractDataProvider createChildProviderImpl(string name, hash<string, AbstractDataField> fields,
2285  *hash<auto> child_create_options) {
2286  throwUnimplementedException();
2287  }
2288 
2290 
2295 protected:
2296  deleteChildProviderImpl(string name, *hash<auto> child_delete_options);
2297 public:
2298 
2299 
2301 
2307 protected:
2308  addFieldImpl(AbstractDataField field, *hash<auto> field_add_options);
2309 public:
2310 
2311 
2313 
2319 protected:
2320  updateFieldImpl(string name, AbstractDataField field, *hash<auto> field_update_options);
2321 public:
2322 
2323 
2325 
2330 protected:
2331  deleteFieldImpl(string name, *hash<auto> field_delete_options);
2332 public:
2333 
2334 
2336 
2340 protected:
2341  object getSchemaObjectImpl();
2342 public:
2343 
2344 
2346 
2350 protected:
2351  *AbstractDataProviderType getRequestTypeImpl();
2352 public:
2353 
2354 
2356 
2360 protected:
2361  *AbstractDataProviderType getResponseTypeImpl();
2362 public:
2363 
2364 
2366 
2370 protected:
2371  *hash<string, AbstractDataProviderType> getErrorResponseTypesImpl();
2372 public:
2373 
2374 
2376 
2382 protected:
2383  AbstractDataProviderType getErrorResponseTypeImpl(string error_code);
2384 public:
2385 
2386 
2388 
2390 protected:
2391  throwUnimplementedException();
2392 public:
2393 
2394 
2396  abstract string getName();
2397 
2399 protected:
2400  abstract hash<DataProviderInfo> getStaticInfoImpl();
2401 public:
2402 }
2403 }
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:586
static code cb_resolve_value
static callback for dynamic value resolution
Definition: AbstractDataProvider.qc.dox.h:837
const GenericExpressions
Generic search operator expressions.
Definition: AbstractDataProvider.qc.dox.h:820
*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.
Logger logger
Logger for logging.
Definition: AbstractDataProvider.qc.dox.h:828
const DataProviderSummaryInfoKeys
A list of members names of the DataProviderSummaryInfoKeys hashdecl.
Definition: AbstractDataProvider.qc.dox.h:823
*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:590
checkUpdateField()
Ensures that the data provider supports updating fields.
*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:845
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:1016
constructor()
Creates the data provider.
*hash< auto > createRecord(hash< auto > rec, *hash< auto > create_options)
Creates the given record in the data provider.
setLogger(Logger logger)
Sets or replaces the logger.
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:1564
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:831
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:1076
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:834
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:1530
*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:978
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.
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.
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:1033
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:1195
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:1550
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:1060
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:996
int deleteRecords(*hash< auto > where_cond, *hash< auto > search_options)
Deletes zero or more records.
checkUpsert()
Ensures that the data provider supports record upserts.
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:166
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 ST_Value
Indicates any literal value of the given type; i.e. not an operator or other expression.
Definition: AbstractDataProvider.qc.dox.h:135
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:241
const DataProviderSignatureStringType
Data provider signature string type.
Definition: AbstractDataProvider.qc.dox.h:265
const DataProviderSignatureDateType
Data provider signature date type.
Definition: AbstractDataProvider.qc.dox.h:271
const LC_Or
Indicates that boolean expressions can be combined with OR logic.
Definition: AbstractDataProvider.qc.dox.h:186
const DataProviderSignatureHashValueType
Data provider signature hash value type.
Definition: AbstractDataProvider.qc.dox.h:253
const ER_Search
Indicates an expression that can be used in a search operation.
Definition: AbstractDataProvider.qc.dox.h:160
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:152
const SignatureTypeCodeMap
Maps signature type codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:145
const DET_Operator
Indicates an operator expression.
Definition: AbstractDataProvider.qc.dox.h:282
const DataProviderSignatureOptionalStringValueType
Data provider signature optional string value type.
Definition: AbstractDataProvider.qc.dox.h:229
const LogicDescMap
Logic map from descriptions to integer codes.
Definition: AbstractDataProvider.qc.dox.h:199
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:183
const DET_Function
Indicates a function expression.
Definition: AbstractDataProvider.qc.dox.h:285
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:211
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:295
const DataProviderSignatureBoolType
Data provider signature bool type.
Definition: AbstractDataProvider.qc.dox.h:259
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:247
const DataProviderSignatureStringValueType
Data provider signature string value type.
Definition: AbstractDataProvider.qc.dox.h:223
const DataProviderSignatureAnyType
Data provider signature any type.
Definition: AbstractDataProvider.qc.dox.h:217
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:141
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:170
const UpsertResultUpdated
Indicates that the record was updated.
Definition: AbstractDataProvider.qc.dox.h:36
const LC_All
Indicates that all logic capabilities are supported.
Definition: AbstractDataProvider.qc.dox.h:189
const ST_Any
Indicates any valid expression that returns the given type (default)
Definition: AbstractDataProvider.qc.dox.h:132
const LogicCodeMap
Logic map from codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:193
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:175
const ER_Field
Indicates an expression that can be used in a field.
Definition: AbstractDataProvider.qc.dox.h:163
const ExpressionTypeCodeMap
Maps DataProvider expression type codes to descriptions.
Definition: AbstractDataProvider.qc.dox.h:289
const DataProviderSignatureIntValueType
Data provider signature int value type.
Definition: AbstractDataProvider.qc.dox.h:235
Data provider expression.
Definition: AbstractDataProvider.qc.dox.h:338
string exp
Expression name.
Definition: AbstractDataProvider.qc.dox.h:340
softlist< auto > args
Expression arguments.
Definition: AbstractDataProvider.qc.dox.h:346
Data provider signature info.
Definition: AbstractDataProvider.qc.dox.h:298
string symbol
The symbol to use when rendering expressions.
Definition: AbstractDataProvider.qc.dox.h:314
string name
The display name.
Definition: AbstractDataProvider.qc.dox.h:308
string label
The label used for the expression.
Definition: AbstractDataProvider.qc.dox.h:305
bool varargs
The last argument can be repeated indefinitely.
Definition: AbstractDataProvider.qc.dox.h:328
int role
The expression role code / bitfield.
Definition: AbstractDataProvider.qc.dox.h:319
int type
The type of expression; see DataProvider Expression Type Codes.
Definition: AbstractDataProvider.qc.dox.h:300
softlist< hash< DataProviderSignatureTypeInfo > > args
Argument types.
Definition: AbstractDataProvider.qc.dox.h:322
string desc
The description of the operation.
Definition: AbstractDataProvider.qc.dox.h:311
AbstractDataProviderType return_type
The return type.
Definition: AbstractDataProvider.qc.dox.h:325
Data provider field reference.
Definition: AbstractDataProvider.qc.dox.h:332
string field
The name of the field being referenced.
Definition: AbstractDataProvider.qc.dox.h:334
Data provider info.
Definition: AbstractDataProvider.qc.dox.h:350
bool supports_delete
Does the data provider support record deletion?
Definition: AbstractDataProvider.qc.dox.h:384
bool supports_bulk_read
Does the data provider support native / optimized bulk reads?
Definition: AbstractDataProvider.qc.dox.h:397
*hash< string, hash< DataProviderOptionInfo > > add_field_options
Add field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:539
bool transaction_management
Does the data provider require transaction management?
Definition: AbstractDataProvider.qc.dox.h:428
*hash< string, hash< DataProviderExpressionInfo > > expressions
Expressions (operators and functions) supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:560
bool supports_child_delete
Does the data provider support deleting new child providers?
Definition: AbstractDataProvider.qc.dox.h:452
string type
The name of the provider type.
Definition: AbstractDataProvider.qc.dox.h:359
bool supports_delete_field
Does the data provider support deleting fields?
Definition: AbstractDataProvider.qc.dox.h:473
bool supports_child_create
Does the data provider support creating new child providers?
Definition: AbstractDataProvider.qc.dox.h:445
*hash< string, hash< DataProviderOptionInfo > > child_delete_options
Child deletion options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:532
bool supports_native_search
Does the data provider support native record searching?
Definition: AbstractDataProvider.qc.dox.h:389
*hash< string, hash< DataProviderOptionInfo > > request_options
Request options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:518
*hash< string, hash< DataProviderOptionInfo > > search_options
Search options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:513
string name
Data provider name.
Definition: AbstractDataProvider.qc.dox.h:354
bool supports_add_field
Does the data provider support adding new fields?
Definition: AbstractDataProvider.qc.dox.h:459
bool supports_bulk_upsert
Does the data provider support native / optimized bulk upserts?
Definition: AbstractDataProvider.qc.dox.h:413
*hash< string, hash< DataProviderOptionInfo > > child_create_options
Child creation options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:525
hash< string, hash< MapperRuntimeKeyInfo > > mapper_keys
A hash of mapper key information.
Definition: AbstractDataProvider.qc.dox.h:572
bool supports_read
Does the data provider support reading.
Definition: AbstractDataProvider.qc.dox.h:364
bool record_requires_search_options
Do we require search options to retrieve the record type?
Definition: AbstractDataProvider.qc.dox.h:438
bool supports_update
Does the data provider support record updates?
Definition: AbstractDataProvider.qc.dox.h:374
bool supports_search_expressions
Does this data provide support advanced search experssions?
Definition: AbstractDataProvider.qc.dox.h:487
*hash< string, hash< DataProviderOptionInfo > > upsert_options
Upsert options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:508
bool supports_update_field
Does the data provider support updating existing fields?
Definition: AbstractDataProvider.qc.dox.h:466
bool supports_request
Does the data provider support the request API?
Definition: AbstractDataProvider.qc.dox.h:418
*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:498
*hash< string, hash< DataProviderOptionInfo > > create_options
Create options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:503
bool supports_create
Does the data provider support record creation?
Definition: AbstractDataProvider.qc.dox.h:369
*list< string > children
A list of child data providers in this data provider.
Definition: AbstractDataProvider.qc.dox.h:582
bool supports_upsert
Does the data provider support record upserts (create or update)?
Definition: AbstractDataProvider.qc.dox.h:379
bool supports_bulk_create
Does the data provider support native / optimized bulk creation?
Definition: AbstractDataProvider.qc.dox.h:405
*hash< string, hash< DataProviderOptionInfo > > delete_field_options
Delete field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:553
bool supports_children
Does the data provider support children?
Definition: AbstractDataProvider.qc.dox.h:423
*hash< string, hash< DataProviderOptionInfo > > update_field_options
Update field options supported by the data provider.
Definition: AbstractDataProvider.qc.dox.h:546
*string desc
A markdown description of the data provider.
Definition: AbstractDataProvider.qc.dox.h:577
bool supports_schema
Does the data provider support a schema?
Definition: AbstractDataProvider.qc.dox.h:480
int search_logic_capabilities
Supported search logic capabilities.
Definition: AbstractDataProvider.qc.dox.h:565
*string schema_type
Returns the schema type supported by this data provider.
Definition: AbstractDataProvider.qc.dox.h:493
bool has_record
Does the data provider provide a record?
Definition: AbstractDataProvider.qc.dox.h:433
Data provider option info.
Definition: AbstractDataProvider.qc.dox.h:49
softlist< AbstractDataProviderType > type
The option value type or types.
Definition: AbstractDataProvider.qc.dox.h:51
auto default_value
Any default value.
Definition: AbstractDataProvider.qc.dox.h:60
string desc
The option description.
Definition: AbstractDataProvider.qc.dox.h:57
bool required
Required flag.
Definition: AbstractDataProvider.qc.dox.h:54
Data provider signature argument info.
Definition: AbstractDataProvider.qc.dox.h:202
int type_code
The signature type code.
Definition: AbstractDataProvider.qc.dox.h:207
AbstractDataProviderType type
Argument types.
Definition: AbstractDataProvider.qc.dox.h:204
Data provider summary info.
Definition: AbstractDataProvider.qc.dox.h:64
bool supports_bulk_upsert
Does the data provider support native / optimized bulk upserts?
Definition: AbstractDataProvider.qc.dox.h:108
bool transaction_management
Does the data provider require transaction management?
Definition: AbstractDataProvider.qc.dox.h:117
bool supports_create
Does the data provider support record creation?
Definition: AbstractDataProvider.qc.dox.h:78
string name
The name of the data provider.
Definition: AbstractDataProvider.qc.dox.h:66
bool supports_read
Does the data provider support reading.
Definition: AbstractDataProvider.qc.dox.h:75
string desc
The description of the data provider; supports markdown.
Definition: AbstractDataProvider.qc.dox.h:69
bool has_record
Does the data provider provide a record?
Definition: AbstractDataProvider.qc.dox.h:120
bool supports_upsert
Does the data provider support record upserts (create or update)?
Definition: AbstractDataProvider.qc.dox.h:84
bool supports_children
Does the data provider support children?
Definition: AbstractDataProvider.qc.dox.h:114
bool supports_bulk_create
Does the data provider support native / optimized bulk creation?
Definition: AbstractDataProvider.qc.dox.h:102
bool supports_delete
Does the data provider support record deletion?
Definition: AbstractDataProvider.qc.dox.h:87
bool supports_request
Does the data provider support the request API?
Definition: AbstractDataProvider.qc.dox.h:111
bool supports_search_expressions
Does this data provide support advanced search experssions?
Definition: AbstractDataProvider.qc.dox.h:123
bool supports_native_search
Does the data provider support native record searching?
Definition: AbstractDataProvider.qc.dox.h:90
string type
The name of the provider type.
Definition: AbstractDataProvider.qc.dox.h:72
bool supports_update
Does the data provider support record updates?
Definition: AbstractDataProvider.qc.dox.h:81
bool supports_bulk_read
Does the data provider support native / optimized bulk reads?
Definition: AbstractDataProvider.qc.dox.h:96