| 506 | }; |
| 507 | |
| 508 | function transformInQuery(inQueryObject, className, results) { |
| 509 | var values = []; |
| 510 | for (var result of results) { |
| 511 | values.push({ |
| 512 | __type: 'Pointer', |
| 513 | className: className, |
| 514 | objectId: result.objectId, |
| 515 | }); |
| 516 | } |
| 517 | delete inQueryObject['$inQuery']; |
| 518 | if (Array.isArray(inQueryObject['$in'])) { |
| 519 | inQueryObject['$in'] = inQueryObject['$in'].concat(values); |
| 520 | } else { |
| 521 | inQueryObject['$in'] = values; |
| 522 | } |
| 523 | } |
| 524 | |
| 525 | _UnsafeRestQuery.prototype.checkSubqueryDepth = function () { |
| 526 | if (this.auth.isMaster || this.auth.isMaintenance) { |