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

Function layer

packages/sql/clickhouse/src/ClickhouseClient.ts:476–484  ·  view source on GitHub ↗
(
  config: ClickhouseClientConfig
)

Source from the content-addressed store, hash-verified

474 * @since 4.0.0
475 */
476export const layer = (
477 config: ClickhouseClientConfig
478): Layer.Layer<ClickhouseClient | Client.SqlClient, Config.ConfigError | SqlError> =>
479 Layer.effectContext(
480 Effect.map(make(config), (client) =>
481 Context.make(ClickhouseClient, client).pipe(
482 Context.add(Client.SqlClient, client)
483 ))
484 ).pipe(Layer.provide(Reactivity.layer))
485
486const typeFromUnknown = (value: unknown): string => {
487 if (Statement.isFragment(value)) {

Callers

nothing calls this directly

Calls 6

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

Tested by

no test coverage detected