/** * @since 1.0.0 */ import type * as Chunk from "@effect/data/Chunk"; import type * as Context from "@effect/data/Context"; import type * as Debug from "@effect/data/Debug"; import type * as Duration from "@effect/data/Duration"; import type * as Either from "@effect/data/Either"; import type { LazyArg } from "@effect/data/Function"; import type * as Option from "@effect/data/Option"; import type * as Cause from "@effect/io/Cause"; import type * as Effect from "@effect/io/Effect"; import type * as Layer from "@effect/io/Layer"; import type * as Cache from "@effect/query/Cache"; import type * as DataSource from "@effect/query/DataSource"; import type * as Described from "@effect/query/Described"; import type * as Request from "@effect/query/Request"; /** * @since 1.0.0 * @category symbols */ export declare const QueryTypeId: unique symbol; /** * @since 1.0.0 * @category symbols */ export type QueryTypeId = typeof QueryTypeId; /** * A `Query` is a purely functional description of an effectual query * that may contain requests from one or more data sources, requires an * environment `R`, and may fail with an `E` or succeed with an `A`. * * Requests that can be performed in parallel, as expressed by `zipWithPar` and * combinators derived from it, will automatically be batched. Requests that * must be performed sequentially, as expressed by `zipWith` and combinators * derived from it, will automatically be pipelined. This allows for aggressive * data source specific optimizations. Requests can also be deduplicated and * cached. * * This allows for writing queries in a high level, compositional style, with * confidence that they will automatically be optimized. For example, consider * the following query from a user service. * * ```ts * import * as Chunk from "@effect/data/Chunk" * import * as Query from "@effect/query/Query" * * declare const getAllUserIds: Query.Query> * declare const getUserNameById: (id: number) => Query.Query * * const userNames = pipe( * getAllUserIds, * Query.flatMap(Query.forEachPar(getUserNameById)) * ) * ``` * * This would normally require `N + 1` queries, one for `getAllUserIds` and one * for each call to `getUserNameById`. In contrast, `Query` will automatically * optimize this to two queries, one for `userIds` and one for `userNames`, * assuming an implementation of the user service that supports batching. * * Based on "There is no Fork: an Abstraction for Efficient, Concurrent, and * Concise Data Access" by Simon Marlow, Louis Brandy, Jonathan Coens, and Jon * Purdy. {@link http://simonmar.github.io/bib/papers/haxl-icfp14.pdf} * * @since 1.0.0 * @category models */ export interface Query extends Query.Variance, Effect.Effect { traced(trace: Debug.Trace): Query; } /** * @since 1.0.0 */ export declare namespace Query { /** * @since 1.0.0 * @category models */ interface Variance { readonly [QueryTypeId]: { readonly _R: (_: never) => R; readonly _E: (_: never) => E; readonly _A: (_: never) => A; }; } } /** * Returns a query which submerges the error case of `Either` into the error * channel of the query * * The inverse of `Query.either`. * * @since 1.0.0 * @category combinators */ export declare const absolve: (self: Query>) => Query; /** * Executes the requests for a query between two effects, `before` and `after`, * where the result of `before` can be used by `after`. * * @since 1.0.0 * @category combinators */ export declare const around: { (before: Described.Described>, after: Described.Described<(a: A2) => Effect.Effect>): (self: Query) => Query; (self: Query, before: Described.Described>, after: Described.Described<(a: A2) => Effect.Effect>): Query; }; /** * Maps the success value of this query to the specified constant value. * * @since 1.0.0 * @category mapping */ export declare const as: { (value: A2): (self: Query) => Query; (self: Query, value: A2): Query; }; /** * Lifts the error channel into a `Some` value for composition with other * optional queries. * * @since 1.0.0 * @category mapping */ export declare const asSomeError: (self: Query) => Query, A>; /** * Maps the success value of this query to unit. * * @since 1.0.0 * @category mapping */ export declare const asUnit: (self: Query) => Query; /** * Enables caching for this query. Note that caching is enabled by default so * this will only be effective to enable caching in part of a larger query in * which caching has been disabled. * * @since 1.0.0 * @category combinators */ export declare const cached: (self: Query) => Query; /** * Recovers from all expected errors. * * @since 1.0.0 * @category error handling */ export declare const catchAll: { (f: (error: E) => Query): (self: Query) => Query; (self: Query, f: (error: E) => Query): Query; }; /** * Recovers from all errors, both expected and unexpected, with provided * `Cause`. * * @since 1.0.0 * @category error handling */ export declare const catchAllCause: { (f: (cause: Cause.Cause) => Query): (self: Query) => Query; (self: Query, f: (cause: Cause.Cause) => Query): Query; }; /** * Collects a collection of queries into a query returning a collection of * their results. Requests will be executed sequentially and will be * pipelined. * * @since 1.0.0 * @category combinators */ export declare const collectAll: (queries: Iterable>) => Query>; /** * Collects a collection of queries into a query returning a collection of * their results, batching requests to data sources. * * @since 1.0.0 * @category combinators */ export declare const collectAllBatched: (queries: Iterable>) => Query>; /** * Collects a collection of queries into a query returning a collection of * their results. Requests will be executed in parallel and will be batched. * * @since 1.0.0 * @category combinators */ export declare const collectAllPar: (queries: Iterable>) => Query>; /** * Accesses the whole context of the query. * * @since 1.0.0 * @category context */ export declare const context: (_: void) => Query>; /** * Accesses the context of the effect. * * @since 1.0.0 * @category context */ export declare const contextWith: (f: (context: Context.Context) => A) => Query; /** * Effectfully accesses the context of the effect. * * @since 1.0.0 * @category context */ export declare const contextWithEffect: (f: (context: Context.Context) => Effect.Effect) => Query; /** * Effectfully accesses the context of the effect. * * @since 1.0.0 * @category context */ export declare const contextWithQuery: (f: (context: Context.Context) => Query) => Query; /** * Provides this query with part of its required context. * * @since 1.0.0 * @category context */ export declare const contramapContext: { (f: Described.Described<(context: Context.Context) => Context.Context>): (self: Query) => Query; (self: Query, f: Described.Described<(context: Context.Context) => Context.Context>): Query; }; /** * Constructs a query that dies with the specified defect. * * @since 1.0.0 * @category constructors */ export declare const die: (defect: unknown) => Query; /** * Constructs a query that dies with the specified lazily evaluated defect. * * @since 1.0.0 * @category constructors */ export declare const dieSync: (evaluate: LazyArg) => Query; /** * Returns a query whose failure and success have been lifted into an * `Either`. The resulting query cannot fail, because the failure case has * been exposed as part of the `Either` success case. * * @since 1.0.0 * @category combinators */ export declare const either: (self: Query) => Query>; /** * Ensures that if this query starts executing, the specified query will be * executed immediately after this query completes execution, whether by * success or failure. * * @since 1.0.0 * @category finalization */ export declare const ensuring: { (finalizer: Query): (self: Query) => Query; (self: Query, finalizer: Query): Query; }; /** * Constructs a query that fails with the specified error. * * @since 1.0.0 * @category constructors */ export declare const fail: (error: E) => Query; /** * Constructs a query that fails with the specified lazily evaluated error. * * @since 1.0.0 * @category constructors */ export declare const failSync: (evaluate: LazyArg) => Query; /** * Constructs a query that fails with the specified cause. * * @since 1.0.0 * @category constructors */ export declare const failCause: (cause: Cause.Cause) => Query; /** * Constructs a query that fails with the specified cause. * * @since 1.0.0 * @category constructors */ export declare const failCauseSync: (evaluate: LazyArg>) => Query; /** * Returns a query that models execution of this query, followed by passing * its result to the specified function that returns a query. Requests * composed with `flatMap` or combinators derived from it will be executed * sequentially and will not be pipelined, though deduplication and caching of * requests may still be applied. * * @since 1.0.0 * @category sequencing */ export declare const flatMap: { (f: (a: A) => Query): (self: Query) => Query; (self: Query, f: (a: A) => Query): Query; }; /** * Returns a query that performs the outer query first, followed by the inner * query, yielding the value of the inner query. * * This method can be used to "flatten" nested queries. * * @since 1.0.0 * @category sequencing */ export declare const flatten: (self: Query>) => Query; /** * 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. * * @since 1.0.0 * @category traversing */ export declare const forEach: { (f: (a: A) => Query): (elements: Iterable) => Query>; (elements: Iterable, f: (a: A) => Query): Query>; }; /** * 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. * * @since 1.0.0 * @category traversing */ export declare const forEachBatched: { (f: (a: A) => Query): (elements: Iterable) => Query>; (elements: Iterable, f: (a: A) => Query): Query>; }; /** * 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. * * @since 1.0.0 * @category traversing */ export declare const forEachPar: { (f: (a: A) => Query): (elements: Iterable) => Query>; (elements: Iterable, f: (a: A) => Query): Query>; }; /** * Constructs a query from an effect. * * @since 1.0.0 * @category constructors */ export declare const fromEffect: (effect: Effect.Effect) => Query; /** * Constructs a query from an `Either`. * * @since 1.0.0 * @category constructors */ export declare const fromEither: (either: Either.Either) => Query; /** * Constructs a query from an `Option`. * * @since 1.0.0 * @category constructors */ export declare const fromOption: (option: Option.Option) => Query, A>; /** * 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. * * @since 1.0.0 * @category constructors */ export declare const fromRequest: , A2 extends A>(request: A, dataSource: DataSource.DataSource) => Query, Request.Request.Success>; /** * Constructs a query from a request and a data source but does not apply * caching to the query. * * @since 1.0.0 * @category constructors */ export declare const fromRequestUncached: , A2 extends A>(request: A, dataSource: DataSource.DataSource) => Query, Request.Request.Success>; /** * This function returns `true` if the specified value is an `Query` value, * `false` otherwise. * * This function can be useful for checking the type of a value before * attempting to operate on it as an `Query` value. For example, you could * use `isQuery` to check the type of a value before using it as an * argument to a function that expects an `Query` value. * * @param u - The value to check for being an `Query` value. * * @returns `true` if the specified value is an `Query` value, `false` * otherwise. * * @since 1.0.0 * @category refinements */ export declare const isQuery: (u: unknown) => u is Query; /** * "Zooms in" on the value in the `Left` side of an `Either`, moving the * possibility that the value is a `Right` to the error channel. * * @since 1.0.0 * @category combinators */ export declare const left: (self: Query>) => Query, A>; /** * Maps the specified function over the successful result of this query. * * @since 1.0.0 * @category mapping */ export declare const map: { (f: (a: A) => B): (self: Query) => Query; (self: Query, f: (a: A) => B): Query; }; /** * Returns a query whose failure and success channels have been mapped by the * specified pair of functions, `f` and `g`. * * @since 1.0.0 * @category mapping */ export declare const mapBoth: { (f: (e: E) => E2, g: (a: A) => A2): (self: Query) => Query; (self: Query, f: (e: E) => E2, g: (a: A) => A2): Query; }; /** * Transforms all data sources with the specified data source aspect. * * @since 1.0.0 * @category mapping */ export declare const mapDataSources: { (f: (dataSource: DataSource.DataSource) => DataSource.DataSource): (self: Query) => Query; (self: Query, f: (dataSource: DataSource.DataSource) => DataSource.DataSource): Query; }; /** * Maps the specified function over the failed result of this query. * * @since 1.0.0 * @category mapping */ export declare const mapError: { (f: (e: E) => E2): (self: Query) => Query; (self: Query, f: (e: E) => E2): Query; }; /** * Returns a query with its full cause of failure mapped using the specified * function. This can be used to transform errors while preserving the * original structure of `Cause`. * * @since 1.0.0 * @category mapping */ export declare const mapErrorCause: { (f: (cause: Cause.Cause) => Cause.Cause): (self: Query) => Query; (self: Query, f: (cause: Cause.Cause) => Cause.Cause): Query; }; /** * Maps the specified effectual function over the result of this query. * * @since 1.0.0 * @category mapping */ export declare const mapEffect: { (f: (a: A) => Effect.Effect): (self: Query) => Query; (self: Query, f: (a: A) => Effect.Effect): Query; }; /** * Folds over the failed or successful result of this query to yield a query * that does not fail, but succeeds with the value returned by the left or * right function passed to `match`. * * @since 1.0.0 * @category folding */ export declare const match: { (onFailure: (error: E) => Z, onSuccess: (value: A) => Z): (self: Query) => Query; (self: Query, onFailure: (error: E) => Z, onSuccess: (value: A) => Z): Query; }; /** * A more powerful version of `foldQuery` that allows recovering from any type * of failure except interruptions. * * @since 1.0.0 * @category folding */ export declare const matchCauseQuery: { (onFailure: (cause: Cause.Cause) => Query, onSuccess: (value: A) => Query): (self: Query) => Query; (self: Query, onFailure: (cause: Cause.Cause) => Query, onSuccess: (value: A) => Query): Query; }; /** * Recovers from errors by accepting one query to execute for the case of an * error, and one query to execute for the case of success. * * @since 1.0.0 * @category folding */ export declare const matchQuery: { (onFailure: (error: E) => Query, onSuccess: (value: A) => Query): (self: Query) => Query; (self: Query, onFailure: (error: E) => Query, onSuccess: (value: A) => Query): Query; }; /** * Limits the query data sources to execute at most `n` requests in parallel. * * @since 1.0.0 * @category combinators */ export declare const maxBatchSize: { (n: number): (self: Query) => Query; (self: Query, n: number): Query; }; /** * Constructs a query that never completes. * * @since 1.0.0 * @category constructors */ export declare const never: (_: void) => Query; /** * Converts this query to one that returns `Some` if data sources return * results for all requests received and `None` otherwise. * * @since 1.0.0 * @category combinators */ export declare const optional: (self: Query) => Query>; /** * Converts this query to one that dies if a query failure occurs. * * @since 1.0.0 * @category error handling */ export declare const orDie: (self: Query) => Query; /** * Converts this query to one that dies if a query failure occurs, using the * specified function to map the error to a defect. * * @since 1.0.0 * @category error handling */ export declare const orDieWith: { (f: (error: E) => unknown): (self: Query) => Query; (self: Query, f: (error: E) => unknown): Query; }; /** * 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. * * @since 1.0.0 * @category combinators */ export declare const partitionQuery: { (f: (a: A) => Query): (elements: Iterable) => Query, Chunk.Chunk]>; (elements: Iterable, f: (a: A) => Query): Query, Chunk.Chunk]>; }; /** * 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. * * @since 1.0.0 * @category combinators */ export declare const partitionQueryPar: { (f: (a: A) => Query): (elements: Iterable) => Query, Chunk.Chunk]>; (elements: Iterable, f: (a: A) => Query): Query, Chunk.Chunk]>; }; /** * Provides this query with its required context. * * @since 1.0.0 * @category context */ export declare const provideContext: { (context: Described.Described>): (self: Query) => Query; (self: Query, context: Described.Described>): Query; }; /** * Provides a layer to this query, which translates it to another level. * * @since 1.0.0 * @category context */ export declare const provideLayer: { (layer: Described.Described>): (self: Query) => Query; (self: Query, layer: Described.Described>): Query; }; /** * Splits the environment into two parts, providing one part using the * specified layer and leaving the remainder `R0`. * * @since 1.0.0 * @category context */ export declare const provideSomeLayer: { (layer: Described.Described>): (self: Query) => Query, E2 | E, A>; (self: Query, layer: Described.Described>): Query, E | E2, A>; }; /** * Races this query with the specified query, returning the result of the * first to complete successfully and safely interrupting the other. * * @since 1.0.0 * @category combinators */ export declare const race: { (that: Query): (self: Query) => Query; (self: Query, that: Query): Query; }; /** * Keeps some of the errors, and terminates the query with the rest. * * @since 1.0.0 * @category error handling */ export declare const refineOrDie: { (pf: (error: E) => Option.Option): (self: Query) => Query; (self: Query, pf: (error: E) => Option.Option): Query; }; /** * Keeps some of the errors, and terminates the query with the rest, using the * specified function to convert the `E` into a defect. * * @since 1.0.0 * @category error handling */ export declare const refineOrDieWith: { (pf: (error: E) => Option.Option, f: (error: E) => unknown): (self: Query) => Query; (self: Query, pf: (error: E) => Option.Option, f: (error: E) => unknown): Query; }; /** * "Zooms in" on the value in the `Right` side of an `Either`, moving the * possibility that the value is a `Left` to the error channel. * * @since 1.0.0 * @category combinators */ export declare const right: (self: Query>) => Query, A2>; /** * Returns an effect that models executing this query. * * @since 1.0.0 * @category destructors */ export declare const run: (self: Query) => Effect.Effect; /** * Returns an effect that models executing this query with the specified * cache. * * @since 1.0.0 * @category destructors */ export declare const runCache: { (cache: Cache.Cache): (self: Query) => Effect.Effect; (self: Query, cache: Cache.Cache): Effect.Effect; }; /** * Returns an effect that models executing this query, returning the query * result along with the cache. * * @since 1.0.0 * @category destructors */ export declare const runLog: (self: Query) => Effect.Effect; /** * Expose the full cause of failure of this query. * * @since 1.0.0 * @category combinators */ export declare const sandbox: (self: Query) => Query, A>; /** * Companion helper to `sandbox`. Allows recovery, and partial recovery, from * errors and defects alike, as in: * * @since 1.0.0 * @category combinators */ export declare const sandboxWith: { (f: (self: Query, A>) => Query, A2>): (self: Query) => Query; (self: Query, f: (self: Query, A>) => Query, A2>): Query; }; /** * Extracts a `Some` value into the value channel while moving the `None` into * the error channel for easier composition * * Inverse of `Query.unoption`. * * @since 1.0.0 * @category combinators */ export declare const some: (self: Query>) => Query, A>; /** * Extracts the optional value or succeeds with the given 'default' value. * * @since 1.0.0 * @category combinators */ export declare const someOrElse: { (def: LazyArg): (self: Query>) => Query; (self: Query>, def: LazyArg): Query; }; /** * Extracts the optional value or executes the given 'default' query. * * @since 1.0.0 * @category combinators */ export declare const someOrElseEffect: { (def: LazyArg>): (self: Query>) => Query; (self: Query>, def: LazyArg>): Query; }; /** * Extracts the optional value or fails with the given error `e`. * * @since 1.0.0 * @category combinators */ export declare const someOrFail: { (error: LazyArg): (self: Query>) => Query; (self: Query>, error: LazyArg): Query; }; /** * Constructs a query that succeeds with the specified value. * * @since 1.0.0 * @category constructors */ export declare const succeed: (value: A) => Query; /** * Constructs a query that succeds with the empty value. * * @since 1.0.0 * @category constructors */ export declare const succeedNone: (_: void) => Query>; /** * Constructs a query that succeeds with the optional value. * * @since 1.0.0 * @category constructors */ export declare const succeedSome: (value: A) => Query>; /** * Summarizes a query by computing some value before and after execution, and * then combining the values to produce a summary, together with the result of * execution. * * @since 1.0.0 * @category combinators */ export declare const summarized: { (summary: Effect.Effect, f: (start: B, end: B) => C): (self: Query) => Query; (self: Query, summary: Effect.Effect, f: (start: B, end: B) => C): Query; }; /** * Returns a lazily constructed query. * * @since 1.0.0 * @category constructors */ export declare const suspend: (evaluate: LazyArg>) => Query; /** * Constructs a query that succeeds with the specified lazily evaluated value. * * @since 1.0.0 * @category constructors */ export declare const sync: (evaluate: LazyArg) => Query; /** * Returns a new query that executes this one and times the execution. * * @since 1.0.0 * @category combinators */ export declare const timed: (self: Query) => Query; /** * Returns an effect that will timeout this query, returning `None` if the * timeout elapses before the query was completed. * * @since 1.0.0 * @category combinators */ export declare const timeout: { (duration: Duration.Duration): (self: Query) => Query>; (self: Query, duration: Duration.Duration): Query>; }; /** * The same as `Query.timeout`, but instead of producing a `None` in the event * of timeout, it will produce the specified error. * * @since 1.0.0 * @category combinators */ export declare const timeoutFail: { (error: LazyArg, duration: Duration.Duration): (self: Query) => Query; (self: Query, error: LazyArg, duration: Duration.Duration): Query; }; /** * The same as `Query.timeout`, but instead of producing a `None` in the event * of timeout, it will produce the specified failure. * * @since 1.0.0 * @category combinators */ export declare const timeoutFailCause: { (evaluate: LazyArg>, duration: Duration.Duration): (self: Query) => Query; (self: Query, evaluate: LazyArg>, duration: Duration.Duration): Query; }; /** * Returns a query that will timeout this query, returning either the default * value if the timeout elapses before the query has completed or the result * of applying the function `f` to the successful result of the query. * * @since 1.0.0 * @category combinators */ export declare const timeoutTo: { (def: B2, f: (a: A) => B, duration: Duration.Duration): (self: Query) => Query; (self: Query, def: B2, f: (a: A) => B, duration: Duration.Duration): Query; }; /** * Disables caching for this query. * * @since 1.0.0 * @category combinators */ export declare const uncached: (self: Query) => Query; /** * The query that succeeds with the unit value. * * @since 1.0.0 * @category constructors */ export declare const unit: (_: void) => Query; /** * Converts a `Query, A>` into a `Query>`. * * The inverse of `left`. * * @since 1.0.0 * @category combinators */ export declare const unleft: (self: Query, A>) => Query>; /** * Converts an option on errors into an option on values. * * @since 1.0.0 * @category combinators */ export declare const unoption: (self: Query, A>) => Query>; /** * Takes some fiber failures and converts them into errors. * * @since 1.0.0 * @category combinators */ export declare const unrefine: { (pf: (defect: unknown) => Option.Option): (self: Query) => Query; (self: Query, pf: (defect: unknown) => Option.Option): Query; }; /** * Takes some fiber failures and converts them into errors, using the * specified function to convert the error. * * @since 1.0.0 * @category combinators */ export declare const unrefineWith: { (pf: (defect: unknown) => Option.Option, f: (error: E) => E3): (self: Query) => Query; (self: Query, pf: (defect: unknown) => Option.Option, f: (error: E) => E3): Query; }; /** * Converts a `Query, A>` into a `Query>`. * * The inverse of `right`. * * @since 1.0.0 * @category combinators */ export declare const unright: (self: Query, A>) => Query>; /** * The inverse operation `Query.sandbox`. * * @since 1.0.0 * @category combinators */ export declare const unsandbox: (self: Query, A>) => Query; /** * Unwraps a query that is produced by an effect. * * @since 1.0.0 * @category combinators */ export declare const unwrap: (effect: Effect.Effect>) => Query; /** * Returns a query that models the execution of this query and the specified * query sequentially, combining their results into a tuple. * * @since 1.0.0 * @category zipping */ export declare const zip: { (that: Query): (self: Query) => Query; (self: Query, that: Query): Query; }; /** * Returns a query that models the execution of this query and the specified * query, batching requests to data sources and combining their results into a * tuple. * * @since 1.0.0 * @category zipping */ export declare const zipBatched: { (that: Query): (self: Query) => Query; (self: Query, that: Query): Query; }; /** * Returns a query that models the execution of this query and the specified * query, batching requests to data sources and returning the result of this * query. * * @since 1.0.0 * @category zipping */ export declare const zipBatchedLeft: { (that: Query): (self: Query) => Query; (self: Query, that: Query): Query; }; /** * Returns a query that models the execution of this query and the specified * query, batching requests to data sources and returning the result of the * specified query. * * @since 1.0.0 * @category zipping */ export declare const zipBatchedRight: { (that: Query): (self: Query) => Query; (self: Query, that: Query): Query; }; /** * Returns a query that models the execution of this query and the specified * query sequentially, returning the result of this query. * * @since 1.0.0 * @category zipping */ export declare const zipLeft: { (that: Query): (self: Query) => Query; (self: Query, that: Query): Query; }; /** * Returns a query that models the execution of this query and the specified * query sequentially, returning the result of the specified query. * * @since 1.0.0 * @category zipping */ export declare const zipRight: { (that: Query): (self: Query) => Query; (self: Query, that: Query): Query; }; /** * Returns a query that models the execution of this query and the specified * query in parallel, combining their results into a tuple. * * @since 1.0.0 * @category zipping */ export declare const zipPar: { (that: Query): (self: Query) => Query; (self: Query, that: Query): Query; }; /** * Returns a query that models the execution of this query and the specified * query in parallel, returning the result of this query. * * @since 1.0.0 * @category zipping */ export declare const zipParLeft: { (that: Query): (self: Query) => Query; (self: Query, that: Query): Query; }; /** * Returns a query that models the execution of this query and the specified * query in parallel, returning the result of the specified query. * * @since 1.0.0 * @category zipping */ export declare const zipParRight: { (that: Query): (self: Query) => Query; (self: Query, that: Query): Query; }; /** * Returns a query that models the execution of this query and the specified * query sequentially, combining their results with the specified function. * Requests composed with `zipWith` or combinators derived from it will * automatically be pipelined. * * @since 1.0.0 * @category zipping */ export declare const zipWith: { (that: Query, f: (a: A, b: B) => C): (self: Query) => Query; (self: Query, that: Query, f: (a: A, b: B) => C): Query; }; /** * Returns a query that models the execution of this query and the specified * query, batching requests to data sources. * * @since 1.0.0 * @category zipping */ export declare const zipWithBatched: { (that: Query, f: (a: A, b: B) => C): (self: Query) => Query; (self: Query, that: Query, f: (a: A, b: B) => C): Query; }; /** * Returns a query that models the execution of this query and the specified * query in parallel, combining their results with the specified function. * Requests composed with `zipWithPar` or combinators derived from it will * automatically be batched. * * @since 1.0.0 * @category zipping */ export declare const zipWithPar: { (that: Query, f: (a: A, b: B) => C): (self: Query) => Query; (self: Query, that: Query, f: (a: A, b: B) => C): Query; }; //# sourceMappingURL=Query.d.ts.map