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.collectAllPar
andZQuery.foreachPar
and their sequential equivalentsZQuery.collectAll
andZQuery.foreach
If you have a ZQuery
, you can use:
map
andmapError
to modify the result or error typeflatMap
,zipWith
, orzipWithPar
to combine it with other queriesprovide
andprovideSome
to eliminate some or all of its environmental requirements