MCPcopy
hub / github.com/parse-community/parse-server / transformSelect

Function transformSelect

src/RestQuery.js:669–680  ·  view source on GitHub ↗
(selectObject, key, objects)

Source from the content-addressed store, hash-verified

667};
668
669const transformSelect = (selectObject, key, objects) => {
670 var values = [];
671 for (var result of objects) {
672 values.push(key.split('.').reduce(getDeepestObjectFromKey, result));
673 }
674 delete selectObject['$select'];
675 if (Array.isArray(selectObject['$in'])) {
676 selectObject['$in'] = selectObject['$in'].concat(values);
677 } else {
678 selectObject['$in'] = values;
679 }
680};
681
682// Replaces a $select clause by running the subquery, if there is a
683// $select clause.

Callers 1

RestQuery.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected