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
- Grouped
- Alphabetic
- By Inheritance
- AbstractGenerator
- GeneratorHelpers
- AnyRef
- Any
- by any2stringadd
- by StringFormat
- by Ensuring
- by ArrowAssoc
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AbstractGenerator(model: Model)
Type Members
- abstract type Table <: TableDef
Table generator virtual class
- 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
- 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
- abstract def Table: (model.Table) => Table
Table generator factory.
Table generator factory. Override for customization.
- abstract def docWithCode(comment: String, code: Code): Code
Assemble doc comment with scala code
Assemble doc comment with scala code
- Definition Classes
- GeneratorHelpers
- 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
- abstract def parseType(tpe: String): Code
Generates code for a qualified Scala type
Generates code for a qualified Scala type
- Definition Classes
- GeneratorHelpers
- 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
- 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
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- 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
- 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()
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- val ddlEnabled: Boolean
Enables DDL Generation.
- 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
- 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
- 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
- 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
- def entityName: (String) => String
Maps database table name to entity case class name
- 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()
- def indent(code: String): String
- Definition Classes
- GeneratorHelpers
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- 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()
- val scalaKeywords: Seq[String]
Words that are reserved keywords in Scala
Words that are reserved keywords in Scala
- Definition Classes
- GeneratorHelpers
- 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
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def tableName: (String) => String
Maps database table name to Table class and value name
- final lazy val tables: Seq[Table]
Table code generators.
- final lazy val tablesByName: Map[QualifiedName, Table]
Table code generators indexed by db table name.
- 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 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 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): (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.