Packages

package ast

Abstract Syntax Tree (AST) for representing queries during compilation

Source
package.scala
Linear Supertypes
AnyRef, Any
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ast
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. final case class Aggregate(sym: TermSymbol, from: Node, select: Node) extends BinaryNode with DefNode with Product with Serializable

    An aggregation function application which is similar to a Bind(_, _, Pure(_)) where the projection contains a mapping function application.

    An aggregation function application which is similar to a Bind(_, _, Pure(_)) where the projection contains a mapping function application. The return type is an aggregated scalar value though, not a collection.

  2. class AnonSymbol extends TermSymbol

    An anonymous symbol defined in the AST.

  3. class AnonTableIdentitySymbol extends AnonTypeSymbol with TableIdentitySymbol

    An anonymous TableIdentitySymbol.

  4. class AnonTypeSymbol extends TypeSymbol

    An anonymous symbol defined in the AST.

  5. final case class Apply(sym: TermSymbol, children: ConstArray[Node])(buildType: Type) extends SimplyTypedNode with Product with Serializable

    A function call expression.

  6. trait AtomicType extends Type

    An atomic type (i.e.

    An atomic type (i.e. a type which does not contain other types)

  7. trait BaseTypedType[T] extends TypedType[T] with AtomicType
  8. trait BinaryNode extends Node
  9. final case class Bind(generator: TermSymbol, from: Node, select: Node) extends BinaryNode with DefNode with Product with Serializable

    A .flatMap call of type (CollectionType(c, _), CollectionType(_, u)) => CollectionType(c, u).

  10. trait ClientSideOp extends AnyRef

    An operation which is expected to be run on the client side.

  11. final case class CollectionCast(child: Node, cons: CollectionTypeConstructor) extends UnaryNode with SimplyTypedNode with Product with Serializable
  12. final case class CollectionType(cons: CollectionTypeConstructor, elementType: Type) extends Type with Product with Serializable
  13. trait CollectionTypeConstructor extends AnyRef

    Represents a type constructor that can be usd for a collection-valued query.

    Represents a type constructor that can be usd for a collection-valued query. The relevant information for Slick is whether the elements of the collection keep their insertion order (isSequential) and whether only distinct elements are allowed (isUnique).

  14. abstract class ColumnOption[+T] extends AnyRef
  15. final case class CompiledStatement(statement: String, extra: Any, buildType: Type) extends NullaryNode with SimplyTypedNode with Product with Serializable

    A compiled statement with a fixed type, a statement string and profile-specific extra data.

  16. abstract class ComplexFilteredQuery extends FilteredQuery with DefNode

    A FilteredQuery with a Symbol.

  17. final case class Comprehension(sym: TermSymbol, from: Node, select: Node, where: Option[Node] = None, groupBy: Option[Node] = None, orderBy: ConstArray[(Node, Ordering)] = ConstArray.empty, having: Option[Node] = None, distinct: Option[Node] = None, fetch: Option[Node] = None, offset: Option[Node] = None, forUpdate: Boolean = false) extends DefNode with Product with Serializable

    A SQL comprehension

  18. trait DefNode extends Node

    A Node which introduces Symbols.

  19. final case class Distinct(generator: TermSymbol, from: Node, on: Node) extends ComplexFilteredQuery with BinaryNode with Product with Serializable

    A .distinct call of type (CollectionType(c, t), _) => CollectionType(c, t).

  20. final case class Drop(from: Node, count: Node) extends SimpleFilteredQuery with BinaryNode with Product with Serializable

    A .drop call.

  21. case class ElementSymbol(idx: Int) extends TermSymbol with Product with Serializable

    An element of a ProductNode (using a 1-based index)

  22. class ErasedCollectionTypeConstructor[C[_]] extends TypedCollectionTypeConstructor[C]
  23. class ErasedScalaBaseType[T, E] extends ScalaBaseType[T]
  24. case class FieldSymbol(name: String)(options: Seq[ColumnOption[_]], tpe: Type) extends TermSymbol with Product with Serializable

    A named symbol which refers to an (aliased or unaliased) field.

  25. final case class Filter(generator: TermSymbol, from: Node, where: Node) extends ComplexFilteredQuery with BinaryNode with Product with Serializable

    A .filter call of type (CollectionType(c, t), Boolean) => CollectionType(c, t).

  26. abstract class FilteredQuery extends Node

    Common superclass for expressions of type (CollectionType(c, t), _) => CollectionType(c, t).

  27. final case class First(child: Node) extends UnaryNode with SimplyTypedNode with ClientSideOp with Product with Serializable

    Get the first element of a collection.

    Get the first element of a collection. For client-side operations only.

  28. final case class ForUpdate(generator: TermSymbol, from: Node) extends ComplexFilteredQuery with Product with Serializable

    A .forUpdate call

  29. class FunctionSymbol extends TermSymbol

    A Symbol that represents a library function or operator

  30. final case class GetOrElse(child: Node, default: () => Any) extends UnaryNode with SimplyTypedNode with Product with Serializable
  31. final case class GroupBy(fromGen: TermSymbol, from: Node, by: Node, identity: TypeSymbol = new AnonTypeSymbol) extends BinaryNode with DefNode with TypeGenerator with Product with Serializable

    A .groupBy call.

  32. final case class IfThenElse(clauses: ConstArray[Node]) extends SimplyTypedNode with Product with Serializable

    A conditional expression; The clauses should be: (if then)+ else.

    A conditional expression; The clauses should be: (if then)+ else. The result type is taken from the first then (i.e. the second clause).

  33. final case class Insert(tableSym: TermSymbol, table: Node, linear: Node, allFields: ConstArray[FieldSymbol]) extends BinaryNode with DefNode with Product with Serializable

    Represents an Insert operation.

  34. final case class InsertColumn(children: ConstArray[Node], fs: FieldSymbol, buildType: Type) extends Node with SimplyTypedNode with Product with Serializable

    A column in an Insert operation.

  35. final case class Join(leftGen: TermSymbol, rightGen: TermSymbol, left: Node, right: Node, jt: JoinType, on: Node) extends DefNode with Product with Serializable

    A join expression.

    A join expression. For joins without option extension, the type rule is (CollectionType(c, t), CollectionType(_, u)) => CollecionType(c, (t, u)). Option-extended left outer joins are typed as (CollectionType(c, t), CollectionType(_, u)) => CollecionType(c, (t, Option(u))), Option-extended right outer joins as (CollectionType(c, t), CollectionType(_, u)) => CollecionType(c, (Option(t), u)) and Option-extended full outer joins as (CollectionType(c, t), CollectionType(_, u)) => CollecionType(c, (Option(t), Option(u))).

  36. abstract class JoinType extends AnyRef

    The type of a join operation.

  37. class LiteralNode extends NullaryNode with SimplyTypedNode

    A literal value expression.

  38. final class MappedScalaType extends Type
  39. trait Node extends Dumpable

    A node in the Slick AST.

    A node in the Slick AST. Every Node has a number of child nodes and an optional type annotation.

  40. final class NodeOps extends AnyVal

    Extra methods for Nodes.

  41. final case class NominalType(sym: TypeSymbol, structuralView: Type) extends Type with Product with Serializable

    A type with a name, as used by tables.

    A type with a name, as used by tables.

    Compiler phases which change types may keep their own representation of the structural view but must update the AST at the end of the phase so that all NominalTypes with the same symbol have the same structural view.

  42. trait NullaryNode extends Node
  43. trait NumericTypedType extends AnyRef

    Mark a TypedType as eligible for numeric operators.

  44. final case class OptionApply(child: Node) extends UnaryNode with SimplyTypedNode with Product with Serializable

    Lift a value into an Option as Some (or None if the value is a null column).

  45. sealed trait OptionDisc extends AnyRef

    A phantom type for Option discriminator columns.

    A phantom type for Option discriminator columns. Values are of type Int.

  46. final case class OptionFold(from: Node, ifEmpty: Node, map: Node, gen: TermSymbol) extends DefNode with Product with Serializable

    The catamorphism of OptionType.

  47. trait OptionType extends Type
  48. trait OptionTypedType[T] extends TypedType[Option[T]] with OptionType
  49. final case class Ordering(direction: Direction = Ordering.Asc, nulls: NullOrdering = Ordering.NullsDefault) extends Product with Serializable
  50. final case class ParameterSwitch(cases: ConstArray[((Any) => Boolean, Node)], default: Node) extends SimplyTypedNode with ClientSideOp with Product with Serializable

    A switch for special-cased parameters that needs to be interpreted in order to find the correct query string for the query arguments.

  51. trait PathElement extends Node
  52. final case class ProductNode(children: ConstArray[Node]) extends SimplyTypedNode with Product with Serializable

    An expression that represents a conjunction of expressions.

  53. final case class ProductType(elements: ConstArray[Type]) extends Type with Product with Serializable
  54. final case class Pure(value: Node, identity: TypeSymbol = new AnonTypeSymbol) extends UnaryNode with SimplyTypedNode with TypeGenerator with Product with Serializable

    An expression that represents a plain value lifted into a Query.

  55. final case class QueryParameter(extractor: (Any) => Any, buildType: Type, id: TermSymbol = new AnonSymbol) extends NullaryNode with SimplyTypedNode with Product with Serializable

    A parameter from a QueryTemplate which gets turned into a bind variable.

  56. final case class RangeFrom(start: Long = 1L) extends NullaryNode with SimplyTypedNode with Product with Serializable

    A Query of this special Node represents an infinite stream of consecutive numbers starting at the given number.

    A Query of this special Node represents an infinite stream of consecutive numbers starting at the given number. This is used as an operand for zipWithIndex. It is not exposed directly in the query language because it cannot be represented in SQL outside of a 'zip' operation.

  57. final case class RebuildOption(discriminator: Node, data: Node) extends BinaryNode with SimplyTypedNode with Product with Serializable

    Rebuild an Option type on the client side

  58. final case class Ref(sym: TermSymbol) extends PathElement with NullaryNode with Product with Serializable

    A reference to a Symbol

  59. final case class ResultSetMapping(generator: TermSymbol, from: Node, map: Node) extends BinaryNode with DefNode with ClientSideOp with Product with Serializable

    A client-side projection of type (CollectionType(c, t), u) => CollectionType(c, u).

    A client-side projection of type (CollectionType(c, t), u) => CollectionType(c, u). Unlike other nodes which only operate on real collections, a ResultSetMapping may use an Identity functor as its collection type constructor c, thus giving it a type of (t, u) => u where t and u are primitive or Option types.

  60. final case class RowNumber(by: ConstArray[(Node, Ordering)] = ConstArray.empty) extends SimplyTypedNode with Product with Serializable

    The row_number window function

  61. class ScalaBaseType[T] extends ScalaType[T] with BaseTypedType[T]
  62. class ScalaNumericType[T] extends ScalaBaseType[T] with NumericTypedType
  63. class ScalaOptionType[T] extends ScalaType[Option[T]] with OptionTypedType[T]
  64. trait ScalaType[T] extends TypedType[T]

    A Slick Type encoding of plain Scala types.

    A Slick Type encoding of plain Scala types.

    This is used by QueryInterpreter and MemoryProfile. Values stored in HeapBackend columns are also expected to use these types.

    All profiles should support the following types which are used internally by the lifted embedding and the query compiler: Boolean, Char, Int, Long, Null, String.

  65. final case class Select(in: Node, field: TermSymbol) extends PathElement with UnaryNode with SimplyTypedNode with Product with Serializable

    An expression that selects a field in another expression.

  66. final case class SequenceNode(name: String)(increment: Long) extends NullaryNode with SimplyTypedNode with Product with Serializable

    A node that represents an SQL sequence.

  67. abstract class SimpleFilteredQuery extends FilteredQuery with SimplyTypedNode

    A FilteredQuery without a Symbol.

  68. case class SimpleTableIdentitySymbol(constituents: AnyRef*) extends TableIdentitySymbol with Product with Serializable

    Default implementation of TableIdentitySymbol

  69. trait SimplyTypedNode extends Node

    A Node which can be typed without access to its scope, and whose children can be typed independently of each other.

  70. final case class SortBy(generator: TermSymbol, from: Node, by: ConstArray[(Node, Ordering)]) extends ComplexFilteredQuery with Product with Serializable

    A .sortBy call of type (CollectionType(c, t), _) => CollectionType(c, t).

  71. final case class StructNode(elements: ConstArray[(TermSymbol, Node)]) extends SimplyTypedNode with DefNode with Product with Serializable

    An expression that represents a structure, i.e.

    An expression that represents a structure, i.e. a conjunction where the individual components have Symbols associated with them.

  72. final case class StructType(elements: ConstArray[(TermSymbol, Type)]) extends Type with Product with Serializable
  73. final case class Subquery(child: Node, condition: Condition) extends UnaryNode with SimplyTypedNode with Product with Serializable

    Forces a subquery to be created in mergeToComprehension if it occurs between two other collection-valued operations that would otherwise be fused, and the subquery condition is true.

  74. sealed trait Symbol extends AnyRef

    A symbol which can be used in the AST.

    A symbol which can be used in the AST. It can be either a TypeSymbol or a TermSymbol.

  75. class SymbolNamer extends AnyRef

    Provides names for symbols

  76. final case class TableExpansion(generator: TermSymbol, table: Node, columns: Node) extends BinaryNode with DefNode with Product with Serializable

    A table together with its expansion into columns.

  77. trait TableIdentitySymbol extends TypeSymbol

    A TypeSymbol which uniquely identifies a table type

  78. final case class TableNode(schemaName: Option[String], tableName: String, identity: TableIdentitySymbol, baseIdentity: TableIdentitySymbol)(profileTable: Any) extends NullaryNode with SimplyTypedNode with TypeGenerator with Product with Serializable

    A Node representing a database table.

  79. final case class Take(from: Node, count: Node) extends SimpleFilteredQuery with BinaryNode with Product with Serializable

    A .take call.

  80. trait TermSymbol extends Symbol

    A symbol representing a variable

  81. trait Type extends Dumpable

    Super-trait for all types

  82. trait TypeGenerator extends AnyRef

    A Node which introduces a NominalType.

  83. final case class TypeMapping(child: Node, mapper: Mapper, classTag: ClassTag[_]) extends UnaryNode with SimplyTypedNode with Product with Serializable

    A client-side type mapping

  84. trait TypeSymbol extends Symbol

    The symbol of a nominal type

  85. final class TypeUtil extends AnyVal
  86. abstract class TypedCollectionTypeConstructor[C[_]] extends CollectionTypeConstructor
    Annotations
    @implicitNotFound()
  87. trait TypedType[T] extends Type

    A Type that carries a Scala type argument

  88. trait UnaryNode extends Node
  89. final case class Union(left: Node, right: Node, all: Boolean) extends BinaryNode with SimplyTypedNode with Product with Serializable

    A union of type (CollectionType(c, t), CollectionType(_, t)) => CollectionType(c, t).

Value Members

  1. object ClientSideOp
  2. object ColumnOption

    The basic column options that influence profile-independent parts of query compilation.

    The basic column options that influence profile-independent parts of query compilation. Different profile levels define additional options.

  3. object Filter extends Serializable
  4. object FwdPath

    A constructor/extractor for nested Selects starting at a Ref so that, for example, a :: b :: c :: Nil corresponds to path a.b.c.

  5. object JoinType
  6. object Library

    The standard library for query operators.

  7. object LiteralNode
  8. object MappedScalaType
  9. object OptionType
  10. object Ordering extends Serializable
  11. object Path

    A constructor/extractor for nested Selects starting at a Ref so that, for example, c :: b :: a :: Nil corresponds to path a.b.c.

  12. object QueryParameter extends Serializable
  13. object ScalaBaseType
  14. object Subquery extends Serializable
  15. object SymbolNamer
  16. object Type
  17. object TypeUtil
  18. object TypedCollectionTypeConstructor
  19. object TypedType
  20. case object UnassignedType extends AtomicType with Product with Serializable

    The standard type for freshly constructed nodes without an explicit type.

  21. object Util

    Utility methods for AST manipulation.

Inherited from AnyRef

Inherited from Any

Ungrouped