backendless 6.6.2 → 6.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/data/store.js CHANGED
@@ -419,46 +419,49 @@ var DataStore = /*#__PURE__*/function () {
419
419
  key: "getObjectCount",
420
420
  value: function () {
421
421
  var _getObjectCount = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(condition) {
422
- var distinct;
422
+ var distinct, groupBy;
423
423
  return _regenerator["default"].wrap(function _callee10$(_context10) {
424
424
  while (1) {
425
425
  switch (_context10.prev = _context10.next) {
426
426
  case 0:
427
427
  distinct = undefined;
428
+ groupBy = undefined;
428
429
 
429
430
  if (!condition) {
430
- _context10.next = 9;
431
+ _context10.next = 11;
431
432
  break;
432
433
  }
433
434
 
434
435
  if (!(condition instanceof _dataQueryBuilder["default"])) {
435
- _context10.next = 7;
436
+ _context10.next = 9;
436
437
  break;
437
438
  }
438
439
 
439
440
  distinct = condition.getDistinct() || undefined;
441
+ groupBy = condition.getGroupBy() || undefined;
440
442
  condition = condition.getWhereClause() || undefined;
441
- _context10.next = 9;
443
+ _context10.next = 11;
442
444
  break;
443
445
 
444
- case 7:
446
+ case 9:
445
447
  if (!(typeof condition !== 'string')) {
446
- _context10.next = 9;
448
+ _context10.next = 11;
447
449
  break;
448
450
  }
449
451
 
450
452
  throw new Error('Condition must be a string or an instance of DataQueryBuilder.');
451
453
 
452
- case 9:
454
+ case 11:
453
455
  return _context10.abrupt("return", this.app.request.post({
454
456
  url: this.app.urls.dataTableCount(this.className),
455
457
  data: {
456
458
  where: condition,
457
- distinct: distinct
459
+ distinct: distinct,
460
+ groupBy: groupBy
458
461
  }
459
462
  }));
460
463
 
461
- case 10:
464
+ case 12:
462
465
  case "end":
463
466
  return _context10.stop();
464
467
  }
package/lib/data/store.js CHANGED
@@ -419,46 +419,49 @@ var DataStore = /*#__PURE__*/function () {
419
419
  key: "getObjectCount",
420
420
  value: function () {
421
421
  var _getObjectCount = (0, _asyncToGenerator2["default"])( /*#__PURE__*/_regenerator["default"].mark(function _callee10(condition) {
422
- var distinct;
422
+ var distinct, groupBy;
423
423
  return _regenerator["default"].wrap(function _callee10$(_context10) {
424
424
  while (1) {
425
425
  switch (_context10.prev = _context10.next) {
426
426
  case 0:
427
427
  distinct = undefined;
428
+ groupBy = undefined;
428
429
 
429
430
  if (!condition) {
430
- _context10.next = 9;
431
+ _context10.next = 11;
431
432
  break;
432
433
  }
433
434
 
434
435
  if (!(condition instanceof _dataQueryBuilder["default"])) {
435
- _context10.next = 7;
436
+ _context10.next = 9;
436
437
  break;
437
438
  }
438
439
 
439
440
  distinct = condition.getDistinct() || undefined;
441
+ groupBy = condition.getGroupBy() || undefined;
440
442
  condition = condition.getWhereClause() || undefined;
441
- _context10.next = 9;
443
+ _context10.next = 11;
442
444
  break;
443
445
 
444
- case 7:
446
+ case 9:
445
447
  if (!(typeof condition !== 'string')) {
446
- _context10.next = 9;
448
+ _context10.next = 11;
447
449
  break;
448
450
  }
449
451
 
450
452
  throw new Error('Condition must be a string or an instance of DataQueryBuilder.');
451
453
 
452
- case 9:
454
+ case 11:
453
455
  return _context10.abrupt("return", this.app.request.post({
454
456
  url: this.app.urls.dataTableCount(this.className),
455
457
  data: {
456
458
  where: condition,
457
- distinct: distinct
459
+ distinct: distinct,
460
+ groupBy: groupBy
458
461
  }
459
462
  }));
460
463
 
461
- case 10:
464
+ case 12:
462
465
  case "end":
463
466
  return _context10.stop();
464
467
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "backendless",
3
- "version": "6.6.2",
3
+ "version": "6.6.3",
4
4
  "description": "Backendless JavaScript SDK for Node.js and the browser",
5
5
  "browser": "dist/backendless.js",
6
6
  "main": "lib/index.js",
package/src/data/store.js CHANGED
@@ -166,10 +166,12 @@ export default class DataStore {
166
166
 
167
167
  async getObjectCount(condition) {
168
168
  let distinct = undefined
169
+ let groupBy = undefined
169
170
 
170
171
  if (condition) {
171
172
  if (condition instanceof DataQueryBuilder) {
172
173
  distinct = condition.getDistinct() || undefined
174
+ groupBy = condition.getGroupBy() || undefined
173
175
  condition = condition.getWhereClause() || undefined
174
176
  } else if (typeof condition !== 'string') {
175
177
  throw new Error('Condition must be a string or an instance of DataQueryBuilder.')
@@ -178,7 +180,7 @@ export default class DataStore {
178
180
 
179
181
  return this.app.request.post({
180
182
  url : this.app.urls.dataTableCount(this.className),
181
- data: { where: condition, distinct },
183
+ data: { where: condition, distinct, groupBy },
182
184
  })
183
185
  }
184
186