slick.codegen

Code generator / type providers

Attributes

Members list

Concise view

Type members

Classlikes

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).

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]
abstract class AbstractSourceCodeGenerator(model: Model) extends AbstractGenerator[String, String, String] with StringGeneratorHelpers

Base implementation for a Source code String generator

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
trait GeneratorHelpers[Code, TermName, TypeName]

Helper methods for code generation

Helper methods for code generation

Attributes

Source:
AbstractGenerator.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

Output-related code-generation utilities.

Output-related code-generation utilities.

Attributes

Source:
OutputHelpers.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes

A customizable code generator for working with Slick.

A customizable code generator for working with Slick.

For usage information please see the corresponding part of the Slick documentation.

The implementation is structured into a small hierarchy of sub-generators responsible for different fragments of the complete output. The implementation of each sub-generator can be swapped out for a customized one by overriding the corresponding factory method. SourceCodeGenerator contains a factory method Table, which it uses to generate a sub-generator for each table. The sub-generator Table in turn contains sub-generators for Table classes, entity case classes, columns, key, indices, etc. Custom sub-generators can easily be added as well.

Within the sub-generators the relevant part of the Slick data model can be accessed to drive the code generation.

Of coures it makes sense to integrate this into your build process.

Attributes

model

Slick data model for which code should be generated.

Companion:
object
Source:
SourceCodeGenerator.scala
Graph
Supertypes
class AbstractGenerator[String, String, String]
trait GeneratorHelpers[String, String, String]
class Object
trait Matchable
class Any

A runnable class to execute the code generator without further setup

A runnable class to execute the code generator without further setup

Attributes

Companion:
class
Source:
SourceCodeGenerator.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
trait StringGeneratorHelpers extends GeneratorHelpers[String, String, String]

Attributes

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