( config: MysqlClientConfig )
| 443 | * @since 4.0.0 |
| 444 | */ |
| 445 | export const layer = ( |
| 446 | config: MysqlClientConfig |
| 447 | ): Layer.Layer<MysqlClient | Client.SqlClient, Config.ConfigError | SqlError> => |
| 448 | Layer.effectContext( |
| 449 | Effect.map(make(config), (client) => |
| 450 | Context.make(MysqlClient, client).pipe( |
| 451 | Context.add(Client.SqlClient, client) |
| 452 | )) |
| 453 | ).pipe(Layer.provide(Reactivity.layer)) |
| 454 | |
| 455 | /** |
| 456 | * Creates the MySQL statement compiler, using `?` placeholders and backtick-escaped identifiers. |