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

Function layerMemory

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

Source from the content-addressed store, hash-verified

519 * @since 4.0.0
520 */
521export const layerMemory = (
522 config: SqliteClientMemoryConfig
523): Layer.Layer<SqliteClient | Client.SqlClient, SqlError> =>
524 Layer.effectContext(
525 Effect.map(makeMemory(config), (client) =>
526 Context.make(SqliteClient, client).pipe(
527 Context.add(Client.SqlClient, client)
528 ))
529 ).pipe(Layer.provide(Reactivity.layer))
530
531/**
532 * 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.85
pipeMethod · 0.65
makeMethod · 0.65
addMethod · 0.65
mapMethod · 0.45
provideMethod · 0.45

Tested by

no test coverage detected