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 any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Basic customization overrides
- class ColumnBuilder extends AnyRef
Column model builder.
- class TableBuilder extends AnyRef
Table model builder
- def createColumnBuilder(tableBuilder: TableBuilder, meta: MColumn): ColumnBuilder
Column model builder factory.
Column model builder factory. Override for customization.
- def createTableBuilder(namer: TableNamer): DBIO[TableBuilder]
Table model builder factory.
Table model builder factory. Override for customization.
Ungrouped
- class Builders extends AnyRef
- class ForeignKeyBuilder extends AnyRef
- class IndexBuilder extends AnyRef
- class PrimaryKeyBuilder extends AnyRef
- class TableNamer extends AnyRef
- 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 createBuilders(tablesByQName: Map[MQName, TableBuilder]): Builders
- 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 createTableNamer(meta: MTable): TableNamer
- 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).
- 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
- lazy val tableNamers: Seq[TableNamer]
- lazy val tableNamersByQName: Map[MQName, TableNamer]
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...