Interface QueryExecutor

This interface abstracts away the details of how to compile a query into SQL and execute it. Instead of passing around all those details, SelectQueryBuilder and other classes that execute queries can just pass around and instance of QueryExecutor.

Hierarchy

Accessors

Methods

  • Executes a compiled query and runs the result through all plugins' transformResult method. Results are streamead instead of loaded at once.

    Type Parameters

    • R

    Parameters

    • compiledQuery: CompiledQuery<R>
    • chunkSize: number

      How many rows should be pulled from the database at once. Supported only by the postgres driver.

    • queryId: QueryId

    Returns AsyncIterableIterator<QueryResult<R>>

  • Given the query the user has built (expressed as an operation node tree) this method runs it through all plugins' transformQuery methods and returns the result.

    Type Parameters

    Parameters

    • node: T
    • queryId: QueryId

    Returns T

Generated using TypeDoc