MCPcopy
hub / github.com/sequelize/sequelize / _expandAttributes

Method _expandAttributes

lib/model.js:3267–3282  ·  lib/model.js::Model._expandAttributes
(options)

Source from the content-addressed store, hash-verified

3265 }
3266
3267 static _expandAttributes(options) {
3268 if (!_.isPlainObject(options.attributes)) {
3269 return;
3270 }
3271 let attributes = Object.keys(this.rawAttributes);
3272
3273 if (options.attributes.exclude) {
3274 attributes = attributes.filter(elem => !options.attributes.exclude.includes(elem));
3275 }
3276
3277 if (options.attributes.include) {
3278 attributes = attributes.concat(options.attributes.include);
3279 }
3280
3281 options.attributes = attributes;
3282 }
3283
3284 class="cm">// Inject _scope into options.
3285 static _injectScope(options) {

Callers 3

findAllMethod · 0.95
generateIncludeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected