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

Function prepare

packages/sql/d1/src/D1Client.ts:234–238  ·  view source on GitHub ↗
(sql: string)

Source from the content-addressed store, hash-verified

232 const db = options.db
233
234 const prepare = (sql: string) =>
235 Effect.try({
236 try: () => db.prepare(sql),
237 catch: (cause) => new SqlError({ reason: classifyError(cause, "Failed to prepare statement", "prepare") })
238 })
239
240 const prepareCache = yield* Cache.make({
241 capacity: options.prepareCacheSize ?? 200,

Callers 2

runRawFunction · 0.70
runUncachedFunction · 0.70

Calls 1

classifyErrorFunction · 0.70

Tested by

no test coverage detected