QueryAPI2.js 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. "use strict";
  2. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3. /**
  4. * Licensed Materials - Property of IBM
  5. * IBM Business Analytics (C) Copyright IBM Corp. 2019, 2020
  6. * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
  7. */
  8. /**
  9. * @class QueryAPI2
  10. * @hideconstructor
  11. * @classdesc API class to construct and run queries.
  12. */
  13. define([], function () {
  14. var QueryAPI = function () {
  15. function QueryAPI() {
  16. _classCallCheck(this, QueryAPI);
  17. }
  18. /**
  19. * @public
  20. * @function QueryAPI#getSpecList
  21. * @description Get the V2 Query Spec which would be sent to the server.
  22. * @return {object[]}
  23. */
  24. QueryAPI.prototype.getSpecList = function getSpecList() {};
  25. /**
  26. * @public
  27. * @function QueryAPI#execute
  28. * @description Execute query with preset parameters.
  29. * @async
  30. *
  31. * @param {Object} [requestOptions] additional request options
  32. * @return {Promise<QueryResultAPI[]>} Returns a promise that will be resolved with an array of {@link QueryResultAPI} object.
  33. */
  34. QueryAPI.prototype.execute = function execute() {};
  35. /**
  36. * @public
  37. * @function QueryAPI#registerFaultHandler
  38. * @description Register a fault handler to be used when executing
  39. * @param {function}
  40. */
  41. QueryAPI.prototype.registerFaultHandler = function registerFaultHandler() {};
  42. /**
  43. * @public
  44. * @function QueryAPI#registerPostProcessor
  45. * @description Register a post processor to process the results on success
  46. * @param {function}
  47. */
  48. QueryAPI.prototype.registerPostProcessor = function registerPostProcessor() {};
  49. /**
  50. * @public
  51. * @function QueryAPI#registerSaveRawDataHandler
  52. * @description Register a handler to receive the raw data results for a query.
  53. * @param {function}
  54. */
  55. QueryAPI.prototype.registerSaveRawDataHandler = function registerSaveRawDataHandler() {};
  56. /**
  57. * @public
  58. * @function QueryAPI#getWarningList
  59. * @description Get the list of warnings generated while executing the query
  60. * @return {QueryWarning[]}
  61. */
  62. QueryAPI.prototype.getWarningList = function getWarningList() {};
  63. return QueryAPI;
  64. }();
  65. return QueryAPI;
  66. });
  67. //# sourceMappingURL=QueryAPI2.js.map