(results, metaData)
| 194 | } |
| 195 | |
| 196 | isInsertQuery(results, metaData) { |
| 197 | let result = true; |
| 198 | |
| 199 | if (this.options.type === QueryTypes.INSERT) { |
| 200 | return true; |
| 201 | } |
| 202 | |
| 203 | // is insert query if sql contains insert into |
| 204 | result = result && this.sql.toLowerCase().startsWith('insert into'); |
| 205 | |
| 206 | // is insert query if no results are passed or if the result has the inserted id |
| 207 | result = result && (!results || Object.prototype.hasOwnProperty.call(results, this.getInsertIdField())); |
| 208 | |
| 209 | // is insert query if no metadata are passed or if the metadata has the inserted id |
| 210 | result = result && (!metaData || Object.prototype.hasOwnProperty.call(metaData, this.getInsertIdField())); |
| 211 | |
| 212 | return result; |
| 213 | } |
| 214 | |
| 215 | handleInsertQuery(results, metaData) { |
| 216 | if (this.instance) { |
no test coverage detected