TableQuery

ldbc.query.builder.TableQuery
case class TableQuery[P <: Product](table: Table[P]) extends Dynamic, TableQueryBuilder

A model for generating queries from Table information.

Type parameters

P

A class that implements a Product that is one-to-one with the table definition.

Value parameters

table

Trait for generating SQL table information.

Attributes

Source
TableQuery.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Dynamic
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

inline def ++=(values: List[P])(using mirror: ProductOf[P]): Insert[P]

A method to build a query model that inserts data from multiple models into all columns defined in a table.

A method to build a query model that inserts data from multiple models into all columns defined in a table.

Value parameters

mirror

product isomorphism map

values

A class that implements a Product that is one-to-one with the table definition.

Attributes

Source
TableQuery.scala
inline def +=(value: P)(using mirror: ProductOf[P]): Insert[P]

A method to build a query model that inserts data from the model into all columns defined in the table.

A method to build a query model that inserts data from the model into all columns defined in the table.

Value parameters

mirror

product isomorphism map

value

A class that implements a Product that is one-to-one with the table definition.

Attributes

Source
TableQuery.scala
inline def insert(using mirror: ProductOf[P])(values: mirror.MirroredElemTypes*): Insert[P]

A method to build a query model that inserts data into all columns defined in the table.

A method to build a query model that inserts data into all columns defined in the table.

Value parameters

mirror

product isomorphism map

values

A list of Tuples constructed with all the property types that Table has.

Attributes

Source
TableQuery.scala
inline def insertInto[T](func: (TableQuery[P]) => T)(using IsColumnQuery[T] =:= true): SelectInsert[P, T]

A method to build a query model that inserts data into specified columns defined in a table.

A method to build a query model that inserts data into specified columns defined in a table.

Type parameters

T

Type of value to be obtained

Value parameters

func

Function to retrieve columns from Table.

Attributes

Source
TableQuery.scala
inline def insertOrUpdate(using mirror: ProductOf[P])(values: mirror.MirroredElemTypes*): DuplicateKeyUpdateInsert

A method to build a query model that inserts data in all columns defined in the table or updates the data if there are duplicate primary keys.

A method to build a query model that inserts data in all columns defined in the table or updates the data if there are duplicate primary keys.

Value parameters

mirror

product isomorphism map

values

A list of Tuples constructed with all the property types that Table has.

Attributes

Source
TableQuery.scala
inline def insertOrUpdates(values: List[P])(using mirror: ProductOf[P]): DuplicateKeyUpdateInsert

A method to build a query model that inserts data in all columns defined in the table or updates the data if there are duplicate primary keys.

A method to build a query model that inserts data in all columns defined in the table or updates the data if there are duplicate primary keys.

Value parameters

mirror

product isomorphism map

values

A class that implements a Product that is one-to-one with the table definition.

Attributes

Source
TableQuery.scala
def join[O <: Product](other: TableQuery[O])(on: (TableQuery[P] *: Tuple1[TableQuery[O]]) => ExpressionSyntax): Join[TableQuery[P] *: Tuple1[TableQuery[O]], TableQuery[P] *: Tuple1[TableQuery[O]]]

A method to perform a simple Join.

A method to perform a simple Join.

Type parameters

O

A class that implements a Product that is one-to-one with the table definition.

Value parameters

on

Comparison function that performs a Join.

other

TableQuery to do a Join.

Attributes

Source
TableQuery.scala
def leftJoin[O <: Product](other: TableQuery[O])(on: (TableQuery[P] *: Tuple1[TableQuery[O]]) => ExpressionSyntax): Join[TableQuery[P] *: Tuple1[TableQuery[O]], TableQuery[P] *: Tuple1[TableOpt[O]]]

Method to perform Left Join.

Method to perform Left Join.

Type parameters

O

A class that implements a Product that is one-to-one with the table definition.

Value parameters

on

Comparison function that performs a Join.

other

TableQuery to do a Join.

Attributes

Source
TableQuery.scala
def rightJoin[O <: Product](other: TableQuery[O])(on: (TableQuery[P] *: Tuple1[TableQuery[O]]) => ExpressionSyntax): Join[TableQuery[P] *: Tuple1[TableQuery[O]], TableOpt[P] *: Tuple1[TableQuery[O]]]

Method to perform Right Join.

