ComponentElaborator

grackle.QueryCompiler.ComponentElaborator
See theComponentElaborator companion object
class ComponentElaborator[F[_]] extends Phase

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

This phase transforms the input query by assigning subtrees to component mappings as specified by the supplied cmapping.

The mapping has Type and field name pairs as keys and mapping 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 mapping which will be responsible for evaluating the subquery. 2. A join function which will be called during interpretation with,

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

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.

Attributes

Companion
object
Source
compiler.scala
Graph
Supertypes
trait Phase
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

override def transform(query: Query): Elab[Query]

Transform the supplied query algebra term query.

Transform the supplied query algebra term query.

Attributes

Definition Classes
Source
compiler.scala

Inherited methods

def transformSelect(fieldName: String, alias: Option[String], child: Query): Elab[Query]

Attributes

Inherited from:
Phase
Source
compiler.scala
def validateSubselection(fieldName: String, child: Query): Elab[Unit]

Attributes

Inherited from:
Phase
Source
compiler.scala

Inherited fields

Attributes

Inherited from:
Phase
Source
compiler.scala