Package

slick

ast

Permalink

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

Type Members

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

    Permalink

    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

    Permalink

    An anonymous symbol defined in the AST.

  3. class AnonTableIdentitySymbol extends AnonTypeSymbol with TableIdentitySymbol

    Permalink

    An anonymous TableIdentitySymbol.

  4. class AnonTypeSymbol extends TypeSymbol

    Permalink

    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

    Permalink

    A function call expression.

  6. trait AtomicType extends Type

    Permalink

    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

    Permalink
  8. trait BinaryNode extends Node

    Permalink
  9. final case class Bind(generator: TermSymbol, from: Node, select: Node) extends BinaryNode with DefNode with Product with Serializable

    Permalink

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

  10. trait ClientSideOp extends AnyRef

    Permalink

    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

    Permalink
  12. final case class CollectionType(cons: CollectionTypeConstructor, elementType: Type) extends Type with Product with Serializable

    Permalink
  13. trait CollectionTypeConstructor extends AnyRef

    Permalink

    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

    Permalink
  15. final case class CompiledStatement(statement: String, extra: Any, buildType: Type) extends NullaryNode with SimplyTypedNode with Product with Serializable

    Permalink

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

  16. abstract class ComplexFilteredQuery extends FilteredQuery with DefNode

    Permalink

    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

    Permalink

    A SQL comprehension

  18. trait DefNode extends Node

    Permalink

    A Node which introduces Symbols.

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

    Permalink

    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

    Permalink

    A .drop call.

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

    Permalink

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

  22. class ErasedCollectionTypeConstructor[C[_]] extends TypedCollectionTypeConstructor[C]

    Permalink
  23. class ErasedScalaBaseType[T, E] extends ScalaBaseType[T]

    Permalink
  24. case class FieldSymbol(name: String)(options: Seq[ColumnOption[_]], tpe: Type) extends TermSymbol with Product with Serializable

    Permalink

    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

    Permalink

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

  26. abstract class FilteredQuery extends Node

    Permalink

    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

    Permalink

    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

    Permalink

    A .forUpdate call

  29. class FunctionSymbol extends TermSymbol

    Permalink

    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

    Permalink
  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

    Permalink

    A .groupBy call.

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

    Permalink

    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

    Permalink

    Represents an Insert operation.

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

    Permalink

    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

    Permalink

    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

    Permalink

    The type of a join operation.

  37. class LiteralNode extends NullaryNode with SimplyTypedNode

    Permalink

    A literal value expression.

  38. final class MappedScalaType extends Type

    Permalink
  39. trait Node extends Dumpable

    Permalink

    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

    Permalink

    Extra methods for Nodes.

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

    Permalink

    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

    Permalink
  43. trait NumericTypedType extends AnyRef

    Permalink

    Mark a TypedType as eligible for numeric operators.

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

    Permalink

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

  45. sealed trait OptionDisc extends AnyRef

    Permalink

    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

    Permalink

    The catamorphism of OptionType.

  47. trait OptionType extends Type

    Permalink
  48. trait OptionTypedType[T] extends TypedType[Option[T]] with OptionType

    Permalink
  49. final case class Ordering(direction: Direction = Ordering.Asc, nulls: NullOrdering = Ordering.NullsDefault) extends Product with Serializable

    Permalink
  50. final case class ParameterSwitch(cases: ConstArray[((Any) ⇒ Boolean, Node)], default: Node) extends SimplyTypedNode with ClientSideOp with Product with Serializable

    Permalink

    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

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

    Permalink

    An expression that represents a conjunction of expressions.

  53. final case class ProductType(elements: ConstArray[Type]) extends Type with Product with Serializable

    Permalink
  54. final case class Pure(value: Node, identity: TypeSymbol = new AnonTypeSymbol) extends UnaryNode with SimplyTypedNode with TypeGenerator with Product with Serializable

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink

    Rebuild an Option type on the client side

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

    Permalink

    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

    Permalink

    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

    Permalink

    The row_number window function

  61. class ScalaBaseType[T] extends ScalaType[T] with BaseTypedType[T]

    Permalink
  62. class ScalaNumericType[T] extends ScalaBaseType[T] with NumericTypedType

    Permalink
  63. class ScalaOptionType[T] extends ScalaType[Option[T]] with OptionTypedType[T]

    Permalink
  64. trait ScalaType[T] extends TypedType[T]

    Permalink

    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

    Permalink

    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

    Permalink

    A node that represents an SQL sequence.

  67. abstract class SimpleFilteredQuery extends FilteredQuery with SimplyTypedNode

    Permalink

    A FilteredQuery without a Symbol.

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

    Permalink

    Default implementation of TableIdentitySymbol

  69. trait SimplyTypedNode extends Node

    Permalink

    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

    Permalink

    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

    Permalink

    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

    Permalink
  73. final case class Subquery(child: Node, condition: Condition) extends UnaryNode with SimplyTypedNode with Product with Serializable

    Permalink

    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

    Permalink

    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

    Permalink

    Provides names for symbols

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

    Permalink

    A table together with its expansion into columns.

  77. trait TableIdentitySymbol extends TypeSymbol

    Permalink

    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

    Permalink

    A Node representing a database table.

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

    Permalink

    A .take call.

  80. trait TermSymbol extends Symbol

    Permalink

    A symbol representing a variable

  81. trait Type extends Dumpable

    Permalink

    Super-trait for all types

  82. trait TypeGenerator extends AnyRef

    Permalink

    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

    Permalink

    A client-side type mapping

  84. trait TypeSymbol extends Symbol

    Permalink

    The symbol of a nominal type

  85. final class TypeUtil extends AnyVal

    Permalink
  86. abstract class TypedCollectionTypeConstructor[C[_]] extends CollectionTypeConstructor

    Permalink
    Annotations
    @implicitNotFound( ... )
  87. trait TypedType[T] extends Type

    Permalink

    A Type that carries a Scala type argument

  88. trait UnaryNode extends Node

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

    Permalink

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

Value Members

  1. object ClientSideOp

    Permalink
  2. object ColumnOption

    Permalink

    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

    Permalink
  4. object FwdPath

    Permalink

    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

    Permalink
  6. object Library

    Permalink

    The standard library for query operators.

  7. object LiteralNode

    Permalink
  8. object MappedScalaType

    Permalink
  9. object OptionType

    Permalink
  10. object Ordering extends Serializable

    Permalink
  11. object Path

    Permalink

    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

    Permalink
  13. object ScalaBaseType

    Permalink
  14. object Subquery extends Serializable

    Permalink
  15. object SymbolNamer

    Permalink
  16. object Type

    Permalink
  17. object TypeUtil

    Permalink
  18. object TypedCollectionTypeConstructor

    Permalink
  19. object TypedType

    Permalink
  20. object UnassignedType extends AtomicType with Product with Serializable

    Permalink

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

  21. object Util

    Permalink

    Utility methods for AST manipulation.

Inherited from AnyRef

Inherited from Any

Ungrouped