Batched

zio.query.DataSource$.Batched
See theBatched companion object
trait Batched[-R, -A] extends DataSource[R, A]

A data source that executes requests that can be performed in parallel in batches but does not further optimize batches of requests that must be performed sequentially.

Attributes

Companion:
object
Graph
Supertypes
trait DataSource[R, A]
class Object
trait Matchable
class Any

Members list

Concise view

Value members

Abstract methods

def run(requests: Chunk[A])(implicit trace: Trace): ZIO[R, Nothing, CompletedRequestMap]

Concrete methods

final def runAll(requests: Chunk[Chunk[A]])(implicit trace: Trace): ZIO[R, Nothing, CompletedRequestMap]

Execute a collection of requests. The outer Chunk represents batches of requests that must be performed sequentially. The inner Chunk represents a batch of requests that can be performed in parallel.

Execute a collection of requests. The outer Chunk represents batches of requests that must be performed sequentially. The inner Chunk represents a batch of requests that can be performed in parallel.

Attributes

Inherited methods

final def @@[R1 <: R](aspect: DataSourceAspect[R1]): DataSource[R1, A]

Syntax for adding aspects.

Syntax for adding aspects.

Attributes

Inherited from:
DataSource
def batchN(n: Int): DataSource[R, A]

Returns a data source that executes at most n requests in parallel.

Returns a data source that executes at most n requests in parallel.

Attributes

Inherited from:
DataSource
final def contramap[B](f: Described[B => A]): DataSource[R, B]

Returns a new data source that executes requests of type B using the specified function to transform B requests into requests that this data source can execute.

Returns a new data source that executes requests of type B using the specified function to transform B requests into requests that this data source can execute.

Attributes

Inherited from:
DataSource
final def contramapZIO[R1 <: R, B](f: Described[B => ZIO[R1, Nothing, A]]): DataSource[R1, B]

Returns a new data source that executes requests of type B using the specified effectual function to transform B requests into requests that this data source can execute.

Returns a new data source that executes requests of type B using the specified effectual function to transform B requests into requests that this data source can execute.

Attributes

Inherited from:
DataSource
final def eitherWith[R1 <: R, B, C](that: DataSource[R1, B])(f: Described[C => Either[A, B]]): DataSource[R1, C]

Returns a new data source that executes requests of type C using the specified function to transform C requests into requests that either this data source or that data source can execute.

Returns a new data source that executes requests of type C using the specified function to transform C requests into requests that either this data source or that data source can execute.

Attributes

Inherited from:
DataSource
final override def equals(that: Any): Boolean

Compares the receiver object (this) with the argument object (that) for equivalence.

Compares the receiver object (this) with the argument object (that) for equivalence.

Any implementation of this method should be an equivalence relation:

  • It is reflexive: for any instance x of type Any, x.equals(x) should return true.
  • It is symmetric: for any instances x and y of type Any, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any instances x, y, and z of type Any if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.

If you override this method, you should verify that your implementation remains an equivalence relation. Additionally, when overriding this method it is usually necessary to override hashCode to ensure that objects which are "equal" (o1.equals(o2) returns true) hash to the same scala.Int. (o1.hashCode.equals(o2.hashCode)).

Attributes

that

the object to compare against this object for equality.

Returns:

true if the receiver object is equivalent to the argument; false otherwise.

Definition Classes
DataSource -> Any
Inherited from:
DataSource
final override def hashCode: Int

Calculate a hash code value for the object.

Calculate a hash code value for the object.

The default hashing algorithm is platform dependent.

Note that it is allowed for two objects to have identical hash codes (o1.hashCode.equals(o2.hashCode)) yet not be equal (o1.equals(o2) returns false). A degenerate implementation could always return 0. However, it is required that if two objects are equal (o1.equals(o2) returns true) that they have identical hash codes (o1.hashCode.equals(o2.hashCode)). Therefore, when overriding this method, be sure to verify that the behavior is consistent with the equals method.

Attributes

Returns:

the hash code value for this object.

Definition Classes
DataSource -> Any
Inherited from:
DataSource

Provides this data source with its required environment.

Provides this data source with its required environment.

Attributes

Inherited from:
DataSource

Provides this data source with part of its required environment.

Provides this data source with part of its required environment.

Attributes

Inherited from:
DataSource
final def race[R1 <: R, A1 <: A](that: DataSource[R1, A1]): DataSource[R1, A1]

Returns a new data source that executes requests by sending them to this data source and that data source, returning the results from the first data source to complete and safely interrupting the loser.

Returns a new data source that executes requests by sending them to this data source and that data source, returning the results from the first data source to complete and safely interrupting the loser.

Attributes

Inherited from:
DataSource
final override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
DataSource -> Any
Inherited from:
DataSource

Inherited fields

The data source's identifier.

The data source's identifier.

Attributes

Inherited from:
DataSource