TableQueryOpt

ldbc.query.builder.TableQueryOpt
case class TableQueryOpt[A, O <: SharedTable](table: O, column: Column[Extract[O]], name: String, params: List[Dynamic]) extends TableQuery[O, A]

Attributes

Source
TableQuery.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait TableQuery[O, A]
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited types

type Entity = Extract[O]

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala

Value members

Inherited methods

inline def ++=(values: List[Entity]): Insert[O]

Method to construct a query to insert a table.

Method to construct a query to insert a table.

 TableQuery[City] ++= List(City(1L, "Tokyo"), City(2L, "Osaka"))

Value parameters

values

Value to be inserted into the table

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala
inline def +=(value: Entity): Insert[O]

Method to construct a query to insert a table.

Method to construct a query to insert a table.

 TableQuery[City] += City(1L, "Tokyo")

Value parameters

value

Value to be inserted into the table

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala
def delete: Delete[O]

Method to construct a query to delete a table.

Method to construct a query to delete a table.

 TableQuery[City]
   .delete

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala

Method to construct a query to drop a table.

Method to construct a query to drop a table.

 TableQuery[City]
   .dropTable

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala
inline def insert(using mirror: Of[Entity])(values: mirror.MirroredElemTypes*): Insert[O]

Method to construct a query to insert a table.

Method to construct a query to insert a table.

 TableQuery[City]
   .insert((1L, "Tokyo"))

Value parameters

mirror

Mirror of Entity

values

Value to be inserted into the table

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala
inline def insertInto[C](func: O => Column[C]): Into[O, C]

Method to construct a query to insert a table.

Method to construct a query to insert a table.

 TableQuery[City]
   .insertInto(city => city.id *: city.name)
   .values((1L, "Tokyo"))

If you want to use a join, consider using select as follows

  TableQuery[City]
    .insertInto(city => city.id *: city.name)
    .select(
      TableQuery[Country]
        .join(TableQuery[City])
        .on((country, city) => country.id === city.countryId)
        .select((country, city) => country.id *: city.name)
        .where((country, city) => city.population > 1000000)
    )

Type parameters

C

Scala types to be converted by Encoder

Value parameters

func

Function to construct an expression using the columns that Table has.

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala
def join[B, BO, AB, OO](other: TableQuery[B, BO])(using Aux[O, B, AB], Aux[A, BO, OO]): Join[O, B, AB, OO]

Method to construct a query to join a table.

Method to construct a query to join a table.

 TableQuery[City]
   .join(TableQuery[Country])
   .on((city, country) => city.countryId === country.id)

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala
def leftJoin[B, BO, OB, OO](other: TableQuery[B, BO])(using Aux[O, BO, OB], Aux[A, BO, OO]): Join[O, B, OB, OO]

Method to construct a query to left join a table.

Method to construct a query to left join a table.

 TableQuery[City]
   .leftJoin(TableQuery[Country])
   .on((city, country) => city.countryId === country.id)

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product
def rightJoin[B, BO, OB, OO](other: TableQuery[B, BO])(using Aux[A, B, OB], Aux[A, BO, OO]): Join[O, B, OB, OO]

Method to construct a query to right join a table.

Method to construct a query to right join a table.

 TableQuery[City]
   .rightJoin(TableQuery[Country])
   .on((city, country) => city.countryId === country.id)

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala
def select[C](func: O => Column[C]): Select[O, C]

Method to construct a query to select a table.

Method to construct a query to select a table.

 TableQuery[City]
   .select(city => city.id *: city.name)

Type parameters

C

Scala types to be converted by Decoder

Value parameters

func

Function to construct an expression using the columns that Table has.

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala

Method to construct a query to select all columns of a table.

Method to construct a query to select all columns of a table.

 TableQuery[City]
   .selectAll

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala

Method to construct a query to truncate a table.

Method to construct a query to truncate a table.

 TableQuery[City]
   .truncateTable

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala

Method to construct a query to update a table.

Method to construct a query to update a table.

 TableQuery[City]
   .update(City(1L, "Tokyo"))

Value parameters

value

Value to be updated in the table

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala
inline def update[C](func: O => Column[C])(values: C): Update[O]

Method to construct a query to update a table.

Method to construct a query to update a table.

 TableQuery[City]
   .update(city => city.id *: city.name)((1L, "Tokyo"))

Type parameters

C

Scala types to be converted by Encoder

Value parameters

func

Function to construct an expression using the columns that Table has.

values

Value to be updated in the table

Attributes

Inherited from:
TableQuery
Source
TableQuery.scala