KeyedTableQueryBase

slick.additions.AdditionsProfile.AdditionsApi.KeyedTableQueryBase
class KeyedTableQueryBase[K, A, T <: KeyedTable[K, A]](cons: Tag => T & KeyedTable[K, A])(implicit evidence$1: BaseColumnType[K]) extends TableQuery[T]

Attributes

Graph
Supertypes
class TableQuery[T]
class Query[T, Extract[T], Seq]
trait QueryBase[Seq[Extract[T]]]
trait Rep[Seq[Extract[T]]]
class Object
trait Matchable
class Any
Show all
Known subtypes
class EntTableQuery[K, V, T]
class TableQuery
class KeyedTableQuery[K, A, T]

Members list

Type members

Types

type Key = K
type Lookup

Value members

Inherited methods

def ++[O >: T, R, D[_]](other: Query[O, Extract[T], D]): Query[O, Extract[T], Seq]

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

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

Attributes

Inherited from:
Query
def baseTableRow: T

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.

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.

Attributes

Inherited from:
TableQuery
def countDistinct: Rep[Int]

The number of distinct elements of the query.

The number of distinct elements of the query.

Attributes

Inherited from:
Query
def distinct: Query[T, Extract[T], Seq]

Remove duplicate elements. When used on an ordered Query, there is no guarantee in which order duplicates are removed. This method is equivalent to distinctOn(identity).

Remove duplicate elements. When used on an ordered Query, there is no guarantee in which order duplicates are removed. This method is equivalent to distinctOn(identity).

Attributes

Inherited from:
Query
def distinctOn[F, T](f: T => F)(implicit shape: Shape[_ <: FlatShapeLevel, F, T, _]): Query[T, Extract[T], Seq]

Remove duplicate elements which are the same in the given projection. When used on an ordered Query, there is no guarantee in which order duplicates are removed.

Remove duplicate elements which are the same in the given projection. When used on an ordered Query, there is no guarantee in which order duplicates are removed.

Attributes

Inherited from:
Query
def drop(num: Int): Query[T, Extract[T], Seq]

Select all elements except the first num ones.

Select all elements except the first num ones.

Attributes

Inherited from:
Query
def drop(num: Long): Query[T, Extract[T], Seq]

Select all elements except the first num ones.

Select all elements except the first num ones.

Attributes

Inherited from:
Query
def drop(num: ConstColumn[Long]): Query[T, Extract[T], Seq]

Select all elements except the first num ones.

Select all elements except the first num ones.

Attributes

Inherited from:
Query
def encodeRef(path: Node): Query[T, Extract[T], Seq]

Encode a reference into this Rep.

Encode a reference into this Rep.

Attributes

Inherited from:
Query
def exists: Rep[Boolean]

Test whether this query is non-empty.

Test whether this query is non-empty.

Attributes

Inherited from:
Query
def filter[T](f: T => T)(implicit wt: CanBeQueryCondition[T]): Query[T, Extract[T], Seq]

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

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

Attributes

Inherited from:
Query
def filterIf[T : CanBeQueryCondition](p: Boolean)(f: T => T): Query[T, Extract[T], Seq]

Applies the given filter function, if the boolean parameter p evaluates to true. If not, the filter will not be part of the query.

Applies the given filter function, if the boolean parameter p evaluates to true. If not, the filter will not be part of the query.

Attributes

Inherited from:
Query
def filterNot[T](f: T => T)(implicit wt: CanBeQueryCondition[T]): Query[T, Extract[T], Seq]

Attributes

Inherited from:
Query
def filterNotIf[T : CanBeQueryCondition](p: Boolean)(f: T => T): Query[T, Extract[T], Seq]

Applies the given filterNot function, if the boolean parameter p evaluates to true. If not, the filter will not be part of the query.

Applies the given filterNot function, if the boolean parameter p evaluates to true. If not, the filter will not be part of the query.

Attributes

Inherited from:
Query
def filterNotOpt[V, T : CanBeQueryCondition](optValue: Option[V])(f: (T, V) => T): Query[T, Extract[T], Seq]

Applies the given filterNot, if the Option value is defined. If the value is None, the filter will not be part of the query.

Applies the given filterNot, if the Option value is defined. If the value is None, the filter will not be part of the query.

Attributes

Inherited from:
Query
def filterOpt[V, T : CanBeQueryCondition](optValue: Option[V])(f: (T, V) => T): Query[T, Extract[T], Seq]

Applies the given filter, if the Option value is defined. If the value is None, the filter will not be part of the query.

Applies the given filter, if the Option value is defined. If the value is None, the filter will not be part of the query.

Attributes

