MCPcopy
hub / github.com/sequelize/sequelize / build

Method build

lib/model.js:2171–2177  ·  view source on GitHub ↗

* Builds a new model instance. * * @param {object|Array} values An object of key value pairs or an array of such. If an array, the function will return an array of instances. * @param {object} [options] Instance build options * @param {boolean} [options.raw=false] If set to true, values

(values, options)

Source from the content-addressed store, hash-verified

2169 * @returns {Model|Array<Model>}
2170 */
2171 static build(values, options) {
2172 if (Array.isArray(values)) {
2173 return this.bulkBuild(values, options);
2174 }
2175
2176 return new this(values, options);
2177 }
2178
2179 static bulkBuild(valueSets, options) {
2180 options = { isNewRecord: true, ...options };

Callers 15

bulkBuildMethod · 0.95
createMethod · 0.95
findOrBuildMethod · 0.95
upsertMethod · 0.95
bulkCreateMethod · 0.95
updateMethod · 0.95
update.tsFile · 0.80
model.tsFile · 0.80
testFunction · 0.80
testUntypedFunction · 0.80
_setIncludeMethod · 0.80
setMethod · 0.80

Calls 1

bulkBuildMethod · 0.95

Tested by 3

testFunction · 0.64
applyFailTestFunction · 0.64
applyPassTestFunction · 0.64