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. sealed trait Ast extends AnyRef

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

    Permalink
  7. sealed trait BinaryOperator extends Operator

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

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

    Permalink
  10. sealed trait CaseClassLift extends Lift

    Permalink
  11. case class CaseClassQueryLift(name: String, value: Any) extends CaseClassLift with Product with Serializable

    Permalink
  12. case class CaseClassValueLift(name: String, value: Any) extends CaseClassLift with Product with Serializable

    Permalink
  13. class CollectAst[T] extends StatefulTransformer[List[T]]

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

    Permalink
  15. case class Constant(v: Any) extends Value with Product with Serializable

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

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

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

    Permalink
  19. case class Dynamic(tree: Any) extends Ast with Product with Serializable

    Permalink
  20. case class Entity(name: String, properties: List[PropertyAlias]) extends Query with Product with Serializable

    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`.

  21. case class ExternalIdent(name: String) extends Ast with Product with Serializable

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

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

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

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

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

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

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

    Permalink
  29. case class Ident(name: String) extends Ast with Product with Serializable

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

    Permalink
  31. case class Infix(parts: List[String], params: List[Ast], pure: Boolean) extends Ast with Product with Serializable

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

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

    Permalink
  34. sealed trait JoinType extends AnyRef

    Permalink
  35. sealed trait Lift extends Ast

    Permalink
  36. case class ListContains(ast: Ast, body: Ast) extends TraversableOperation with Product with Serializable

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

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

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

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

    Permalink
  41. sealed trait Operation extends Ast

    Permalink
  42. sealed trait Operator extends AnyRef

    Permalink
  43. 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. In some cases e.g. BetaReduction, AST elements need to be neutralized (i.e. set back to defaults in the entire tree) so that this works correctly.

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

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

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

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

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

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

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

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

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

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

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

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

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

    Permalink
  57. sealed trait OptionOperation extends Ast

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

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

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

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

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

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

    Permalink
  64. sealed trait Ordering extends Ast

    Permalink
  65. sealed trait PostfixUnaryOperator extends UnaryOperator

    Permalink
  66. sealed trait PrefixUnaryOperator extends UnaryOperator

    Permalink
  67. case class Property(ast: Ast, name: String) extends Ast with Product with Serializable

    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.

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

    Permalink
  69. sealed trait PropertyOrdering extends Ordering

    Permalink
  70. sealed trait Query extends Ast

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

    Permalink
  72. sealed trait Renameable extends Opinion[Renameable]

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

    Permalink
  74. sealed trait ReturningAction extends Action

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

    Permalink
  76. sealed trait ScalarLift extends Lift

    Permalink
  77. case class ScalarQueryLift(name: String, value: Any, encoder: Any) extends ScalarLift with Product with Serializable

    Permalink
  78. case class ScalarValueLift(name: String, value: Any, encoder: Any) extends ScalarLift with Product with Serializable

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

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

    Permalink
  81. trait StatefulTransformer[T] extends AnyRef

    Permalink
  82. trait StatelessTransformer extends AnyRef

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

    Permalink
  84. class Transform[T] extends StatelessTransformer

    Permalink
  85. sealed trait TraversableOperation extends Ast

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

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

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

    Permalink
  89. sealed trait UnaryOperator extends Operator

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

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

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

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

    Permalink
  94. sealed trait Value extends Ast

    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 BooleanOperator

    Permalink
  10. object CollectAst

    Permalink
  11. object Desc extends PropertyOrdering with Product with Serializable

    Permalink
  12. object DescNullsFirst extends PropertyOrdering with Product with Serializable

    Permalink
  13. object DescNullsLast extends PropertyOrdering with Product with Serializable

    Permalink
  14. object Entity extends Serializable

    Permalink
  15. object EqualityOperator

    Permalink
  16. object FullJoin extends JoinType with Product with Serializable

    Permalink
  17. object IfExist

    Permalink
  18. object IfExistElseNull

    Permalink
  19. object Implicits

    Permalink
  20. object InnerJoin extends JoinType with Product with Serializable

    Permalink
  21. object IsNotNullCheck

    Permalink
  22. object IsNullCheck

    Permalink
  23. object LeftJoin extends JoinType with Product with Serializable

    Permalink
  24. object NullValue extends Value

    Permalink
  25. object NumericOperator

    Permalink
  26. object OnConflict extends Serializable

    Permalink
  27. object OptionNone extends OptionOperation

    Permalink
  28. object Property extends Serializable

    Permalink
  29. object Renameable extends OpinionValues[Renameable]

    Permalink
  30. object ReturningAction

    Permalink
  31. object RightJoin extends JoinType with Product with Serializable

    Permalink
  32. object SetOperator

    Permalink
  33. object StringOperator

    Permalink
  34. object Transform

    Permalink

Ungrouped