MCPcopy
hub / github.com/Effect-TS/effect / layerMemoryConfig

Function layerMemoryConfig

packages/sql-sqlite-wasm/src/SqliteClient.ts:452–464  ·  view source on GitHub ↗
(
  config: Config.Config.Wrap<SqliteClientMemoryConfig>
)

Source from the content-addressed store, hash-verified

450 * @since 1.0.0
451 */
452export const layerMemoryConfig = (
453 config: Config.Config.Wrap<SqliteClientMemoryConfig>
454): Layer.Layer<SqliteClient | Client.SqlClient, ConfigError | SqlError> =>
455 Layer.scopedContext(
456 Config.unwrap(config).pipe(
457 Effect.flatMap(makeMemory),
458 Effect.map((client) =>
459 Context.make(SqliteClient, client).pipe(
460 Context.add(Client.SqlClient, client)
461 )
462 )
463 )
464 ).pipe(Layer.provide(Reactivity.layer))
465
466/**
467 * @category layers

Callers

nothing calls this directly

Calls 5

pipeMethod · 0.65
mapMethod · 0.65
makeMethod · 0.65
addMethod · 0.65
provideMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…