class JdbcModelBuilder extends Logging
Build a Slick model from introspecting the JDBC metadata.
In most cases you are better off transforming the generated model instead of overriding functionality here. It is only useful if you need easy access to the JDBC metadata in order to influence how the model is generated. A good use case would be interpreting column types or default values that Slick doesn't understand out of the box. If you just want to remove or hard code some default values, transform the resulting model instead.
The tight coupling can easily lead to source code incompatibilities in future versions. Avoid hooking in here if you don't have to.
- Source
- JdbcModelBuilder.scala
- Grouped
- Alphabetic
- By Inheritance
- JdbcModelBuilder
- Logging
- AnyRef
- Any
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Type Members
- class Builders extends AnyRef
- class ColumnBuilder extends AnyRef
Column model builder.
- class ForeignKeyBuilder extends AnyRef
- class IndexBuilder extends AnyRef
- class PrimaryKeyBuilder extends AnyRef
- class TableBuilder extends AnyRef
Table model builder
- class TableNamer extends AnyRef
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- def ->[B](y: B): (JdbcModelBuilder, B)
- Implicit
- This member is added by an implicit conversion from JdbcModelBuilder toArrowAssoc[JdbcModelBuilder] performed by method ArrowAssoc in scala.Predef.
- Definition Classes
- ArrowAssoc
- Annotations
- @inline()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def buildModel: DBIO[Model]
Creates a Slick data model from jdbc meta data.
Creates a Slick data model from jdbc meta data. Foreign keys pointing out of the given tables are not included.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def createBuilders(tablesByQName: Map[MQName, TableBuilder]): Builders
- def createColumnBuilder(tableBuilder: TableBuilder, meta: MColumn): ColumnBuilder
Column model builder factory.
Column model builder factory. Override for customization.
- def createForeignKeyBuilder(tableBuilder: TableBuilder, meta: Seq[MForeignKey]): ForeignKeyBuilder
- def createIndexBuilder(tableBuilder: TableBuilder, meta: Seq[MIndexInfo]): IndexBuilder
- def createPrimaryKeyBuilder(tableBuilder: TableBuilder, meta: Seq[MPrimaryKey]): PrimaryKeyBuilder
- def createTableBuilder(namer: TableNamer): DBIO[TableBuilder]
Table model builder factory.
Table model builder factory. Override for customization.
- def createTableNamer(meta: MTable): TableNamer
- def ensuring(cond: (JdbcModelBuilder) => Boolean, msg: => Any): JdbcModelBuilder
- Implicit
- This member is added by an implicit conversion from JdbcModelBuilder toEnsuring[JdbcModelBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: (JdbcModelBuilder) => Boolean): JdbcModelBuilder
- Implicit
- This member is added by an implicit conversion from JdbcModelBuilder toEnsuring[JdbcModelBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean, msg: => Any): JdbcModelBuilder
- Implicit
- This member is added by an implicit conversion from JdbcModelBuilder toEnsuring[JdbcModelBuilder] performed by method Ensuring in scala.Predef.
- Definition Classes
- Ensuring
- def ensuring(cond: Boolean): JdbcModelBuilder
- Implicit
- This member is added by an implicit conversion from JdbcModelBuilder toEnsuring[JdbcModelBuilder] 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
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def jdbcTypeToScala(jdbcType: Int, typeName: String = ""): ClassTag[_]
Converts from java.sql.Types w/ type name to the corresponding Java class name (with fully qualified path).
- lazy val logger: SlickLogger
- Attributes
- protected[this]
- Definition Classes
- Logging
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def readColumns(t: MTable): DBIO[Vector[MColumn]]
Read the column metadata for a table in ordinal position order
- def readForeignKeys(t: MTable): DBIO[Seq[Seq[MForeignKey]]]
Read the foreign key metadata for a table grouped by name and in key sequence order
- def readIndices(t: MTable): DBIO[Seq[Seq[MIndexInfo]]]
Read the index metadata grouped by name and in ordinal position order
- def readPrimaryKeys(t: MTable): DBIO[Vector[MPrimaryKey]]
Read the primary key metadata for a table in key sequence order
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- lazy val tableNamers: Seq[TableNamer]
- lazy val tableNamersByQName: Map[MQName, TableNamer]
- 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
- def formatted(fmtstr: String): String
- Implicit
- This member is added by an implicit conversion from JdbcModelBuilder toStringFormat[JdbcModelBuilder] 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): (JdbcModelBuilder, B)
- Implicit
- This member is added by an implicit conversion from JdbcModelBuilder toArrowAssoc[JdbcModelBuilder] 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...