Tim
Tim
> @tim-smart added encode for modify operations and schema context test. > > Not sure what you mean with `support for schema classes with auto-incrementing keys`. As far as I...
> By the way, @SandroMaglione, I accidentally found in the effect codebase this: https://github.com/Effect-TS/effect/blob/main/packages/experimental/src/EventJournal.ts#L358 > > And I think it's worth your attention, maybe you could insert your implementation here...
> Is that not already the case? No it should use `Schema.Struct.Constructor` instead, and then modify it further to make the auto-increment key optional.
Ideally the auto-increment key would not be optional, so it would require overriding the autoincrement key for the schema and types for inserts.
I think a better primitive is a kind of `ScopedRef` that does ref counting. You can then wrap a `PubSub` or `Queue` with it and call `Stream.fromQueue` etc. It could...
> @tim-smart could you maybe provide an example of code of how to use hypothetical `ScopedRef` to solve the described problem? https://github.com/Effect-TS/effect/pull/3179 You could do: ```ts import { Effect, PubSub,...
> I also implemented a test that dead-locks in case of using `Effect.forkScoped` under the hood of `shareRefCount` You should be using `forkIn` in this situation, to fork in the...
> Do you mean like this (only about forking mechanism)? Yes
You can add timeouts with customs errors like this: ```ts Effect.gen(function*() { const client = (yield* HttpClient.HttpClient).pipe( HttpClient.transform((effect, request) => Effect.timeoutFail(effect, { duration: 1000, onTimeout: () => new Error(`${request.method} ${request.url}...
Ideally these apis will work with types that also don't contain tags, such as unions with a mix of types.