MCPcopy Index your code
hub / github.com/sequelize/sequelize / build

Method build

src/model.js:2250–2256  ·  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

2248 * @returns {Model|Array<Model>}
2249 */
2250 static build(values, options) {
2251 if (Array.isArray(values)) {
2252 return this.bulkBuild(values, options);
2253 }
2254
2255 return new this(values, options);
2256 }
2257
2258 static bulkBuild(valueSets, options) {
2259 options = { isNewRecord: true, ...options };

Callers 15

bulkBuildMethod · 0.95
createMethod · 0.95
findOrBuildMethod · 0.95
upsertMethod · 0.95
bulkCreateMethod · 0.95
updateMethod · 0.95
executeFunction · 0.80
model.test.jsFile · 0.80
sequelize.test.jsFile · 0.80
instance.test.jsFile · 0.80
dao.test.jsFile · 0.80

Calls 1

bulkBuildMethod · 0.95

Tested by 4

executeFunction · 0.64
testFunction · 0.64
applyFailTestFunction · 0.64
applyPassTestFunction · 0.64