MergeToComprehensions

slick.compiler.MergeToComprehensions

This phase merges nested nodes of types Bind, Filter, GroupBy, SortBy, Take, Drop, CollectionCast and Distinct to Comprehension nodes. Nodes can be merged if they occur in the following order:

[Source] -> Filter (where) -> GroupBy -> SortBy / (Distinct | Filter (having)) -> Take / Drop

Aliasing Binds and CollectionCasts are allowed everywhere in the chain. Any out of order operation starts a new chain with a subquery as the source.

Attributes

Source:
MergeToComprehensions.scala
Graph
Supertypes
trait Phase
trait Logging
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Classlikes

Attributes

Source:
MergeToComprehensions.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Types

A map from a TypeSymbol and a field on top of it to a new Symbol

A map from a TypeSymbol and a field on top of it to a new Symbol

Attributes

Source:
MergeToComprehensions.scala

Inherited types

type State

The immutable state of the phase that can also be accessed by other phases.

The immutable state of the phase that can also be accessed by other phases.

Attributes

Inherited from:
Phase
Source:
QueryCompiler.scala

Value members

Concrete methods

def and(p1: Node, p2: Node): Node

Run the phase

Run the phase

Attributes

Source:
MergeToComprehensions.scala

Apply the replacements and current selection of a Comprehension to a new Node that will be merged into the Comprehension.

Apply the replacements and current selection of a Comprehension to a new Node that will be merged into the Comprehension.

Attributes

Source:
MergeToComprehensions.scala

Lift a valid top-level or source Node into a subquery

Lift a valid top-level or source Node into a subquery

Attributes

Source:
MergeToComprehensions.scala
def convert(tree: Node): Node
def dealias(n: Node)(f: Node => (Node, Mappings)): (Node, Mappings)

Remove purely aliasing Bind mappings, apply the conversion to the source, then inject the mappings back into the source's mappings.

Remove purely aliasing Bind mappings, apply the conversion to the source, then inject the mappings back into the source's mappings.

Attributes

Source:
MergeToComprehensions.scala
def mergeCommon(rec: (Node, Boolean) => (Base, Replacements), parent: (Node, Boolean) => (Base, Replacements), n: Node, buildBase: Boolean, allowFilter: Boolean): (Base, Replacements)

Merge the common operations Bind, Filter and CollectionCast into an existing Comprehension. This method is used at different stages of the pipeline. If the Comprehension already contains a Distinct clause, it is pushed into a subquery.

Merge the common operations Bind, Filter and CollectionCast into an existing Comprehension. This method is used at different stages of the pipeline. If the Comprehension already contains a Distinct clause, it is pushed into a subquery.

Attributes

Source:
MergeToComprehensions.scala

Inherited methods

def andThen[A](g: CompilerState => A): T1 => A

Attributes

Inherited from:
Function1
def compose[A](g: A => CompilerState): A => R

Attributes

Inherited from:
Function1
override def toString(): String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns:

a string representation of the object.

Definition Classes
Function1 -> Any
Inherited from:
Function1

Concrete fields

val name: String

The unique name of the phase

The unique name of the phase

Attributes

Source:
MergeToComprehensions.scala