← ZIO Query docs

DataSource

zio.query.DataSource
See theDataSource companion trait
object DataSource

Attributes

Companion
trait
Source
DataSource.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
DataSource.type

Members list

Type members

Classlikes

object Batched

Attributes

Companion
trait
Source
DataSource.scala
Supertypes
class Object
trait Matchable
class Any
Self type
Batched.type
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.

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
Source
DataSource.scala
Supertypes
trait DataSource[R, A]
class Object
trait Matchable
class Any

Value members

Concrete methods

def fromFunction[A, B](name: String)(f: A => B)(implicit ev: A <:< Request[Nothing, B]): DataSource[Any, A]

Constructs a data source from a pure function.

Constructs a data source from a pure function.

Attributes

Source
DataSource.scala
def fromFunctionBatched[A, B](name: String)(f: (Chunk[A]) => Chunk[B])(implicit ev: A <:< Request[Nothing, B]): DataSource[Any, A]

Constructs a data source from a pure function that takes a list of requests and returns a list of results of the same size. Each item in the result list must correspond to the item at the same index in the request list.

Constructs a data source from a pure function that takes a list of requests and returns a list of results of the same size. Each item in the result list must correspond to the item at the same index in the request list.

Attributes

Source
DataSource.scala
def fromFunctionBatchedOption[A, B](name: String)(f: (Chunk[A]) => Chunk[Option[B]])(implicit ev: A <:< Request[Nothing, B]): DataSource[Any, A]

Constructs a data source from a pure function that takes a list of requests and returns a list of optional results of the same size. Each item in the result list must correspond to the item at the same index in the request list.

Constructs a data source from a pure function that takes a list of requests and returns a list of optional results of the same size. Each item in the result list must correspond to the item at the same index in the request list.

Attributes

Source
DataSource.scala
def fromFunctionBatchedOptionZIO[R, E, A, B](name: String)(f: (Chunk[A]) => ZIO[R, E, Chunk[Option[B]]])(implicit ev: A <:< Request[E, B]): DataSource[R, A]

Constructs a data source from an effectual function that takes a list of requests and returns a list of optional results of the same size. Each item in the result list must correspond to the item at the same index in the request list.

Constructs a data source from an effectual function that takes a list of requests and returns a list of optional results of the same size. Each item in the result list must correspond to the item at the same index in the request list.

Attributes

Source
DataSource.scala
def fromFunctionBatchedWith[A, B](name: String)(f: (Chunk[A]) => Chunk[B], g: B => Request[Nothing, B])(implicit ev: A <:< Request[Nothing, B]): DataSource[Any, A]

Constructs a data source from a function that takes a list of requests and returns a list of results of the same size. Uses the specified function to associate each result with the corresponding effect, allowing the function to return the list of results in a different order than the list of requests.

Constructs a data source from a function that takes a list of requests and returns a list of results of the same size. Uses the specified function to associate each result with the corresponding effect, allowing the function to return the list of results in a different order than the list of requests.

Attributes

Source
DataSource.scala
def fromFunctionBatchedWithZIO[R, E, A, B](name: String)(f: (Chunk[A]) => ZIO[R, E, Chunk[B]], g: B => Request[E, B])(implicit ev: A <:< Request[E, B]): DataSource[R, A]

Constructs a data source from an effectual function that takes a list of requests and returns a list of results of the same size. Uses the specified function to associate each result with the corresponding effect, allowing the function to return the list of results in a different order than the list of requests.

Constructs a data source from an effectual function that takes a list of requests and returns a list of results of the same size. Uses the specified function to associate each result with the corresponding effect, allowing the function to return the list of results in a different order than the list of requests.

Attributes

Source
DataSource.scala
def fromFunctionBatchedZIO[R, E, A, B](name: String)(f: (Chunk[A]) => ZIO[R, E, Chunk[B]])(implicit ev: A <:< Request[E, B]): DataSource[R, A]

Constructs a data source from an effectual function that takes a list of requests and returns a list of results of the same size. Each item in the result list must correspond to the item at the same index in the request list.

Constructs a data source from an effectual function that takes a list of requests and returns a list of results of the same size. Each item in the result list must correspond to the item at the same index in the request list.

Attributes

Source
DataSource.scala
def fromFunctionOption[A, B](name: String)(f: A => Option[B])(implicit ev: A <:< Request[Nothing, B]): DataSource[Any, A]

Constructs a data source from a pure function that may not provide results for all requests received.

Constructs a data source from a pure function that may not provide results for all requests received.

Attributes

Source
DataSource.scala
def fromFunctionOptionZIO[R, E, A, B](name: String)(f: A => ZIO[R, E, Option[B]])(implicit ev: A <:< Request[E, B]): DataSource[R, A]

Constructs a data source from an effectual function that may not provide results for all requests received.

Constructs a data source from an effectual function that may not provide results for all requests received.

Attributes

Source
DataSource.scala
def fromFunctionZIO[R, E, A, B](name: String)(f: A => ZIO[R, E, B])(implicit ev: A <:< Request[E, B]): DataSource[R, A]

Constructs a data source from an effectual function.

Constructs a data source from an effectual function.

Attributes

Source
DataSource.scala
def make[R, A](name: String)(f: (Chunk[Chunk[A]]) => ZIO[R, Nothing, CompletedRequestMap]): DataSource[R, A]

Constructs a data source from a function taking a collection of requests and returning a CompletedRequestMap.

Constructs a data source from a function taking a collection of requests and returning a CompletedRequestMap.

Attributes

Source
DataSource.scala

Concrete fields

val never: DataSource[Any, Any]

A data source that never executes requests.

A data source that never executes requests.

Attributes

Source
DataSource.scala