* Execute a SQL query, this can have multiple statements. * This uses the "Simple Query" postgres wire protocol message. * @param query The query to execute * @returns The result of the query
(query: string, options?: QueryOptions)
| 191 | * @returns The result of the query |
| 192 | */ |
| 193 | async exec(query: string, options?: QueryOptions): Promise<Array<Results>> { |
| 194 | await this._checkReady() |
| 195 | // We wrap the public exec method in the transaction mutex to ensure that |
| 196 | // only one query can be executed at a time and not concurrently with a |
| 197 | // transaction. |
| 198 | return await this._runExclusiveTransaction(async () => { |
| 199 | return await this.#runExec(query, options) |
| 200 | }) |
| 201 | } |
| 202 | |
| 203 | /** |
| 204 | * Internal method to execute a query |
nothing calls this directly
no test coverage detected