MCPcopy Create free account
hub / github.com/Effect-TS/effect / runValues

Function runValues

packages/sql/sqlite-bun/src/SqliteClient.ts:168–181  ·  view source on GitHub ↗
(
        sql: string,
        params: ReadonlyArray<unknown> = []
      )

Source from the content-addressed store, hash-verified

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) {

Callers 2

executeValuesFunction · 0.70
executeValuesUnpreparedFunction · 0.70

Calls 5

prepareFunction · 0.85
classifyErrorFunction · 0.70
getMethod · 0.65
succeedMethod · 0.45
failMethod · 0.45

Tested by

no test coverage detected