ComponentElaborator

class ComponentElaborator[F[_]] extends Phase

A compiler phase which partitions a query for execution by multiple composed interpreters.

This phase transforms the input query by assigning subtrees to component interpreters as specified by the supplied mapping.

The mapping has Type and field name pairs as keys and component id and join function pairs as values. When the traversal of the input query visits a Select node with type Type.field name it will replace the Select with a Component node comprising,

  1. the component id of the interpreter which will be responsible for evaluating the subquery.
  2. A join function which will be called during interpretation with,

i) the cursor at that point in evaluation. ii) The deferred subquery.

This join function is responsible for computing the continuation query which will be evaluated by the responsible interpreter.

Because the join is provided with the cursor of the parent interpreter the subquery can be parameterised with values derived from the parent query.

Companion:
object
trait Phase
class Object
trait Matchable
class Any

Value members

Concrete methods

override def transform(query: Query, vars: Vars, schema: Schema, tpe: Type): Result[Query]
Definition Classes