TableQuery

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

A model for generating queries from Table information.

Type parameters

F

The effect type

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

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait TableQueryBuilder
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[F, 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

inline def +=(value: P)(using mirror: ProductOf[P]): Insert[F, 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

inline def insert(using mirror: ProductOf[P])(values: <none>*): Insert[F, 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

inline def insertInto[T](func: TableQuery[F, P] => T)(using IsColumnQuery[F, T] =:= true): SelectInsert[F, 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

inline def insertOrUpdate(using mirror: ProductOf[P])(values: <none>*): DuplicateKeyUpdateInsert[F]

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

inline def insertOrUpdates(values: List[P])(using mirror: ProductOf[P]): DuplicateKeyUpdateInsert[F]

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

def join[O <: Product](other: TableQuery[F, O])(on: TableQuery[F, P] *: (TableQuery[F, O]) => ExpressionSyntax[F]): Join[F, TableQuery[F, P] *: (TableQuery[F, O]), TableQuery[F, P] *: (TableQuery[F, 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

def leftJoin[O <: Product](other: TableQuery[F, O])(on: TableQuery[F, P] *: (TableQuery[F, O]) => ExpressionSyntax[F]): Join[F, TableQuery[F, P] *: (TableQuery[F, O]), TableQuery[F, P] *: (TableOpt[F, 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

def rightJoin[O <: Product](other: TableQuery[F, O])(on: TableQuery[F, P] *: (TableQuery[F, O]) => ExpressionSyntax[F]): Join[F, TableQuery[F, P] *: (TableQuery[F, O]), TableOpt[F, P] *: (TableQuery[F, 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

def select[T](func: TableQuery[F, P] => T)(using IsColumnQuery[F, T] =:= true): Select[F, 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

inline def selectAll(using mirror: ProductOf[P]): Select[F, P, ToColumn[F, <none>]]

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

transparent inline def selectDynamic[Tag <: Singleton](tag: Tag)(using mirror: ProductOf[P], index: ValueOf[IndexOf[MirroredElemLabels, Tag]]): ColumnQuery[F, Elem[<none>, IndexOf[MirroredElemLabels, Tag]]]
inline def update[Tag <: Singleton, T](tag: Tag, value: T)(using mirror: ProductOf[P], index: ValueOf[IndexOf[MirroredElemLabels, Tag]], check: T =:= Elem[<none>, IndexOf[MirroredElemLabels, Tag]]): Update[F, 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

inline def update(value: P)(using mirror: ProductOf[P]): Update[F, 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

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product

Concrete fields

val createTable: Command[F]

Method to construct a query to create a table.

Method to construct a query to create a table.

Attributes

val delete: Delete[F, P]

Method to construct a query to delete a table.

Method to construct a query to delete a table.

Attributes

val dropTable: Command[F]

Method to construct a query to drop a table.

Method to construct a query to drop a table.

Attributes

val truncateTable: Command[F]

Method to construct a query to truncate a table.

Method to construct a query to truncate a table.

Attributes

Inherited fields

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

Attributes

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

Attributes

Inherited from:
TableValidator (hidden)
lazy val createStatement: String

Variable that generates the Create statement that creates the Table.

Variable that generates the Create statement that creates the Table.

Attributes

Inherited from:
TableQueryBuilder
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
protected val keyPart: Seq[Column[_]]

Attributes

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

Attributes

Inherited from:
TableValidator (hidden)
lazy val truncateStatement: String

Variable that generates the Truncate statement that creates the Table.

Variable that generates the Truncate statement that creates the Table.

Attributes

Inherited from:
TableQueryBuilder