class Dialect[-P <: JdbcProfile] extends AstHelpers
Base class for database dialects. Provides methods that return the dialect-specific SQL strings for performing various database operations. The most important method is perhaps migrateTable, which is called from TableMigration#sql. These methods are to be overridden in database-specific subclasses as needed.
- P
The corresponding Slick driver type. Not used, but may come in handy in certain situations.
- Alphabetic
- By Inheritance
- Dialect
- AstHelpers
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new Dialect()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def +(other: String): String
- def ->[B](y: B): (Dialect[P], B)
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def addColumn(table: TableInfo, column: ColumnInfo): String
- def addColumnWithInitialValue(table: TableInfo, column: ColumnInfo, rawSqlExpr: String): List[String]
- def alterColumnDefault(table: TableInfo, column: ColumnInfo): String
- def alterColumnNullability(table: TableInfo, column: ColumnInfo): String
- def alterColumnType(table: TableInfo, column: ColumnInfo): List[String]
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def autoInc(ci: ColumnInfo): String
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- def colInfo[T <: jdbc.JdbcProfile.Table[_]](table: T)(f: (T) => Rep[_]): ColumnInfo
- Attributes
- protected
- Definition Classes
- AstHelpers
- def columnInfo(driver: JdbcProfile, column: FieldSymbol): ColumnInfo
- driver
a Slick driver, used to extract
ColumnInfo#sqlType
andColumnInfo#notNull
by callingtypeInfoFor
- returns
a
ColumnInfo
representing the relevant information incolumn
- Attributes
- protected
- Definition Classes
- AstHelpers
- def columnList(columns: Seq[FieldSymbol]): String
- def columnSql(ci: ColumnInfo, newTable: Boolean): String
- def columnType(ci: ColumnInfo): String
- def createForeignKey(sourceTable: TableInfo, name: String, sourceColumns: Seq[FieldSymbol], targetTable: TableInfo, targetColumns: Seq[FieldSymbol], onUpdate: ForeignKeyAction, onDelete: ForeignKeyAction): String
- def createIndex(index: IndexInfo): String
- def createPrimaryKey(table: TableInfo, name: String, columns: Seq[FieldSymbol]): String
- def createTable(table: TableInfo, columns: Seq[ColumnInfo]): List[String]
- def dropColumn(table: TableInfo, column: String): List[String]
- def dropConstraint(table: TableInfo, name: String): String
- def dropForeignKey(sourceTable: TableInfo, name: String): String
- def dropIndex(index: IndexInfo): String
- def dropPrimaryKey(table: TableInfo, name: String): String
- def dropTable(table: TableInfo): String
- def ensuring(cond: (Dialect[P]) => Boolean, msg: => Any): Dialect[P]
- def ensuring(cond: (Dialect[P]) => Boolean): Dialect[P]
- def ensuring(cond: Boolean, msg: => Any): Dialect[P]
- def ensuring(cond: Boolean): Dialect[P]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def fieldSym(node: Node): Option[FieldSymbol]
- returns
if
node
represents a reference to a table's column, that is, it is aSelect(_, f: FieldSymbol)
, thenSome(f)
; otherwiseNone
- Attributes
- protected
- Definition Classes
- AstHelpers
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def indexInfo(index: Index): IndexInfo
- returns
an
IndexInfo
containing the relevant information from a SlickIndex
- Attributes
- protected
- Definition Classes
- AstHelpers
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def migrateTable(table: TableInfo, actions: List[Action]): List[String]
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def notNull(ci: ColumnInfo): String
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def primaryKey(ci: ColumnInfo, newTable: Boolean): String
- def quoteIdentifier(id: String): String
- def quoteTableName(t: TableInfo): String
- def quotedColumnNames(ns: Seq[FieldSymbol]): Seq[String]
- Attributes
- protected
- def renameColumn(table: TableInfo, from: ColumnInfo, to: String): String
- def renameColumn(table: TableInfo, from: String, to: String): String
- def renameIndex(old: IndexInfo, newName: String): List[String]
- def renameTable(table: TableInfo, to: String): String
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tableInfo(table: TableNode): TableInfo
- table
a Slick table object whose qualified name is needed
- returns
a
TableInfo
representing the qualified name oftable
- Attributes
- protected
- Definition Classes
- AstHelpers
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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])
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 Dialect[P] toStringFormat[Dialect[P]] 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,formatted
resolves to the new method in String which has reversed parameters.
- def →[B](y: B): (Dialect[P], B)
- Implicit
- This member is added by an implicit conversion from Dialect[P] toArrowAssoc[Dialect[P]] 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.