(method: string, sql: string, params: ReadonlyArray<unknown>)
| 298 | } |
| 299 | |
| 300 | private run(method: string, sql: string, params: ReadonlyArray<unknown>) { |
| 301 | return Effect.map( |
| 302 | Effect.tryPromise({ |
| 303 | try: () => this.pglite.query<any>(sql, params as Array<any>), |
| 304 | catch: (cause) => new SqlError({ reason: classifyError(cause, "Failed to execute statement", method) }) |
| 305 | }), |
| 306 | (result) => result.rows |
| 307 | ) |
| 308 | } |
| 309 | execute( |
| 310 | sql: string, |
| 311 | params: ReadonlyArray<unknown>, |
no test coverage detected