MCPcopy Create free account
hub / github.com/CloudBoost/cloudboost / distinct

Function distinct

services/cloudObjects.js:63–81  ·  view source on GitHub ↗
(appId, collectionName, onKey, query, select, sort, limit, skip, accessList, isMasterKey)

Source from the content-addressed store, hash-verified

61 return deferred.promise;
62 },
63 async distinct(appId, collectionName, onKey, query, select, sort, limit, skip, accessList, isMasterKey) {
64 const deferred = q.defer();
65
66 try {
67 const _query = await _modifyFieldsInQuery(appId, collectionName, query);
68 const doc = await mongoService.document.distinct(
69 appId, collectionName, onKey, _query, select,
70 sort, limit, skip, accessList, isMasterKey,
71 );
72 deferred.resolve(doc);
73 } catch (err) {
74 winston.log('error', {
75 error: String(err),
76 stack: new Error().stack,
77 });
78 deferred.reject(err);
79 }
80 return deferred.promise;
81 },
82
83 async findOne(appId, collectionName, query, select, sort, skip, accessList, isMasterKey) {
84 const deferred = q.defer();

Callers

nothing calls this directly

Calls 2

_modifyFieldsInQueryFunction · 0.85
distinctMethod · 0.80

Tested by

no test coverage detected