Method to perform Right Join.

Type parameters

O

A class that implements a Product that is one-to-one with the table definition.

Value parameters

on

Comparison function that performs a Join.

other

TableQuery to do a Join.

Attributes

Source
TableQuery.scala
def select[T](func: (TableQuery[P]) => T)(using IsColumnQuery[T] =:= true): Select[P, T]

A method to build a query model that specifies and retrieves columns defined in a table.

A method to build a query model that specifies and retrieves columns defined in a table.

Type parameters

T

Type of value to be obtained

Value parameters

func

Function to retrieve columns from Table.

Attributes

Source
TableQuery.scala
inline def selectAll(using mirror: ProductOf[P]): Select[P, ToColumn[mirror.MirroredElemTypes]]

A method to build a query model to retrieve all columns defined in the Table.

A method to build a query model to retrieve all columns defined in the Table.

Value parameters

mirror

product isomorphism map

Attributes

Source
TableQuery.scala
transparent inline def selectDynamic[Tag <: Singleton](tag: Tag)(using mirror: ProductOf[P], index: ValueOf[IndexOf[mirror.MirroredElemLabels, Tag]]): ColumnQuery[Elem[mirror.MirroredElemTypes, IndexOf[mirror.MirroredElemLabels, Tag]]]

Attributes

Source
TableQuery.scala
inline def update[Tag <: Singleton, T](tag: Tag, value: T)(using mirror: ProductOf[P], index: ValueOf[IndexOf[mirror.MirroredElemLabels, Tag]], check: T =:= Elem[mirror.MirroredElemTypes, IndexOf[mirror.MirroredElemLabels, Tag]]): Update[P]

A method to build a query model that updates specified columns defined in a table.

A method to build a query model that updates specified columns defined in a table.

Type parameters

T

Scala types that match SQL DataType

Tag

Type with a single instance

Value parameters

check

A value to verify that the specified type matches the type of the specified column that the Table has.

index

Position of the specified type in tuple X

mirror

product isomorphism map

tag

A type with a single instance. Here, Column is passed.

value

A value of type T to be inserted into the specified column.

Attributes

Source
TableQuery.scala
inline def update(value: P)(using mirror: ProductOf[P]): Update[P]

A method to build a query model that updates all columns defined in the table using the model.

A method to build a query model that updates all columns defined in the table using the model.

Value parameters

mirror

product isomorphism map

value

A class that implements a Product that is one-to-one with the table definition.

Attributes

Source
TableQuery.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product

Concrete fields

val createTable: Command

Method to construct a query to create a table.

Method to construct a query to create a table.

Attributes

Source
TableQuery.scala
val delete: Delete[P]

Method to construct a query to delete a table.

Method to construct a query to delete a table.

Attributes

Source
TableQuery.scala
val dropTable: Command

Method to construct a query to drop a table.

Method to construct a query to drop a table.

Attributes

Source
TableQuery.scala
val truncateTable: Command

Method to construct a query to truncate a table.

Method to construct a query to truncate a table.

Attributes

Source
TableQuery.scala

Inherited fields

protected val autoInc: List[Column[[A] => (x$1: A) => A]]

Attributes

Inherited from:
TableValidator (hidden)
Source
TableValidator.scala
protected val constraints: Seq[Constraint]

Attributes

Inherited from:
TableValidator (hidden)
Source
TableValidator.scala

Variable that generates the Create statement that creates the Table.

Variable that generates the Create statement that creates the Table.

Attributes

Inherited from:
TableQueryBuilder
Source
TableQueryBuilder.scala
lazy val dropStatement: String

Variable that generates the Drop statement that creates the Table.

Variable that generates the Drop statement that creates the Table.

Attributes

Inherited from:
TableQueryBuilder
Source
TableQueryBuilder.scala
protected val keyPart: Seq[Column[_]]

Attributes

Inherited from:
TableValidator (hidden)
Source
TableValidator.scala
protected val primaryKey: List[Column[[A] => (x$1: A) => A]]

Attributes

Inherited from:
TableValidator (hidden)
Source
TableValidator.scala

Variable that generates the Truncate statement that creates the Table.

Variable that generates the Truncate statement that creates the Table.

Attributes

Inherited from:
TableQueryBuilder
Source
TableQueryBuilder.scala