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

Function layerMemory

packages/sql/sqlite-wasm/src/SqliteClient.ts:539–547  ·  view source on GitHub ↗
(
  config: SqliteClientMemoryConfig
)

Source from the content-addressed store, hash-verified

537 * @since 4.0.0
538 */
539export const layerMemory = (
540 config: SqliteClientMemoryConfig
541): Layer.Layer<SqliteClient | Client.SqlClient, SqlError> =>
542 Layer.effectContext(
543 Effect.map(makeMemory(config), (client) =>
544 Context.make(SqliteClient, client).pipe(
545 Context.add(Client.SqlClient, client)
546 ))
547 ).pipe(Layer.provide(Reactivity.layer))
548
549/**
550 * Builds a layer from a worker-backed SQLite WASM client configuration, providing both `SqliteClient` and the generic `SqlClient` service.

Callers

nothing calls this directly

Calls 6

makeMemoryFunction · 0.70
pipeMethod · 0.65
makeMethod · 0.65
addMethod · 0.65
mapMethod · 0.45
provideMethod · 0.45

Tested by

no test coverage detected