Inherited from:
Query
def flatMap[F, T, D[_]](f: T => 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. This corresponds to an implicit inner join in SQL.

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.

Attributes

Inherited from:
Query
def forUpdate: Query[T, Extract[T], Seq]

Specify part of a select statement for update and marked for row level locking

Specify part of a select statement for update and marked for row level locking

Attributes

Inherited from:
Query
def groupBy[K, T, G, P](f: T => K)(implicit kshape: Shape[_ <: FlatShapeLevel, K, T, G], vshape: Shape[_ <: FlatShapeLevel, T, _, P]): Query[(G, Query[P, Extract[T], Seq]), (T, Query[P, Extract[T], 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.

Attributes

Inherited from:
Query
def join[E2, U2, D[_]](q2: Query[E2, U2, D]): BaseJoinQuery[T, E2, Extract[T], U2, Seq, T, E2]

Join two queries with a cross join or inner join. An optional join predicate can be specified later by calling on.

Join two queries with a cross join or inner join. An optional join predicate can be specified later by calling on.

Attributes

Inherited from:
Query
def joinFull[E1 >: T, E2, U2, D[_], O1, U1, O2](q2: Query[E2, _, D])(implicit ol1: OptionLift[E1, O1], sh1: Shape[FlatShapeLevel, O1, U1, _], ol2: OptionLift[E2, O2], sh2: Shape[FlatShapeLevel, O2, U2, _]): BaseJoinQuery[O1, O2, U1, U2, Seq, T, E2]

Join two queries with a full outer join. An optional join predicate can be specified later by calling on. Both sides of the join are lifted to an Option. If at least one element on either side matches the other side, all matching elements are returned as Some, otherwise a single None row is returned.

Join two queries with a full outer join. An optional join predicate can be specified later by calling on. Both sides of the join are lifted to an Option. If at least one element on either side matches the other side, all matching elements are returned as Some, otherwise a single None row is returned.

Attributes

Inherited from:
Query
def joinLeft[E2, U2, D[_], O2](q2: Query[E2, _, D])(implicit ol: OptionLift[E2, O2], sh: Shape[FlatShapeLevel, O2, U2, _]): BaseJoinQuery[T, O2, Extract[T], U2, Seq, T, E2]

Join two queries with a left outer join. An optional join predicate can be specified later by calling on. The right side of the join is lifted to an Option. If at least one element on the right matches, all matching elements are returned as Some, otherwise a single None row is returned.

Join two queries with a left outer join. An optional join predicate can be specified later by calling on. The right side of the join is lifted to an Option. If at least one element on the right matches, all matching elements are returned as Some, otherwise a single None row is returned.

Attributes

Inherited from:
Query
def joinRight[E1 >: T, E2, U2, D[_], O1, U1](q2: Query[E2, U2, D])(implicit ol: OptionLift[E1, O1], sh: Shape[FlatShapeLevel, O1, U1, _]): BaseJoinQuery[O1, E2, U1, U2, Seq, T, E2]

Join two queries with a right outer join. An optional join predicate can be specified later by calling on. The left side of the join is lifted to an Option. If at least one element on the left matches, all matching elements are returned as Some, otherwise a single None row is returned.

Join two queries with a right outer join. An optional join predicate can be specified later by calling on. The left side of the join is lifted to an Option. If at least one element on the left matches, all matching elements are returned as Some, otherwise a single None row is returned.

Attributes

Inherited from:
Query
def length: Rep[Int]

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

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

Attributes

Inherited from:
Query
def map[F, G, T](f: T => 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.

Attributes

Inherited from:
Query
def pack[R](implicit packing: Shape[_ <: FlatShapeLevel, T, _, R]): Query[R, Extract[T], Seq]

Attributes

Inherited from:
Query
def size: Rep[Int]

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

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

Attributes

Inherited from:
Query
def sortBy[T](f: T => T)(implicit ev: T => Ordered): Query[T, Extract[T], 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.

Attributes

Inherited from:
Query
def sorted(implicit ev: T => Ordered): Query[T, Extract[T], Seq]

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

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

Attributes

Inherited from:
Query
def subquery: Query[T, Extract[T], Seq]

Force a subquery to be created when using this Query as part of a larger Query. This method should never be necessary for correctness. If a query works with an explicit .subquery call but fails without, this should be considered a bug in Slick. The method is exposed in the API to enable workarounds to be written in such cases.

Force a subquery to be created when using this Query as part of a larger Query. This method should never be necessary for correctness. If a query works with an explicit .subquery call but fails without, this should be considered a bug in Slick. The method is exposed in the API to enable workarounds to be written in such cases.

Attributes

Inherited from:
Query
def take(num: Int): Query[T, Extract[T], Seq]

Select the first num elements.

Select the first num elements.

Attributes

Inherited from:
Query
def take(num: Long): Query[T, Extract[T], Seq]

Select the first num elements.

Select the first num elements.

Attributes

Inherited from:
Query
def take(num: ConstColumn[Long]): Query[T, Extract[T], Seq]

Select the first num elements.

Select the first num elements.

Attributes

Inherited from:
Query
def to[D[_]](implicit ctc: TypedCollectionTypeConstructor[D]): Query[T, Extract[T], D]

Change the collection type to build when executing the query.

Change the collection type to build when executing the query.

Attributes

Inherited from:
Query
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Rep -> Any
Inherited from:
Rep
def union[O >: T, R, D[_]](other: Query[O, Extract[T], D]): Query[O, Extract[T], Seq]

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

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

Attributes

Inherited from:
Query
def unionAll[O >: T, R, D[_]](other: Query[O, Extract[T], D]): Query[O, Extract[T], Seq]

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

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

Attributes

Inherited from:
Query
def withFilter[T : CanBeQueryCondition](f: T => T): Query[T, Extract[T], Seq]

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.

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.

Attributes

Inherited from:
Query
def zip[E2, U2, D[_]](q2: Query[E2, U2, D]): Query[(T, E2), (Extract[T], 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.

Attributes

Inherited from:
Query
def zipWith[E2, U2, F, G, T, D[_]](q2: Query[E2, U2, D], f: (T, 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.

Attributes

Inherited from:
Query
def zipWithIndex: BaseJoinQuery[T, Rep[Long], Extract[T], Long, Seq, T, Rep[Long]]

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

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

Attributes

Inherited from:
Query

Inherited fields

final lazy val packed: Node

Attributes

Inherited from:
Query
lazy val shaped: ShapedValue[_ <: T, Extract[T]]

Attributes

Inherited from:
TableQuery
lazy val toNode: Node

Get the Node for this Rep.

Get the Node for this Rep.

Attributes

Inherited from:
TableQuery