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

Function loadExtension

packages/sql/sqlite-node/src/SqliteClient.ts:287–298  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

285 })
286 },
287 loadExtension(path) {
288 return Effect.acquireUseRelease(
289 Effect.sync(() => db.enableLoadExtension(true)),
290 () =>
291 Effect.try({
292 try: () => db.loadExtension(path),
293 catch: (cause) =>
294 new SqlError({ reason: classifyError(cause, "Failed to load extension", "loadExtension") })
295 }),
296 () => Effect.sync(() => db.enableLoadExtension(false))
297 )
298 }
299 })
300 })
301

Callers

nothing calls this directly

Calls 2

classifyErrorFunction · 0.70
syncMethod · 0.45

Tested by

no test coverage detected