class QueryBuilder extends InterpolationContext
Builder for SELECT and UPDATE statements.
- Self Type
- JdbcProfile.QueryBuilder
- Source
- JdbcStatementBuilderComponent.scala
- Alphabetic
- By Inheritance
- QueryBuilder
- InterpolationContext
- AnyRef
- Any
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new QueryBuilder(tree: Node, state: CompilerState)
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ->[B](y: B): (JdbcProfile.QueryBuilder, B)
- Implicit
- This member is added by an implicit conversion from JdbcProfile.QueryBuilder toArrowAssoc[JdbcProfile.QueryBuilder] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- val alwaysAliasSubqueries: Boolean
- Attributes
- protected
- val alwaysAliasTables: Boolean
Alias every table in a FROM clause and qualify the column references, also in single-table SELECTs.
Alias every table in a FROM clause and qualify the column references, also in single-table SELECTs. SQLite needs this because it reads an unknown, unqualified double-quoted column name as a string literal instead of failing.
- Attributes
- protected
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val b: SQLBuilder
- Attributes
- protected
- def buildComprehension(c: Base): Unit
- Attributes
- protected
- def buildDelete(): Result
- def buildDeleteFrom(tableName: String): Unit
- Attributes
- protected
- def buildFetchOffsetClause(fetch: Option[Node], offset: Option[Node]): Unit
- Attributes
- protected
- def buildFrom(n: Node, alias: Option[TermSymbol]): Unit
- Attributes
- protected
- final def buildFrom(n: Node, alias: Option[TermSymbol], skipParens: Boolean): Unit
- Attributes
- protected
- def buildFromClause(from: Seq[(TermSymbol, Node)]): Unit
- Attributes
- protected
- def buildGroupByClause(groupBy: Option[Node]): Unit
- Attributes
- protected
- def buildGroupByColumn(by: Node): Unit
- Attributes
- protected
- def buildHavingClause(having: Option[Node]): Unit
- Attributes
- protected
- def buildJoin(j: Join): Unit
- Attributes
- protected
- def buildLockingClause(strength: Option[LockStrength]): Unit
- Attributes
- protected
- def buildOrderByClause(order: ConstArray[(Node, Ordering)]): Unit
- Attributes
- protected
- def buildOrdering(n: Node, o: Ordering): Unit
- Attributes
- protected
- final def buildSelect(): Result
- def buildSelectClause(c: Base): Unit
- Attributes
- protected
- def buildSelectModifiers(c: Base): Unit
- Attributes
- protected
- def buildSelectPart(n: Node): Unit
- Attributes
- protected
- def buildUpdate(): Result
- def buildWhereClause(where: Option[Node]): Unit
- Attributes
- protected
- final def building(p: JdbcProfile.StatementPart)(f: => Unit): Unit
- Attributes
- protected
- Annotations
- @inline()
- def castNullLiteralInSelect(ti: JdbcType[_]): Boolean
Whether a NULL literal of type
tithat is a column of a select list is written ascast(null as <type>).Whether a NULL literal of type
tithat is a column of a select list is written ascast(null as <type>). Without the cast, a database has to guess the type of the column, e.g. in a subquery or a union of NULLs, and PostgreSQL and HSQLDB guess one that does not match the other side of a union or the column's use in an outer query. A bind variable is never cast.The cast's type is the default SQL type of
ti, not the type of the other sides of a union. A union of strings, times or most numbers takes the largest length or precision of its sides, so the cast can only widen the result. A union of DECIMALs adds up the largest scale and the largest number of integer digits of its sides, so where that sum is capped (38 digits on SQL Server, 31 on DB2), the cast'sDECIMAL(21,2)can cost a high-scale column its scale or integer digits. Those profiles leave a DECIMAL NULL untyped.A
Stringmapped onto a column of a custom database type, such as a PostgreSQL enum, has the SQL type VARCHAR, so its NULL is cast to VARCHAR and does not match the column in a union. Such a type needs asqlTypeNamethat names the real type.- Attributes
- protected
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
- val concatOperator: Option[String]
- Attributes
- protected
- var currentPart: JdbcProfile.StatementPart
- Attributes
- protected
- var currentUniqueFrom: Option[TermSymbol]
- Attributes
- protected
- var dmlTargetTableName: Option[String]
The name of the target table of the UPDATE or DELETE statement being built.
The name of the target table of the UPDATE or DELETE statement being built. A subquery that reads the same table must alias it, so that its columns don't resolve to the target table.
- Attributes
- protected
- def ensuring(cond: (JdbcProfile.QueryBuilder) => Boolean, msg: => Any): JdbcProfile.QueryBuilder
- Implicit
- This member is added by an implicit conversion from JdbcProfile.QueryBuilder toEnsuring[JdbcProfile.QueryBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (JdbcProfile.QueryBuilder) => Boolean): JdbcProfile.QueryBuilder
- Implicit
- This member is added by an implicit conversion from JdbcProfile.QueryBuilder toEnsuring[JdbcProfile.QueryBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): JdbcProfile.QueryBuilder
- Implicit
- This member is added by an implicit conversion from JdbcProfile.QueryBuilder toEnsuring[JdbcProfile.QueryBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): JdbcProfile.QueryBuilder
- Implicit
- This member is added by an implicit conversion from JdbcProfile.QueryBuilder toEnsuring[JdbcProfile.QueryBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def expr(n: Node): Unit
- Definition Classes
- QueryBuilder → InterpolationContext
- final def expr(n: Node, skipParens: Boolean): Unit
- def flattenJoins(s: TermSymbol, n: Node): (Seq[(TermSymbol, Node)], Seq[Node])
- Attributes
- protected
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- val hasPiFunction: Boolean
- Attributes
- protected
- val hasRadDegConversion: Boolean
- Attributes
- protected
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @IntrinsicCandidate() @native()
- implicit def interpolationContext: InterpolationContext
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val joins: HashMap[TermSymbol, Join]
- Attributes
- protected
- val maxFlatBooleanOperands: Int
The maximum number of operands of an
andororthat are rendered as one flat list.The maximum number of operands of an
andororthat are rendered as one flat list. Longer chains are split into a balanced tree of parenthesized groups, so that their nesting depth in the database's SQL parser stays logarithmic (e.g. SQLite limits the expression depth to 1000 and Derby's SQL compiler recurses over it).- Attributes
- protected
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @IntrinsicCandidate() @native()
- val parenthesizeNestedRHSJoin: Boolean
- Attributes
- protected
- val pi: String
- Attributes
- protected
- def quoteIdentifier(s: String): String
- Definition Classes
- QueryBuilder → InterpolationContext
- val quotedJdbcFns: Option[Seq[JdbcFunction]]
- Attributes
- protected
- def scanJoins(from: ConstArray[(TermSymbol, Node)]): Unit
- Attributes
- protected
- final def skipParens: Boolean
- Definition Classes
- QueryBuilder → InterpolationContext
- def sqlBuilder: SQLBuilder
- Definition Classes
- QueryBuilder → InterpolationContext
- val state: CompilerState
- val supportsCast: Boolean
- Attributes
- protected
- val supportsLiteralGroupBy: Boolean
- Attributes
- protected
- val supportsTuples: Boolean
- Attributes
- protected
- val symbolName: SymbolNamer
- Definition Classes
- QueryBuilder → InterpolationContext
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- val tree: Node
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def withSkipParens[U](b: Boolean)(f: => U): U
- Definition Classes
- QueryBuilder → InterpolationContext
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from JdbcProfile.QueryBuilder toStringFormat[JdbcProfile.QueryBuilder] performed by method StringFormat in scala.Predef.
- Definition Classes
- StringFormat
- Annotations
- @deprecated @inline()
- Deprecated
(Since version 2.12.16) Use
formatString.format(value)instead ofvalue.formatted(formatString), or use thef""string interpolator. In Java 15 and later,formattedresolves to the new method in String which has reversed parameters.
- def →[B](y: B): (JdbcProfile.QueryBuilder, B)
- Implicit
- This member is added by an implicit conversion from JdbcProfile.QueryBuilder toArrowAssoc[JdbcProfile.QueryBuilder] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @deprecated
- Deprecated
(Since version 2.13.0) Use
->instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

edit this text on github
Scala Language-Integrated Connection Kit
This is the API documentation for the Slick database library. It should be used as an additional resource to the user manual.
Further documentation for Slick can be found on the documentation pages.
To the slick package list...