(results, metaData)
| 170 | } |
| 171 | |
| 172 | isInsertQuery(results, metaData) { |
| 173 | let result = true; |
| 174 | |
| 175 | if (this.options.type === QueryTypes.INSERT) { |
| 176 | return true; |
| 177 | } |
| 178 | |
| 179 | // is insert query if sql contains insert into |
| 180 | result = result && this.sql.toLowerCase().startsWith('insert into'); |
| 181 | |
| 182 | // is insert query if no results are passed or if the result has the inserted id |
| 183 | result = result && (!results || Object.prototype.hasOwnProperty.call(results, this.getInsertIdField())); |
| 184 | |
| 185 | // is insert query if no metadata are passed or if the metadata has the inserted id |
| 186 | result = result && (!metaData || Object.prototype.hasOwnProperty.call(metaData, this.getInsertIdField())); |
| 187 | |
| 188 | return result; |
| 189 | } |
| 190 | |
| 191 | handleInsertQuery(results, metaData) { |
| 192 | if (this.instance) { |
no test coverage detected