Packages

object ZQuery

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ZQuery
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final class Acquire[-R, +E, +A] extends AnyVal
  2. final class AcquireExit[-R, +E, +A] extends AnyVal
  3. final class EnvironmentWithPartiallyApplied[R] extends AnyVal
  4. final class EnvironmentWithQueryPartiallyApplied[R] extends AnyVal
  5. final class EnvironmentWithZIOPartiallyApplied[R] extends AnyVal
  6. final class ProvideSomeLayer[R0, -R, +E, +A] extends AnyVal
  7. final class Release[-R, +E, +A] extends AnyRef
  8. final class ReleaseExit[-R, +E, E1, +A, B] extends AnyRef
  9. final class ServiceWithPartiallyApplied[R] extends AnyVal
  10. final class ServiceWithQueryPartiallyApplied[Service] extends AnyVal
  11. final class ServiceWithZIOPartiallyApplied[Service] extends AnyVal
  12. final class TimeoutTo[-R, +E, +A, +B] extends AnyRef

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def absolve[R, E, A](v: => ZQuery[R, E, Either[E, A]])(implicit trace: Trace): ZQuery[R, E, A]
  5. 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.

  6. 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.

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. val cachingEnabled: FiberRef[Boolean]
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  10. 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.

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

  11. 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.

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

  12. def collectAll[R, E, A](as: Array[ZQuery[R, E, A]])(implicit arg0: ClassTag[A], trace: Trace): ZQuery[R, E, Array[A]]

    Collects a collection of queries into a query returning a collection of their results.

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

  13. 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.

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

  14. def collectAll[R, E, A, Collection[+Element] <: Iterable[Element]](as: Collection[ZQuery[R, E, A]])(implicit bf: zio.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.

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

  15. 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.

  16. def collectAllBatched[R, E, A](as: Array[ZQuery[R, E, A]])(implicit arg0: 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.

  17. 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.

  18. def collectAllBatched[R, E, A, Collection[+Element] <: Iterable[Element]](as: Collection[ZQuery[R, E, A]])(implicit bf: zio.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.

  19. 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.

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

  20. def collectAllPar[R, E, A](as: Array[ZQuery[R, E, A]])(implicit arg0: ClassTag[A], trace: Trace): ZQuery[R, E, Array[A]]

    Collects a collection of queries into a query returning a collection of their results.

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

  21. 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.

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

  22. def collectAllPar[R, E, A, Collection[+Element] <: Iterable[Element]](as: Collection[ZQuery[R, E, A]])(implicit bf: zio.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.

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

  23. val currentCache: FiberRef[Cache]
  24. val currentScope: FiberRef[Scope]
  25. def die(t: => Throwable)(implicit trace: Trace): ZQuery[Any, Nothing, Nothing]

    Constructs a query that dies with the specified error.

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

    Accesses the whole environment of the query.

  27. def environmentWith[R]: EnvironmentWithPartiallyApplied[R]

    Accesses the environment of the effect.

    Accesses the environment of the effect.

    val portNumber = effect.access(_.config.portNumber)
  28. def environmentWithQuery[R]: EnvironmentWithQueryPartiallyApplied[R]

    Effectfully accesses the environment of the effect.

  29. def environmentWithZIO[R]: EnvironmentWithZIOPartiallyApplied[R]

    Effectfully accesses the environment of the effect.

  30. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  31. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  32. def fail[E](error: => E)(implicit trace: Trace): ZQuery[Any, E, Nothing]

    Lazily constructs a query that fails with the specified error.

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

    Lazily constructs a query that fails with the specified cause.

  34. def failCauseNow[E](cause: Cause[E]): ZQuery[Any, E, Nothing]

    Eagerly constructs a query that fails with the specified cause.

  35. def failNow[E](error: E): ZQuery[Any, E, Nothing]

    Eagerly constructs a query that fails with the specified error.

  36. 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.

  37. 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].

  38. 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.

  39. def foreach[R, E, A, B](in: Array[A])(f: (A) => ZQuery[R, E, B])(implicit arg0: 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.

  40. 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.

  41. def foreach[R, E, A, B, Collection[+Element] <: Iterable[Element]](as: Collection[A])(f: (A) => ZQuery[R, E, B])(implicit bf: zio.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.

    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.

  42. 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.

  43. 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.

  44. def foreachBatched[R, E, A, B](as: Array[A])(f: (A) => ZQuery[R, E, B])(implicit arg0: 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.

  45. def foreachBatched[R, E, A, B](as: Set[A])(fn: (A) => ZQuery[R, E, B])(implicit trace: Trace): ZQuery[R, E, Set[B]]
  46. def foreachBatched[R, E, A, B, Collection[+Element] <: Iterable[Element]](as: Collection[A])(f: (A) => ZQuery[R, E, B])(implicit bf: zio.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.

  47. 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.

    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.

  48. 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.

    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.

  49. def foreachPar[R, E, A, B](as: Array[A])(f: (A) => ZQuery[R, E, B])(implicit arg0: 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.

    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.

  50. 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.

    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.

  51. def foreachPar[R, E, A, B, Collection[+Element] <: Iterable[Element]](as: Collection[A])(f: (A) => ZQuery[R, E, B])(implicit bf: zio.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.

    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.

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

    Constructs a query from an either

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

    Constructs a query from an option

  54. 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.

    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.

    See also

    fromRequests for variants that allow for multiple requests to be submitted at once

  55. 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.

  56. def fromRequests[R, E, A, B](requests: List[A])(dataSource: DataSource[R, A])(implicit trace: Trace, ev: <:<[A, Request[E, B]]): ZQuery[R, E, List[B]]

    Constructs a query from a List of requests and a data source.

    Constructs a query from a List of requests and a data source. Queries will die with a QueryFailure when run the data source does not provide results for all requests received.

    See also

    fromRequest for submitting a single request to a datasource

    fromRequestsWith for a variant that allows transforming the input to a request

  57. def fromRequests[R, E, A, B](requests: Chunk[A])(dataSource: DataSource[R, A])(implicit trace: Trace, ev: <:<[A, Request[E, B]]): ZQuery[R, E, Chunk[B]]

    Constructs a query from a Chunk of requests and a data source.

    Constructs a query from a Chunk of requests and a data source. Queries will die with a QueryFailure when run the data source does not provide results for all requests received.

    See also

    fromRequest for submitting a single request to a datasource

    fromRequestsWith for a variant that allows transforming the input to a request

  58. def fromRequestsWith[R, E, In, A, B](as: List[In], f: (In) => A)(dataSource: DataSource[R, A])(implicit ev: <:<[A, Request[E, B]], trace: Trace): ZQuery[R, E, List[B]]

    Constructs a query from a List of values, a function transforming them into requests and a data source.

    Constructs a query from a List of values, a function transforming them into requests and a data source. Queries will die with a QueryFailure when run the data source does not provide results for all requests received.

  59. def fromRequestsWith[R, E, In, A, B](as: Chunk[In], f: (In) => A)(dataSource: DataSource[R, A])(implicit ev: <:<[A, Request[E, B]], trace: Trace): ZQuery[R, E, Chunk[B]]

    Constructs a query from a Chunk of values, a function transforming them into requests and a data source.

    Constructs a query from a Chunk of values, a function transforming them into requests and a data source. Queries will die with a QueryFailure when run the data source does not provide results for all requests received.

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

    Constructs a query from an effect.

  61. def fromZIONow[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. Unlike fromZIO, this method does not suspend the creation of the effect which can lead to improved performance in some cases, but it should only be used when the creation of the effect is side effect-free.

    Note that this is method is meant mostly for internal use, but it's made public so that library authors can make use of this optimization. Most users should use fromZIO instead.

  62. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  63. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  64. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  65. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  66. def never(implicit trace: Trace): ZQuery[Any, Nothing, Nothing]

    Constructs a query that never completes.

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

    Constructs a query that succeds with the empty value.

  68. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  69. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  70. 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.

    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.

  71. 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.

    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.

  72. def service[R](implicit arg0: Tag[R], trace: Trace): ZQuery[R, Nothing, R]

    Accesses the whole environment of the query.

  73. def serviceWith[R]: ServiceWithPartiallyApplied[R]

    Accesses the environment of the effect.

    Accesses the environment of the effect.

    val portNumber = effect.access(_.config.portNumber)
  74. def serviceWithQuery[R]: ServiceWithQueryPartiallyApplied[R]

    Effectfully accesses the environment of the effect.

  75. def serviceWithZIO[R]: ServiceWithZIOPartiallyApplied[R]

    Effectfully accesses the environment of the effect.

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

    Constructs a query that succeeds with the optional value.

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

    Lazily constructs a query that succeeds with the specified value.

    Lazily constructs a query that succeeds with the specified value.

    NOTE: If the value is side-effect free, prefer using succeedNow instead

  78. def succeedNow[A](value: A): ZQuery[Any, Nothing, A]

    Eagerly constructs a query that succeeds with the specified value.

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

    Returns a lazily constructed query.

  80. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  81. def toString(): String
    Definition Classes
    AnyRef → Any
  82. val unit: ZQuery[Any, Nothing, Unit]

    The query that succeeds with the unit value.

  83. 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]

  84. 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.

  85. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  86. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  87. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  88. object unsafe

    These methods can improve UX and performance in some cases, but when used improperly they can lead to unexpected behaviour in the application code.

    These methods can improve UX and performance in some cases, but when used improperly they can lead to unexpected behaviour in the application code.

    Make sure you really understand them before using them!

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped