findProductRepos :: WithDBPool [ProductRepo]
findProductRepos = ask >>= \pool ->
  (liftIO (DB.runSqlPool findProductReposQuery pool)) >>= (return . (fmap toProductRepo))
  where
    findProductReposQuery =
      E.select $ E.from $ \(repoStatus `E.InnerJoin` prod) -> do
        E.on $ repoStatus ^. RepositoryStatusProductId E.==. prod ^. ProductId
        return (repoStatus, prod)
findProductRepos :: WithDBPool [ProductRepo]
findProductRepos = ask >>= \pool ->
  (liftIO (DB.runSqlPool findProductReposQuery pool)) >>= (return . (fmap toProductRepo))
  where
    findProductReposQuery =
      E.select $ E.from $ \(repoStatus `E.InnerJoin` prod) -> do
        E.on $ repoStatus ^. RepositoryStatusProductId E.==. prod ^. ProductId
        return (repoStatus, prod)
findProductRepos = ask >>= \pool ->
  (liftIO (DB.runSqlPool findProductReposQuery pool)) >>= (return . (fmap toProductRepo))
  where
    findProductReposQuery =
      E.select $ E.from $ \(repoStatus `E.InnerJoin` prod) -> do
        E.on $ repoStatus ^. RepositoryStatusProductId E.==. prod ^. ProductId
        return (repoStatus, prod)