Package

slick

lifted

Permalink

package lifted

Lifted embedding: Stable query api based on implicits and overloading lifting Scala code into Slick ASTs

Source
package.scala
Linear Supertypes
AnyRef, Any
Content Hierarchy
TupleShapeImplicitsShapeColumnOrdered[T]OrderedCompilableFunctionsCompilableMappedProjection[T, P]ShapedValue[T, U]ColumnsShapeLevelFlatShapeLevelNestedShapeLevelShapeLevelProductClassShape[E, C]CaseClassShape[P, LiftedTuple, LiftedCaseClass, PlainTuple, PlainCaseClass]TupleShape[Level, M, U, P]MappedScalaProductShape[Level, C, M, U, P]MappedProductShape[Level, C, M, U, P]ProductNodeShape[Level, C, M, U, P]RepShapeOptionShapeImplicitsRepShapeImplicitsConstColumnShapeImplicitsAbstractTableShapeImplicitsShape[Level, Mixed_, Unpacked_, Packed_]RepOption[T]LiteralColumn[T]ConstColumn[T]Rep[T]QueryBase[T]AbstractTable[T]TableQuery[E]BaseJoinQuery[E1, E2, U1, U2, C, B1, B2]WrappingQuery[E, U, C]ForeignKeyQuery[E, U]Query[E, U, C]OptionLiftLowPriorityOptionLiftOptionMapper3[B1, B2, B3, BR, P1, P2, P3, R]OptionMapper2[B1, B2, BR, P1, P2, R]OptionMapper[BR, R]MappedTo[T]MappedToBaseStringColumnExtensionMethods[P1]BooleanColumnExtensionMethods[P1]OptionNumericColumnExtensionMethods[B1]BaseNumericColumnExtensionMethods[P1]NumericColumnExtensionMethods[B1, P1]OptionColumnExtensionMethods[B1]BaseColumnExtensionMethods[P1]ColumnExtensionMethods[B1, P1]OptionExtensionMethods[B1]BaseExtensionMethods[B1]ExtensionMethods[B1, P1]PrimaryKeyConstraintCompilableLowPriorityStreamingExecutableStreamingExecutable[T, TU, EU]Executable[T, TU]CompiledStreamingExecutable[R, RU, EU]CompiledExecutable[R, RU]AppliedCompiledFunction[PU, R, RU]StreamableCompiled[R, RU, EU]RunnableCompiled[R, RU]CompiledFunction[F, PT, PU, R, RU]CompilersMixinCompiled[T]BaseTagRefTagTag
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. lifted
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractTable[T] extends Rep[T]

    Permalink

    The profile-independent superclass of all table row objects.

    The profile-independent superclass of all table row objects.

    T

    Row type for this table. Make sure it matches the type of your * projection.

  2. trait AbstractTableShapeImplicits extends RepShapeImplicits

    Permalink
  3. trait Aliases extends AnyRef

    Permalink

    Aliases for lifted embedding features.

    Aliases for lifted embedding features. This trait can be mixed into aliasing objects which simplify the use of the lifted embedding.

  4. final class AnyExtensionMethods extends AnyVal

    Permalink

    Extension methods for all columns and all primitive values that can be lifted to columns

  5. final class AnyOptionExtensionMethods[O <: Rep[_], P] extends AnyVal

    Permalink

    Extension methods for Options of single- and multi-column values

  6. class AppliedCompiledFunction[PU, R <: Rep[_], RU] extends RunnableCompiled[R, RU]

    Permalink
  7. final class BaseColumnExtensionMethods[P1] extends AnyVal with ColumnExtensionMethods[P1, P1] with BaseExtensionMethods[P1]

    Permalink
  8. trait BaseExtensionMethods[B1] extends ExtensionMethods[B1, B1]

    Permalink
  9. final class BaseJoinQuery[+E1, +E2, U1, U2, C[_], +B1, +B2] extends WrappingQuery[(E1, E2), (U1, U2), C]

    Permalink
  10. final class BaseNumericColumnExtensionMethods[P1] extends AnyVal with NumericColumnExtensionMethods[P1, P1] with BaseExtensionMethods[P1]

    Permalink
  11. trait BaseTag extends Tag

    Permalink

    A Tag marking the base table instance itself

  12. final class BooleanColumnExtensionMethods[P1] extends AnyVal with ExtensionMethods[Boolean, P1]

    Permalink

    Extension methods for Rep[Boolean] and Rep[Option[Boolean]]

  13. trait CanBeQueryCondition[-T] extends (T) ⇒ Rep[_]

    Permalink

    A typeclass for types that can be used as predicates in filter calls.

    A typeclass for types that can be used as predicates in filter calls.

    Annotations
    @implicitNotFound( ... )
  14. class CaseClassShape[P <: Product, LiftedTuple, LiftedCaseClass <: P, PlainTuple, PlainCaseClass <: P] extends MappedScalaProductShape[FlatShapeLevel, P, LiftedCaseClass, PlainCaseClass, LiftedCaseClass]

    Permalink

    A generic case class shape that can be used to lift a case class of plain Scala types to a case class of lifted types.

    A generic case class shape that can be used to lift a case class of plain Scala types to a case class of lifted types. This allows the type to be used as a record type (like tuples and HLists) in the Lifted Embedding.

    Example:

    case class C(a: Int, b: Option[String])
    case class LiftedC(a: Column[Int], b: Column[Option[String]])
    implicit object cShape extends CaseClassShape(LiftedC.tupled, C.tupled)
  15. trait ColumnExtensionMethods[B1, P1] extends ExtensionMethods[B1, P1]

    Permalink

    Extension methods for all columns

  16. case class ColumnOrdered[T](column: Rep[T], ord: Ordering) extends Ordered with Product with Serializable

    Permalink

    A Column with an associated Ordering.

  17. trait ColumnsShapeLevel extends FlatShapeLevel

    Permalink

    ShapeLevel that only allows records of individual columns.

    ShapeLevel that only allows records of individual columns. This level is used for parameters of compiled queries.

  18. trait Compilable[T, C <: Compiled[T]] extends AnyRef

    Permalink

    Typeclass for types that can be contained in a Compiled container.

    Typeclass for types that can be contained in a Compiled container. This includes all Executable types as well as functions (of any arity) from flat, fully packed parameter types to an Executable result type.

    Annotations
    @implicitNotFound( ... )
  19. trait CompilableFunctions extends CompilableLowPriority

    Permalink
  20. trait CompilableLowPriority extends AnyRef

    Permalink
  21. sealed trait Compiled[T] extends AnyRef

    Permalink

    A possibly parameterized query that will be cached for repeated efficient execution without having to recompile it every time.

    A possibly parameterized query that will be cached for repeated efficient execution without having to recompile it every time. The compiled state is computed on demand the first time a Cached value is executed. It is always tied to a specific profile.

    Cached forms a limited monad which ensures that it can only contain values that are Compilable.

  22. abstract class CompiledExecutable[R, RU] extends RunnableCompiled[R, RU] with CompilersMixin

    Permalink
  23. class CompiledFunction[F, PT, PU, R <: Rep[_], RU] extends Compiled[F] with CompilersMixin

    Permalink
  24. abstract class CompiledStreamingExecutable[R, RU, EU] extends CompiledExecutable[R, RU] with StreamableCompiled[R, RU, EU]

    Permalink
  25. trait CompilersMixin extends AnyRef

    Permalink
  26. class ConstColumn[T] extends TypedRep[T]

    Permalink

    A scalar value that is known at the client side at the time a query is executed.

    A scalar value that is known at the client side at the time a query is executed. This is either a constant value (LiteralColumn) or a scalar parameter.

  27. trait ConstColumnShapeImplicits extends RepShapeImplicits

    Permalink
  28. trait Constraint extends AnyRef

    Permalink

    Marker trait for foreign key and primary key constraints.

  29. trait Executable[T, TU] extends AnyRef

    Permalink

    Typeclass for types that can be executed as queries.

    Typeclass for types that can be executed as queries. This encompasses collection-valued (Query[_, _, _[_] ]), scalar and record types.

    Annotations
    @implicitNotFound( ... )
  30. trait ExtensionMethodConversions extends AnyRef

    Permalink
  31. trait ExtensionMethods[B1, P1] extends Any

    Permalink
  32. trait FlatShapeLevel extends NestedShapeLevel

    Permalink

    ShapeLevel that does not allow nested collections.

    ShapeLevel that does not allow nested collections. This is the standard level for executable queries.

  33. final class ForeignKey extends AnyRef

    Permalink

    Represents a foreign key.

    Represents a foreign key. Objects of this type are used internally by Slick. At the user level you generally see ForeignKeyQuery objects instead.

  34. class ForeignKeyQuery[E <: AbstractTable[_], U] extends WrappingQuery[E, U, Seq] with Constraint

    Permalink

    A query that selects data linked by a foreign key.

  35. final class FunctionSymbolExtensionMethods extends AnyRef

    Permalink

    Utility methods for internal use in the lifted embedding

  36. class Index extends AnyRef

    Permalink

    An index (or foreign key constraint with an implicit index).

  37. class Isomorphism[A, B] extends AnyRef

    Permalink

    An isomorphism between two types that can be used for mapped column types.

  38. final case class LiteralColumn[T](value: T)(implicit tt: TypedType[T]) extends ConstColumn[T] with Product with Serializable

    Permalink

    A column with a constant value which is inserted into an SQL statement as a literal.

  39. abstract class MappedProductShape[Level <: ShapeLevel, C, M <: C, U <: C, P <: C] extends ProductNodeShape[Level, C, M, U, P]

    Permalink

    Base class for ProductNodeShapes with a type mapping

  40. class MappedProjection[T, P] extends Rep[T]

    Permalink
  41. abstract class MappedScalaProductShape[Level <: ShapeLevel, C <: Product, M <: C, U <: C, P <: C] extends MappedProductShape[Level, C, M, U, P]

    Permalink

    Base class for ProductNodeShapes with a type mapping to a type that extends scala.Product

  42. trait MappedTo[T] extends MappedToBase

    Permalink

    The base type for automatically mapped column types.

    The base type for automatically mapped column types. Extending this type (with a type parameter T which is already a supported column type) lets you use your custom type as a column type in the Lifted Embedding. You must provide a constructor that takes a single value of the underlying type (same restriction as for value classes).

  43. trait MappedToBase extends Any

    Permalink
  44. trait NestedShapeLevel extends ShapeLevel

    Permalink

    ShapeLevel that allows nested collections.

  45. trait NumericColumnExtensionMethods[B1, P1] extends ExtensionMethods[B1, P1]

    Permalink

    Extension methods for numeric columns

  46. final class OptionColumnExtensionMethods[B1] extends AnyVal with ColumnExtensionMethods[B1, Option[B1]] with OptionExtensionMethods[B1]

    Permalink
  47. trait OptionExtensionMethods[B1] extends ExtensionMethods[B1, Option[B1]]

    Permalink
  48. sealed trait OptionLift[M, O] extends AnyRef

    Permalink

    A typeclass that lifts a mixed type to the packed Option type.

  49. sealed trait OptionLiftLowPriority extends AnyRef

    Permalink
  50. trait OptionMapper[BR, R] extends (Rep[BR]) ⇒ Rep[R]

    Permalink
  51. sealed trait OptionMapper2[B1, B2, BR, P1, P2, R] extends OptionMapper[BR, R]

    Permalink
    Annotations
    @implicitNotFound( ... )
  52. sealed trait OptionMapper3[B1, B2, B3, BR, P1, P2, P3, R] extends OptionMapper[BR, R]

    Permalink
    Annotations
    @implicitNotFound( ... )
  53. final class OptionNumericColumnExtensionMethods[B1] extends AnyVal with NumericColumnExtensionMethods[B1, Option[B1]] with OptionExtensionMethods[B1]

    Permalink
  54. trait OptionShapeImplicits extends AnyRef

    Permalink
  55. class Ordered extends AnyRef

    Permalink
  56. final class Parameters[PU, PP] extends AnyRef

    Permalink
  57. case class PrimaryKey(name: String, columns: IndexedSeq[Node]) extends Constraint with Product with Serializable

    Permalink

    An explicit primary key.

    An explicit primary key. Simple primary keys can also be represented by O.PrimaryKey column options instead.

  58. class ProductClassShape[E <: Product, C <: Product] extends MappedScalaProductShape[FlatShapeLevel, Product, C, E, C]

    Permalink

    A generic Product class shape that can be used to lift a class of plain Scala types to a class of lifted types.

    A generic Product class shape that can be used to lift a class of plain Scala types to a class of lifted types. This allows the type to be used as a record type (like tuples and HLists) in the Lifted Embedding.

    This can help with mapping tables >22 columns to classes, especially when using code generation. This can be used for Scala 2.11 case classes >22 fields.

    Example:

    def columnShape[T](implicit s: Shape[FlatShapeLevel, Column[T], T, Column[T]]) = s
    class C(val a: Int, val b: Option[String]) extends Product{
      def canEqual(that: Any): Boolean = that.isInstanceOf[C]
      def productArity: Int = 2
      def productElement(n: Int): Any = Seq(a, b)(n)
    }
    class LiftedC(val a: Column[Int], val b: Column[Option[String]]) extends Product{
      def canEqual(that: Any): Boolean = that.isInstanceOf[LiftedC]
      def productArity: Int = 2
      def productElement(n: Int): Any = Seq(a, b)(n)
    }
    implicit object cShape extends ProductClassShape(
      Seq(columnShape[Int], columnShape[Option[String]]),
      seq => new LiftedC(seq(0).asInstanceOf[Column[Int]], seq(1).asInstanceOf[Column[Option[String]]]),
      seq => new C(seq(0).asInstanceOf[Int], seq(1).asInstanceOf[Option[String]])
    )
  59. abstract class ProductNodeShape[Level <: ShapeLevel, C, M <: C, U <: C, P <: C] extends Shape[Level, M, U, P]

    Permalink

    Base class for Shapes of record values which are represented by ProductNodes in the AST.

    Base class for Shapes of record values which are represented by ProductNodes in the AST.

    C

    The supertype for the record values.

    M

    The mixed type of the Shape (a subtype of C).

    U

    The unpacked type of the Shape (a subtype of C).

    P

    The fully packed type of the Shape (a subtype of C).

  60. trait ProvenShape[U] extends AnyRef

    Permalink

    A limited version of ShapedValue which can be constructed for every type that has a valid shape.

    A limited version of ShapedValue which can be constructed for every type that has a valid shape. We use it to enforce that a table's * projection has a valid shape. A ProvenShape has itself a Shape so it can be used in place of the value that it wraps for purposes of packing and unpacking.

  61. sealed abstract class Query[+E, U, C[_]] extends QueryBase[C[U]]

    Permalink

    An instance of Query represents a query or view, i.e.

    An instance of Query represents a query or view, i.e. a computation of a collection type (Rep[Seq[T]]). It is parameterized with both, the mixed type (the type of values you see e.g. when you call map()) and the unpacked type (the type of values that you get back when you run the query).

    Additional extension methods for queries containing a single column are defined in slick.lifted.SingleColumnQueryExtensionMethods.

  62. sealed trait QueryBase[T] extends Rep[T]

    Permalink
  63. abstract class RefTag extends Tag

    Permalink

    A Tag for table instances that represent a Node

  64. trait Rep[T] extends AnyRef

    Permalink

    Common base trait for all lifted values, including columns.

    Common base trait for all lifted values, including columns.

    All column operations are added with extension methods that depend on the type inside the Rep. These are defined in:

    A Rep[T : TypedType] is always Typed, so that the TypedType can be retrieved directly from the Rep value.

  65. final case class RepOption[T](base: ShapedValue[_, _], toNode: Node) extends Rep[Option[T]] with Product with Serializable

    Permalink

    Represents Rep[Option[T]] in all cases where T is not a column base type.

    Represents Rep[Option[T]] in all cases where T is not a column base type. This special representation is necessary so that a non-Option Rep value can be retrieved for encoding Option-based operations. This base value is of type T if T <: Rep[_], otherwise of type Rep[T].

  66. trait RepShapeImplicits extends OptionShapeImplicits

    Permalink
  67. trait RunnableCompiled[R, RU] extends Compiled[R]

    Permalink

    A compiled value that can be executed to obtain its result.

  68. abstract class Shape[Level <: ShapeLevel, -Mixed_, Unpacked_, Packed_] extends AnyRef

    Permalink

    A type class that encodes the unpacking Mixed => Unpacked of a Query[Mixed] to its result element type Unpacked and the packing to a fully packed type Packed, i.e.

    A type class that encodes the unpacking Mixed => Unpacked of a Query[Mixed] to its result element type Unpacked and the packing to a fully packed type Packed, i.e. a type where everything which is not a transparent container is wrapped in a Column[_].

    Example:

    - Mixed: (Column[Int], Column[(Int, String)], (Int, Option[Double])) - Unpacked: (Int, (Int, String), (Int, Option[Double])) - Packed: (Column[Int], Column[(Int, String)], (Column[Int], Column[Option[Double]])) - Linearized: (Int, Int, String, Int, Option[Double])

    Annotations
    @implicitNotFound( ... )
  69. trait ShapeLevel extends AnyRef

    Permalink

    The level of a Shape, i.e.

    The level of a Shape, i.e. what kind of types it allows. Subtypes of this trait are used as a phantom type for Shape resolution. There are no instances of any ShapeLevel.

  70. case class ShapedValue[T, U](value: T, shape: Shape[_ <: FlatShapeLevel, T, U, _]) extends Rep[U] with Product with Serializable

    Permalink

    A value together with its Shape

  71. trait SimpleBinaryOperator extends BinaryNode

    Permalink

    A SimpleBinaryOperator gets translated to a binary operator call in SQL.

  72. trait SimpleExpression extends Node

    Permalink

    A SimpleExpression allows arbitrary SQL code to be generated.

  73. trait SimpleFunction extends Node

    Permalink

    A SimpleFunction gets translated to a plain function call or JDBC/ODBC scalar function {fn ...} call in SQL.

  74. final case class SimpleLiteral(name: String)(buildType: Type) extends NullaryNode with SimplyTypedNode with Product with Serializable

    Permalink

    A SimpleLiteral is inserted verbatim into a SQL query string.

    A SimpleLiteral is inserted verbatim into a SQL query string. For the purpose of handling it in the query compiler it is assumed to be an expression of the specified type.

  75. final class SingleColumnQueryExtensionMethods[B1, P1, C[_]] extends AnyVal

    Permalink

    Extension methods for Queries of a single column

  76. trait StreamableCompiled[R, RU, EU] extends RunnableCompiled[R, RU]

    Permalink

    A compiled value that can be executed to obtain its result as a stream of data.

  77. trait StreamingExecutable[T, TU, EU] extends Executable[T, TU]

    Permalink

    Typeclass for types that can be executed as streaming queries, i.e.

    Typeclass for types that can be executed as streaming queries, i.e. only collection-valued (Query[_, _, _[_] ]) types. This is used as a phantom type for computing the required types. The actual value is always null.

    Annotations
    @implicitNotFound( ... )
  78. final class StringColumnExtensionMethods[P1] extends AnyVal with ExtensionMethods[String, P1]

    Permalink

    Extension methods for Rep[String] and Rep[Option[String]]

  79. class TableQuery[E <: AbstractTable[_]] extends Query[E, lifted.TableQuery.E.TableElementType, Seq]

    Permalink

    Represents a database table.

    Represents a database table. Profiles add extension methods to TableQuery for operations that can be performed on tables but not on arbitrary queries, e.g. getting the table DDL.

  80. sealed trait Tag extends AnyRef

    Permalink

    A Tag marks a specific row represented by an AbstractTable instance.

  81. final class TupleShape[Level <: ShapeLevel, M <: Product, U <: Product, P <: Product] extends ProductNodeShape[Level, Product, M, U, P]

    Permalink

    Shape for Scala tuples of all arities

  82. trait TupleShapeImplicits extends AnyRef

    Permalink
  83. class WrappingQuery[+E, U, C[_]] extends Query[E, U, C]

    Permalink

