| 312 | * @since 4.0.0 |
| 313 | */ |
| 314 | export const layerConfig = ( |
| 315 | config: Config.Wrap<SqliteClientConfig> |
| 316 | ): Layer.Layer<SqliteClient | Client.SqlClient, Config.ConfigError> => |
| 317 | Layer.effectContext( |
| 318 | Config.unwrap(config).pipe( |
| 319 | Effect.flatMap(make), |
| 320 | Effect.map((client) => |
| 321 | Context.make(SqliteClient, client).pipe( |
| 322 | Context.add(Client.SqlClient, client) |
| 323 | ) |
| 324 | ) |
| 325 | ) |
| 326 | ).pipe(Layer.provide(Reactivity.layer)) |
| 327 | |
| 328 | /** |
| 329 | * Creates a layer from a concrete Durable Object SQLite client configuration, providing both `SqliteClient` and `SqlClient`. |