OperationsParser

io.getquill.parser.OperationsParser
class OperationsParser(val rootParse: Parser)(using x$2: Quotes, x$3: TranspileConfig) extends Parser with ComparisonTechniques with QuatMaking

Attributes

Graph
Supertypes
trait Parser
class Object
trait Matchable
class Any

Members list

Concise view

Type members

Classlikes

object NamedOp1

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object operator

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Inherited classlikes

Allow T == Option[T] comparison *

Allow T == Option[T] comparison *

Attributes

Inherited from:
ComparisonTechniques
Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case object Equal extends EqualityBehavior

Attributes

Inherited from:
ComparisonTechniques
Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
sealed trait EqualityBehavior

Attributes

Inherited from:
ComparisonTechniques
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Equal.type
object NotEqual.type

Forbid T == Option[T] comparison *

Forbid T == Option[T] comparison *

Attributes

Inherited from:
ComparisonTechniques
Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
object InferQuat

Attributes

Inherited from:
QuatMakingBase
Graph
Supertypes
class Object
trait Matchable
class Any
case object NotEqual extends EqualityBehavior

Attributes

Inherited from:
ComparisonTechniques
Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Attributes

Inherited from:
ComparisonTechniques
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object AllowInnerCompare.type
object ForbidInnerCompare.type

Value members

Concrete methods

def attempt: History ?=> PartialFunction[Expr[_], Ast]

Inherited methods

Attributes

Inherited from:
QuatMakingBase
def apply(input: Expr[_])(using History): Ast

Attributes

Inherited from:
Parser
def checkInnerTypes(using Quotes)(lhs: Term, rhs: Term, optionCheckBehavior: OptionCheckBehavior): (Boolean, Boolean)

Type-check two trees, if one of them has optionals, go into the optionals to find the root types in each of them. Then compare the types that are inside. If they are not compareable, abort the build. Otherwise return type of which side (or both) has the optional. In order to do the actual comparison, the 'weak conformance' operator is used and a subclass is allowed on either side of the ==. Weak conformance is necessary so that Longs can be compared to Ints etc...

Type-check two trees, if one of them has optionals, go into the optionals to find the root types in each of them. Then compare the types that are inside. If they are not compareable, abort the build. Otherwise return type of which side (or both) has the optional. In order to do the actual comparison, the 'weak conformance' operator is used and a subclass is allowed on either side of the ==. Weak conformance is necessary so that Longs can be compared to Ints etc...

Attributes

Inherited from:
ComparisonTechniques
def equalityWithInnerTypechecksAnsi(using Quotes, History)(left: Term, right: Term)(equalityBehavior: EqualityBehavior): BinaryOperation

(not used yet but will be used when support for 'extras' dsl functionality is added) Do equality checking on the database level with the ansi-style truth table (i.e. always false if one side is null)

(not used yet but will be used when support for 'extras' dsl functionality is added) Do equality checking on the database level with the ansi-style truth table (i.e. always false if one side is null)

Attributes

Inherited from:
ComparisonTechniques
def equalityWithInnerTypechecksIdiomatic(using Quotes, History)(left: Term, right: Term)(equalityBehavior: EqualityBehavior): BinaryOperation

Taken from the identically named method in Parser.scala in Scala2-Quill. Much of this logic is not macro specific so a good deal of it can be refactored out into the quill-sql-portable module. Do equality checking on the database level with the same truth-table as idiomatic scala

Taken from the identically named method in Parser.scala in Scala2-Quill. Much of this logic is not macro specific so a good deal of it can be refactored out into the quill-sql-portable module. Do equality checking on the database level with the same truth-table as idiomatic scala

Attributes

Inherited from:
ComparisonTechniques
override def existsEncoderFor(using Quotes)(tpe: TypeRepr): Boolean

Attributes

Definition Classes
Inherited from:
QuatMaking
def innerOptionParam(using Quotes)(tpe: TypeRepr): TypeRepr

Attributes

Inherited from:
ComparisonTechniques
def isOptionType(using Quotes)(tpe: TypeRepr): Boolean

Attributes

Inherited from:
ComparisonTechniques
def wideMatchTypes(using Quotes)(a: TypeRepr, b: TypeRepr): Boolean

Match types in the most wide way possible. This function is not for generalized type equality since quill does not directly compare anything, rather it just translates things into SQL expressions. This kind of check is used in a general sense when things that it doesn't even make sense to compare are compared e.g. an Person and a String. In this case, we want to provide some kind of compile-time warning that the comparision the user is attempting to do in SQL is non sensical in the first place. Therefore when there is any kind of possibility that the expression makes sense (e.g. by comparing a Dog to a Animal (i.e. class to subclass), by comparing two numeric types of any kind etc... we allow the comparison to happen). For int/long/float/double comparisons don't crash on compile-time typing can re-evaluate this upon user feedback

Match types in the most wide way possible. This function is not for generalized type equality since quill does not directly compare anything, rather it just translates things into SQL expressions. This kind of check is used in a general sense when things that it doesn't even make sense to compare are compared e.g. an Person and a String. In this case, we want to provide some kind of compile-time warning that the comparision the user is attempting to do in SQL is non sensical in the first place. Therefore when there is any kind of possibility that the expression makes sense (e.g. by comparing a Dog to a Animal (i.e. class to subclass), by comparing two numeric types of any kind etc... we allow the comparison to happen). For int/long/float/double comparisons don't crash on compile-time typing can re-evaluate this upon user feedback

Attributes

Inherited from:
ComparisonTechniques

Concrete fields