MCPcopy Create free account
hub / github.com/effect-app/libs / layer

Function layer

repos/effect/packages/sql/d1/src/D1Client.ts:259–267  ·  view source on GitHub ↗
(
  config: D1ClientConfig
)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 6

makeFunction · 0.70
pipeMethod · 0.65
mapMethod · 0.65
makeMethod · 0.65
addMethod · 0.65
provideMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…