slick

ast

package ast

Abstract Syntax Tree (AST) for representing queries during compilation

Source
package.scala
Linear Supertypes
AnyRef, Any
Content Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ast
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class AnonSymbol extends Symbol

    An anonymous symbol defined in the AST.

  2. class AnonTableIdentitySymbol extends AnonTypeSymbol with TableIdentitySymbol

    An anonymous TableIdentitySymbol.

  3. class AnonTypeSymbol extends TypeSymbol

    An anonymous symbol defined in the AST.

  4. final case class Apply(sym: Symbol, children: Seq[Node])(tpe: Type) extends TypedNode with Product with Serializable

    A function call expression.

  5. trait AtomicType extends Type

    An atomic type (i.e.

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

  6. trait BaseTypedType[T] extends TypedType[T] with AtomicType

  7. trait BinaryNode extends Node

  8. final case class Bind(generator: Symbol, from: Node, select: Node) extends BinaryNode with DefNode with Product with Serializable

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

  9. trait ClientSideOp extends AnyRef

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

  10. final case class CollectionCast(child: Node, cons: CollectionTypeConstructor) extends UnaryNode with SimplyTypedNode with Product with Serializable

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

  12. 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).

  13. abstract class ColumnOption[+T] extends AnyRef

  14. final case class CompiledStatement(statement: String, extra: Any, tpe: Type) extends NullaryNode with TypedNode with Product with Serializable

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

  15. final case class Comprehension(from: Seq[(Symbol, Node)] = Seq.empty, where: Seq[Node] = Seq.empty, groupBy: Option[Node] = None, orderBy: Seq[(Node, Ordering)] = Seq.empty, select: Option[Node] = None, fetch: Option[Node] = None, offset: Option[Node] = None) extends DefNode with Product with Serializable

    A SQL comprehension

  16. trait DefNode extends Node

    A Node which introduces Symbols.

  17. class DefaultSymbolScope extends SymbolScope

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

    A .drop call.

  19. case class ElementSymbol(idx: Int) extends Symbol with Product with Serializable

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

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

  21. class ErasedScalaBaseType[T, E] extends ScalaBaseType[T]

  22. case class FieldSymbol(name: String)(options: Seq[ColumnOption[_]], tpe: Type) extends Symbol with Typed with Product with Serializable

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

  23. final case class Filter(generator: Symbol, from: Node, where: Node) extends FilteredQuery with BinaryNode with DefNode with Product with Serializable

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

  24. abstract class FilteredQuery extends Node

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

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

  26. class FunctionSymbol extends Symbol

    A Symbol that represents a library function or operator

  27. final case class GetOrElse(child: Node, default: () ⇒ Any) extends UnaryNode with SimplyTypedNode with Product with Serializable

  28. final case class GroupBy(fromGen: Symbol, from: Node, by: Node, identity: TypeSymbol = new AnonTypeSymbol) extends BinaryNode with DefNode with Product with Serializable

    A .groupBy call.

  29. final case class IfThenElse(clauses: IndexedSeq[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).

  30. final case class Insert(tableSym: Symbol, table: Node, linear: Node) extends BinaryNode with DefNode with Product with Serializable

    Represents an Insert operation.

  31. final case class InsertColumn(children: IndexedSeq[Node], fs: FieldSymbol, tpe: Type) extends Node with TypedNode with Product with Serializable

    A column in an Insert operation.

  32. final case class Join(leftGen: Symbol, rightGen: Symbol, 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))).

  33. abstract class JoinType extends AnyRef

    The type of a join operation.

  34. class LiteralNode extends NullaryNode with TypedNode

    A literal value expression.

  35. final class MappedScalaType extends Type

  36. trait Node extends Dumpable

    A node in the query AST.

    A node in the query AST.

    Every Node has a number of child nodes and an optional type annotation.

  37. final class NodeOps extends AnyVal

    Extra methods for Nodes.

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

  39. trait NullaryNode extends Node

  40. trait NumericTypedType extends AnyRef

    Mark a TypedType as eligible for numeric operators.

  41. 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).

  42. sealed trait OptionDisc extends AnyRef

    A phantom type for Option discriminator columns.

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

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

    The catamorphism of OptionType.

  44. trait OptionType extends Type

  45. trait OptionTypedType[T] extends TypedType[Option[T]] with OptionType

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

  47. final case class ParameterSwitch(cases: Seq[((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.

  48. trait ProductNode extends SimplyTypedNode

    An expression that represents a conjunction of expressions.

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

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

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

  51. final case class QueryParameter(extractor: (Any) ⇒ Any, tpe: Type) extends NullaryNode with TypedNode with Product with Serializable

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

  52. final case class RangeFrom(start: Long = 1L) extends NullaryNode with TypedNode 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.

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

    Rebuild an Option type on the client side

  54. final case class Ref(sym: Symbol) extends NullaryNode with Product with Serializable

    A reference to a Symbol

  55. final case class ResultSetMapping(generator: Symbol, 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.

  56. final case class RowNumber(by: Seq[(Node, Ordering)] = Seq.empty) extends TypedNode with Product with Serializable

    The row_number window function

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

  58. class ScalaNumericType[T] extends ScalaBaseType[T] with NumericTypedType

  59. class ScalaOptionType[T] extends ScalaType[Option[T]] with OptionTypedType[T]

  60. 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 MemoryDriver. Values stored in HeapBackend columns are also expected to use these types.

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

  61. case class Scope(m: Map[Symbol, (Node, Scope)]) extends Product with Serializable

    A scope for scoped traversal

  62. final case class Select(in: Node, field: Symbol) extends UnaryNode with SimplyTypedNode with Product with Serializable

    An expression that selects a field in another expression.

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

    A node that represents an SQL sequence.

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

    Default implementation of TableIdentitySymbol

  65. trait SimplyTypedNode extends Node

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

  66. final case class SortBy(generator: Symbol, from: Node, by: Seq[(Node, Ordering)]) extends FilteredQuery with DefNode with Product with Serializable

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

  67. final case class StructNode(elements: IndexedSeq[(Symbol, Node)]) extends ProductNode 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.

  68. final case class StructType(elements: IndexedSeq[(Symbol, Type)]) extends Type with Product with Serializable

  69. trait Symbol extends AnyRef

    A symbol which can be used in the AST.

  70. class SymbolNamer extends AnyRef

    Provides names for symbols

  71. trait SymbolScope extends AnyRef

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

    A table together with its expansion into columns.

  73. trait TableIdentitySymbol extends TypeSymbol

    A TypeSymbol which uniquely identifies a table type

  74. final case class TableNode(schemaName: Option[String], tableName: String, identity: TableIdentitySymbol, driverTable: Any, baseIdentity: TableIdentitySymbol) extends NullaryNode with TypedNode with Product with Serializable

    A Node representing a database table.

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

    A .take call.

  76. trait Type extends Dumpable

    Super-trait for all types

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

    A client-side type mapping

  78. trait TypeSymbol extends Symbol

    The symbol of a nominal type

  79. final class TypeUtil extends AnyVal

  80. trait Typed extends AnyRef

    Something that has a Type

  81. abstract class TypedCollectionTypeConstructor[C[_]] extends CollectionTypeConstructor

    Annotations
    @implicitNotFound( ... )
  82. trait TypedNode extends Node with Typed

  83. trait TypedType[T] extends Type

    A Type that carries a Scala type argument

  84. trait UnaryNode extends Node

  85. final case class UnassignedStructuralType(sym: TypeSymbol) extends AtomicType with Product with Serializable

    The type of a structural view of a NominalType before computing the proper type in the inferTypes phase.

  86. final case class Union(left: Node, right: Node, all: Boolean, leftGen: Symbol = new AnonSymbol, rightGen: Symbol = new AnonSymbol) extends BinaryNode with DefNode 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 ExtraUtil

    Some less general but still useful methods for the code generators.

  4. object Filter extends Serializable

  5. object FwdPath

  6. object JoinType

  7. object Library

    The standard library for query operators.

  8. object LiteralNode

  9. object MappedScalaType

  10. object Node extends Logging

  11. object NodeOps

  12. object OptionType

  13. object Ordering extends Serializable

  14. object Path

    A constructor/extractor for nested Selects starting at a Ref.

  15. object ProductNode

  16. object ProductOfCommonPaths

  17. object QueryParameter extends Serializable

  18. object ScalaBaseType

  19. object Scope extends Serializable

  20. object SymbolNamer

  21. object SymbolScope

  22. object Type

  23. object TypeUtil

  24. object TypeUtilOps

  25. object Typed

  26. object TypedCollectionTypeConstructor

  27. object TypedType

  28. object UnassignedType extends AtomicType with Product with Serializable

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

  29. object Util

    Utility methods for AST manipulation.

Inherited from AnyRef

Inherited from Any

Ungrouped