Trait for building Statements to be WHERE.
Type parameters
- A
-
The type of Table. in the case of Join, it is a Tuple of type Table.
Attributes
- Companion
- object
- Source
- Where.scala
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Known subtypes
- Self type
Members list
Type members
Types
Attributes
- Source
- Where.scala
Value members
Abstract methods
Trait for generating SQL table information.
Concrete methods
Attributes
- Source
- Where.scala
Attributes
- Source
- Where.scala
Function to set additional conditions on WHERE statement.
Function to set additional conditions on WHERE statement.
TableQuery[City]
.select(_.name)
.where(_.population > 1000000)
.and(_.name == "Tokyo")
// SELECT name FROM city WHERE population > ? AND name = ?
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Where.scala
Function to set additional conditions on WHERE statement.
Function to set additional conditions on WHERE statement.
TableQuery[City]
.select(_.name)
.where(_.population > 1000000)
.and(_.name == "Tokyo", false)
// SELECT name FROM city WHERE population > ?
Value parameters
- bool
-
Determine whether to add to the conditions. If false, the AND condition is not added to the query.
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Where.scala
Function to set additional conditions on WHERE statement.
Function to set additional conditions on WHERE statement.
val opt: Option[String] = ???
TableQuery[City]
.select(_.name)
.where(_.population > 1000000)
.andOpt((city => opt.map(value => city.name === value))
// SELECT name FROM city WHERE population > ? AND name = ?
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Where.scala
Function to set additional conditions on WHERE statement.
Function to set additional conditions on WHERE statement.
TableQuery[City]
.select(_.name)
.where(_.population > 1000000)
.andOpt(Some("Tokyo"))((city, value) => city.name == value)
// SELECT name FROM city WHERE population > ? AND name = ?
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Where.scala
Function to set additional conditions on WHERE statement.
Function to set additional conditions on WHERE statement.
TableQuery[City]
.select(_.name)
.where(_.population > 1000000)
.or(_.name == "Tokyo")
// SELECT name FROM city WHERE population > ? OR name = ?
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Where.scala
Function to set additional conditions on WHERE statement.
Function to set additional conditions on WHERE statement.
TableQuery[City]
.select(_.name)
.where(_.population > 1000000)
.or(_.name == "Tokyo", false)
// SELECT name FROM city WHERE population > ?
Value parameters
- bool
-
Determine whether to add to the conditions. If false, the OR condition is not added to the query.
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Where.scala
Function to set additional conditions on WHERE statement.
Function to set additional conditions on WHERE statement.
val opt: Option[String] = ???
TableQuery[City]
.select(_.name)
.where(_.population > 1000000)
.orOpt((city => opt.map(value => city.name === value))
// SELECT name FROM city WHERE population > ? OR name = ?
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Where.scala
Function to set additional conditions on WHERE statement.
Function to set additional conditions on WHERE statement.
TableQuery[City]
.select(_.name)
.where(_.population > 1000000)
.orOpt(Some("Tokyo"))((city, value) => city.name == value)
// SELECT name FROM city WHERE population > ? OR name = ?
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Where.scala
Function to set additional conditions on WHERE statement.
Function to set additional conditions on WHERE statement.
TableQuery[City]
.select(_.name)
.where(_.population > 1000000)
.xor(_.name == "Tokyo")
// SELECT name FROM city WHERE population > ? XOR name = ?
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Where.scala
Function to set additional conditions on WHERE statement.
Function to set additional conditions on WHERE statement.
TableQuery[City]
.select(_.name)
.where(_.population > 1000000)
.xor(_.name == "Tokyo", false)
// SELECT name FROM city WHERE population > ?
Value parameters
- bool
-
Determine whether to add to the conditions. If false, the XOR condition is not added to the query.
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Where.scala
Function to set additional conditions on WHERE statement.
Function to set additional conditions on WHERE statement.
val opt: Option[String] = ???
TableQuery[City]
.select(_.name)
.where(_.population > 1000000)
.xorOpt((city => opt.map(value => city.name === value))
// SELECT name FROM city WHERE population > ? XOR name = ?
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Where.scala
Function to set additional conditions on WHERE statement.
Function to set additional conditions on WHERE statement.
TableQuery[City]
.select(_.name)
.where(_.population > 1000000)
.xorOpt(Some("Tokyo"))((city, value) => city.name == value)
// SELECT name FROM city WHERE population > ? XOR name = ?
Value parameters
- func
-
Function to construct an expression using the columns that Table has.
Attributes
- Source
- Where.scala
Attributes
- Source
- Where.scala
Attributes
- Source
- Where.scala