Packages

package ast

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. 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

  2. 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 ...

  3. trait AliasedColumns [A] extends AnyRef

    Type class witnessing that all the elements in A are instances of AliasedColumn[_]

  4. sealed trait BaseColumnType [A] extends ColumnType[A]

    Trait representing a column type read directly from the database.

  5. 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

  6. trait BooleanMappedColumnTypes extends AnyRef
  7. sealed trait CaseColumn [A] extends Column[A]

    Case statement *

  8. 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

  9. 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

  10. 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

  11. 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

  12. 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, and a == 1.

  13. case class ColumnGroup (column: Column[_]) extends Group with Product with Serializable
  14. 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 Scala Option types that are mapped to nullable SQL types;
    • MappedColumnTypes represent arbitrary mappings between Scala types and SQL types.
  15. 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 but 1 === "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

  16. trait Command extends Operation
  17. 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

  18. 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.

  19. case class Delete (from: Table, where: Option[Column[Boolean]]) extends Command with ColumnSyntax with Product with Serializable
  20. 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

  21. trait EnumerationMappedColumnTypes extends AnyRef
  22. 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

  23. case class FunctionGroup (name: String, groups: List[Group]) extends Group with Product with Serializable
  24. sealed trait Group extends AnyRef
  25. 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).

  26. 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.

  27. sealed trait Insert extends Command
  28. case class InsertFromSelect [A](into: Table, columns: Seq[TableColumn[_]], select: Select[A, _ <: Relation])(implicit evidence$1: AliasedColumns[A]) extends Insert with Product with Serializable
  29. case class InsertValues (into: Table, setterLists: Seq[Seq[Setter[_, _]]]) extends Insert with Product with Serializable
  30. sealed trait Join [R1 <: Relation, R2 <: Relation] extends Relation

    A join over two relations.

  31. case class KeywordFunctionColumn [A](name: String)(implicit columnType: ColumnType[A]) extends Column[A] with Product with Serializable

    A KeywordFunctionColumn represents a

  32. case class Lateral [A, R <: Relation](select: Select[A, R]) extends Relation with Product with Serializable

    Allows use on Lateral in join conditions

  33. 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.

  34. 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.

  35. 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.

  36. trait LocalDateMappedColumnTypes extends AnyRef
  37. trait LowPriorityImplicits extends AnyRef
  38. abstract class MappedColumnType [A, B] extends ColumnType[A]

    Object representing a custom column type A with an underlying database type B.

    Object representing a custom column type A with an underlying database type B.

    For every MappedColumnType there is an underlying BaseColumnType.

  39. trait MappedColumnTypes extends StringMappedColumnTypes with BooleanMappedColumnTypes with EnumerationMappedColumnTypes with NumericMappedColumnTypes with LocalDateMappedColumnTypes with OptionColumnTypes

    Standard set of MappedColumnTypes for various column types:

  40. case class MaterializeColumnTypeMacro (c: Context) extends Product with Serializable
  41. sealed trait NonNumericColumnType [A] extends BaseColumnType[A]
  42. 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

  43. sealed trait NumericColumnType [A] extends BaseColumnType[A]
  44. trait NumericMappedColumnTypes extends AnyRef
  45. sealed trait Operation extends AnyRef
  46. 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 underlying BaseColumnType.

  47. trait OptionColumnTypes extends AnyRef
  48. case class Order (column: Column[_], ascending: Boolean) extends Product with Serializable
  49. trait OrderedColumnType extends AnyRef
  50. 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.

  51. 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.

  52. 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.

  53. trait Query extends Operation
  54. 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

  55. 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.

  56. 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.

  57. 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.

  58. 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

  59. trait ScalarFunctions extends AnyRef
  60. 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.

  61. 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

  62. class Setter [A, B] extends AnyRef
  63. trait StringMappedColumnTypes extends AnyRef
  64. abstract class Table extends Relation with BaseTable

    A database table.

  65. case class TableColumn [A](tableAlias: String, columnName: String)(implicit columnType: ColumnType[A]) extends AliasedColumn[A] with Product with Serializable

    Columns from tables.

  66. 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

  67. 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.

  68. trait TableFunctions extends AnyRef
  69. case class TupleGroup (groups: List[Group]) extends Group with Product with Serializable
  70. trait TupleGroups extends AnyRef
  71. case class Union [A](select: Select[A, _ <: Relation], unionAll: Boolean) extends Product with Serializable
  72. case class Update (table: Table, set: Seq[Setter[_, _]], where: Option[Column[Boolean]] = None) extends Command with ColumnSyntax with Product with Serializable

    An update statement.

  73. case class When [A](condition: Column[Boolean], result: Column[A]) extends Product with Serializable

    A when clause in a CaseColumn *

  74. 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

  1. object AliasTableImpl
  2. object AliasedColumns
  3. object BigDecimalColumnType extends NumericColumnType[BigDecimal] with Product with Serializable
  4. object BooleanColumnType extends NonNumericColumnType[Boolean] with Product with Serializable
  5. object ByteArrayColumnType extends NonNumericColumnType[Array[Byte]] with Product with Serializable
  6. object ColumnType
  7. object ColumnTypeEquivalence extends LowPriorityImplicits
  8. object DateTimeColumnType extends NonNumericColumnType[DateTime] with Product with Serializable
  9. object DoubleColumnType extends NumericColumnType[Double] with Product with Serializable
  10. object IntColumnType extends NumericColumnType[Int] with Product with Serializable
  11. object LocalDateColumnType extends NonNumericColumnType[LocalDate] with Product with Serializable
  12. object LongColumnType extends NumericColumnType[Long] with Product with Serializable
  13. object MappedColumnType
  14. object MaterializeColumnTypeMacro extends Serializable
  15. object OptionColumnType extends Serializable
  16. object Setter
  17. object StringColumnType extends NonNumericColumnType[String] with Product with Serializable
  18. object TableFunctionApplyImplementations

Ungrouped