| 645 | * @since 4.0.0 |
| 646 | */ |
| 647 | export 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. |