Trait for constructing SQL Statement from Table information.
Type parameters
- A
-
The type of Table. in the case of Join, it is a Tuple of type Table.
- O
-
The type of Optional Table. in the case of Join, it is a Tuple of type Optional Table.
Attributes
- Companion
- object
- Source
- TableQuery.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
-
Members list
Type members
Types
Attributes
- Source
- TableQuery.scala
Value members
Abstract methods
Name of Table
Concrete methods
Method to construct a query to insert a table.
Method to construct a query to insert a table.
TableQuery[City] ++= List(City(1L, "Tokyo"), City(2L, "Osaka"))
Type parameters
- P
-
Scala types to be converted by Encoder
Value parameters
- check
-
Check if the type of the value is the same as the Entity
- values
-
Value to be inserted into the table
Attributes
- Source
- TableQuery.scala
Method to construct a query to insert a table.
Method to construct a query to insert a table.
TableQuery[City] += City(1L, "Tokyo")
Value parameters
- mirror
-
Mirror of Entity
- value
-
Value to be inserted into the table
Attributes
- Source
- TableQuery.scala
Method to construct a query to delete a table.
Method to construct a query to delete a table.
TableQuery[City]
.delete
Attributes
- Source
- TableQuery.scala
Method to construct a query to drop a table.
Method to construct a query to drop a table.
TableQuery[City]
.dropTable
Attributes
- Source
- TableQuery.scala
Method to construct a query to insert a table.
Method to construct a query to insert a table.
TableQuery[City]
.insert((1L, "Tokyo"))
Value parameters
- mirror
-
Mirror of Entity
- values
-
Value to be inserted into the table
Attributes
- Source
- TableQuery.scala
Method to construct a query to insert a table.
Method to construct a query to insert a table.
TableQuery[City]
.insertInto(city => city.id *: city.name)
.values((1L, "Tokyo"))
If you want to use a join, consider using select as follows
TableQuery[City]
.insertInto(city => city.id *: city.name)
.select(
TableQuery[Country]
.join(TableQuery[City])
.on((country, city) => country.id === city.countryId)
.select((country, city) => country.id *: city.name)
.where((country, city) => city.population > 1000000)
)
Type parameters
- C
-
Scala types to be converted by Encoder
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- TableQuery.scala
Method to construct a query to join a table.
Method to construct a query to join a table.
TableQuery[City]
.join(TableQuery[Country])
.on((city, country) => city.countryId === country.id)
Attributes
- Source
- TableQuery.scala
Method to construct a query to left join a table.
Method to construct a query to left join a table.
TableQuery[City]
.leftJoin(TableQuery[Country])
.on((city, country) => city.countryId === country.id)
Attributes
- Source
- TableQuery.scala
Method to construct a query to right join a table.
Method to construct a query to right join a table.
TableQuery[City]
.rightJoin(TableQuery[Country])
.on((city, country) => city.countryId === country.id)
Attributes
- Source
- TableQuery.scala
Method to construct a query to select a table.
Method to construct a query to select a table.
TableQuery[City]
.select(city => city.id *: city.name)
Type parameters
- C
-
Scala types to be converted by Decoder
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- TableQuery.scala
Method to construct a query to select all columns of a table.
Method to construct a query to select all columns of a table.
TableQuery[City]
.selectAll
Attributes
- Source
- TableQuery.scala
Method to construct a query to truncate a table.
Method to construct a query to truncate a table.
TableQuery[City]
.truncateTable
Attributes
- Source
- TableQuery.scala
Method to construct a query to update a table.
Method to construct a query to update a table.
TableQuery[City]
.update(city => city.id *: city.name)((1L, "Tokyo"))
Type parameters
- C
-
Scala types to be converted by Encoder
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
- values
-
Value to be updated in the table
Attributes
- Source
- TableQuery.scala
Method to construct a query to update a table.
Method to construct a query to update a table.
TableQuery[City]
.update(City(1L, "Tokyo"))
Type parameters
- P
-
Scala types to be converted by Encoder
Value parameters
- check
-
Check if the type of the value is the same as the Entity
- mirror
-
Mirror of Entity
- value
-
Value to be updated in the table
Attributes
- Source
- TableQuery.scala