SqlQuery

object SqlQuery
Companion
class
trait Sum
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

case
class SqlJoin(parent: TableExpr, child: TableExpr, on: List[(SqlColumn, SqlColumn)], inner: Boolean) extends ColumnOwner

Representation of an SQL join

Representation of an SQL join

Companion
object
object SqlJoin
Companion
class
case
class SqlSelect(context: Context, withs: List[WithRef], table: TableExpr, cols: List[SqlColumn], joins: List[SqlJoin], wheres: List[Predicate], orders: List[OrderSelection[_]], offset: Option[Int], limit: Option[Int], distinct: List[SqlColumn], oneToOne: Boolean, predicate: Boolean) extends SqlQuery

Representation of an SQL SELECT

Representation of an SQL SELECT

Companion
object
object SqlSelect
Companion
class
case
class SqlUnion(elems: List[SqlSelect]) extends SqlQuery

Representation of a UNION ALL of SQL SELECTs

Representation of a UNION ALL of SQL SELECTs

Companion
object
object SqlUnion
Companion
class

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from
Mirror

Value members

Concrete methods

def combineAll(queries: List[SqlQuery]): Option[SqlQuery]

Combine the given queries as a single SQL query

Combine the given queries as a single SQL query

def contextualiseOrderTerms[T](context: Context, owner: ColumnOwner, os: OrderSelection[T]): OrderSelection[T]

Contextualise all terms in the given OrderSelection to the given context and owner

Contextualise all terms in the given OrderSelection to the given context and owner

def contextualiseTerm(context: Context, owner: ColumnOwner, term: Term[_]): SqlColumn

Yield a copy of the given Term with all referenced SqlColumns relativised to the given context and owned by by the given owner

Yield a copy of the given Term with all referenced SqlColumns relativised to the given context and owned by by the given owner

def contextualiseWhereTerms(context: Context, owner: ColumnOwner, pred: Predicate): Predicate

Contextualise all terms in the given Predicate to the given context and owner

Contextualise all terms in the given Predicate to the given context and owner

def ordersToFragment(orders: List[OrderSelection[_]]): Aliased[Fragment]

Render the given OrderSelections as a Fragment

Render the given OrderSelections as a Fragment

def substOrderTables[T](from: TableExpr, to: TableExpr, os: OrderSelection[T]): OrderSelection[T]

Yields a copy of the given OrderSelection with all occurences of from replaced by to

Yields a copy of the given OrderSelection with all occurences of from replaced by to

def substWhereTables(from: TableExpr, to: TableExpr, pred: Predicate): Predicate

Yields a copy of the given Predicate with all occurences of from replaced by to

Yields a copy of the given Predicate with all occurences of from replaced by to

def whereCols(f: Term[_] => SqlColumn, pred: Predicate): List[SqlColumn]

Compute the set of columns referred to by the given prediate

Compute the set of columns referred to by the given prediate

def wherePaths(pred: Predicate): List[List[String]]

Compute the set of paths traversed by the given prediate

Compute the set of paths traversed by the given prediate

def wheresToFragment(context: Context, wheres: List[Predicate]): Aliased[Fragment]

Render the given Predicates as a where clause Fragment

Render the given Predicates as a where clause Fragment