class MergeToComprehensions extends Phase
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.
- Alphabetic
- By Inheritance
- MergeToComprehensions
- Phase
- Logging
- Function1
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new MergeToComprehensions()
Type Members
- type Mappings = ConstArray[((TypeSymbol, TermSymbol), List[TermSymbol])]
- type Replacements = Map[(TypeSymbol, TermSymbol), TermSymbol]
A map from a TypeSymbol and a field on top of it to a new Symbol
- abstract 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.
- Definition Classes
- Phase
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- Implicit
- This member is added by an implicit conversion from MergeToComprehensions toany2stringadd[MergeToComprehensions] performed by method any2stringadd in scala.Predef.
- Definition Classes
- any2stringadd
- def ->[B](y: B): (MergeToComprehensions, B)
- Implicit
- This member is added by an implicit conversion from MergeToComprehensions toArrowAssoc[MergeToComprehensions] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def and(p1: Node, p2: Node): Node
- def andThen[A](g: (CompilerState) => A): (CompilerState) => A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def apply(state: CompilerState): CompilerState
Run the phase
Run the phase
- Definition Classes
- MergeToComprehensions → Phase → Function1
- def applyReplacements(n1: Node, r: Replacements, c: Comprehension[Option[Node]]): Node
Apply the replacements and current selection of a Comprehension to a new Node that will be merged into the Comprehension.
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def buildSubquery(n: Node, mappings: Mappings): (Base, Replacements)
Lift a valid top-level or source Node into a subquery
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def compose[A](g: (A) => CompilerState): (A) => CompilerState
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- 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. - def ensuring(cond: (MergeToComprehensions) => Boolean, msg: => Any): MergeToComprehensions
- Implicit
- This member is added by an implicit conversion from MergeToComprehensions toEnsuring[MergeToComprehensions] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (MergeToComprehensions) => Boolean): MergeToComprehensions
- Implicit
- This member is added by an implicit conversion from MergeToComprehensions toEnsuring[MergeToComprehensions] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): MergeToComprehensions
- Implicit
- This member is added by an implicit conversion from MergeToComprehensions toEnsuring[MergeToComprehensions] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): MergeToComprehensions
- Implicit
- This member is added by an implicit conversion from MergeToComprehensions toEnsuring[MergeToComprehensions] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- lazy val logger: SlickLogger
- Attributes
- protected[this]
- Definition Classes
- Logging
- def mergeCommon(rec: (Node, Boolean) => (Base, Replacements), parent: (Node, Boolean) => (Base, Replacements), n: Node, buildBase: Boolean, allowFilter: Boolean = true): (Base, Replacements)
Merge the common operations Bind, Filter and CollectionCast into an existing Comprehension.
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.
- val name: String
The unique name of the phase
The unique name of the phase
- Definition Classes
- MergeToComprehensions → Phase
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Function1 → AnyRef → Any
- def toSubquery(n: Base, r: Replacements): (Base, Replacements)
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- object FwdPathOnTypeSymbol
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from MergeToComprehensions toStringFormat[MergeToComprehensions] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)
instead ofvalue.formatted(formatString)
, or use thef""
string interpolator. In Java 15 and later,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (MergeToComprehensions, B)
- Implicit
- This member is added by an implicit conversion from MergeToComprehensions toArrowAssoc[MergeToComprehensions] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->
instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.
edit this text on github
Scala Language-Integrated Connection Kit
This is the API documentation for the Slick database library. It should be used as an additional resource to the user manual.
Further documentation for Slick can be found on the documentation pages.
To the slick package list...