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

Method deleteColumn

sdk/src/CloudTable.js:84–111  ·  view source on GitHub ↗
(column)

Source from the content-addressed store, hash-verified

82
83
84 deleteColumn(column){
85 if(Object.prototype.toString.call(column) === '[object String]') {
86 var obj = new CB.Column(column);
87 column = obj;
88 }
89 if (Object.prototype.toString.call(column) === '[object Object]') {
90 if(CB._columnValidation(column, this)){
91 var arr = [];
92 for(var i=0;i<this.columns.length;i++){
93 if(this.columns[i].name !== column.name)
94 arr.push(this.columns[i]);
95 }
96 this.document.columns = arr;
97 }
98
99 } else if (Object.prototype.toString.call(column) === '[object Array]') {
100 var arr = [];
101 for(var i=0; i<column.length; i++){
102 if(CB._columnValidation(column[i], this)){
103 for(var i=0;i<this.columns.length;i++){
104 if(this.columns[i].name !== column[i].name)
105 arr.push(this.columns[i]);
106 }
107 this.document.columns = arr;
108 }
109 }
110 }
111 };
112 /**
113 * Deletes a table from database.
114 *

Callers 4

test.jsFile · 0.80
cloudtable.jsFile · 0.80
test.jsFile · 0.80
upsertTableFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected