Table

ldbc.query.builder.Table
See theTable companion object
trait Table[P <: Product] extends MySQLTable[P], Dynamic

Trait for generating SQL table information.

Type parameters

P

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

Attributes

Companion
object
Source
Table.scala
Graph
Supertypes
trait Dynamic
trait MySQLTable[P]
class Object
trait Matchable
class Any

Members list

Type members

Types

type ElemLabels <: Tuple

Attributes

Source
Table.scala

Inherited types

type ElemTypes <: Tuple

Type of scala types.

Type of scala types.

Attributes

Inherited from:
MySQLTable
Source
Table.scala

Value members

Abstract methods

An alias for the table.

An alias for the table.

Attributes

Source
Table.scala
def _name: String

The name of the table.

The name of the table.

Attributes

Source
Table.scala
def as(name: String): Table[P]

Function for setting alias names for tables.

Function for setting alias names for tables.

Value parameters

name

Alias name

Attributes

Returns

Table with alias name

Source
Table.scala

A method to get the column names defined in the table.

A method to get the column names defined in the table.

Attributes

Source
Table.scala
def setName(name: String): Table[P]

Function for setting table names.

Function for setting table names.

Value parameters

name

Table name

Attributes

Returns

Table with table name

Source
Table.scala

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
Table.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
Table.scala
def delete: Delete[P, Map[ElemTypes, Column]]

Method to construct a query to delete a table.

Method to construct a query to delete a table.

Attributes

Source
Table.scala

Method to construct a query to drop a table.

Method to construct a query to drop a table.

Attributes

Source
Table.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
Table.scala
inline def insertInto[T](func: (Table[P]) => T)(using IsColumn[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
Table.scala
def join[O <: Product](other: Table[O])(on: (Table[P] *: Tuple1[Table[O]]) => Expression): Join[Table[P] *: Tuple1[Table[O]], Table[P] *: Tuple1[Table[O]]]

A method to perform a simple Join.

A method to perform a simple Join.

 Table[Person].join(Table[City])((person, city) => person.cityId == city.id)
 // ... person JOIN city ON person.cityId = city.id

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

Table to do a Join.

Attributes

Source
Table.scala
def label: String

A method to get the table name.

A method to get the table name.

Attributes

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

Method to perform Left Join.

Method to perform Left Join.

 Table[Person].leftJoin(Table[City])((person, city) => person.cityId == city.id)
 // ... person LEFT JOIN city ON person.cityId = city.id

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

Table to do a Join.

Attributes

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

Method to perform Right Join.

Method to perform Right Join.

 Table[Person].rightJoin(Table[City])((person, city) => person.cityId == city.id)
 // ... person RIGHT JOIN city ON person.cityId = city.id

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

Table to do a Join.

Attributes

Source
Table.scala
def select[T](func: (Table[P]) => T): Select[P, T]

A method to perform a simple Select.

A method to perform a simple Select.

 Table[Person].select(person => (person.id, person.name))
 // SELECT id, name FROM person

Type parameters

T

Type of value to be obtained

Value parameters

func

Function to retrieve columns from Table.

Attributes

Returns

Select model

Source
Table.scala
def selectAll(using mirror: ProductOf[P]): Select[P, Map[mirror.MirroredElemTypes, Column]]

A method to perform a simple Select.

A method to perform a simple Select.

 Table[Person].selectAll
 // SELECT id, name, age FROM person

Attributes

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

A method to get a specific column defined in the table.

A method to get a specific column defined in the table.

Type parameters

Tag

Type with a single instance

Value parameters

index

Position of the specified type in tuple X

mirror

product isomorphism map

tag

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

Attributes

Source
Table.scala

Method to construct a query to truncate a table.

Method to construct a query to truncate a table.

Attributes

Source
Table.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
Table.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
Table.scala

Inherited methods

def *: Map[ElemTypes, Column]

A method to get all columns defined in the table.

A method to get all columns defined in the table.

Attributes

Inherited from:
MySQLTable
Source
Table.scala