( config: D1ClientConfig )
| 206 | * @since 1.0.0 |
| 207 | */ |
| 208 | export const layer = ( |
| 209 | config: D1ClientConfig |
| 210 | ): Layer.Layer<D1Client | Client.SqlClient, ConfigError> => |
| 211 | Layer.scopedContext( |
| 212 | Effect.map(make(config), (client) => |
| 213 | Context.make(D1Client, client).pipe( |
| 214 | Context.add(Client.SqlClient, client) |
| 215 | )) |
| 216 | ).pipe(Layer.provide(Reactivity.layer)) |