(data)
| 411 | } |
| 412 | |
| 413 | async handleShowIndexesQuery(data) { |
| 414 | // Sqlite returns indexes so the one that was defined last is returned first. Lets reverse that! |
| 415 | return Promise.all(data.reverse().map(async item => { |
| 416 | item.fields = []; |
| 417 | item.primary = false; |
| 418 | item.unique = !!item.unique; |
| 419 | item.constraintName = item.name; |
| 420 | const columns = await this.run(`PRAGMA INDEX_INFO(\`${item.name}\`)`); |
| 421 | for (const column of columns) { |
| 422 | item.fields[column.seqno] = { |
| 423 | attribute: column.name, |
| 424 | length: undefined, |
| 425 | order: undefined |
| 426 | }; |
| 427 | } |
| 428 | |
| 429 | return item; |
| 430 | })); |
| 431 | } |
| 432 | |
| 433 | getDatabaseMethod() { |
| 434 | if (this.isInsertQuery() || this.isUpdateQuery() || this.isUpsertQuery() || this.isBulkUpdateQuery() || this.sql.toLowerCase().includes('CREATE TEMPORARY TABLE'.toLowerCase()) || this.options.type === QueryTypes.BULKDELETE) { |
no test coverage detected