()
| 547 | |
| 548 | // Execution methods |
| 549 | async execute(): Promise<T[]> { |
| 550 | const query = this.buildQuery(); |
| 551 | // console.log( |
| 552 | // 'query', |
| 553 | // `${query.replaceAll('\n', ' ').replaceAll('\t', ' ').replaceAll('\r', ' ')} SETTINGS session_timezone = '${this.timezone}'`, |
| 554 | // ); |
| 555 | |
| 556 | const result = await this.client.query({ |
| 557 | query, |
| 558 | clickhouse_settings: { |
| 559 | session_timezone: this.timezone, |
| 560 | }, |
| 561 | }); |
| 562 | const json = await result.json<T>(); |
| 563 | return this.transformJson(json).data; |
| 564 | } |
| 565 | |
| 566 | // Debug methods |
| 567 | toSQL(): string { |
no test coverage detected