ZQuery

zio.query.ZQuery$
See theZQuery companion class
object ZQuery

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZQuery.type

Members list

Concise view

Type members

Classlikes

final class Acquire[-R, +E, +A](acquire: () => ZIO[R, E, A]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class AcquireExit[-R, +E, +A](acquire: () => ZIO[R, E, A]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class EnvironmentWithPartiallyApplied[R](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class EnvironmentWithQueryPartiallyApplied[R](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class EnvironmentWithZIOPartiallyApplied[R](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class ProvideSomeLayer[R0, -R, +E, +A](self: ZQuery[R, E, A]) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class Release[-R, +E, +A](acquire: () => ZIO[R, E, A], release: A => URIO[R, Any])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
final class ReleaseExit[-R, +E, E1, +A, B](acquire: () => ZIO[R, E, A], release: (A, Exit[E1, B]) => URIO[R, Any])

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
final class ServiceWithPartiallyApplied[R](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class ServiceWithQueryPartiallyApplied[Service](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class ServiceWithZIOPartiallyApplied[Service](dummy: Boolean) extends AnyVal

Attributes

Graph
Supertypes
class AnyVal
trait Matchable
class Any
final class TimeoutTo[-R, +E, +A, +B](self: ZQuery[R, E, A], b: () => B)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Value members

Concrete methods

final def absolve[R, E, A](v: => ZQuery[R, E, Either[E, A]])(implicit trace: Trace): ZQuery[R, E, A]
def acquireReleaseExitWith[R, E, A](acquire: => ZIO[R, E, A]): AcquireExit[R, E, A]

Acquires the specified resource before the query begins execution and releases it after the query completes execution, whether by success, failure, or interruption.

Acquires the specified resource before the query begins execution and releases it after the query completes execution, whether by success, failure, or interruption.

Attributes

def acquireReleaseWith[R, E, A](acquire: => ZIO[R, E, A]): Acquire[R, E, A]

Acquires the specified resource before the query begins execution and releases it after the query completes execution, whether by success, failure, or interruption.

Acquires the specified resource before the query begins execution and releases it after the query completes execution, whether by success, failure, or interruption.

Attributes

def collectAll[R, E, A, Collection <: (Iterable)](as: Collection[ZQuery[R, E, A]])(implicit bf: BuildFrom[Collection[ZQuery[R, E, A]], A, Collection[A]], trace: Trace): ZQuery[R, E, Collection[A]]

Collects a collection of queries into a query returning a collection of their results. Requests will be executed sequentially and will be pipelined.

Collects a collection of queries into a query returning a collection of their results. Requests will be executed sequentially and will be pipelined.

Attributes

def collectAll[R, E, A](as: Set[ZQuery[R, E, A]])(implicit trace: Trace): ZQuery[R, E, Set[A]]

Collects a collection of queries into a query returning a collection of their results. Requests will be executed sequentially and will be pipelined.

Collects a collection of queries into a query returning a collection of their results. Requests will be executed sequentially and will be pipelined.

Attributes

def collectAll[R, E, A : ClassTag](as: Array[ZQuery[R, E, A]])(implicit evidence$2: ClassTag[A], trace: Trace): ZQuery[R, E, Array[A]]

Collects a collection of queries into a query returning a collection of their results. Requests will be executed sequentially and will be pipelined.

Collects a collection of queries into a query returning a collection of their results. Requests will be executed sequentially and will be pipelined.

Attributes

def collectAll[R, E, A](as: Option[ZQuery[R, E, A]])(implicit trace: Trace): ZQuery[R, E, Option[A]]

Collects a collection of queries into a query returning a collection of their results. Requests will be executed sequentially and will be pipelined.

Collects a collection of queries into a query returning a collection of their results. Requests will be executed sequentially and will be pipelined.

Attributes

def collectAll[R, E, A](as: NonEmptyChunk[ZQuery[R, E, A]])(implicit trace: Trace): ZQuery[R, E, NonEmptyChunk[A]]

Collects a collection of queries into a query returning a collection of their results. Requests will be executed sequentially and will be pipelined.

Collects a collection of queries into a query returning a collection of their results. Requests will be executed sequentially and will be pipelined.

Attributes

def collectAllBatched[R, E, A, Collection <: (Iterable)](as: Collection[ZQuery[R, E, A]])(implicit bf: BuildFrom[Collection[ZQuery[R, E, A]], A, Collection[A]], trace: Trace): ZQuery[R, E, Collection[A]]

Collects a collection of queries into a query returning a collection of their results, batching requests to data sources.

Collects a collection of queries into a query returning a collection of their results, batching requests to data sources.

Attributes

def collectAllBatched[R, E, A](as: Set[ZQuery[R, E, A]])(implicit trace: Trace): ZQuery[R, E, Set[A]]

Collects a collection of queries into a query returning a collection of their results, batching requests to data sources.

Collects a collection of queries into a query returning a collection of their results, batching requests to data sources.

Attributes

def collectAllBatched[R, E, A : ClassTag](as: Array[ZQuery[R, E, A]])(implicit evidence$3: ClassTag[A], trace: Trace): ZQuery[R, E, Array[A]]

Collects a collection of queries into a query returning a collection of their results, batching requests to data sources.

Collects a collection of queries into a query returning a collection of their results, batching requests to data sources.

Attributes

def collectAllBatched[R, E, A](as: NonEmptyChunk[ZQuery[R, E, A]])(implicit trace: Trace): ZQuery[R, E, NonEmptyChunk[A]]

Collects a collection of queries into a query returning a collection of their results, batching requests to data sources.

Collects a collection of queries into a query returning a collection of their results, batching requests to data sources.

Attributes

def collectAllPar[R, E, A, Collection <: (Iterable)](as: Collection[ZQuery[R, E, A]])(implicit bf: BuildFrom[Collection[ZQuery[R, E, A]], A, Collection[A]], trace: Trace): ZQuery[R, E, Collection[A]]

Collects a collection of queries into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Collects a collection of queries into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Attributes

def collectAllPar[R, E, A](as: Set[ZQuery[R, E, A]])(implicit trace: Trace): ZQuery[R, E, Set[A]]

Collects a collection of queries into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Collects a collection of queries into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Attributes

def collectAllPar[R, E, A : ClassTag](as: Array[ZQuery[R, E, A]])(implicit evidence$4: ClassTag[A], trace: Trace): ZQuery[R, E, Array[A]]

Collects a collection of queries into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Collects a collection of queries into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Attributes

def collectAllPar[R, E, A](as: NonEmptyChunk[ZQuery[R, E, A]])(implicit trace: Trace): ZQuery[R, E, NonEmptyChunk[A]]

Collects a collection of queries into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Collects a collection of queries into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Attributes

def die(t: => Throwable)(implicit trace: Trace): ZQuery[Any, Nothing, Nothing]

Constructs a query that dies with the specified error.

Constructs a query that dies with the specified error.

Attributes

def environment[R](implicit trace: Trace): ZQuery[R, Nothing, ZEnvironment[R]]

Accesses the whole environment of the query.

Accesses the whole environment of the query.

Attributes

Accesses the environment of the effect.

Accesses the environment of the effect.

val portNumber = effect.access(_.config.portNumber)

Attributes

Effectfully accesses the environment of the effect.

Effectfully accesses the environment of the effect.

Attributes

Effectfully accesses the environment of the effect.

Effectfully accesses the environment of the effect.

Attributes

def fail[E](error: => E)(implicit trace: Trace): ZQuery[Any, E, Nothing]

Constructs a query that fails with the specified error.

Constructs a query that fails with the specified error.

Attributes

def failCause[E](cause: => Cause[E])(implicit trace: Trace): ZQuery[Any, E, Nothing]

Constructs a query that fails with the specified cause.

Constructs a query that fails with the specified cause.

Attributes

def foreach[R, E, A, B, Collection <: (Iterable)](as: Collection[A])(f: A => ZQuery[R, E, B])(implicit bf: BuildFrom[Collection[A], B, Collection[B]], trace: Trace): ZQuery[R, E, Collection[B]]

Performs a query for each element in a collection, collecting the results into a query returning a collection of their results. Requests will be executed sequentially and will be pipelined.

Performs a query for each element in a collection, collecting the results into a query returning a collection of their results. Requests will be executed sequentially and will be pipelined.

Attributes

final def foreach[R, E, A, B](in: Set[A])(f: A => ZQuery[R, E, B])(implicit trace: Trace): ZQuery[R, E, Set[B]]

Applies the function f to each element of the Set[A] and returns the results in a new Set[B].

Applies the function f to each element of the Set[A] and returns the results in a new Set[B].

For a parallel version of this method, see foreachPar. If you do not need the results, see foreach_ for a more efficient implementation.

Attributes

final def foreach[R, E, A, B : ClassTag](in: Array[A])(f: A => ZQuery[R, E, B])(implicit evidence$5: ClassTag[B], trace: Trace): ZQuery[R, E, Array[B]]

Applies the function f to each element of the Array[A] and returns the results in a new Array[B].

Applies the function f to each element of the Array[A] and returns the results in a new Array[B].

For a parallel version of this method, see foreachPar. If you do not need the results, see foreach_ for a more efficient implementation.

Attributes

def foreach[R, E, Key, Key2, Value, Value2](map: Map[Key, Value])(f: (Key, Value) => ZQuery[R, E, (Key2, Value2)])(implicit trace: Trace): ZQuery[R, E, Map[Key2, Value2]]

Applies the function f to each element of the Map[Key, Value] and returns the results in a new Map[Key2, Value2].

Applies the function f to each element of the Map[Key, Value] and returns the results in a new Map[Key2, Value2].

For a parallel version of this method, see foreachPar. If you do not need the results, see foreach_ for a more efficient implementation.

Attributes

final def foreach[R, E, A, B](in: Option[A])(f: A => ZQuery[R, E, B])(implicit trace: Trace): ZQuery[R, E, Option[B]]

Applies the function f if the argument is non-empty and returns the results in a new Option[B].

Applies the function f if the argument is non-empty and returns the results in a new Option[B].

Attributes

final def foreach[R, E, A, B](in: NonEmptyChunk[A])(f: A => ZQuery[R, E, B])(implicit trace: Trace): ZQuery[R, E, NonEmptyChunk[B]]

Applies the function f to each element of the NonEmptyChunk[A] and returns the results in a new NonEmptyChunk[B].

Applies the function f to each element of the NonEmptyChunk[A] and returns the results in a new NonEmptyChunk[B].

For a parallel version of this method, see foreachPar. If you do not need the results, see foreach_ for a more efficient implementation.

Attributes

def foreachBatched[R, E, A, B, Collection <: (Iterable)](as: Collection[A])(f: A => ZQuery[R, E, B])(implicit bf: BuildFrom[Collection[A], B, Collection[B]], trace: Trace): ZQuery[R, E, Collection[B]]

Performs a query for each element in a collection, batching requests to data sources and collecting the results into a query returning a collection of their results.

Performs a query for each element in a collection, batching requests to data sources and collecting the results into a query returning a collection of their results.

Attributes

final def foreachBatched[R, E, A, B](as: Set[A])(fn: A => ZQuery[R, E, B])(implicit trace: Trace): ZQuery[R, E, Set[B]]
final def foreachBatched[R, E, A, B : ClassTag](as: Array[A])(f: A => ZQuery[R, E, B])(implicit evidence$6: ClassTag[B], trace: Trace): ZQuery[R, E, Array[B]]

Performs a query for each element in an Array, batching requests to data sources and collecting the results into a query returning a collection of their results.

Performs a query for each element in an Array, batching requests to data sources and collecting the results into a query returning a collection of their results.

For a sequential version of this method, see foreach.

Attributes

def foreachBatched[R, E, Key, Key2, Value, Value2](map: Map[Key, Value])(f: (Key, Value) => ZQuery[R, E, (Key2, Value2)])(implicit trace: Trace): ZQuery[R, E, Map[Key2, Value2]]

Performs a query for each element in a Map, batching requests to data sources and collecting the results into a query returning a collection of their results.

Performs a query for each element in a Map, batching requests to data sources and collecting the results into a query returning a collection of their results.

For a sequential version of this method, see foreach.

Attributes

final def foreachBatched[R, E, A, B](as: NonEmptyChunk[A])(f: A => ZQuery[R, E, B])(implicit trace: Trace): ZQuery[R, E, NonEmptyChunk[B]]

Performs a query for each element in a NonEmptyChunk, batching requests to data sources and collecting the results into a query returning a collection of their results.

Performs a query for each element in a NonEmptyChunk, batching requests to data sources and collecting the results into a query returning a collection of their results.

For a sequential version of this method, see foreach.

Attributes

def foreachPar[R, E, A, B, Collection <: (Iterable)](as: Collection[A])(f: A => ZQuery[R, E, B])(implicit bf: BuildFrom[Collection[A], B, Collection[B]], trace: Trace): ZQuery[R, E, Collection[B]]

Performs a query for each element in a collection, collecting the results into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Performs a query for each element in a collection, collecting the results into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Attributes

final def foreachPar[R, E, A, B](as: Set[A])(fn: A => ZQuery[R, E, B])(implicit trace: Trace): ZQuery[R, E, Set[B]]

Performs a query for each element in a Set, collecting the results into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Performs a query for each element in a Set, collecting the results into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Attributes

final def foreachPar[R, E, A, B : ClassTag](as: Array[A])(f: A => ZQuery[R, E, B])(implicit evidence$7: ClassTag[B], trace: Trace): ZQuery[R, E, Array[B]]

Performs a query for each element in an Array, collecting the results into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Performs a query for each element in an Array, collecting the results into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

For a sequential version of this method, see foreach.

Attributes

def foreachPar[R, E, Key, Key2, Value, Value2](map: Map[Key, Value])(f: (Key, Value) => ZQuery[R, E, (Key2, Value2)])(implicit trace: Trace): ZQuery[R, E, Map[Key2, Value2]]

Performs a query for each element in a Map, collecting the results into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Performs a query for each element in a Map, collecting the results into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

For a sequential version of this method, see foreach.

Attributes

final def foreachPar[R, E, A, B](as: NonEmptyChunk[A])(fn: A => ZQuery[R, E, B])(implicit trace: Trace): ZQuery[R, E, NonEmptyChunk[B]]

Performs a query for each element in a NonEmptyChunk, collecting the results into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

Performs a query for each element in a NonEmptyChunk, collecting the results into a query returning a collection of their results. Requests will be executed in parallel and will be batched.

For a sequential version of this method, see foreach.

Attributes

def fromEither[E, A](either: => Either[E, A])(implicit trace: Trace): ZQuery[Any, E, A]

Constructs a query from an either

Constructs a query from an either

Attributes

def fromOption[A](option: => Option[A])(implicit trace: Trace): ZQuery[Any, Option[Nothing], A]

Constructs a query from an option

Constructs a query from an option

Attributes

def fromRequest[R, E, A, B](request0: => A)(dataSource0: => DataSource[R, A])(implicit ev: A <:< Request[E, B], trace: Trace): ZQuery[R, E, B]

Constructs a query from a request and a data source. Queries will die with a QueryFailure when run if the data source does not provide results for all requests received. Queries must be constructed with fromRequest or one of its variants for optimizations to be applied.

Constructs a query from a request and a data source. Queries will die with a QueryFailure when run if the data source does not provide results for all requests received. Queries must be constructed with fromRequest or one of its variants for optimizations to be applied.

Attributes

def fromRequestUncached[R, E, A, B](request: => A)(dataSource: => DataSource[R, A])(implicit ev: A <:< Request[E, B], trace: Trace): ZQuery[R, E, B]

Constructs a query from a request and a data source but does not apply caching to the query.

Constructs a query from a request and a data source but does not apply caching to the query.

Attributes

def fromZIO[R, E, A](effect: => ZIO[R, E, A])(implicit trace: Trace): ZQuery[R, E, A]

Constructs a query from an effect.

Constructs a query from an effect.

Attributes

def never(implicit trace: Trace): ZQuery[Any, Nothing, Nothing]

Constructs a query that never completes.

Constructs a query that never completes.

Attributes

def partitionQuery[R, E, A, B](as: Iterable[A])(f: A => ZQuery[R, E, B])(implicit ev: CanFail[E], trace: Trace): ZQuery[R, Nothing, (Iterable[E], Iterable[B])]

Performs a query for each element in a collection, collecting the results into a collection of failed results and a collection of successful results. Requests will be executed sequentially and will be pipelined.

Performs a query for each element in a collection, collecting the results into a collection of failed results and a collection of successful results. Requests will be executed sequentially and will be pipelined.

Attributes

def partitionQueryPar[R, E, A, B](as: Iterable[A])(f: A => ZQuery[R, E, B])(implicit ev: CanFail[E], trace: Trace): ZQuery[R, Nothing, (Iterable[E], Iterable[B])]

Performs a query for each element in a collection, collecting the results into a collection of failed results and a collection of successful results. Requests will be executed in parallel and will be batched.

Performs a query for each element in a collection, collecting the results into a collection of failed results and a collection of successful results. Requests will be executed in parallel and will be batched.

Attributes

def service[R : Tag](implicit evidence$8: Tag[R], trace: Trace): ZQuery[R, Nothing, R]

Accesses the whole environment of the query.

Accesses the whole environment of the query.

Attributes

Accesses the environment of the effect.

Accesses the environment of the effect.

val portNumber = effect.access(_.config.portNumber)

Attributes

Effectfully accesses the environment of the effect.

Effectfully accesses the environment of the effect.

Attributes

Effectfully accesses the environment of the effect.

Effectfully accesses the environment of the effect.

Attributes

def some[A](a: => A)(implicit trace: Trace): ZQuery[Any, Nothing, Option[A]]

Constructs a query that succeeds with the optional value.

Constructs a query that succeeds with the optional value.

Attributes

def succeed[A](value: => A)(implicit trace: Trace): ZQuery[Any, Nothing, A]

Constructs a query that succeeds with the specified value.

Constructs a query that succeeds with the specified value.

Attributes

def suspend[R, E, A](query: => ZQuery[R, E, A])(implicit trace: Trace): ZQuery[R, E, A]

Returns a lazily constructed query.

Returns a lazily constructed query.

Attributes

def unsandbox[R, E, A](v: => ZQuery[R, Cause[E], A])(implicit trace: Trace): ZQuery[R, E, A]

The inverse operation ZQuery.sandbox

The inverse operation ZQuery.sandbox

Terminates with exceptions on the Left side of the Either error, if it exists. Otherwise extracts the contained IO[E, A]

Attributes

def unwrap[R, E, A](zio: => ZIO[R, E, ZQuery[R, E, A]])(implicit trace: Trace): ZQuery[R, E, A]

Unwraps a query that is produced by an effect.

Unwraps a query that is produced by an effect.

Attributes

Concrete fields

val none: ZQuery[Any, Nothing, Option[Nothing]]

Constructs a query that succeds with the empty value.

Constructs a query that succeds with the empty value.

Attributes

val unit: ZQuery[Any, Nothing, Unit]

The query that succeeds with the unit value.

The query that succeeds with the unit value.

Attributes