Trait for building Statements to be added.
Type parameters
- A
-
The type of Table. in the case of Join, it is a Tuple of type Table.
Attributes
- Companion
- object
- Source
- Insert.scala
- Graph
-
- Supertypes
- Known subtypes
Members list
Value members
Abstract methods
Methods for constructing INSERT ... ON DUPLICATE KEY UPDATE statements.
Methods for constructing INSERT ... ON DUPLICATE KEY UPDATE statements.
TableQuery[City]
.insert((1L, "Tokyo"))
.onDuplicateKeyUpdate(_.name)
Attributes
- Source
- Insert.scala
Methods for constructing INSERT ... ON DUPLICATE KEY UPDATE statements.
Methods for constructing INSERT ... ON DUPLICATE KEY UPDATE statements.
TableQuery[City]
.insert((1L, "Tokyo"))
.onDuplicateKeyUpdate(_.name, "Osaka")
Attributes
- Source
- Insert.scala
A model for generating queries from Table information.
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