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

Method handleInsertQuery

src/dialects/abstract/query.js:215–226  ·  view source on GitHub ↗
(results, metaData)

Source from the content-addressed store, hash-verified

213 }
214
215 handleInsertQuery(results, metaData) {
216 if (this.instance) {
217 // add the inserted row id to the instance
218 const autoIncrementAttribute = this.model.autoIncrementAttribute;
219 let id = null;
220
221 id = id || results && results[this.getInsertIdField()];
222 id = id || metaData && metaData[this.getInsertIdField()];
223
224 this.instance[autoIncrementAttribute] = id;
225 }
226 }
227
228 isShowTablesQuery() {
229 return this.options.type === QueryTypes.SHOWTABLES;

Callers

nothing calls this directly

Calls 1

getInsertIdFieldMethod · 0.95

Tested by

no test coverage detected