package query
- Alphabetic
- Public
- Protected
Type Members
- class Aggregate[Q, R] extends DelegateQueryable[Q, R]
- sealed trait AscDesc extends AnyRef
- class Column[T] extends Expr[T]
A variant of Expr representing a raw table column; allows assignment in updates and inserts
- class CompoundSelect[Q, R] extends Proxy[Q, R]
A SQL
SELECT
query, withORDER BY
,LIMIT
,OFFSET
, orUNION
clauses - trait Delete[Q] extends ExecuteUpdate[Int] with Base[Q]
A SQL
DELETE
query - trait GetGeneratedKeys[Q, R] extends Query[Seq[R]]
Represents an Insert query that you want to call
JdbcStatement.getGeneratedKeys
on to retrieve any auto-generated primary key values from the results - case class GroupBy(keys: Seq[Expr[_]], select: () => Select[_, _], having: Seq[Expr[_]]) extends Product with Serializable
Models a SQL
GROUP BY
clause - trait Insert[V[_[_]], R] extends WithSqlExpr[V[Column]] with generated.Insert[V, R]
A SQL
INSERT
query - trait InsertColumns[V[_[_]], R] extends InsertBase[V[Column]] with ExecuteUpdate[Int]
A SQL
INSERT VALUES
query - trait InsertSelect[V[_[_]], C, R, R2] extends InsertBase[V[Column]] with ExecuteUpdate[Int]
A SQL
INSERT SELECT
query - trait InsertValues[V[_[_]], R] extends InsertBase[V[Column]] with ExecuteUpdate[Int]
- case class Join(prefix: String, from: Seq[From]) extends Product with Serializable
Models a SQL
JOIN
clause - trait JoinAppend[Q, Q2, QF, RF] extends AnyRef
Typeclass to allow
.join
to append tuples, such thatQuery[(A, B)].join(Query[C])
returns a flatQuery[(A, B, C)]
rather than a nestedQuery[((A, B), B)]
.Typeclass to allow
.join
to append tuples, such thatQuery[(A, B)].join(Query[C])
returns a flatQuery[(A, B, C)]
rather than a nestedQuery[((A, B), B)]
. Can't eliminate nesting in all cases, but eliminates nesting often enough to be useful - trait JoinAppendLowPriority extends AnyRef
- trait JoinOps[C[_, _], Q, R] extends WithSqlExpr[Q]
- trait Joinable[Q, R] extends AnyRef
- class LateralJoinOps[C[_, _], Q, R] extends AnyRef
Wrapper class with extension methods to add support for
JOIN LATERAL
, which allow forJOIN
clauses to access the results of earlierJOIN
andFROM
clauses.Wrapper class with extension methods to add support for
JOIN LATERAL
, which allow forJOIN
clauses to access the results of earlierJOIN
andFROM
clauses. Only supported by Postgres and MySql - sealed trait Nulls extends AnyRef
- class OnConflict[Q, R] extends AnyRef
A query with a SQL
ON CONFLICT
clause, typically anINSERT
or anUPDATE
- case class OrderBy(expr: Expr[_], ascDesc: Option[AscDesc], nulls: Option[Nulls]) extends Product with Serializable
Models a SQL
ORDER BY
clause - trait Query[R] extends Renderable
A SQL Query, either a Query.Multiple that returns multiple rows, or a Query.Single that returns a single row
- trait Returning[Q, R] extends Query[Seq[R]] with DelegateQueryable[Q, Seq[R]]
A query with a
RETURNING
clause - trait Select[Q, R] extends Renderable with Aggregatable[Q] with Joinable[Q, R] with JoinOps[Select, Q, R] with Query[Seq[R]] with DelegateQueryable[Q, Seq[R]] with Wrapped
A SQL
SELECT
query, possible withJOIN
,WHERE
,GROUP BY
,ORDER BY
,LIMIT
,OFFSET
clausesA SQL
SELECT
query, possible withJOIN
,WHERE
,GROUP BY
,ORDER BY
,LIMIT
,OFFSET
clausesModels the various components of a SQL SELECT:
SELECT DISTINCT column, AGG_FUNC(column_or_expression), … FROM mytable JOIN another_table ON mytable.column = another_table.column WHERE constraint_expression GROUP BY column HAVING constraint_expression ORDER BY column ASC/DESC LIMIT count OFFSET COUNT;
Good syntax reference:
https://www.cockroachlabs.com/docs/stable/selection-queries#set-operations https://www.postgresql.org/docs/current/sql-select.html
- class SimpleSelect[Q, R] extends Select[Q, R]
A
SELECT
query, withFROM
/JOIN
/WHERE
/GROUP BY
clauses, but withoutORDER BY
/LIMIT
/TAKE
/UNION
clauses - case class SqlWindow[T](e: Expr[T], partitionBy0: Option[Expr[_]], filter0: Option[Expr[Boolean]], orderBy: Seq[OrderBy], frameStart0: Option[SqlStr], frameEnd0: Option[SqlStr], exclusions: Option[SqlStr])(implicit dialect: DialectTypeMappers) extends Expr[T] with Product with Serializable
- class SubqueryRef extends From
Models a subquery: a
SELECT
,VALUES
, nestedWITH
, etc. - abstract class Table[V[_[_]]] extends Base with LowPri[V]
In-code representation of a SQL table, associated with a given
case class
V. - trait TableMacros extends AnyRef
- class TableRef extends From
Models a SQL
FROM
clause - trait Update[Q, R] extends JoinOps[Update, Q, R] with Base[Q] with ExecuteUpdate[Int]
A SQL
UPDATE
query - class Values[Q, R] extends Proxy[Q, R] with DelegateQueryable[Q, Seq[R]]
A SQL
VALUES
clause, used to treat a sequence of primitive Ts as a Select query. - class WithCte[Q, R] extends Proxy[Q, R]
A SQL
WITH
clause - class WithCteRef extends From
Value Members
- object AscDesc
- object Column
- object CompoundSelect
- object Delete
- object FlatJoin
- object GetGeneratedKeys
- object Insert
- object InsertColumns
- object InsertSelect
- object InsertValues
- object Join extends Serializable
- object JoinAppend extends generated.JoinAppend
- object JoinOps
- object Joinable
- object Nulls
- object OnConflict
- object Query
- object Returning
- object Select
- object SimpleSelect
- object SubqueryRef
- object Table
- object TableMacros
- object Update
- object Values
- object WithCte