| 625 | export const layerConfig: ( |
| 626 | config: Config.Wrap<MssqlClientConfig> |
| 627 | ) => Layer.Layer<Client.SqlClient | MssqlClient, Config.ConfigError | SqlError> = ( |
| 628 | config: Config.Wrap<MssqlClientConfig> |
| 629 | ): Layer.Layer<Client.SqlClient | MssqlClient, Config.ConfigError | SqlError> => |
| 630 | Layer.effectContext( |
| 631 | Config.unwrap(config).pipe( |
| 632 | Effect.flatMap(make), |
| 633 | Effect.map((client) => |
| 634 | Context.make(MssqlClient, client).pipe( |
| 635 | Context.add(Client.SqlClient, client) |
| 636 | ) |
| 637 | ) |
| 638 | ) |
| 639 | ).pipe(Layer.provide(Reactivity.layer)) |
| 640 | |
| 641 | /** |
| 642 | * Creates a layer from a concrete SQL Server client configuration, providing both `MssqlClient` and `SqlClient`. |