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

Function _getSchema

services/cloudObjects.js:1085–1103  ·  view source on GitHub ↗
(appId, collectionName)

Source from the content-addressed store, hash-verified

1083
1084// this function gets the schema of the table from the db.
1085function _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.
1106function _modifyFieldsInQuery(appId, collectionName, query) {

Callers 2

_deleteRollbackFunction · 0.85
_modifyFieldsInQueryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected