AbstractGenerator

slick.codegen.AbstractGenerator
abstract class AbstractGenerator[Code, TermName, TypeName](model: Model) 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).

Attributes

See also:
Source:
AbstractGenerator.scala
Graph
Supertypes
trait GeneratorHelpers[Code, TermName, TypeName]
class Object
trait Matchable
class Any
Known subtypes
Self type
AbstractGenerator[Code, TermName, TypeName]

Members list

Concise view

Basic customization overrides

abstract case class AbstractTableDef(model: Table)

Code generator for table related code

Code generator for table related code

Attributes

model

corresponding Slick meta model component

Source:
AbstractGenerator.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes
Self type
def Table: Table => Table

Table generator factory. Override for customization.

Table generator factory. Override for customization.

Attributes

Source:
AbstractGenerator.scala
def entityName: String => String

Maps database table name to entity case class name

Maps database table name to entity case class name

Attributes

Source:
AbstractGenerator.scala
def tableName: String => String

Maps database table name to Table class and value name

Maps database table name to Table class and value name

Attributes

Source:
AbstractGenerator.scala

Type members

Inherited classlikes

implicit class StringExtensions(val str: String)

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

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

Attributes

Inherited from:
GeneratorHelpers
Source:
AbstractGenerator.scala
Graph
Supertypes
class Object
trait Matchable
class Any

Types

Table generator virtual class

Table generator virtual class

Attributes

Source:
AbstractGenerator.scala

Value members

Inherited methods

def docWithCode(comment: String, code: Code): Code

Assemble doc comment with scala code

Assemble doc comment with scala code

Attributes

Inherited from:
GeneratorHelpers
Source:
AbstractGenerator.scala
def indent(code: String): String

Attributes

Inherited from:
GeneratorHelpers
Source:
AbstractGenerator.scala
def optionType(tpe: Code): Code

Wrap the given type into an Option type

Wrap the given type into an Option type

Attributes

Inherited from:
GeneratorHelpers
Source:
AbstractGenerator.scala
def parseType(tpe: String): Code

Generates code for a qualified Scala type

Generates code for a qualified Scala type

Attributes

Inherited from:
GeneratorHelpers
Source:
AbstractGenerator.scala
protected def termName(name: String): TermName

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

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

Attributes

Inherited from:
GeneratorHelpers
Source:
AbstractGenerator.scala
protected def typeName(name: String): TypeName

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

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

Attributes

Inherited from:
GeneratorHelpers
Source:
AbstractGenerator.scala

Concrete fields

val ddlEnabled: Boolean

Enables DDL Generation.

Enables DDL Generation.

Attributes

Source:
AbstractGenerator.scala
final lazy val tables: Seq[Table]

Table code generators.

Table code generators.

Attributes

Source:
AbstractGenerator.scala
final lazy val tablesByName: Map[QualifiedName, Table]

Table code generators indexed by db table name.

Table code generators indexed by db table name.

Attributes

Source:
AbstractGenerator.scala

Inherited fields

val scalaKeywords: Seq[String]

Words that are reserved keywords in Scala

Words that are reserved keywords in Scala

Attributes

Inherited from:
GeneratorHelpers
Source:
AbstractGenerator.scala

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

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

Attributes

Inherited from:
GeneratorHelpers
Source:
AbstractGenerator.scala

Implicits

Inherited implicits

final implicit def StringExtensions(str: String): StringExtensions

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

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

Attributes

Inherited from:
GeneratorHelpers
Source:
AbstractGenerator.scala