(
sql: string,
params: ReadonlyArray<unknown> = []
)
| 166 | }) |
| 167 | |
| 168 | const runValues = ( |
| 169 | sql: string, |
| 170 | params: ReadonlyArray<unknown> = [] |
| 171 | ) => |
| 172 | Effect.withFiber<Array<any>, SqlError>((fiber) => { |
| 173 | const useSafeIntegers = Context.get(fiber.context, Client.SafeIntegers) |
| 174 | try { |
| 175 | return Effect.succeed((prepare(sql, useSafeIntegers).values(...(params as any)) ?? []) as Array<any>) |
| 176 | } catch (cause) { |
| 177 | return Effect.fail( |
| 178 | new SqlError({ reason: classifyError(cause, "Failed to execute statement", "executeValues") }) |
| 179 | ) |
| 180 | } |
| 181 | }) |
| 182 | |
| 183 | return identity<SqliteConnection>({ |
| 184 | execute(sql, params, transformRows) { |
no test coverage detected