class CompoundSelect[Q, R](val lhs: SimpleSelect[Q, R], val compoundOps: Seq[Op[Q, R]], val orderBy: Seq[OrderBy], val limit: Option[Int], val offset: Option[Int])(implicit val qr: Row[Q, R], val dialect: DialectTypeMappers) extends Proxy[Q, R]
A SQL SELECT query, with ORDER BY, LIMIT, OFFSET, or UNION clauses
Sorts this Select via the given expression. Translates into a SQL ORDER BY clause. Can be called more than once to sort on multiple columns, with the last call to sortBy taking priority. Can be followed by asc, desc, nullsFirst or nullsLast to configure the sort order
Sorts this Select via the given expression. Translates into a SQL ORDER BY clause. Can be called more than once to sort on multiple columns, with the last call to sortBy taking priority. Can be followed by asc, desc, nullsFirst or nullsLast to configure the sort order
Only returns the first n rows from this Select. Like when used in Scala collections, if called multiple times only the smallest value of n takes effect
Only returns the first n rows from this Select. Like when used in Scala collections, if called multiple times only the smallest value of n takes effect
Intersects the result rows of this Select with another, preserving only rows present in both this and the other and removing duplicates. Translates into SQL INTERSECT
Intersects the result rows of this Select with another, preserving only rows present in both this and the other and removing duplicates. Translates into SQL INTERSECT
Asserts that this query returns exactly one row, and returns a single value of type R rather than a Seq[R]. Throws an exception if zero or multiple rows are returned.
Asserts that this query returns exactly one row, and returns a single value of type R rather than a Seq[R]. Throws an exception if zero or multiple rows are returned.
Forces this Select to be treated as a subquery that any further operations will operate on, rather than having some operations flattened out into clauses in this Select
Forces this Select to be treated as a subquery that any further operations will operate on, rather than having some operations flattened out into clauses in this Select
Converts this Select into an Expr, assuming it returns a single row and a single column. Note that if this returns multiple rows, behavior is database-specific, with some like Sqlite simply taking the first row while others like Postgres/MySql throwing exceptions
Converts this Select into an Expr, assuming it returns a single row and a single column. Note that if this returns multiple rows, behavior is database-specific, with some like Sqlite simply taking the first row while others like Postgres/MySql throwing exceptions