| 28 | ) {} |
| 29 | |
| 30 | async queryRaw(query: SqlQuery): Promise<SqlResultSet> { |
| 31 | const tag = '[js::query_raw]' |
| 32 | debug(`${tag} %O`, query) |
| 33 | |
| 34 | const result = await this.performIO(query) |
| 35 | return { |
| 36 | columnNames: result.meta?.map((field) => field.name()) ?? [], |
| 37 | columnTypes: result.meta?.map(mapColumnType) ?? [], |
| 38 | rows: Array.isArray(result) ? result.map((row) => mapRow(row, result.meta)) : [], |
| 39 | lastInsertId: result.insertId?.toString(), |
| 40 | } |
| 41 | } |
| 42 | |
| 43 | async executeRaw(query: SqlQuery): Promise<number> { |
| 44 | const tag = '[js::execute_raw]' |