Delete
A model for constructing DELETE statements in MySQL.
Type parameters
- A
-
Type representing Table
Value parameters
- params
-
List of parameters
- statement
-
SQL statement string
- table
-
Trait for generating SQL table information.
Attributes
- Source
- Delete.scala
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait CommandProvidertrait Commandtrait SQLclass Objecttrait Matchableclass AnyShow all
Members list
Value members
Concrete methods
Attributes
- Definition Classes
- Source
- Delete.scala
A method for setting the WHERE condition in a DELETE statement.
A method for setting the WHERE condition in a DELETE statement.
TableQuery[City].delete.where(_.name === "Tokyo")
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Delete.scala
A method for setting the WHERE condition in a DELETE statement.
A method for setting the WHERE condition in a DELETE statement.
val opt: Option[String] = ???
TableQuery[City].delete.whereOpt(city => opt.map(value => city.name === value))
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Delete.scala
A method for setting the WHERE condition in a DELETE statement.
A method for setting the WHERE condition in a DELETE statement.
TableQuery[City].delete.where(_.name === "Tokyo")
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Delete.scala
Inherited methods
A method for setting the LIMIT condition in a UPDATE/DELETE statement.
A method for setting the LIMIT condition in a UPDATE/DELETE statement.
TableQuery[City]
.delete
.limit(10)
Value parameters
- length
-
The number of rows to return.
Attributes
- Inherited from:
- CommandProvider
- Source
- Limit.scala
Attributes
- Inherited from:
- Product
Attributes
- Inherited from:
- Product
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