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

Function layer

packages/sql/mssql/src/MssqlClient.ts:647–655  ·  view source on GitHub ↗
(
  config: MssqlClientConfig
)

Source from the content-addressed store, hash-verified

645 * @since 4.0.0
646 */
647export const layer = (
648 config: MssqlClientConfig
649): Layer.Layer<Client.SqlClient | MssqlClient, never | SqlError> =>
650 Layer.effectContext(
651 Effect.map(make(config), (client) =>
652 Context.make(MssqlClient, client).pipe(
653 Context.add(Client.SqlClient, client)
654 ))
655 ).pipe(Layer.provide(Reactivity.layer))
656
657/**
658 * Creates the SQL Server statement compiler, using `@1`-style placeholders, bracket-escaped identifiers, and SQL Server `OUTPUT INSERTED` returning clauses.

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