scala.slick.lifted

Query

abstract class Query[+E, U] extends Rep[Seq[U]]

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

Self Type
Query[E, U]
Linear Supertypes
Rep[Seq[U]], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Query
  2. Rep
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Query()

Abstract Value Members

  1. abstract def toNode: Node

    Get the Node for this Rep

    Get the Node for this Rep

    Definition Classes
    Rep
  2. abstract def unpackable: ShapedValue[_ <: E, U]

Concrete Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def ++[O >: E, R](other: Query[O, U]): WrappingQuery[O, U]

    Return a new query containing the elements from both operands.

    Return a new query containing the elements from both operands. Duplicate elements are preserved.

  5. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  6. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def countDistinct: Column[Int]

    The number of distinct elements of the query.

  10. def drop(num: Int): Query[E, U]

    Select all elements except the first num ones.

  11. def encodeRef(path: List[ast.Symbol]): Query[E, U]

    Encode a reference into this Rep

    Encode a reference into this Rep

    Definition Classes
    QueryRep
  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def exists: Column[Boolean]

    Test whether this query is non-empty.

  15. def filter[T](f: (E) ⇒ T)(implicit wt: CanBeQueryCondition[T]): Query[E, U]

  16. def filterNot[T](f: (E) ⇒ T)(implicit wt: CanBeQueryCondition[T]): Query[E, U]

  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def flatMap[F, T](f: (E) ⇒ Query[F, T]): Query[F, T]

    Build a new query by applying a function to all elements of this query and using the elements of the resulting queries.

    Build a new query by applying a function to all elements of this query and using the elements of the resulting queries. This corresponds to an implicit inner join in SQL.

  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def groupBy[K, T, G, P](f: (E) ⇒ K)(implicit kshape: Shape[_ <: Flat, K, T, G], vshape: Shape[_ <: Flat, E, _, P]): Query[(G, Query[P, U]), (T, Query[P, U])]

    Partition this query into a query of pairs of a key and a nested query containing the elements for the key, according to some discriminator function.

  21. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  22. def innerJoin[E2, U2](q2: Query[E2, U2]): BaseJoinQuery[E, E2, U, U2]

    Join two collections with an inner join.

    Join two collections with an inner join. An optional join predicate can be specified later by calling on.

  23. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  24. def join[E2, U2](q2: Query[E2, U2], jt: JoinType = JoinType.Inner): BaseJoinQuery[E, E2, U, U2]

    Join two collections.

    Join two collections. An optional join predicate can be specified later by calling on.

  25. def leftJoin[E2, U2](q2: Query[E2, U2]): BaseJoinQuery[E, E2, U, U2]

    Join two collections with a left outer join.

    Join two collections with a left outer join. An optional join predicate can be specified later by calling on.

  26. def length: Column[Int]

    The total number of elements of the query.

  27. def map[F, G, T](f: (E) ⇒ F)(implicit shape: Shape[_ <: Flat, F, T, G]): Query[G, T]

    Build a new query by applying a function to all elements of this query.

  28. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  29. final def notify(): Unit

    Definition Classes
    AnyRef
  30. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  31. def outerJoin[E2, U2](q2: Query[E2, U2]): BaseJoinQuery[E, E2, U, U2]

    Join two collections with a full outer join.

    Join two collections with a full outer join. An optional join predicate can be specified later by calling on.

  32. def pack[R](implicit packing: Shape[_ <: Flat, E, _, R]): Query[R, U]

  33. final lazy val packed: Node

  34. def rightJoin[E2, U2](q2: Query[E2, U2]): BaseJoinQuery[E, E2, U, U2]

    Join two collections with a right outer join.

    Join two collections with a right outer join. An optional join predicate can be specified later by calling on.

  35. def sortBy[T](f: (E) ⇒ T)(implicit arg0: (T) ⇒ Ordered): Query[E, U]

    Sort this query according to a function which extracts the ordering criteria from the query's elements.

  36. def sorted(implicit ev: (E) ⇒ Ordered): Query[E, U]

    Sort this query according to a the ordering of its elements.

  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  38. def take(num: Int): Query[E, U]

    Select the first num elements.

  39. def toString(): String

    Definition Classes
    AnyRef → Any
  40. def union[O >: E, R](other: Query[O, U]): WrappingQuery[O, U]

    Return a new query containing the elements from both operands.

    Return a new query containing the elements from both operands. Duplicate elements are eliminated from the result.

  41. def unionAll[O >: E, R](other: Query[O, U]): WrappingQuery[O, U]

    Return a new query containing the elements from both operands.

    Return a new query containing the elements from both operands. Duplicate elements are preserved.

  42. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  43. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  44. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  45. def where[T <: Column[_]](f: (E) ⇒ T)(implicit arg0: CanBeQueryCondition[T]): Query[E, U]

    Select all elements of this query which satisfy a predicate.

    Select all elements of this query which satisfy a predicate. Unlike filter, this method only allows Column-valued predicates, so it guards against the accidental use use plain Booleans.

  46. def withFilter[T](f: (E) ⇒ T)(implicit arg0: CanBeQueryCondition[T]): Query[E, U]

    Select all elements of this query which satisfy a predicate.

    Select all elements of this query which satisfy a predicate. This method is used when desugaring for-comprehensions over queries. There is no reason to call it directly because it is the same as filter.

  47. def zip[E2, U2](q2: Query[E2, U2]): Query[(E, E2), (U, U2)]

    Return a query formed from this query and another query by combining corresponding elements in pairs.

  48. def zipWith[E2, U2, F, G, T](q2: Query[E2, U2], f: (E, E2) ⇒ F)(implicit shape: Shape[_ <: Flat, F, T, G]): Query[G, T]

    Return a query formed from this query and another query by combining corresponding elements with the specified function.

  49. def zipWithIndex: BaseJoinQuery[E, Column[Long], U, Long]

    Zip this query with its indices (starting at 0).

Deprecated Value Members

  1. def >>[F, T](q: Query[F, T]): Query[F, T]

    Annotations
    @deprecated
    Deprecated

    (Since version 2.0) Use flatMap instead

Inherited from Rep[Seq[U]]

Inherited from AnyRef

Inherited from Any

Ungrouped