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.
Run the phase
Run the phase
Check if a type is equivalent to the Scala Boolean type or a (possibly nested) Option of that type.
The unique name of the phase
The unique name of the phase
Rewrite a single Node.
Rewrite a single Node. This method can be overridden in subclasses to change the situations in which conversions are applied.
Create a conversion to a fake boolean, cancelling out an existing conversion to a real boolean.
Create a conversion to a real boolean, cancelling out an existing conversion to a fake boolean.
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 driver). 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.