AbstractSourceCodeGenerator

slick.codegen.AbstractSourceCodeGenerator
abstract class AbstractSourceCodeGenerator(model: Model) extends AbstractGenerator[String, String, String] with StringGeneratorHelpers

Base implementation for a Source code String generator

Attributes

Source:
AbstractSourceCodeGenerator.scala
Graph
Supertypes
class AbstractGenerator[String, String, String]
trait GeneratorHelpers[String, String, String]
class Object
trait Matchable
class Any
Known subtypes

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

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

Table generator factory. Override for customization.

Table generator factory. Override for customization.

Attributes

Inherited from:
AbstractGenerator
Source:
AbstractGenerator.scala
def code: String

Generates code for the complete model (not wrapped in a package yet)

Generates code for the complete model (not wrapped in a package yet)

Attributes

Source:
AbstractSourceCodeGenerator.scala
def codeForContainer: String

Generates code for the container class (not wrapped in a package yet)

Generates code for the container class (not wrapped in a package yet)

Attributes

Source:
AbstractSourceCodeGenerator.scala
def codeForDDL: String

Generates code for the DDL statement.

Generates code for the DDL statement.

Attributes

Source:
AbstractSourceCodeGenerator.scala
def codePerTable: Map[String, String]

Generates a map that associates the table name with its generated code (not wrapped in a package yet).

Generates a map that associates the table name with its generated code (not wrapped in a package yet).

Attributes

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

Maps database table name to entity case class name

Maps database table name to entity case class name

Attributes

Inherited from:
AbstractGenerator
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

Inherited from:
AbstractGenerator
Source:
AbstractGenerator.scala

Type members

Classlikes

abstract class AbstractSourceCodeTableDef(model: Table) extends AbstractTableDef

Attributes

Source:
AbstractSourceCodeGenerator.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Known subtypes

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

Inherited types

Table generator virtual class

Table generator virtual class

Attributes

Inherited from:
AbstractGenerator
Source:
AbstractGenerator.scala

Value members

Concrete methods

def foreignKeysPerTable: Map[String, List[String]]
protected def tuple(i: Int): String

Inherited methods

def docWithCode(doc: String, code: String): String

Assemble doc comment with scala code

Assemble doc comment with scala code

Attributes

Inherited from:
StringGeneratorHelpers
Source:
AbstractSourceCodeGenerator.scala
def indent(code: String): String

Attributes

Inherited from:
GeneratorHelpers
Source:
AbstractGenerator.scala
final def optionType(t: String): String

Wrap the given type into an Option type

Wrap the given type into an Option type

Attributes

Inherited from:
StringGeneratorHelpers
Source:
AbstractSourceCodeGenerator.scala
def parseType(tpe: String): String

Generates code for a qualified Scala type

Generates code for a qualified Scala type

Attributes

Inherited from:
StringGeneratorHelpers
Source:
AbstractSourceCodeGenerator.scala
def shouldQuoteIdentifier(s: String): Boolean
def termName(name: String): String

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:
StringGeneratorHelpers
Source:
AbstractSourceCodeGenerator.scala
def typeName(name: String): String

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:
StringGeneratorHelpers
Source:
AbstractSourceCodeGenerator.scala

Inherited fields

val ddlEnabled: Boolean

Enables DDL Generation.

Enables DDL Generation.

Attributes

Inherited from:
AbstractGenerator
Source:
AbstractGenerator.scala
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
final lazy val tables: Seq[Table]

Table code generators.

Table code generators.

Attributes

Inherited from:
AbstractGenerator
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

Inherited from:
AbstractGenerator
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