(query: string)
| 125 | } |
| 126 | |
| 127 | private async runQuery<T = Record<string, unknown>>(query: string): Promise<IResult<T>> { |
| 128 | if (!this.pool) throw new Error('No data loaded. Please call source() first.'); |
| 129 | const request = this.pool.request(); |
| 130 | this.requests.add(request); |
| 131 | try { |
| 132 | return await request.query<T>(query); |
| 133 | } finally { |
| 134 | this.requests.delete(request); |
| 135 | } |
| 136 | } |
| 137 | } |