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

Function loadExtension

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

Source from the content-addressed store, hash-verified

327 })
328 },
329 loadExtension(path) {
330 return Effect.acquireUseRelease(
331 Effect.sync(() => setLoadExtensionEnabled(db, true)),
332 () =>
333 Effect.try({
334 try: () => db.loadExtension(path),
335 catch: (cause) =>
336 new SqlError({ reason: classifyError(cause, "Failed to load extension", "loadExtension") })
337 }),
338 () => Effect.sync(() => setLoadExtensionEnabled(db, false))
339 )
340 }
341 })
342 })
343

Callers

nothing calls this directly

Calls 3

setLoadExtensionEnabledFunction · 0.85
classifyErrorFunction · 0.70
syncMethod · 0.45

Tested by

no test coverage detected