RewriteBooleans

slick.compiler.RewriteBooleans
See theRewriteBooleans companion object
class RewriteBooleans extends Phase

For SQL back-ends which do not support real boolean types for fields and general expressions but which do have special boolean expressions and operators, this phase injects conversions between fake and real boolean values.

The default for booleans in the AST is to use the fake type (mapped to a numeric type by the profile). There are specific places where a real boolean (that can be used in boolean expressions) is required or produced, so we inject a call to ToRealBoolean or ToFakeBoolean as needed.

Attributes

Companion:
object
Source:
RewriteBooleans.scala
Graph
Supertypes
trait Phase
trait Logging
class Object
trait Matchable
class Any

Members list

Concise view

Type members

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

Run the phase

Run the phase

Attributes

Source:
RewriteBooleans.scala
def isBooleanLike(t: Type): Boolean

Check if a type is equivalent to the Scala Boolean type or a (possibly nested) Option of that type.

Check if a type is equivalent to the Scala Boolean type or a (possibly nested) Option of that type.

Attributes

Source:
RewriteBooleans.scala
def rewrite(n: Node): Node

Rewrite a single Node. This method can be overridden in subclasses to change the situations in which conversions are applied.

Rewrite a single Node. This method can be overridden in subclasses to change the situations in which conversions are applied.

Attributes

Source:
RewriteBooleans.scala

Attributes

Source:
RewriteBooleans.scala
def toFake(n: Node): Node

Create a conversion to a fake boolean, cancelling out an existing conversion to a real boolean.

Create a conversion to a fake boolean, cancelling out an existing conversion to a real boolean.

Attributes

Source:
RewriteBooleans.scala
def toReal(n: Node): Node

Create a conversion to a real boolean, cancelling out an existing conversion to a fake boolean.

Create a conversion to a real boolean, cancelling out an existing conversion to a fake boolean.

Attributes

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