(appId, collectionName, query, limit, skip, accessList, isMasterKey)
| 44 | return deferred.promise; |
| 45 | }, |
| 46 | async count(appId, collectionName, query, limit, skip, accessList, isMasterKey) { |
| 47 | const deferred = q.defer(); |
| 48 | |
| 49 | try { |
| 50 | const _query = await _modifyFieldsInQuery(appId, collectionName, query); |
| 51 | const doc = await mongoService.document.count(appId, collectionName, _query, limit, skip, accessList, isMasterKey); |
| 52 | deferred.resolve(doc); |
| 53 | } catch (err) { |
| 54 | winston.log('error', { |
| 55 | error: String(err), |
| 56 | stack: new Error().stack, |
| 57 | }); |
| 58 | deferred.reject(err); |
| 59 | } |
| 60 | |
| 61 | return deferred.promise; |
| 62 | }, |
| 63 | async distinct(appId, collectionName, onKey, query, select, sort, limit, skip, accessList, isMasterKey) { |
| 64 | const deferred = q.defer(); |
| 65 |
nothing calls this directly
no test coverage detected