package ast
- Alphabetic
- Public
- All
Type Members
-
case class
AliasColumn
[A](column: Column[_], columnAlias: String)(implicit columnType: ColumnType[A]) extends AliasedColumn[A] with Product with Serializable
Alias for a column expression, e.g.
Alias for a column expression, e.g.
expression as alias
-
sealed
trait
AliasedColumn
[A] extends Column[A] with CellExtractor[ResultSet, A]
A column that has an alias associated with it.
A column that has an alias associated with it.
The columns selected by a relation must all have aliases. This is how we address them in the JDBC ResultSet:
SELECT a as a_alias, b as b_alias, c as c_alias FROM ...
-
trait
AliasedColumns
[A] extends AnyRef
Type class witnessing that all the elements in
A
are instances ofAliasedColumn[_]
-
sealed
trait
BaseColumnType
[A] extends ColumnType[A]
Trait representing a column type read directly from the database.
-
trait
BaseTable
extends AnyRef
A BaseTable allows columns to be defined on it.
A BaseTable allows columns to be defined on it. It is a base type for Tables and TableFunctions
- trait BooleanMappedColumnTypes extends AnyRef
-
sealed
trait
CaseColumn
[A] extends Column[A]
Case statement *
-
case class
CaseColumnColumn
[A, B](column: Column[B], mappings: List[(Column[_], Column[A])])(implicit columnType: ColumnType[A]) extends CaseColumn[A] with Product with Serializable
A case statement that compares a column to multiple values.
A case statement that compares a column to multiple values. e.g.
case position when 1 then 'Gold' when 2 then 'Silver' when 3 then 'Bronze' end
-
case class
CaseColumnElseColumn
[A, B](column: Column[B], mappings: List[(Column[_], Column[A])], else: Column[A])(implicit columnType: ColumnType[A]) extends CaseColumn[A] with Product with Serializable
A case statement that compares a column to multiple values e.g.
A case statement that compares a column to multiple values e.g.
case position when 1 then 'Gold' when 2 then 'Silver' when 3 then 'Bronze' else 'Other' end
-
case class
CaseWhenColumn
[A](whens: List[When[A]])(implicit columnType: ColumnType[A]) extends CaseColumn[A] with Product with Serializable
A case statement with no else clause
A case statement with no else clause
case when position = 1 then 'Gold' when position = 2 then 'Silver' when position = 3 then 'Bronze' end
-
case class
CaseWhenElseColumn
[A](whens: List[When[A]], else: Column[A])(implicit columnType: ColumnType[A]) extends CaseColumn[A] with Product with Serializable
A case statement with an else clause
A case statement with an else clause
case when position = 1 then 'Gold' when position = 2 then 'Silver' when position = 3 then 'Bronze' else 'Other' end
-
sealed
trait
Column
[A] extends AnyRef
A column, column literal, or column expression.
A column, column literal, or column expression.
This is a more general concept than it may first seem. For example, in the SQL:
SELECT a, b, c FROM t WHERE a == 1
all of the following would be represented as instances of
Column
:a
,b
,c
,1
, anda == 1
. - case class ColumnGroup (column: Column[_]) extends Group with Product with Serializable
-
sealed
trait
ColumnType
[A] extends AnyRef
Object representing a mapping between a Scala data type and an underlying SQL data type.
Object representing a mapping between a Scala data type and an underlying SQL data type. Column types are broadly divided into three categories:
BaseColumnType
represent Scala data types that can be directly mapped to SQL types;OptionColumnTypes
represent ScalaOption
types that are mapped to nullable SQL types;MappedColumnTypes
represent arbitrary mappings between Scala types and SQL types.
-
trait
ColumnTypeEquivalence
[A, B] extends AnyRef
Typeclass representing the equivalence of two column types.
Typeclass representing the equivalence of two column types. For example:
1 === 2
is a valid sqlest expression but1 === "2"
is not.The main requirement for this class comes from
OptionColumnTypes
. sqlest is relaxed about allowing direct comparisons between optional and non-optional columns. For example,1 === Some(2)
is considered valid.The second requirement is that different numeric column types should be comparable
- trait Command extends Operation
-
case class
ConstantColumn
[A](value: A)(implicit columnType: ColumnType[A]) extends Column[A] with Product with Serializable
Constant column values, e.g.
Constant column values, e.g.
1
,'foo'
, and so on. These are embedded directly in sql statements so beware of sql injection -
case class
CrossJoin
[R1 <: Relation, R2 <: Relation](left: R1, right: R2) extends Join[R1, R2] with Product with Serializable
An outer join between two tables.
- case class Delete (from: Table, where: Option[Column[Boolean]]) extends Command with ColumnSyntax with Product with Serializable
-
case class
DoubleInfixFunctionColumn
[A](infix1: String, infix2: String, parameter1: Column[_], parameter2: Column[_], parameter3: Column[_])(implicit columnType: ColumnType[A]) extends Column[A] with Product with Serializable
Binary prefix, infix operators, e.g.
Binary prefix, infix operators, e.g.
a between 1 and 2
- trait EnumerationMappedColumnTypes extends AnyRef
-
case class
ExistsColumn
(select: Select[_, _ <: Relation]) extends Column[Boolean] with Product with Serializable
A column which is false if the select statement within it returns no rows
- case class FunctionGroup (name: String, groups: List[Group]) extends Group with Product with Serializable
- sealed trait Group extends AnyRef
-
case class
InfixFunctionColumn
[A](name: String, parameter1: Column[_], parameter2: Column[_])(implicit columnType: ColumnType[A]) extends Column[A] with Product with Serializable
Binary functions and operators, e.g.
Binary functions and operators, e.g.
1 + 2
,sum(1, 2)
. -
case class
InnerJoin
[R1 <: Relation, R2 <: Relation](left: R1, right: R2, condition: Column[Boolean]) extends Join[R1, R2] with Product with Serializable
An inner join between two tables.
- sealed trait Insert extends Command
- case class InsertFromSelect [A](into: Table, columns: Seq[TableColumn[_]], select: Select[A, _ <: Relation])(implicit evidence$1: AliasedColumns[A]) extends Insert with Product with Serializable
- case class InsertValues (into: Table, setterLists: Seq[Seq[Setter[_, _]]]) extends Insert with Product with Serializable
-
sealed
trait
Join
[R1 <: Relation, R2 <: Relation] extends Relation
A join over two relations.
-
case class
KeywordFunctionColumn
[A](name: String)(implicit columnType: ColumnType[A]) extends Column[A] with Product with Serializable
A KeywordFunctionColumn represents a
-
case class
Lateral
[A, R <: Relation](select: Select[A, R]) extends Relation with Product with Serializable
Allows use on Lateral in join conditions
-
case class
LeftExceptionJoin
[R1 <: Relation, R2 <: Relation](left: R1, right: R2, condition: Column[Boolean]) extends Join[R1, R2] with Product with Serializable
A left exception join (DB2-only) between two tables.
-
case class
LeftJoin
[R1 <: Relation, R2 <: Relation](left: R1, right: R2, condition: Column[Boolean]) extends Join[R1, R2] with Product with Serializable
A left join between two tables.
-
case class
LiteralColumn
[A](value: A)(implicit columnType: ColumnType[A]) extends Column[A] with Product with Serializable
Literal column values, e.g.
Literal column values, e.g.
1
,'foo'
, and so on. - trait LocalDateMappedColumnTypes extends AnyRef
- trait LowPriorityImplicits extends AnyRef
-
abstract
class
MappedColumnType
[A, B] extends ColumnType[A]
Object representing a custom column type
A
with an underlying database typeB
.Object representing a custom column type
A
with an underlying database typeB
.For every
MappedColumnType
there is an underlyingBaseColumnType
. -
trait
MappedColumnTypes
extends StringMappedColumnTypes with BooleanMappedColumnTypes with EnumerationMappedColumnTypes with NumericMappedColumnTypes with LocalDateMappedColumnTypes with OptionColumnTypes
Standard set of MappedColumnTypes for various column types:
- case class MaterializeColumnTypeMacro (c: Context) extends Product with Serializable
- sealed trait NonNumericColumnType [A] extends BaseColumnType[A]
-
case class
NotExistsColumn
(select: Select[_, _ <: Relation]) extends Column[Boolean] with Product with Serializable
A column which is true if the select statement within it returns no rows
- sealed trait NumericColumnType [A] extends BaseColumnType[A]
- trait NumericMappedColumnTypes extends AnyRef
- sealed trait Operation extends AnyRef
-
case class
OptionColumnType
[A, B](nullValue: B, isNull: (B) ⇒ Boolean)(implicit innerColumnType: Aux[A, B]) extends ColumnType[Option[A]] with Product with Serializable
Class representing an nullable SQL column type that is mapped to an
Option
in Scala.Class representing an nullable SQL column type that is mapped to an
Option
in Scala.For every
OptionColumnType
there is an underlyingBaseColumnType
. - trait OptionColumnTypes extends AnyRef
- case class Order (column: Column[_], ascending: Boolean) extends Product with Serializable
- trait OrderedColumnType extends AnyRef
-
case class
OuterJoin
[R1 <: Relation, R2 <: Relation](left: R1, right: R2, condition: Column[Boolean]) extends Join[R1, R2] with Product with Serializable
An outer join between two tables.
-
case class
PostfixFunctionColumn
[A](name: String, parameter: Column[_])(implicit columnType: ColumnType[A]) extends Column[A] with Product with Serializable
Unary postfix functions and operators, e.g.
Unary postfix functions and operators, e.g.
a is null
. -
case class
PrefixFunctionColumn
[A](name: String, parameter: Column[_])(implicit columnType: ColumnType[A]) extends Column[A] with Product with Serializable
Unary prefix functions and operators, e.g.
Unary prefix functions and operators, e.g.
not a
. - trait Query extends Operation
-
case class
ReferenceColumn
[A](columnAlias: String)(implicit columnType: ColumnType[A]) extends AliasedColumn[A] with Product with Serializable
Used for refering to another column by alias
-
sealed
trait
Relation
extends AnyRef
A source of columns from the database.
A source of columns from the database. Tables, joins, and select statements are all types of relation.
-
case class
RightExceptionJoin
[R1 <: Relation, R2 <: Relation](left: R1, right: R2, condition: Column[Boolean]) extends Join[R1, R2] with Product with Serializable
A right exception join (DB2-only) between two tables.
-
case class
RightJoin
[R1 <: Relation, R2 <: Relation](left: R1, right: R2, condition: Column[Boolean]) extends Join[R1, R2] with Product with Serializable
A right join between two tables.
-
case class
ScalarFunctionColumn
[A](name: String, parameters: Seq[Column[_]])(implicit columnType: ColumnType[A]) extends Column[A] with Product with Serializable
A ScalarFunctionColumn should not be created by the user directly.
A ScalarFunctionColumn should not be created by the user directly. Instead it will be returned as a result of applying a ScalarFunctionN (where N is a number) to a set of columns. See ScalarFunctions for the implementations of ScalarFunctionN
- trait ScalarFunctions extends AnyRef
-
case class
Select
[A, R <: Relation](cols: A, from: R, where: Option[Column[Boolean]] = None, startWith: Option[Column[Boolean]] = None, connectBy: Option[Column[Boolean]] = None, groupBy: List[Group] = Nil, having: Option[Column[Boolean]] = None, orderBy: List[Order] = Nil, limit: Option[Long] = None, offset: Option[Long] = None, optimize: Option[Long] = None, union: List[Union[_]] = Nil, subselectAlias: Option[String] = None)(implicit aliasedColumns: AliasedColumns[A]) extends Relation with Query with ColumnSyntax with Product with Serializable
A select statement or subselect.
-
case class
SelectColumn
[A](select: Select[AliasedColumn[A], _ <: Relation])(implicit columnType: ColumnType[A]) extends Column[A] with Product with Serializable
A column containing a select statement which selects only a single column
- class Setter [A, B] extends AnyRef
- trait StringMappedColumnTypes extends AnyRef
-
abstract
class
Table
extends Relation with BaseTable
A database table.
-
case class
TableColumn
[A](tableAlias: String, columnName: String)(implicit columnType: ColumnType[A]) extends AliasedColumn[A] with Product with Serializable
Columns from tables.
-
case class
TableFunctionApplication
[+T](tableName: String, aliasedAs: Option[String], parameterColumns: Seq[Column[_]], tableFunction: T) extends Relation with Product with Serializable
This TableFunction case class should not be created by the user directly.
This TableFunction case class should not be created by the user directly. Instead it will be returned as a result of applying a TableFunctionN (where N is a number) to a set of columns. See TableFunctions for the implementations of TableFunctionN
-
case class
TableFunctionFromSelect
[A, R <: Relation](select: Select[A, R], aliasedAs: String) extends Relation with Product with Serializable
A temporary table for the given select statement.
- trait TableFunctions extends AnyRef
- case class TupleGroup (groups: List[Group]) extends Group with Product with Serializable
- trait TupleGroups extends AnyRef
- case class Union [A](select: Select[A, _ <: Relation], unionAll: Boolean) extends Product with Serializable
-
case class
Update
(table: Table, set: Seq[Setter[_, _]], where: Option[Column[Boolean]] = None) extends Command with ColumnSyntax with Product with Serializable
An update statement.
-
case class
When
[A](condition: Column[Boolean], result: Column[A]) extends Product with Serializable
A when clause in a CaseColumn *
-
case class
WindowFunctionColumn
(partitionByColumns: Seq[Column[_]], orderBy: Seq[Order]) extends Column[Int] with Product with Serializable
Defines a window for use within an OLAP function
Value Members
- object AliasTableImpl
- object AliasedColumns
- object BigDecimalColumnType extends NumericColumnType[BigDecimal] with Product with Serializable
- object BooleanColumnType extends NonNumericColumnType[Boolean] with Product with Serializable
- object ByteArrayColumnType extends NonNumericColumnType[Array[Byte]] with Product with Serializable
- object ColumnType
- object ColumnTypeEquivalence extends LowPriorityImplicits
- object DateTimeColumnType extends NonNumericColumnType[DateTime] with Product with Serializable
- object DoubleColumnType extends NumericColumnType[Double] with Product with Serializable
- object IntColumnType extends NumericColumnType[Int] with Product with Serializable
- object LocalDateColumnType extends NonNumericColumnType[LocalDate] with Product with Serializable
- object LongColumnType extends NumericColumnType[Long] with Product with Serializable
- object MappedColumnType
- object MaterializeColumnTypeMacro extends Serializable
- object OptionColumnType extends Serializable
- object Setter
- object StringColumnType extends NonNumericColumnType[String] with Product with Serializable
- object TableFunctionApplyImplementations