ResolveZipJoins

slick.compiler.ResolveZipJoins
class ResolveZipJoins(rownumStyle: Boolean) extends Phase

Rewrite zip joins into a form suitable for SQL using inner joins and RowNumber columns.

We rely on having a Bind around every Join and both of its generators, which should have been generated by Phase.forceOuterBinds. The inner Binds need to select Pure(StructNode(...)) which should be the outcome of Phase.flattenProjections.

Attributes

rownumStyle

Whether to use Subquery boundaries suitable for Oracle-style ROWNUM semantics instead of standard ROW_NUMBER().

Source:
ResolveZipJoins.scala
Graph
Supertypes
trait Phase
trait Logging
class Object
trait Matchable
class Any
Known subtypes

Members list

Concise view

Type members

Types

type State = Boolean

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

Source:
ResolveZipJoins.scala

Value members

Concrete methods

Run the phase

Run the phase

Attributes

Source:
ResolveZipJoins.scala
def transformZip(s1: TermSymbol, jlsym: TermSymbol, jrsym: TermSymbol, l: Bind, ldefs: ConstArray[(TermSymbol, Node)], r: Bind, rdefs: ConstArray[(TermSymbol, Node)], sel: Node): Node

Transform a zip operation of the form Bind(s1, Join(jlsym, jrsym, l @ Bind(_, _, Pure(StructNode(ldefs), _)), r @ Bind(_, _, Pure(StructNode(rdefs), _)), JoinType.Zip, LiteralNode(true)), sel) into an equivalent mapping operation using RowNum by first transforming both sides of the join into zipWithIndex and then using transformZipWithIndex on those.

Transform a zip operation of the form Bind(s1, Join(jlsym, jrsym, l @ Bind(_, _, Pure(StructNode(ldefs), _)), r @ Bind(_, _, Pure(StructNode(rdefs), _)), JoinType.Zip, LiteralNode(true)), sel) into an equivalent mapping operation using RowNum by first transforming both sides of the join into zipWithIndex and then using transformZipWithIndex on those.

Attributes

Source:
ResolveZipJoins.scala
def transformZipWithIndex(s1: TermSymbol, ls: TermSymbol, from: Node, defs: ConstArray[(TermSymbol, Node)], offset: Long, p: Node): Node

Transform a zipWithIndex operation of the form Bind(s1, Join(_, _, Bind(ls, from, Pure(StructNode(defs), _)), RangeFrom(offset), JoinType.Zip, LiteralNode(true)), p) into an equivalent mapping operation using RowNum. This method can be overridden in subclasses to implement non-standard translations.

Transform a zipWithIndex operation of the form Bind(s1, Join(_, _, Bind(ls, from, Pure(StructNode(defs), _)), RangeFrom(offset), JoinType.Zip, LiteralNode(true)), p) into an equivalent mapping operation using RowNum. This method can be overridden in subclasses to implement non-standard translations.

Attributes

Source:
ResolveZipJoins.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:
ResolveZipJoins.scala