scala.slick.lifted

TableQuery

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

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.

Source
Query.scala
Linear Supertypes
Query[E, E.TableElementType, Seq], QueryBase[Seq[E.TableElementType]], Rep[Seq[E.TableElementType]], AnyRef, Any
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TableQuery
  2. Query
  3. QueryBase
  4. Rep
  5. AnyRef
  6. 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 TableQuery(cons: (Tag) ⇒ E)

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 TableQuery[E] to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ++[O >: E, R, D[_]](other: Query[O, E.TableElementType, D]): Query[O, E.TableElementType, Seq]

    Return a new query containing the elements from both operands.

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

    Definition Classes
    Query
  6. def ->[B](y: B): (TableQuery[E], B)

    Implicit information
    This member is added by an implicit conversion from TableQuery[E] to ArrowAssoc[TableQuery[E]] 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 baseTableRow: E

    Get the "raw" table row that represents the table itself, as opposed to a Path for a variable of the table's type.

    Get the "raw" table row that represents the table itself, as opposed to a Path for a variable of the table's type. This method should generally not be called from user code.

  11. def clone(): AnyRef

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

    The number of distinct elements of the query.

    The number of distinct elements of the query.

    Definition Classes
    Query
  13. def drop(num: Int): Query[E, E.TableElementType, Seq]

    Select all elements except the first num ones.

    Select all elements except the first num ones.

    Definition Classes
    Query
  14. def drop(num: Long): Query[E, E.TableElementType, Seq]

    Select all elements except the first num ones.

    Select all elements except the first num ones.

    Definition Classes
    Query
  15. def drop(num: ConstColumn[Long]): Query[E, E.TableElementType, Seq]

    Select all elements except the first num ones.

    Select all elements except the first num ones.

    Definition Classes
    Query
  16. def encodeRef(path: List[ast.Symbol]): Query[E, E.TableElementType, Seq]

    Encode a reference into this Rep

    Encode a reference into this Rep

    Definition Classes
    QueryRep
  17. def ensuring(cond: (TableQuery[E]) ⇒ Boolean, msg: ⇒ Any): TableQuery[E]

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

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

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

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

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

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

    Test whether this query is non-empty.

    Test whether this query is non-empty.

    Definition Classes
    Query
  24. def filter[T <: Column[_]](f: (E) ⇒ T)(implicit wt: CanBeQueryCondition[T]): Query[E, E.TableElementType, Seq]

    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.

    Definition Classes
    Query
  25. def filterNot[T <: Column[_]](f: (E) ⇒ T)(implicit wt: CanBeQueryCondition[T]): Query[E, E.TableElementType, Seq]

    Definition Classes
    Query
  26. def finalize(): Unit

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

    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.

    Definition Classes
    Query
  28. def formatted(fmtstr: String): String

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

    Definition Classes
    AnyRef → Any
  30. 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, E.TableElementType, Seq]), (T, Query[P, E.TableElementType, Seq]), Seq]

    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.

    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.

    Definition Classes
    Query
  31. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  32. def innerJoin[E2, U2, D[_]](q2: Query[E2, U2, D]): BaseJoinQuery[E, E2, E.TableElementType, U2, Seq]

    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.

    Definition Classes
    Query
  33. final def isInstanceOf[T0]: Boolean

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

    Join two collections.

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

    Definition Classes
    Query
  35. def leftJoin[E2, U2, D[_]](q2: Query[E2, U2, D]): BaseJoinQuery[E, E2, E.TableElementType, U2, Seq]

    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.

    Definition Classes
    Query
  36. def length: Column[Int]

    The total number of elements (i.

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

    Definition Classes
    Query
  37. def map[F, G, T](f: (E) ⇒ F)(implicit shape: Shape[_ <: FlatShapeLevel, F, T, G]): Query[G, T, Seq]

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

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

    Definition Classes
    Query
  38. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  41. def outerJoin[E2, U2, D[_]](q2: Query[E2, U2, D]): BaseJoinQuery[E, E2, E.TableElementType, U2, Seq]

    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.

    Definition Classes
    Query
  42. def pack[R](implicit packing: Shape[_ <: FlatShapeLevel, E, _, R]): Query[R, E.TableElementType, Seq]

    Definition Classes
    Query
  43. final lazy val packed: Node

    Definition Classes
    Query
  44. def rightJoin[E2, U2, D[_]](q2: Query[E2, U2, D]): BaseJoinQuery[E, E2, E.TableElementType, U2, Seq]

    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.

    Definition Classes
    Query
  45. lazy val shaped: ShapedValue[E, E.TableElementType]

    Definition Classes
    TableQueryQuery
  46. def size: Column[Int]

    The total number of elements (i.

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

    Definition Classes
    Query
  47. def sortBy[T](f: (E) ⇒ T)(implicit arg0: (T) ⇒ Ordered): Query[E, E.TableElementType, Seq]

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

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

    Definition Classes
    Query
  48. def sorted(implicit ev: (E) ⇒ Ordered): Query[E, E.TableElementType, Seq]

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

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

    Definition Classes
    Query
  49. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  50. def take(num: Int): Query[E, E.TableElementType, Seq]

    Select the first num elements.

    Select the first num elements.

    Definition Classes
    Query
  51. def take(num: Long): Query[E, E.TableElementType, Seq]

    Select the first num elements.

    Select the first num elements.

    Definition Classes
    Query
  52. def take(num: ConstColumn[Long]): Query[E, E.TableElementType, Seq]

    Select the first num elements.

    Select the first num elements.

    Definition Classes
    Query
  53. def to[D[_]](implicit ctc: TypedCollectionTypeConstructor[D]): Query[E, E.TableElementType, D]

    Definition Classes
    Query
  54. lazy val toNode: Node

    Definition Classes
    TableQueryRep
  55. def toString(): String

    Definition Classes
    AnyRef → Any
  56. def union[O >: E, R, D[_]](other: Query[O, E.TableElementType, D]): Query[O, E.TableElementType, Seq]

    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.

    Definition Classes
    Query
  57. def unionAll[O >: E, R, D[_]](other: Query[O, E.TableElementType, D]): Query[O, E.TableElementType, Seq]

    Return a new query containing the elements from both operands.

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

    Definition Classes
    Query
  58. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  61. def withFilter[T](f: (E) ⇒ T)(implicit arg0: CanBeQueryCondition[T]): Query[E, E.TableElementType, Seq]

    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.

    Definition Classes
    Query
  62. def zip[E2, U2, D[_]](q2: Query[E2, U2, D]): Query[(E, E2), (E.TableElementType, U2), Seq]

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

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

    Definition Classes
    Query
  63. 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, Seq]

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

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

    Definition Classes
    Query
  64. def zipWithIndex: BaseJoinQuery[E, Column[Long], E.TableElementType, Long, Seq]

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

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

    Definition Classes
    Query
  65. def [B](y: B): (TableQuery[E], B)

    Implicit information
    This member is added by an implicit conversion from TableQuery[E] to ArrowAssoc[TableQuery[E]] 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 TableQuery[E] 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:
    (tableQuery: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from TableQuery[E] 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:
    (tableQuery: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

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

    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.

    Definition Classes
    Query
    Annotations
    @deprecated
    Deprecated

    (Since version 2.1) Use filter instead of where

  2. def x: TableQuery[E]

    Implicit information
    This member is added by an implicit conversion from TableQuery[E] to ArrowAssoc[TableQuery[E]] 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:
    (tableQuery: ArrowAssoc[TableQuery[E]]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  3. def x: TableQuery[E]

    Implicit information
    This member is added by an implicit conversion from TableQuery[E] to Ensuring[TableQuery[E]] 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:
    (tableQuery: Ensuring[TableQuery[E]]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from Query[E, E.TableElementType, Seq]

Inherited from QueryBase[Seq[E.TableElementType]]

Inherited from Rep[Seq[E.TableElementType]]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from TableQuery[E] to StringAdd

Inherited by implicit conversion any2stringfmt from TableQuery[E] to StringFormat

Inherited by implicit conversion any2ArrowAssoc from TableQuery[E] to ArrowAssoc[TableQuery[E]]

Inherited by implicit conversion any2Ensuring from TableQuery[E] to Ensuring[TableQuery[E]]

Ungrouped