Package

io.getquill

ast

Permalink

package ast

Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Action extends Ast

    Permalink
  2. case class Aggregation(operator: AggregationOperator, ast: Ast) extends Query with Product with Serializable

    Permalink
  3. sealed trait AggregationOperator extends Operator

    Permalink
  4. case class Assignment(alias: Ident, property: Ast, value: Ast) extends Ast with Product with Serializable

    Permalink
  5. case class AssignmentDual(alias1: Ident, alias2: Ident, property: Ast, value: Ast) extends Ast with Product with Serializable

    Permalink
  6. sealed trait Ast extends AnyRef

    Permalink
  7. case class BinaryOperation(a: Ast, operator: BinaryOperator, b: Ast) extends Operation with Product with Serializable

    Permalink
  8. sealed trait BinaryOperator extends Operator

    Permalink
  9. case class Block(statements: List[Ast]) extends Ast with Product with Serializable

    Permalink
  10. case class CaseClass(values: List[(String, Ast)]) extends Value with Product with Serializable

    Permalink
  11. sealed trait CaseClassLift extends Lift

    Permalink
  12. final class CaseClassQueryLift extends CaseClassLift

    Permalink
  13. final class CaseClassValueLift extends CaseClassLift

    Permalink
  14. class CollectAst[T] extends StatefulTransformer[Queue[T]]

    Permalink

    The collection is treated as immutable internally but an ArrayBuffer is more effecient then Collection.list at appending which is mostly what the collection does

  15. case class ConcatMap(query: Ast, alias: Ident, body: Ast) extends Query with Product with Serializable

    Permalink
  16. final class Constant extends Value

    Permalink
  17. case class Delete(query: Ast) extends Action with Product with Serializable

    Permalink
  18. case class Distinct(a: Ast) extends Query with Product with Serializable

    Permalink
  19. case class DistinctOn(query: Ast, alias: Ident, body: Ast) extends Query with Product with Serializable

    Permalink
  20. case class Drop(query: Ast, n: Ast) extends Query with Product with Serializable

    Permalink
  21. final class Dynamic extends Ast

    Permalink

    For Dynamic Infix Splices

  22. final class Entity extends Query

    Permalink

    Entities represent the actual tables/views being selected.

    Entities represent the actual tables/views being selected. Typically, something like:

    `SELECT p.name FROM People p`
    
    comes from something like:
    `Map(Entity("People", Nil), Ident("p"), Property(Ident(p), "name"))`.
    
    When you define a querySchema, the fields you mention inside become PropertyAliass. For example something like:
    `querySchema[Person]("t_person", _.name -> "s_name")`
    
    Becomes something like:
    `Entity("t_person", List(PropertyAlias(List("name"), "s_name"))) { def renameable = Fixed }`
    
    Note that Entity has an Opinion called renameable which will be the value Fixed when a querySchema is specified. That means that even if the NamingSchema is UpperCase, the resulting query will select t_person as opposed to T_PERSON or Person.

    SELECT p.name FROM People p something like:

    `Map(Entity("People", Nil), Ident("p"), Property(Ident(p), "name"))`.
    
    When you define a `querySchema`, the fields you mention inside become `PropertyAlias`s. For example something like:
    `querySchema[Person]("t_person", _.name -> "s_name")`
    
    Becomes something like:
    `Entity("t_person", List(PropertyAlias(List("name"), "s_name"))) { def renameable = Fixed }`
    
    Note that Entity has an Opinion called `renameable` which will be the value `Fixed` when a `querySchema` is specified. That means that even if the `NamingSchema` is `UpperCase`, the resulting query will select `t_person` as opposed to `T_PERSON` or `Person`.

  23. sealed trait External extends Ast

    Permalink
  24. final class ExternalIdent extends Ast

    Permalink
  25. case class Filter(query: Ast, alias: Ident, body: Ast) extends Query with Product with Serializable

    Permalink
  26. case class FlatJoin(typ: JoinType, a: Ast, aliasA: Ident, on: Ast) extends Query with Product with Serializable

    Permalink
  27. case class FlatMap(query: Ast, alias: Ident, body: Ast) extends Query with Product with Serializable

    Permalink
  28. case class Foreach(query: Ast, alias: Ident, body: Ast) extends Action with Product with Serializable

    Permalink
  29. case class Function(params: List[Ident], body: Ast) extends Ast with Product with Serializable

    Permalink
  30. case class FunctionApply(function: Ast, values: List[Ast]) extends Operation with Product with Serializable

    Permalink
  31. case class GroupBy(query: Ast, alias: Ident, body: Ast) extends Query with Product with Serializable

    Permalink
  32. final class Ident extends Terminal with Ast

    Permalink
  33. case class IdentName(name: String) extends Product with Serializable

    Permalink
  34. case class If(condition: Ast, then: Ast, else: Ast) extends Ast with Product with Serializable

    Permalink
  35. final class Infix extends Ast

    Permalink
  36. case class Insert(query: Ast, assignments: List[Assignment]) extends Action with Product with Serializable

    Permalink
  37. sealed trait IterableOperation extends Ast

    Permalink
  38. case class Join(typ: JoinType, a: Ast, b: Ast, aliasA: Ident, aliasB: Ident, on: Ast) extends Query with Product with Serializable

    Permalink
  39. sealed trait JoinType extends AnyRef

    Permalink
  40. sealed trait Lift extends External with Terminal

    Permalink

    ********************************************************************

  41. case class ListContains(ast: Ast, body: Ast) extends IterableOperation with Product with Serializable

    Permalink
  42. case class Map(query: Ast, alias: Ident, body: Ast) extends Query with Product with Serializable

    Permalink
  43. case class MapContains(ast: Ast, body: Ast) extends IterableOperation with Product with Serializable

    Permalink
  44. case class Nested(a: Ast) extends Query with Product with Serializable

    Permalink
  45. case class OnConflict(insert: Ast, target: Target, action: OnConflict.Action) extends Action with Product with Serializable

    Permalink
  46. sealed trait Operation extends Ast

    Permalink
  47. sealed trait Operator extends AnyRef

    Permalink
  48. sealed trait Opinion[T] extends AnyRef

    Permalink

    An Opinion represents a piece of data that needs to be propagated through AST transformations but is not directly related to how ASTs are transformed in most stages.

    An Opinion represents a piece of data that needs to be propagated through AST transformations but is not directly related to how ASTs are transformed in most stages. For instance, Renameable controls how columns are named (i.e. whether to use a NamingStrategy or not) after most of the SQL transformations are done. Some transformations (e.g. RenameProperties will use Opinions or even modify them so that the correct kind of query comes out at the end of the normalizations. That said, Opinions should be transparent in most steps of the normalization.

  49. sealed trait OpinionValues[T <: Opinion[T]] extends AnyRef

    Permalink
  50. case class OptionApply(ast: Ast) extends OptionOperation with Product with Serializable

    Permalink
  51. case class OptionContains(ast: Ast, body: Ast) extends OptionOperation with Product with Serializable

    Permalink
  52. case class OptionExists(ast: Ast, alias: Ident, body: Ast) extends OptionOperation with Product with Serializable

    Permalink
  53. case class OptionFlatMap(ast: Ast, alias: Ident, body: Ast) extends OptionOperation with Product with Serializable

    Permalink
  54. case class OptionFlatten(ast: Ast) extends OptionOperation with Product with Serializable

    Permalink
  55. case class OptionForall(ast: Ast, alias: Ident, body: Ast) extends OptionOperation with Product with Serializable

    Permalink
  56. case class OptionGetOrElse(ast: Ast, body: Ast) extends OptionOperation with Product with Serializable

    Permalink
  57. case class OptionGetOrNull(ast: Ast) extends OptionOperation with Product with Serializable

    Permalink
  58. case class OptionIsDefined(ast: Ast) extends OptionOperation with Product with Serializable

    Permalink
  59. case class OptionIsEmpty(ast: Ast) extends OptionOperation with Product with Serializable

    Permalink
  60. case class OptionMap(ast: Ast, alias: Ident, body: Ast) extends OptionOperation with Product with Serializable

    Permalink
  61. case class OptionNonEmpty(ast: Ast) extends OptionOperation with Product with Serializable

    Permalink
  62. final class OptionNone extends OptionOperation with Terminal

    Permalink
  63. sealed trait OptionOperation extends Ast

    Permalink
  64. case class OptionOrNull(ast: Ast) extends OptionOperation with Product with Serializable

    Permalink
  65. case class OptionSome(ast: Ast) extends OptionOperation with Product with Serializable

    Permalink
  66. case class OptionTableExists(ast: Ast, alias: Ident, body: Ast) extends OptionOperation with Product with Serializable

    Permalink
  67. case class OptionTableFlatMap(ast: Ast, alias: Ident, body: Ast) extends OptionOperation with Product with Serializable

    Permalink
  68. case class OptionTableForall(ast: Ast, alias: Ident, body: Ast) extends OptionOperation with Product with Serializable

    Permalink
  69. case class OptionTableMap(ast: Ast, alias: Ident, body: Ast) extends OptionOperation with Product with Serializable

    Permalink
  70. sealed trait Ordering extends Ast

    Permalink
  71. sealed trait PostfixUnaryOperator extends UnaryOperator

    Permalink
  72. sealed trait PrefixUnaryOperator extends UnaryOperator

    Permalink
  73. final class Property extends Ast

    Permalink

    Properties generally represent column selection from a table or invocation of some kind of method from some other object.

    Properties generally represent column selection from a table or invocation of some kind of method from some other object. Typically, something like

    `SELECT p.name FROM People p`
    
    comes from something like
    `Map(Entity("People"), Ident("p"), Property(Ident(p), "name"))`
    
    Properties also have an Opinion about how the NamingStrategy affects their name. For example something like Property.Opinionated(Ident(p), "s_name", Fixed) will become p.s_name even if the NamingStrategy is UpperCase (whereas Property(Ident(p), "s_name") would become p.S_NAME). When Property is constructed without Opinionated being used, the default opinion ByStrategy is used.

    SELECT p.name FROM People p something like

    `Map(Entity("People"), Ident("p"), Property(Ident(p), "name"))`
    
    Properties also have an Opinion about how the `NamingStrategy` affects their name. For example something like `Property.Opinionated(Ident(p), "s_name", Fixed)` will become `p.s_name` even if the `NamingStrategy` is `UpperCase` (whereas `Property(Ident(p), "s_name")` would become `p.S_NAME`). When Property is constructed without `Opinionated` being used, the default opinion `ByStrategy` is used.

  74. case class PropertyAlias(path: List[String], alias: String) extends Product with Serializable

    Permalink
  75. sealed trait PropertyOrdering extends Ordering

    Permalink
  76. sealed trait Query extends Ast

    Permalink
  77. case class QuotationTag(uid: String) extends Tag with Product with Serializable

    Permalink
  78. case class QuotationTagId(uid: String) extends Product with Serializable

    Permalink
  79. case class QuotedReference(tree: Any, ast: Ast) extends Ast with Product with Serializable

    Permalink
  80. sealed trait Renameable extends Opinion[Renameable]

    Permalink
  81. case class Returning(action: Ast, alias: Ident, property: Ast) extends ReturningAction with Product with Serializable

    Permalink
  82. sealed trait ReturningAction extends Action

    Permalink
  83. case class ReturningGenerated(action: Ast, alias: Ident, property: Ast) extends ReturningAction with Product with Serializable

    Permalink
  84. sealed trait ScalarLift extends Lift with Terminal

    Permalink
  85. final class ScalarQueryLift extends ScalarLift

    Permalink
  86. case class ScalarTag(uid: String) extends Tag with Product with Serializable

    Permalink
  87. case class ScalarTagId(uid: String) extends Product with Serializable

    Permalink
  88. final class ScalarValueLift extends ScalarLift

    Permalink
  89. case class SetContains(ast: Ast, body: Ast) extends IterableOperation with Product with Serializable

    Permalink
  90. case class SortBy(query: Ast, alias: Ident, criterias: Ast, ordering: Ast) extends Query with Product with Serializable

    Permalink
  91. trait StatefulTransformer[T] extends AnyRef

    Permalink
  92. trait StatefulTransformerWithStack[T] extends AnyRef

    Permalink
  93. trait StatelessTransformer extends AnyRef

    Permalink
  94. sealed trait Tag extends External

    Permalink

    ********************************************************************

  95. case class Take(query: Ast, n: Ast) extends Query with Product with Serializable

    Permalink
  96. sealed trait Terminal extends Ast

    Permalink
  97. class Transform[T] extends StatelessTransformer

    Permalink
  98. case class Tuple(values: List[Ast]) extends Value with Product with Serializable

    Permalink
  99. case class TupleOrdering(elems: List[Ordering]) extends Ordering with Product with Serializable

    Permalink
  100. case class UnaryOperation(operator: UnaryOperator, ast: Ast) extends Operation with Product with Serializable

    Permalink
  101. sealed trait UnaryOperator extends Operator

    Permalink
  102. case class Union(a: Ast, b: Ast) extends Query with Product with Serializable

    Permalink
  103. case class UnionAll(a: Ast, b: Ast) extends Query with Product with Serializable

    Permalink
  104. case class Update(query: Ast, assignments: List[Assignment]) extends Action with Product with Serializable

    Permalink
  105. case class Val(name: Ident, body: Ast) extends Ast with Product with Serializable

    Permalink
  106. sealed trait Value extends Ast

    Permalink
  107. sealed trait Visibility extends Opinion[Visibility]

    Permalink

Value Members

  1. object +!=+

    Permalink
  2. object +&&+

    Permalink
  3. object +==+

    Permalink
  4. object +||+

    Permalink
  5. object AggregationOperator

    Permalink
  6. object Asc extends PropertyOrdering with Product with Serializable

    Permalink
  7. object AscNullsFirst extends PropertyOrdering with Product with Serializable

    Permalink
  8. object AscNullsLast extends PropertyOrdering with Product with Serializable

    Permalink
  9. object Ast

    Permalink
  10. object BooleanOperator

    Permalink
  11. object BottomTypedTerminal

    Permalink
  12. object CaseClass extends Serializable

    Permalink
  13. object CaseClassQueryLift

    Permalink
  14. object CaseClassValueLift

    Permalink
  15. object CollectAst

    Permalink
  16. object Constant

    Permalink
  17. object Core

    Permalink
  18. object Desc extends PropertyOrdering with Product with Serializable

    Permalink
  19. object DescNullsFirst extends PropertyOrdering with Product with Serializable

    Permalink
  20. object DescNullsLast extends PropertyOrdering with Product with Serializable

    Permalink
  21. object Dynamic

    Permalink
  22. object Entity

    Permalink
  23. object EqualityOperator

    Permalink
  24. object ExternalIdent

    Permalink
  25. object FullJoin extends JoinType with Product with Serializable

    Permalink
  26. object Ident

    Permalink

    Ident represents a single variable name, this typically refers to a table but not always.

    Ident represents a single variable name, this typically refers to a table but not always. Invisible identities are a rare case where a user returns an embedded table from a map clause:

    
        case class Emb(id: Int, name: String) extends Embedded
        case class Parent(id: Int, name: String, emb: Emb) extends Embedded
        case class GrandParent(id: Int, par: Parent)
    
        query[GrandParent]
            .map(g => g.par).distinct
            .map(p => (p.name, p.emb)).distinct
            .map(tup => (tup._1, tup._2)).distinct
        }
    
    

    In these situations, the identity whose properties need to be expanded in the ExpandNestedQueries phase, needs to be marked invisible.

  27. object IfExist

    Permalink
  28. object IfExistElseNull

    Permalink
  29. object Implicits

    Permalink
  30. object Infix

    Permalink
  31. object InnerJoin extends JoinType with Product with Serializable

    Permalink
  32. object IsNotNullCheck

    Permalink
  33. object IsNullCheck

    Permalink
  34. object LeftJoin extends JoinType with Product with Serializable

    Permalink
  35. object NullValue extends Value with Product with Serializable

    Permalink
  36. object NumericOperator

    Permalink
  37. object OnConflict extends Serializable

    Permalink
  38. object OptionNone

    Permalink
  39. object OptionNoneId extends Product with Serializable

    Permalink
  40. object Property

    Permalink
  41. object PropertyOrCore

    Permalink
  42. object Renameable extends OpinionValues[Renameable]

    Permalink
  43. object ReturningAction

    Permalink
  44. object RightJoin extends JoinType with Product with Serializable

    Permalink
  45. object ScalarQueryLift

    Permalink
  46. object ScalarValueLift

    Permalink
  47. object SetOperator

    Permalink
  48. object StatefulTransformerWithStack

    Permalink
  49. object StringOperator

    Permalink
  50. object Terminal

    Permalink
  51. object Transform

    Permalink
  52. object Visibility extends OpinionValues[Visibility]

    Permalink

Ungrouped