Alias for a column expression, e.g.
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 ...
Type class witnessing that all the elements in A
are instances of AliasedColumn[_]
Trait representing a column type read directly from the database.
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
Case statement *
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
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
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
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
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
.
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.
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
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
An outer join between two tables.
Binary prefix, infix operators, e.g.
Binary prefix, infix operators, e.g. a between 1 and 2
Binary functions and operators, e.g.
Binary functions and operators, e.g. 1 + 2
, sum(1, 2)
.
An inner join between two tables.
A join over two relations.
A left join between two tables.
Literal column values, e.g.
Literal column values, e.g. 1
, 'foo'
, and so on.
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
.
Standard set of MappedColumnTypes for various column types:
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
.
An outer join between two tables.
Unary postfix functions and operators, e.g.
Unary postfix functions and operators, e.g. a is null
.
Unary prefix functions and operators, e.g.
Unary prefix functions and operators, e.g. not a
.
Used for refering to another column by alias
A source of columns from the database.
A source of columns from the database. Tables, joins, and select statements are all types of relation.
A right join between two tables.
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
A select statement or subselect.
A column containing a select statement which selects only a single column
A database table.
Columns from tables.
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
An update statement.
A when clause in a CaseColumn *
Defines a window for use within an OLAP function
Alias for a column expression, e.g.
expression as alias