(
sql: string,
params: ReadonlyArray<unknown> = []
)
| 215 | }) |
| 216 | |
| 217 | const runValues = ( |
| 218 | sql: string, |
| 219 | params: ReadonlyArray<unknown> = [] |
| 220 | ) => |
| 221 | Effect.withFiber<Array<any>, SqlError>((fiber) => { |
| 222 | const useSafeIntegers = Context.get(fiber.context, Client.SafeIntegers) |
| 223 | try { |
| 224 | return Effect.succeed((prepare(sql, useSafeIntegers).values(...(params as any)) ?? []) as Array<any>) |
| 225 | } catch (cause) { |
| 226 | return Effect.fail( |
| 227 | new SqlError({ reason: classifyError(cause, "Failed to execute statement", "executeValues") }) |
| 228 | ) |
| 229 | } |
| 230 | }) |
| 231 | |
| 232 | return identity<SqliteConnection>({ |
| 233 | isTransaction: () => db.inTransaction, |
no test coverage detected