Value Members

  1. object CanBeQueryCondition

    Permalink
  2. object Case

    Permalink

    Case provides a DSL for conditional statements in the query language.

    Case provides a DSL for conditional statements in the query language. An arbitrary number of If...Then expressions can be chained, optionally followed by Else, e.g.:

    Case If u.id < 3 Then "low" If u.id < 6 Then "medium" Else "high"

    All result expressions have to be of compatible type (modulo nullability). If at least one of them is an Option type or the Else branch is missing, the result is also an Option.

  3. object Compilable extends CompilableFunctions

    Permalink
  4. object Compiled

    Permalink
  5. object Executable

    Permalink
  6. object ForeignKey

    Permalink
  7. object FunctionSymbolExtensionMethods

    Permalink
  8. object Functions

    Permalink

    Contains stand-alone database functions for use in queries.

    Contains stand-alone database functions for use in queries. Functions which operate on columns are generally added as extension methods to the appropriate column types instead.

  9. object MappedToBase

    Permalink
  10. object OptionLift extends OptionLiftLowPriority

    Permalink
  11. object OptionMapper2

    Permalink
  12. object OptionMapper3

    Permalink
  13. object OptionMapperDSL

    Permalink
  14. object Ordered

    Permalink
  15. object Parameters

    Permalink
  16. object ProvenShape

    Permalink
  17. object Query

    Permalink

    The companion object for Query contains factory methods for creating queries.

  18. object Rep

    Permalink
  19. object RepShape extends Shape[FlatShapeLevel, Rep[_], Any, Rep[_]]

    Permalink

    Shape for Rep values (always fully packed)

  20. object Shape extends ConstColumnShapeImplicits with AbstractTableShapeImplicits with TupleShapeImplicits

    Permalink
  21. object ShapedValue extends Serializable

    Permalink
  22. object SimpleBinaryOperator

    Permalink
  23. object SimpleExpression

    Permalink
  24. object SimpleFunction

    Permalink
  25. object SimpleLiteral extends Serializable

    Permalink
  26. object StreamingExecutable extends StreamingExecutable[Rep[Any], Any, Any]

    Permalink

    A prototype StreamingExecutable instance for Rep types.

  27. object TableQuery

    Permalink
  28. object TableQueryMacroImpl

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped