scala.slick.driver.JdbcModelComponent

ModelBuilder

class ModelBuilder extends AnyRef

Build a Slick model from introspecting the jdbc meta data. Similar to SlickCodeGenerator, this is implemented as nested classes, which allow hooking into the behavior by overriding methods. This comes at the price of very tight coupling. In most cases you are better of transforming the generated model instead of overriding functionality here. It is only useful, if you need easy access to the jdbc meta data in order to influence how the model is generated. A good use case would be interpreting column types or default values Slick doesn't understand out of the box. If you just want to remove or hard code some default values, just transform the resulting model instead.

The tight coupling can easily lead to sorce code incompatibilities in future versions. Avoid hooking in here if you don't have to.

Source
JdbcModelComponent.scala
Linear Supertypes
AnyRef, Any
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Grouped
  2. Alphabetic
  3. By inheritance
Inherited
  1. ModelBuilder
  2. AnyRef
  3. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ModelBuilder(mTables: Seq[MTable])(implicit session: SessionDef)

    workaround for https://issues.

    workaround for https://issues.scala-lang.org/browse/SI-7769 sets default value for ignoreInvalidDefaults to true

  2. new ModelBuilder(mTables: Seq[MTable], ignoreInvalidDefaults: Boolean)(implicit session: SessionDef)

    ignoreInvalidDefaults

    see ModelBuilder#Table#Column#default

Type Members

  1. class Table extends AnyRef

    Table model builder

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from JdbcDriver.ModelBuilder to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (JdbcDriver.ModelBuilder, B)

    Implicit information
    This member is added by an implicit conversion from JdbcDriver.ModelBuilder to ArrowAssoc[JdbcDriver.ModelBuilder] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. def Table: (MTable) ⇒ Table

    Table model builder factory.

    Table model builder factory. Override for customization.

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. def ensuring(cond: (JdbcDriver.ModelBuilder) ⇒ Boolean, msg: ⇒ Any): JdbcDriver.ModelBuilder

    Implicit information
    This member is added by an implicit conversion from JdbcDriver.ModelBuilder to Ensuring[JdbcDriver.ModelBuilder] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: (JdbcDriver.ModelBuilder) ⇒ Boolean): JdbcDriver.ModelBuilder

    Implicit information
    This member is added by an implicit conversion from JdbcDriver.ModelBuilder to Ensuring[JdbcDriver.ModelBuilder] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def ensuring(cond: Boolean, msg: ⇒ Any): JdbcDriver.ModelBuilder

    Implicit information
    This member is added by an implicit conversion from JdbcDriver.ModelBuilder to Ensuring[JdbcDriver.ModelBuilder] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: Boolean): JdbcDriver.ModelBuilder

    Implicit information
    This member is added by an implicit conversion from JdbcDriver.ModelBuilder to Ensuring[JdbcDriver.ModelBuilder] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  17. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  18. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from JdbcDriver.ModelBuilder to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  19. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  20. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  21. def includeJdbcMetaData: Boolean

    currently unused

  22. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  23. def jdbcTypeToScala(jdbcType: Int): ClassTag[_]

    Converts from java.

    Converts from java.sql.Types to the corresponding Java class name (with fully qualified path).

  24. final lazy val logger: SlickLogger

  25. def model: 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.

  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  30. final lazy val tables: Seq[Table]

    Table model builders

  31. final lazy val tablesByMQName: Map[MQName, Table]

    Table model builders indexed by meta data qualified name

  32. def toString(): String

    Definition Classes
    AnyRef → Any
  33. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. def [B](y: B): (JdbcDriver.ModelBuilder, B)

    Implicit information
    This member is added by an implicit conversion from JdbcDriver.ModelBuilder to ArrowAssoc[JdbcDriver.ModelBuilder] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from JdbcDriver.ModelBuilder to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (modelBuilder: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from JdbcDriver.ModelBuilder to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (modelBuilder: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: JdbcDriver.ModelBuilder

    Implicit information
    This member is added by an implicit conversion from JdbcDriver.ModelBuilder to ArrowAssoc[JdbcDriver.ModelBuilder] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (modelBuilder: ArrowAssoc[JdbcDriver.ModelBuilder]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: JdbcDriver.ModelBuilder

    Implicit information
    This member is added by an implicit conversion from JdbcDriver.ModelBuilder to Ensuring[JdbcDriver.ModelBuilder] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (modelBuilder: Ensuring[JdbcDriver.ModelBuilder]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from JdbcDriver.ModelBuilder to StringAdd

Inherited by implicit conversion any2stringfmt from JdbcDriver.ModelBuilder to StringFormat

Inherited by implicit conversion any2ArrowAssoc from JdbcDriver.ModelBuilder to ArrowAssoc[JdbcDriver.ModelBuilder]

Inherited by implicit conversion any2Ensuring from JdbcDriver.ModelBuilder to Ensuring[JdbcDriver.ModelBuilder]

Basic customization overrides

Ungrouped