Packages

c

slick.codegen

AbstractGenerator

abstract class AbstractGenerator[Code, TermName, TypeName] extends GeneratorHelpers[Code, TermName, TypeName]

Slick code generator providing the base structure and facilities. It contains a subclass as a generator for Tables, which again contains subclasses for Column, etc. The implementation follows the virtual class pattern, which allows flexible customization by overriding the inner classes (following the pattern).

Self Type
AbstractGenerator[Code, TermName, TypeName]
Source
AbstractGenerator.scala
See also

http://lampwww.epfl.ch/~odersky/papers/ScalableComponent.html

Linear Supertypes
GeneratorHelpers[Code, TermName, TypeName], AnyRef, Any
Type Hierarchy
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. AbstractGenerator
  2. GeneratorHelpers
  3. AnyRef
  4. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new AbstractGenerator(model: Model)

Type Members

  1. abstract type Table <: TableDef

    Table generator virtual class

  2. abstract case class TableDef(model: model.Table) extends Product with Serializable

    Code generator for table related code

    Code generator for table related code

    model

    corresponding Slick meta model component

  3. implicit class StringExtensions extends AnyRef

    Slick code generator string extension methods.

    Slick code generator string extension methods. (Warning: Not unicode-safe, uses String#apply)

    Definition Classes
    GeneratorHelpers

Abstract Value Members

  1. abstract def Table: (model.Table) => Table

    Table generator factory.

    Table generator factory. Override for customization.

  2. abstract def docWithCode(comment: String, code: Code): Code

    Assemble doc comment with scala code

    Assemble doc comment with scala code

    Definition Classes
    GeneratorHelpers
  3. abstract def optionType(tpe: Code): Code

    Wrap the given type into an Option type

    Wrap the given type into an Option type

    Definition Classes
    GeneratorHelpers
  4. abstract def parseType(tpe: String): Code

    Generates code for a qualified Scala type

    Generates code for a qualified Scala type

    Definition Classes
    GeneratorHelpers
  5. abstract def termName(name: String): TermName

    Marks a String as a TermName (e.g.

    Marks a String as a TermName (e.g. for escaping scala keywords)

    Attributes
    protected
    Definition Classes
    GeneratorHelpers
  6. abstract def typeName(name: String): TypeName

    Marks a String as a TypeName (e.g.

    Marks a String as a TypeName (e.g. for escaping scala keywords)

    Attributes
    protected
    Definition Classes
    GeneratorHelpers

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String
    Implicit
    This member is added by an implicit conversion from AbstractGenerator[Code, TermName, TypeName] toany2stringadd[AbstractGenerator[Code, TermName, TypeName]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (AbstractGenerator[Code, TermName, TypeName], B)
    Implicit
    This member is added by an implicit conversion from AbstractGenerator[Code, TermName, TypeName] toArrowAssoc[AbstractGenerator[Code, TermName, TypeName]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. val ddlEnabled: Boolean

    Enables DDL Generation.

  9. def ensuring(cond: (AbstractGenerator[Code, TermName, TypeName]) => Boolean, msg: => Any): AbstractGenerator[Code, TermName, TypeName]
    Implicit
    This member is added by an implicit conversion from AbstractGenerator[Code, TermName, TypeName] toEnsuring[AbstractGenerator[Code, TermName, TypeName]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (AbstractGenerator[Code, TermName, TypeName]) => Boolean): AbstractGenerator[Code, TermName, TypeName]
    Implicit
    This member is added by an implicit conversion from AbstractGenerator[Code, TermName, TypeName] toEnsuring[AbstractGenerator[Code, TermName, TypeName]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: => Any): AbstractGenerator[Code, TermName, TypeName]
    Implicit
    This member is added by an implicit conversion from AbstractGenerator[Code, TermName, TypeName] toEnsuring[AbstractGenerator[Code, TermName, TypeName]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): AbstractGenerator[Code, TermName, TypeName]
    Implicit
    This member is added by an implicit conversion from AbstractGenerator[Code, TermName, TypeName] toEnsuring[AbstractGenerator[Code, TermName, TypeName]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. def entityName: (String) => String

    Maps database table name to entity case class name

  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. def indent(code: String): String
    Definition Classes
    GeneratorHelpers
  19. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  21. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  22. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  23. val scalaKeywords: Seq[String]

    Words that are reserved keywords in Scala

    Words that are reserved keywords in Scala

    Definition Classes
    GeneratorHelpers
  24. val slickTableTermMembersNoArgs: Seq[String]

    Existing term member names in Table[_] that do not take parameters

    Existing term member names in Table[_] that do not take parameters

    Definition Classes
    GeneratorHelpers
  25. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  26. def tableName: (String) => String

    Maps database table name to Table class and value name

  27. final lazy val tables: Seq[Table]

    Table code generators.

  28. final lazy val tablesByName: Map[QualifiedName, Table]

    Table code generators indexed by db table name.

  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated
  2. def formatted(fmtstr: String): String
    Implicit
    This member is added by an implicit conversion from AbstractGenerator[Code, TermName, TypeName] toStringFormat[AbstractGenerator[Code, TermName, TypeName]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @deprecated @inline()
    Deprecated

    (Since version 2.12.16) Use formatString.format(value) instead of value.formatted(formatString), or use the f"" string interpolator. In Java 15 and later, formatted resolves to the new method in String which has reversed parameters.

  3. def [B](y: B): (AbstractGenerator[Code, TermName, TypeName], B)
    Implicit
    This member is added by an implicit conversion from AbstractGenerator[Code, TermName, TypeName] toArrowAssoc[AbstractGenerator[Code, TermName, TypeName]] 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.

Inherited from GeneratorHelpers[Code, TermName, TypeName]

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd fromAbstractGenerator[Code, TermName, TypeName] to any2stringadd[AbstractGenerator[Code, TermName, TypeName]]

Inherited by implicit conversion StringFormat fromAbstractGenerator[Code, TermName, TypeName] to StringFormat[AbstractGenerator[Code, TermName, TypeName]]

Inherited by implicit conversion Ensuring fromAbstractGenerator[Code, TermName, TypeName] to Ensuring[AbstractGenerator[Code, TermName, TypeName]]

Inherited by implicit conversion ArrowAssoc fromAbstractGenerator[Code, TermName, TypeName] to ArrowAssoc[AbstractGenerator[Code, TermName, TypeName]]

Basic customization overrides

Ungrouped