(appId, collectionName)
| 1083 | |
| 1084 | // this function gets the schema of the table from the db. |
| 1085 | function _getSchema(appId, collectionName) { |
| 1086 | const deferred = q.defer(); |
| 1087 | |
| 1088 | try { |
| 1089 | tableService.getSchema(appId, collectionName).then((table) => { |
| 1090 | deferred.resolve(table.columns); |
| 1091 | }, (error) => { |
| 1092 | deferred.reject(error); |
| 1093 | }); |
| 1094 | } catch (err) { |
| 1095 | winston.log('error', { |
| 1096 | error: String(err), |
| 1097 | stack: new Error().stack, |
| 1098 | }); |
| 1099 | deferred.reject(err); |
| 1100 | } |
| 1101 | |
| 1102 | return deferred.promise; |
| 1103 | } |
| 1104 | |
| 1105 | // this function modifies the fields ['password','datetime'] passed in the Query. |
| 1106 | function _modifyFieldsInQuery(appId, collectionName, query) { |
no outgoing calls
no test coverage detected