(
sql: string,
params: ReadonlyArray<unknown> = []
)
| 153 | constructor(readonly sdk: Libsql.Client | Libsql.Transaction) {} |
| 154 | |
| 155 | run( |
| 156 | sql: string, |
| 157 | params: ReadonlyArray<unknown> = [] |
| 158 | ) { |
| 159 | return Effect.map( |
| 160 | Effect.tryPromise({ |
| 161 | try: () => this.sdk.execute({ sql, args: params as Array<any> }), |
| 162 | catch: (cause) => new SqlError({ cause, message: "Failed to execute statement" }) |
| 163 | }), |
| 164 | (results) => results.rows |
| 165 | ) |
| 166 | } |
| 167 | |
| 168 | runRaw( |
| 169 | sql: string, |
no test coverage detected