(sql: string, params: ReadonlyArray<unknown>)
| 218 | return this.run(sql, params) |
| 219 | } |
| 220 | executeValues(sql: string, params: ReadonlyArray<unknown>) { |
| 221 | return this.runWithClient<ReadonlyArray<any>>((client, resume) => { |
| 222 | client.query( |
| 223 | { |
| 224 | text: sql, |
| 225 | rowMode: "array", |
| 226 | values: params as Array<string> |
| 227 | }, |
| 228 | (err, result) => { |
| 229 | if (err) { |
| 230 | resume(Effect.fail(new SqlError({ cause: err, message: "Failed to execute statement" }))) |
| 231 | } else { |
| 232 | resume(Effect.succeed(result.rows)) |
| 233 | } |
| 234 | } |
| 235 | ) |
| 236 | }) |
| 237 | } |
| 238 | executeUnprepared( |
| 239 | sql: string, |
| 240 | params: ReadonlyArray<unknown>, |
no test coverage detected