(sql: string, params: ReadonlyArray<unknown>)
| 692 | : this.run(sql, params) |
| 693 | } |
| 694 | executeRaw(sql: string, params: ReadonlyArray<unknown>) { |
| 695 | return this.runWithClient<Pg.Result>((client, resume) => { |
| 696 | client.query(sql, params as any, (err, result) => { |
| 697 | if (err) { |
| 698 | resume( |
| 699 | Effect.fail(new SqlError({ reason: classifyError(err, "Failed to execute statement", "execute") })) |
| 700 | ) |
| 701 | } else { |
| 702 | resume(Effect.succeed(result)) |
| 703 | } |
| 704 | }) |
| 705 | }) |
| 706 | } |
| 707 | executeWithoutTransform(sql: string, params: ReadonlyArray<unknown>) { |
| 708 | return this.run(sql, params) |
| 709 | } |
| 710 | executeValues(sql: string, params: ReadonlyArray<unknown>) { |
| 711 | return this.runWithClient<ReadonlyArray<any>>((client, resume) => { |
| 712 | client.query( |
| 713 | { |
| 714 | text: sql, |
| 715 | rowMode: "array", |
| 716 | values: params as Array<string> |
no test coverage detected