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

Function runValues

packages/sql/d1/src/D1Client.ts:254–271  ·  view source on GitHub ↗
(
        sql: string,
        params: ReadonlyArray<unknown>
      )

Source from the content-addressed store, hash-verified

252 ) => runRaw(sql, params)
253
254 const runValues = (
255 sql: string,
256 params: ReadonlyArray<unknown>
257 ) =>
258 Effect.flatMap(
259 Cache.get(prepareCache, sql),
260 (statement) =>
261 Effect.tryPromise({
262 try: () => {
263 return statement.bind(...params).raw() as Promise<
264 ReadonlyArray<
265 ReadonlyArray<unknown>
266 >
267 >
268 },
269 catch: (cause) => new SqlError({ reason: classifyError(cause, "Failed to execute statement", "execute") })
270 })
271 )
272
273 const runValuesUncached = (
274 sql: string,

Callers 1

executeValuesFunction · 0.70

Calls 3

rawMethod · 0.80
classifyErrorFunction · 0.70
getMethod · 0.65

Tested by

no test coverage detected