Update

ldbc.statement.Update
See theUpdate companion object
sealed trait Update[A] extends Command

Trait for building Statements to be updated.

Type parameters

A

The type of Table. in the case of Join, it is a Tuple of type Table.

Attributes

Companion
object
Source
Update.scala
Graph
Supertypes
trait Command
trait SQL
class Object
trait Matchable
class Any

Members list

Value members

Abstract methods

def set[B](column: A => Column[B], value: B): Update[A]

Methods for setting the value of a column in a table.

Methods for setting the value of a column in a table.

 TableQuery[City]
   .update(...)
   .set(_.population, 13929286)

Value parameters

column

A column in the table

value

The value to be set

Attributes

Source
Update.scala
def set[B](column: A => Column[B], value: B, bool: Boolean): Update[A]

Methods for setting the value of a column in a table. If the value passed to this set is false, the update process is skipped.

Methods for setting the value of a column in a table. If the value passed to this set is false, the update process is skipped.

 TableQuery[City]
   .update(...)
   .set(_.population, 13929286, true)

Value parameters

bool

A boolean value that determines whether to update

column

A column in the table

value

The value to be set

Attributes

Source
Update.scala
def table: A

A model for generating queries from Table information.

A model for generating queries from Table information.

Attributes

Source
Update.scala
def where(func: A => Expression): C[A]

A method for setting the WHERE condition in a Update statement.

A method for setting the WHERE condition in a Update statement.

 TableQuery[City]
   .update(...)
   .set(_.population, 13929286)
   .where(_.name === "Tokyo")

Value parameters

func

A function that takes a column and returns an expression.

Attributes

Source
Update.scala
def whereOpt(func: A => Option[Expression]): C[A]

A method for setting the WHERE condition in a Update statement.

A method for setting the WHERE condition in a Update statement.

 val opt: Option[String] = ???
 TableQuery[City]
   .update(...)
   .set(_.population, 13929286)
   .whereOpt(city => opt.map(value => city.name === value))

Value parameters

func

A function that takes a column and returns an expression.

Attributes

Source
Update.scala
def whereOpt[B](opt: Option[B])(func: (A, B) => Expression): C[A]

A method for setting the WHERE condition in a Update statement.

A method for setting the WHERE condition in a Update statement.

 TableQuery[City]
   .update(...)
   .set(_.population, 13929286)
   .whereOpt(Some("Tokyo"))((city, value) => city.name === value)

Value parameters

func

A function that takes a column and returns an expression.

Attributes

Source
Update.scala

Inherited and Abstract methods

def ++(sql: SQL): SQL

Attributes

Inherited from:
SQL
Source
SQL.scala

statement has '?' that the statement has.

statement has '?' that the statement has.

Attributes

Inherited from:
SQL
Source
SQL.scala

an SQL statement that may contain one or more '?' IN parameter placeholders

an SQL statement that may contain one or more '?' IN parameter placeholders

Attributes

Inherited from:
SQL
Source
SQL.scala