(query: string, params: ReadonlyArray<unknown> = [])
| 54 | : undefined |
| 55 | |
| 56 | const run = (query: string, params: ReadonlyArray<unknown> = []) => |
| 57 | Effect.withFiber<Array<Record<string, unknown>>, SqlError>((fiber) => { |
| 58 | const statement = native.prepare(query) |
| 59 | statement.setReadBigInts(Context.get(fiber.context, Client.SafeIntegers)) |
| 60 | try { |
| 61 | return Effect.succeed(statement.all(...(params as SQLInputValue[])) as Array<Record<string, unknown>>) |
| 62 | } catch (cause) { |
| 63 | return Effect.fail( |
| 64 | new SqlError({ |
| 65 | reason: classifySqliteError(cause, { message: "Failed to execute statement", operation: "execute" }), |
| 66 | }), |
| 67 | ) |
| 68 | } |
| 69 | }) |
| 70 | |
| 71 | const runValues = (query: string, params: ReadonlyArray<unknown> = []) => |
| 72 | Effect.withFiber<ReadonlyArray<ReadonlyArray<unknown>>, SqlError>((fiber) => { |
no test coverage detected