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

Function prepare

packages/sql/sqlite-node/src/SqliteClient.ts:201–205  ·  view source on GitHub ↗
(sql: string)

Source from the content-addressed store, hash-verified

199 }
200
201 const prepare = (sql: string) =>
202 Effect.try({
203 try: () => db.prepare(sql),
204 catch: (cause) => new SqlError({ reason: classifyError(cause, "Failed to prepare statement", "prepare") })
205 })
206
207 const prepareCacheTTL = options.prepareCacheTTL ?? Duration.minutes(10)
208 const prepareCache = yield* Cache.makeWith(prepare, {

Callers 2

runValuesUnpreparedFunction · 0.70
executeUnpreparedFunction · 0.70

Calls 1

classifyErrorFunction · 0.70

Tested by

no test coverage detected