Into

ldbc.statement.Insert.Into
case class Into[A, B](table: A, statement: String, columns: Column[B])

Attributes

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

Members list

Value members

Concrete methods

def select[C](select: Select[C, B]): Values[A]

Method for constructing INSERT ... SELECT statements.

Method for constructing INSERT ... SELECT statements.

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

Type parameters

C

The type of the column to be inserted.

Value parameters

select

The SELECT statement to be inserted.

Attributes

Source
Insert.scala
def select[C](where: Q[C, B]): Values[A]

Method for constructing INSERT ... SELECT statements.

Method for constructing INSERT ... SELECT statements.

 TableQuery[City]
   .insertInto(city => city.id *: city.name)
   .select(
     TableQuery[Country]
       .select(country => country.id *: country.name)
       .where(_.name === "Japan")
   )

Type parameters

C

The type of the column to be inserted.

Value parameters

where

The WHERE statement to be inserted.

Attributes

Source
Insert.scala
def values(head: B, tail: B*): Values[A]

Method for constructing INSERT ... VALUES statements.

Method for constructing INSERT ... VALUES statements.

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

Value parameters

head

The values to be inserted.

tail

The values to be inserted.

Attributes

Source
Insert.scala
def values(values: NonEmptyList[B]): Values[A]

Method for constructing INSERT ... VALUES statements.

Method for constructing INSERT ... VALUES statements.

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

Value parameters

values

The values to be inserted.

Attributes

Source
Insert.scala

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product