Saurabh Nanda
Saurabh Nanda
@harendra-kumar how did you determine this? And why isn't the type-system preventing me from making this mistake? Is the underlying issue with how `Opaleye.runQueryFold` is written, or how I'm using...
@harendra-kumar thanks for the explanation. Yes - it makes sense now. Does something like this look like a better implementation? 1. Although I'm not sure if I'm mixing `Streamly.unfoldrM` and...
@harendra-kumar does this seem better? ```haskell runQueryStream qry = do conn pure Nothing True -> do Opaleye.foldForward cur 1 (\_ haskells -> pure $ Just haskells) Nothing >>= \case Left...
@harendra-kumar should I add `{-# INLINE runQueryStream #-}` to ensure that stages can fuse?
@harendra-kumar even I feel weird about `m (SerialT IO a)`, but all of this ultimately needs to align with Servant's streaming. All examples that I have seen online seem to...
@harendra-kumar here's the complete function definition as of now. The only reason this needs to be a `m (SerialT IO haskell)` is because of the call to `getDbConnection`. I can...
@harendra-kumar here's the updated version of the `runQueryStream` function... ```haskell {-# INLINE runQueryStream #-} runQueryStream :: ( Default Opaleye.QueryRunner columns haskells , Default Opaleye.Unpackspec columns columns ) => Connection ->...
> You do not need to call getDbConnection at call site. You can call it in the alloc part of bracketIO. That is what I was suggesting earlier as well....
@harendra-kumar >> Won't I have to juggle around with liftIO and UnliftIO.withRunInIO to make all of the following align? > I did not know the types and UnliftIO issue. Just...