scala.slick.lifted

Query

sealed abstract class Query[+E, U, C[_]] extends QueryBase[C[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).

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

Self Type
Query[E, U, C]
Source
Query.scala
Linear Supertypes
QueryBase[C[U]], Rep[C[U]], AnyRef, Any
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Query
  2. QueryBase
  3. Rep
  4. AnyRef
  5. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  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 shaped: ShapedValue[_ <: E, U]

  2. abstract def toNode: Node

    Get the Node for this Rep

    Get the Node for this Rep

    Definition Classes
    Rep

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 +(other: String): String

    Implicit information
    This member is added by an implicit conversion from Query[E, U, C] to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ++[O >: E, R, D[_]](other: Query[O, U, D]): Query[O, U, C]

    Return a new query containing the elements from both operands.

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

  6. def ->[B](y: B): (Query[E, U, C], B)

    Implicit information
    This member is added by an implicit conversion from Query[E, U, C] to ArrowAssoc[Query[E, U, C]] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  7. final def ==(arg0: AnyRef): Boolean

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

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

    Definition Classes
    Any
  10. def clone(): AnyRef

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

    The number of distinct elements of the query.

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

    Select all elements except the first num ones.

  13. def drop(num: Long): Query[E, U, C]

    Select all elements except the first num ones.

  14. def drop(num: ConstColumn[Long]): Query[E, U, C]

    Select all elements except the first num ones.

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

    Encode a reference into this Rep

    Encode a reference into this Rep

    Definition Classes
    QueryRep
  16. def ensuring(cond: (Query[E, U, C]) ⇒ Boolean, msg: ⇒ Any): Query[E, U, C]

    Implicit information
    This member is added by an implicit conversion from Query[E, U, C] to Ensuring[Query[E, U, C]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. def ensuring(cond: (Query[E, U, C]) ⇒ Boolean): Query[E, U, C]

    Implicit information
    This member is added by an implicit conversion from Query[E, U, C] to Ensuring[Query[E, U, C]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  18. def ensuring(cond: Boolean, msg: ⇒ Any): Query[E, U, C]

    Implicit information
    This member is added by an implicit conversion from Query[E, U, C] to Ensuring[Query[E, U, C]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  19. def ensuring(cond: Boolean): Query[E, U, C]

    Implicit information
    This member is added by an implicit conversion from Query[E, U, C] to Ensuring[Query[E, U, C]] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  20. final def eq(arg0: AnyRef): Boolean

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

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

    Test whether this query is non-empty.

  23. def filter[T <: Column[_]](f: (E) ⇒ T)(implicit wt: CanBeQueryCondition[T]): Query[E, U, C]

    Select all elements of this query which satisfy a predicate.

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

  24. def filterNot[T <: Column[_]](f: (E) ⇒ T)(implicit wt: CanBeQueryCondition[T]): Query[E, U, C]

  25. def finalize(): Unit

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

    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.

  27. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from Query[E, U, C] to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  28. final def getClass(): Class[_]

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

    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.

  30. def hashCode(): Int

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

    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.

  32. final def isInstanceOf[T0]: Boolean

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

    Join two collections.

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

  34. def leftJoin[E2, U2, D[_]](q2: Query[E2, U2, D]): BaseJoinQuery[E, E2, U, U2, C]

    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.

  35. def length: Column[Int]

    The total number of elements (i.

    The total number of elements (i.e. rows).

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

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

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

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

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

    Definition Classes
    AnyRef
  40. def outerJoin[E2, U2, D[_]](q2: Query[E2, U2, D]): BaseJoinQuery[E, E2, U, U2, C]

    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.

  41. def pack[R](implicit packing: Shape[_ <: FlatShapeLevel, E, _, R]): Query[R, U, C]

  42. final lazy val packed: Node

  43. def rightJoin[E2, U2, D[_]](q2: Query[E2, U2, D]): BaseJoinQuery[E, E2, U, U2, C]

    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.

  44. def size: Column[Int]

    The total number of elements (i.

    The total number of elements (i.e. rows).

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

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

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

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

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

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

    Select the first num elements.

  49. def take(num: Long): Query[E, U, C]

    Select the first num elements.

  50. def take(num: ConstColumn[Long]): Query[E, U, C]

    Select the first num elements.

  51. def to[D[_]](implicit ctc: TypedCollectionTypeConstructor[D]): Query[E, U, D]

  52. def toString(): String

    Definition Classes
    AnyRef → Any
  53. def union[O >: E, R, D[_]](other: Query[O, U, D]): Query[O, U, C]

    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.

  54. def unionAll[O >: E, R, D[_]](other: Query[O, U, D]): Query[O, U, C]

    Return a new query containing the elements from both operands.

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

  55. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  58. def withFilter[T](f: (E) ⇒ T)(implicit arg0: CanBeQueryCondition[T]): Query[E, U, C]

    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.

  59. def zip[E2, U2, D[_]](q2: Query[E2, U2, D]): Query[(E, E2), (U, U2), C]

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

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

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

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

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

  62. def [B](y: B): (Query[E, U, C], B)

    Implicit information
    This member is added by an implicit conversion from Query[E, U, C] to ArrowAssoc[Query[E, U, C]] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from Query[E, U, C] to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (query: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from Query[E, U, C] to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (query: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def where[T <: Column[_]](f: (E) ⇒ T)(implicit arg0: CanBeQueryCondition[T]): Query[E, U, C]

    Select all elements of this query which satisfy a predicate.

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

    Annotations
    @deprecated
    Deprecated

    (Since version 2.1) Use filter instead of where

  2. def x: Query[E, U, C]

    Implicit information
    This member is added by an implicit conversion from Query[E, U, C] to ArrowAssoc[Query[E, U, C]] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (query: ArrowAssoc[Query[E, U, C]]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  3. def x: Query[E, U, C]

    Implicit information
    This member is added by an implicit conversion from Query[E, U, C] to Ensuring[Query[E, U, C]] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (query: Ensuring[Query[E, U, C]]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from QueryBase[C[U]]

Inherited from Rep[C[U]]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Query[E, U, C] to StringAdd

Inherited by implicit conversion any2stringfmt from Query[E, U, C] to StringFormat

Inherited by implicit conversion any2ArrowAssoc from Query[E, U, C] to ArrowAssoc[Query[E, U, C]]

Inherited by implicit conversion any2Ensuring from Query[E, U, C] to Ensuring[Query[E, U, C]]

Ungrouped