(columnNames)
| 321 | |
| 322 | //select/deselect columns to show |
| 323 | selectColumn(columnNames) { |
| 324 | |
| 325 | if (Object.keys(this.select).length === 0) { |
| 326 | this.select = { |
| 327 | _id: 1, |
| 328 | createdAt: 1, |
| 329 | updatedAt: 1, |
| 330 | ACL: 1, |
| 331 | _type: 1, |
| 332 | _tableName: 1 |
| 333 | } |
| 334 | } |
| 335 | |
| 336 | if (Object.prototype.toString.call(columnNames) === '[object Object]') { |
| 337 | this.select = columnNames; |
| 338 | } else if (Object.prototype.toString.call(columnNames) === '[object Array]') { |
| 339 | for (var i = 0; i < columnNames.length; i++) { |
| 340 | this.select[columnNames[i]] = 1; |
| 341 | } |
| 342 | } else { |
| 343 | this.select[columnNames] = 1; |
| 344 | } |
| 345 | |
| 346 | return this; |
| 347 | }; |
| 348 | |
| 349 | doNotSelectColumn(columnNames) { |
| 350 | if (Object.prototype.toString.call(columnNames) === '[object Object]') { |
no outgoing calls
no test coverage detected