Creating Queries
There are several ways to create a ZQuery. We've seen ZQuery.fromRequest, but you can also:
- create a query from a pure value with
ZQuery.succeed - create a query from an effect with
ZQuery.fromZIO - combine multiple queries with
ZQuery.collectAllParandZQuery.foreachParand their sequential equivalentsZQuery.collectAllandZQuery.foreach
If you have a ZQuery, you can use:
mapandmapErrorto modify the result or error typeflatMap,zipWith, orzipWithParto combine it with other queriesprovideandprovideSometo eliminate some or all of its environmental requirements