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
Members list
Value members
Abstract methods
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
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
A model for generating queries from Table information.
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
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
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 methods
A method to execute an insert operation against the MySQL server.
A method to execute an insert operation against the MySQL server.
TableQuery[User]
.insertInto(user => user.name *: user.age)
.values(("Alice", 20))
.returning[Long]
Type parameters
- T
-
The type of the primary key
Attributes
- Returns
-
The primary key value
- Inherited from:
- Command
- Source
- Command.scala
A method to execute an update operation against the MySQL server.
A method to execute an update operation against the MySQL server.
TableQuery[User]
.update(user => user.id *: user.name *: user.age)((1L, "Alice", 20))
.where(_.id === 1L)
.update
Attributes
- Returns
-
The number of rows updated
- Inherited from:
- Command
- Source
- Command.scala